diff options
author | inoguchi <> | 2022-01-22 00:31:23 +0000 |
---|---|---|
committer | inoguchi <> | 2022-01-22 00:31:23 +0000 |
commit | f681a5a63acd72d47e3469699cb30955a22010f0 (patch) | |
tree | 193c4663332ece3581aa23238092f0e0bac47e52 /src/lib/libcrypto/ocsp/ocsp_lib.c | |
parent | 7ee0568b0b9f8ec4acb3415f7e0df79b2fb0d8e8 (diff) | |
download | openbsd-f681a5a63acd72d47e3469699cb30955a22010f0.tar.gz openbsd-f681a5a63acd72d47e3469699cb30955a22010f0.tar.bz2 openbsd-f681a5a63acd72d47e3469699cb30955a22010f0.zip |
X509_GET_PUBKEY(3) return value check in libcrypto
ok beck@ tb@
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_lib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ocsp/ocsp_lib.c b/src/lib/libcrypto/ocsp/ocsp_lib.c index 8081a1ce85..09bccc0cfd 100644 --- a/src/lib/libcrypto/ocsp/ocsp_lib.c +++ b/src/lib/libcrypto/ocsp/ocsp_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ocsp_lib.c,v 1.24 2022/01/07 09:45:52 tb Exp $ */ | 1 | /* $OpenBSD: ocsp_lib.c,v 1.25 2022/01/22 00:31:23 inoguchi Exp $ */ |
2 | /* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL | 2 | /* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL |
3 | * project. */ | 3 | * project. */ |
4 | 4 | ||
@@ -96,7 +96,9 @@ OCSP_cert_to_id(const EVP_MD *dgst, const X509 *subject, const X509 *issuer) | |||
96 | iname = X509_get_subject_name(issuer); | 96 | iname = X509_get_subject_name(issuer); |
97 | serial = NULL; | 97 | serial = NULL; |
98 | } | 98 | } |
99 | ikey = X509_get0_pubkey_bitstr(issuer); | 99 | if ((ikey = X509_get0_pubkey_bitstr(issuer)) == NULL) |
100 | return NULL; | ||
101 | |||
100 | return OCSP_cert_id_new(dgst, iname, ikey, serial); | 102 | return OCSP_cert_id_new(dgst, iname, ikey, serial); |
101 | } | 103 | } |
102 | 104 | ||