]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
ossl_pw_get_passphrase: No ui method does not necessarily mean internal error
authorTomas Mraz <tomas@openssl.org>
Wed, 23 Jun 2021 11:52:10 +0000 (13:52 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 24 Jun 2021 13:26:56 +0000 (15:26 +0200)
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15878)

crypto/passphrase.c

index 170374f9d9cf2ed6a184695632ffa877394f389a..5fb77756c5c377f5cd9f7368d0df36c88316a9b8 100644 (file)
@@ -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;
     }