diff options
| author | job <> | 2023-01-24 09:48:57 +0000 |
|---|---|---|
| committer | job <> | 2023-01-24 09:48:57 +0000 |
| commit | e859c316f610e7693e0526533700da423b364a09 (patch) | |
| tree | 783f25267b7f2d511ad70c4911a2ec828191aac8 /src | |
| parent | 349332a10007a3f74d6cb7919c689d41d208098e (diff) | |
| download | openbsd-e859c316f610e7693e0526533700da423b364a09.tar.gz openbsd-e859c316f610e7693e0526533700da423b364a09.tar.bz2 openbsd-e859c316f610e7693e0526533700da423b364a09.zip | |
Check return value of X509_digest
OK tb@
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/pkcs12/p12_crt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_crt.c b/src/lib/libcrypto/pkcs12/p12_crt.c index 79e21d9b92..8655be108e 100644 --- a/src/lib/libcrypto/pkcs12/p12_crt.c +++ b/src/lib/libcrypto/pkcs12/p12_crt.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p12_crt.c,v 1.21 2022/11/12 13:03:28 beck Exp $ */ | 1 | /* $OpenBSD: p12_crt.c,v 1.22 2023/01/24 09:48:57 job 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. | 3 | * project. |
| 4 | */ | 4 | */ |
| @@ -113,7 +113,8 @@ PKCS12_create(const char *pass, const char *name, EVP_PKEY *pkey, X509 *cert, | |||
| 113 | if (pkey && cert) { | 113 | if (pkey && cert) { |
| 114 | if (!X509_check_private_key(cert, pkey)) | 114 | if (!X509_check_private_key(cert, pkey)) |
| 115 | return NULL; | 115 | return NULL; |
| 116 | X509_digest(cert, EVP_sha1(), keyid, &keyidlen); | 116 | if (!X509_digest(cert, EVP_sha1(), keyid, &keyidlen)) |
| 117 | return NULL; | ||
| 117 | } | 118 | } |
| 118 | 119 | ||
| 119 | if (cert) { | 120 | if (cert) { |
