diff options
author | Kinichiro Inoguchi <inoguchi@cvs.openbsd.org> | 2022-01-22 00:30:00 +0000 |
---|---|---|
committer | Kinichiro Inoguchi <inoguchi@cvs.openbsd.org> | 2022-01-22 00:30:00 +0000 |
commit | ea2d8150cfea72686cba0605e8869997fdcd4fd9 (patch) | |
tree | 0f3ca201b54fb740e5c5e0ca26168fb7542bae0b /lib/libcrypto | |
parent | 230ab49529ddbfa675a327f8f4419d2b4f19e699 (diff) |
X509_GET_PUBKEY(3) return value check in libcrypto
ok beck@ tb@
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/ct/ct_sct.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libcrypto/ct/ct_sct.c b/lib/libcrypto/ct/ct_sct.c index 9ba7c4b5cb5..a05b0f92a25 100644 --- a/lib/libcrypto/ct/ct_sct.c +++ b/lib/libcrypto/ct/ct_sct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ct_sct.c,v 1.7 2021/12/18 16:34:52 tb Exp $ */ +/* $OpenBSD: ct_sct.c,v 1.8 2022/01/22 00:29:59 inoguchi Exp $ */ /* * Written by Rob Stradling (rob@comodo.com), Stephen Henson (steve@openssl.org) * and Adam Eijdenberg (adam.eijdenberg@gmail.com) for the OpenSSL project 2016. @@ -411,7 +411,8 @@ SCT_validate(SCT *sct, const CT_POLICY_EVAL_CTX *ctx) goto end; } - issuer_pkey = X509_get0_pubkey(ctx->issuer); + if ((issuer_pkey = X509_get0_pubkey(ctx->issuer)) == NULL) + goto err; if (X509_PUBKEY_set(&pub, issuer_pkey) != 1) goto err; |