aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/pkcs12/p12_crt.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/pkcs12/p12_crt.c')
-rw-r--r--crypto/pkcs12/p12_crt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/pkcs12/p12_crt.c b/crypto/pkcs12/p12_crt.c
index d43dc3b30cf3..bfcae3f697e9 100644
--- a/crypto/pkcs12/p12_crt.c
+++ b/crypto/pkcs12/p12_crt.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -62,7 +62,8 @@ PKCS12 *PKCS12_create(const char *pass, const char *name, EVP_PKEY *pkey, X509 *
if (pkey && cert) {
if (!X509_check_private_key(cert, pkey))
return NULL;
- X509_digest(cert, EVP_sha1(), keyid, &keyidlen);
+ if (!X509_digest(cert, EVP_sha1(), keyid, &keyidlen))
+ return NULL;
}
if (cert) {