diff options
author | inoguchi <> | 2022-01-22 00:36:46 +0000 |
---|---|---|
committer | inoguchi <> | 2022-01-22 00:36:46 +0000 |
commit | 82c2915a4ef786e8c35c893eeb49a303ae7ee490 (patch) | |
tree | 491cb2785cf22a220eae8e2bf41c9d73461367ee /src | |
parent | 37f9c924dfb51feb0b51e0445d8f00d9818d9381 (diff) | |
download | openbsd-82c2915a4ef786e8c35c893eeb49a303ae7ee490.tar.gz openbsd-82c2915a4ef786e8c35c893eeb49a303ae7ee490.tar.bz2 openbsd-82c2915a4ef786e8c35c893eeb49a303ae7ee490.zip |
X509_GET_PUBKEY(3) return value check in libcrypto
CID 345116
ok beck@ tb@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/x509/x509_vfy.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c index cf92c10299..9a929963f3 100644 --- a/src/lib/libcrypto/x509/x509_vfy.c +++ b/src/lib/libcrypto/x509/x509_vfy.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_vfy.c,v 1.100 2021/11/26 13:17:09 schwarze Exp $ */ | 1 | /* $OpenBSD: x509_vfy.c,v 1.101 2022/01/22 00:36:46 inoguchi Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -2096,7 +2096,8 @@ X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain) | |||
2096 | 2096 | ||
2097 | /* first, populate the other certs */ | 2097 | /* first, populate the other certs */ |
2098 | for (j = i - 1; j >= 0; j--) { | 2098 | for (j = i - 1; j >= 0; j--) { |
2099 | ktmp2 = X509_get0_pubkey(sk_X509_value(chain, j)); | 2099 | if ((ktmp2 = X509_get0_pubkey(sk_X509_value(chain, j))) == NULL) |
2100 | return 0; | ||
2100 | if (!EVP_PKEY_copy_parameters(ktmp2, ktmp)) | 2101 | if (!EVP_PKEY_copy_parameters(ktmp2, ktmp)) |
2101 | return 0; | 2102 | return 0; |
2102 | } | 2103 | } |