From: Richard Levitte Date: Mon, 3 May 2021 06:48:07 +0000 (+0200) Subject: APPS: Set a default passphrase UI for the "ec" command X-Git-Tag: openssl-3.0.0-alpha16~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49ce00374030c74f527c9916bff7c2c7268f4318;p=thirdparty%2Fopenssl.git APPS: Set a default passphrase UI for the "ec" command Fixes #15114 Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/15119) --- diff --git a/apps/ec.c b/apps/ec.c index 5103838da03..f8f77dd492a 100644 --- a/apps/ec.c +++ b/apps/ec.c @@ -267,7 +267,10 @@ int ec_main(int argc, char **argv) NULL); if (enc != NULL) { OSSL_ENCODER_CTX_set_cipher(ectx, EVP_CIPHER_name(enc), NULL); + /* Default passphrase prompter */ + OSSL_ENCODER_CTX_set_passphrase_ui(ectx, get_ui_method(), NULL); if (passout != NULL) + /* When passout given, override the passphrase prompter */ OSSL_ENCODER_CTX_set_passphrase(ectx, (const unsigned char *)passout, strlen(passout));