summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbeck <>2021-08-29 17:13:15 +0000
committerbeck <>2021-08-29 17:13:15 +0000
commitc76670890900dadb631c27f0e0c40d5aa8cb03f5 (patch)
tree73027dcb5f8f0d8781afed430ec2179aada701e7 /src
parent8e92a8bca9ebc02e6ff1164c9b1749f3e0e31a0a (diff)
downloadopenbsd-c76670890900dadb631c27f0e0c40d5aa8cb03f5.tar.gz
openbsd-c76670890900dadb631c27f0e0c40d5aa8cb03f5.tar.bz2
openbsd-c76670890900dadb631c27f0e0c40d5aa8cb03f5.zip
Don't call the verify callback twice on success.
This fixes a problem in the perl regress where it notices the callback is called twice and complains. ok tb@ bluhm@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/x509/x509_verify.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/x509_verify.c b/src/lib/libcrypto/x509/x509_verify.c
index 68dd2863a7..051a04c1be 100644
--- a/src/lib/libcrypto/x509/x509_verify.c
+++ b/src/lib/libcrypto/x509/x509_verify.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_verify.c,v 1.44 2021/08/28 15:22:42 beck Exp $ */ 1/* $OpenBSD: x509_verify.c,v 1.45 2021/08/29 17:13:15 beck Exp $ */
2/* 2/*
3 * Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2020-2021 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -659,7 +659,6 @@ x509_verify_build_chains(struct x509_verify_ctx *ctx, X509 *cert,
659 ctx->xsc->error = X509_V_OK; 659 ctx->xsc->error = X509_V_OK;
660 ctx->xsc->error_depth = depth; 660 ctx->xsc->error_depth = depth;
661 ctx->xsc->current_cert = cert; 661 ctx->xsc->current_cert = cert;
662 (void) ctx->xsc->verify_cb(1, ctx->xsc);
663 } 662 }
664 } else if (ctx->error_depth == depth) { 663 } else if (ctx->error_depth == depth) {
665 if (!x509_verify_ctx_set_xsc_chain(ctx, current_chain, 0, 0)) 664 if (!x509_verify_ctx_set_xsc_chain(ctx, current_chain, 0, 0))