ossl_pw_get_passphrase: No ui method does not necessarily mean internal error

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15878)
This commit is contained in:
Tomas Mraz 2021-06-23 13:52:10 +02:00
parent 77072e2749
commit e30b254b63

View File

@ -262,7 +262,8 @@ int ossl_pw_get_passphrase(char *pass, size_t pass_size, size_t *pass_len,
} }
if (ui_method == NULL) { 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; return 0;
} }