From: Tomas Mraz Date: Wed, 23 Jun 2021 11:52:10 +0000 (+0200) Subject: ossl_pw_get_passphrase: No ui method does not necessarily mean internal error X-Git-Tag: openssl-3.0.0-beta2~220 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e30b254b63a6947284683f94be5929e7f4b21279;p=thirdparty%2Fopenssl.git ossl_pw_get_passphrase: No ui method does not necessarily mean internal error Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15878) --- diff --git a/crypto/passphrase.c b/crypto/passphrase.c index 170374f9d9c..5fb77756c5c 100644 --- a/crypto/passphrase.c +++ b/crypto/passphrase.c @@ -262,7 +262,8 @@ int ossl_pw_get_passphrase(char *pass, size_t pass_size, size_t *pass_len, } if (ui_method == NULL) { - ERR_raise(ERR_LIB_CRYPTO, ERR_R_INTERNAL_ERROR); + ERR_raise_data(ERR_LIB_CRYPTO, ERR_R_PASSED_INVALID_ARGUMENT, + "No password method specified"); return 0; }