artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eebb070
)
X509_GET_PUBKEY(3) return value check in libcrypto
author
inoguchi
<inoguchi@openbsd.org>
Sat, 22 Jan 2022 00:31:23 +0000
(
00:31
+0000)
committer
inoguchi
<inoguchi@openbsd.org>
Sat, 22 Jan 2022 00:31:23 +0000
(
00:31
+0000)
ok beck@ tb@
lib/libcrypto/ocsp/ocsp_lib.c
patch
|
blob
|
history
diff --git
a/lib/libcrypto/ocsp/ocsp_lib.c
b/lib/libcrypto/ocsp/ocsp_lib.c
index
8081a1c
..
09bccc0
100644
(file)
--- a/
lib/libcrypto/ocsp/ocsp_lib.c
+++ b/
lib/libcrypto/ocsp/ocsp_lib.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: ocsp_lib.c,v 1.2
4 2022/01/07 09:45:52 tb
Exp $ */
+/* $OpenBSD: ocsp_lib.c,v 1.2
5 2022/01/22 00:31:23 inoguchi
Exp $ */
/* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL
* project. */
@@
-96,7
+96,9
@@
OCSP_cert_to_id(const EVP_MD *dgst, const X509 *subject, const X509 *issuer)
iname = X509_get_subject_name(issuer);
serial = NULL;
}
- ikey = X509_get0_pubkey_bitstr(issuer);
+ if ((ikey = X509_get0_pubkey_bitstr(issuer)) == NULL)
+ return NULL;
+
return OCSP_cert_id_new(dgst, iname, ikey, serial);
}