diff options
| author | beck <> | 2021-08-29 17:13:15 +0000 |
|---|---|---|
| committer | beck <> | 2021-08-29 17:13:15 +0000 |
| commit | f9a1f301d09203a9502b89510114c776bc4f12bf (patch) | |
| tree | 73027dcb5f8f0d8781afed430ec2179aada701e7 /src | |
| parent | 20d8e3c789694ae0bef3350820e0fb7482d77b72 (diff) | |
| download | openbsd-f9a1f301d09203a9502b89510114c776bc4f12bf.tar.gz openbsd-f9a1f301d09203a9502b89510114c776bc4f12bf.tar.bz2 openbsd-f9a1f301d09203a9502b89510114c776bc4f12bf.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.c | 3 |
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)) |
