diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-05-11 15:51:34 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-11-19 11:36:02 +0100 |
commit | 61dd4168f5d98cd914a65b7357e4df06a65693ab (patch) | |
tree | 18327e5b73226542f3316e9ae0ceddb0e10a71d4 /crypto | |
parent | 3a6df6bd5cf64005682da6ec18ef58b929baa452 (diff) |
Allow for PKCS#12 input without MAC in p12_kiss.c and e_loader_attic.c
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/4930)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/pkcs12/p12_kiss.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/pkcs12/p12_kiss.c b/crypto/pkcs12/p12_kiss.c index 894520be39..9b2e8a55c5 100644 --- a/crypto/pkcs12/p12_kiss.c +++ b/crypto/pkcs12/p12_kiss.c @@ -58,7 +58,8 @@ int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, */ if (pass == NULL || *pass == '\0') { - if (PKCS12_verify_mac(p12, NULL, 0)) + if (!PKCS12_mac_present(p12) + || PKCS12_verify_mac(p12, NULL, 0)) pass = NULL; else if (PKCS12_verify_mac(p12, "", 0)) pass = ""; |