]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
apps/pkcs12: Do not prompt for password in case -nomac and -noenc/-nodes
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Mon, 11 May 2020 13:48:52 +0000 (15:48 +0200)
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>
Thu, 19 Nov 2020 10:36:02 +0000 (11:36 +0100)
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/4930)

apps/pkcs12.c

index 2c4e11a4102d692fc5d6ef1e095ac5673850ffea..67da0823906c6bd018f6c64b5489cc27e7d448f9 100644 (file)
@@ -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