diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-06-23 13:52:10 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-06-24 15:26:56 +0200 |
commit | e30b254b63a6947284683f94be5929e7f4b21279 (patch) | |
tree | 7e62fc3db5abb1ed74e59e71145335c659543a6c /crypto/passphrase.c | |
parent | 77072e274925d26da3a17378e4794dc11f43ace4 (diff) |
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)
Diffstat (limited to 'crypto/passphrase.c')
-rw-r--r-- | crypto/passphrase.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/passphrase.c b/crypto/passphrase.c index 170374f9d9..5fb77756c5 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; } |