summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/x509/x509_verify.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_verify.c b/src/lib/libcrypto/x509/x509_verify.c
index a5b41afb85..0297fac145 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.26 2021/01/05 16:45:59 jsing Exp $ */ 1/* $OpenBSD: x509_verify.c,v 1.27 2021/01/05 16:53:10 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2020 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2020 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -540,6 +540,9 @@ x509_verify_build_chains(struct x509_verify_ctx *ctx, X509 *cert,
540 (void) ctx->xsc->verify_cb(1, ctx->xsc); 540 (void) ctx->xsc->verify_cb(1, ctx->xsc);
541 } 541 }
542 } else if (ctx->error_depth == depth && !ctx->dump_chain) { 542 } else if (ctx->error_depth == depth && !ctx->dump_chain) {
543 if (depth == 0 &&
544 ctx->error == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY)
545 ctx->error = X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE;
543 (void) x509_verify_cert_error(ctx, cert, depth, 546 (void) x509_verify_cert_error(ctx, cert, depth,
544 ctx->error, 0); 547 ctx->error, 0);
545 } 548 }