summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/pkcs12/p12_decr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_decr.c b/src/lib/libcrypto/pkcs12/p12_decr.c
index 8466e92415..3090781eba 100644
--- a/src/lib/libcrypto/pkcs12/p12_decr.c
+++ b/src/lib/libcrypto/pkcs12/p12_decr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_decr.c,v 1.27 2025/05/10 05:54:38 tb Exp $ */ 1/* $OpenBSD: p12_decr.c,v 1.28 2026/01/27 14:03:01 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -130,6 +130,11 @@ PKCS12_item_decrypt_d2i(const X509_ALGOR *algor, const ASN1_ITEM *it,
130 void *ret; 130 void *ret;
131 int outlen; 131 int outlen;
132 132
133 if (oct == NULL) {
134 PKCS12error(ERR_R_PASSED_NULL_PARAMETER);
135 return NULL;
136 }
137
133 if (!PKCS12_pbe_crypt(algor, pass, passlen, oct->data, oct->length, 138 if (!PKCS12_pbe_crypt(algor, pass, passlen, oct->data, oct->length,
134 &out, &outlen, 0)) { 139 &out, &outlen, 0)) {
135 PKCS12error(PKCS12_R_PKCS12_PBE_CRYPT_ERROR); 140 PKCS12error(PKCS12_R_PKCS12_PBE_CRYPT_ERROR);