From b84965aff0451dd914d54d3fbb6b9d347e1cd947 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Mon, 11 May 2020 15:48:52 +0200 Subject: [PATCH] apps/pkcs12: Do not prompt for password in case -nomac and -noenc/-nodes Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/4930) --- apps/pkcs12.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/pkcs12.c b/apps/pkcs12.c index 2c4e11a4102..67da0823906 100644 --- a/apps/pkcs12.c +++ b/apps/pkcs12.c @@ -573,7 +573,7 @@ int pkcs12_main(int argc, char **argv) if (add_lmk && key != NULL) EVP_PKEY_add1_attr_by_NID(key, NID_LocalKeySet, 0, NULL, -1); - if (!noprompt) { + if (!noprompt && !(enc == NULL && maciter == -1)) { /* To avoid bit rot */ if (1) { #ifndef OPENSSL_NO_UI_CONSOLE -- 2.47.2