summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2026-04-25 10:54:30 +0000
committertb <>2026-04-25 10:54:30 +0000
commit7e7d161332b52626dc0726b3ad604fb2221b29b1 (patch)
tree0f4cfd337d6b1f30495290c7926f4a5c5a1c51ef /src/lib
parent7da630bada4c36b6af5653af0d898894545e22d7 (diff)
downloadopenbsd-7e7d161332b52626dc0726b3ad604fb2221b29b1.tar.gz
openbsd-7e7d161332b52626dc0726b3ad604fb2221b29b1.tar.bz2
openbsd-7e7d161332b52626dc0726b3ad604fb2221b29b1.zip
pkcs7: drop silly use of i in PKCS7_dataVerify()
ok jsing kenjiro
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/pkcs7/pk7_doit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libcrypto/pkcs7/pk7_doit.c b/src/lib/libcrypto/pkcs7/pk7_doit.c
index 8f788a3c5d..c999cbef2b 100644
--- a/src/lib/libcrypto/pkcs7/pk7_doit.c
+++ b/src/lib/libcrypto/pkcs7/pk7_doit.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: pk7_doit.c,v 1.66 2026/04/25 10:53:13 tb Exp $ */ 1/* $OpenBSD: pk7_doit.c,v 1.67 2026/04/25 10:54:30 tb 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 *
@@ -917,9 +917,9 @@ PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx, BIO *bio,
917 PKCS7 *p7, PKCS7_SIGNER_INFO *si) 917 PKCS7 *p7, PKCS7_SIGNER_INFO *si)
918{ 918{
919 PKCS7_ISSUER_AND_SERIAL *ias; 919 PKCS7_ISSUER_AND_SERIAL *ias;
920 int ret = 0, i;
921 STACK_OF(X509) *cert; 920 STACK_OF(X509) *cert;
922 X509 *x509; 921 X509 *x509;
922 int ret = 0;
923 923
924 if (p7 == NULL) { 924 if (p7 == NULL) {
925 PKCS7error(PKCS7_R_INVALID_NULL_POINTER); 925 PKCS7error(PKCS7_R_INVALID_NULL_POINTER);
@@ -959,8 +959,7 @@ PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx, BIO *bio,
959 X509_STORE_CTX_cleanup(ctx); 959 X509_STORE_CTX_cleanup(ctx);
960 goto err; 960 goto err;
961 } 961 }
962 i = X509_verify_cert(ctx); 962 if (X509_verify_cert(ctx) <= 0) {
963 if (i <= 0) {
964 PKCS7error(ERR_R_X509_LIB); 963 PKCS7error(ERR_R_X509_LIB);
965 X509_STORE_CTX_cleanup(ctx); 964 X509_STORE_CTX_cleanup(ctx);
966 goto err; 965 goto err;