summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2021-01-05 16:53:10 +0000
committerjsing <>2021-01-05 16:53:10 +0000
commit6c7a19527207c9facce4fe2c51bab20e5ccf1ceb (patch)
tree06b6bac6b6b2beb86e63301e9cdf7a34a39c2728 /src
parent90ef40ae9d614b7e8df22be569d2596374073170 (diff)
downloadopenbsd-6c7a19527207c9facce4fe2c51bab20e5ccf1ceb.tar.gz
openbsd-6c7a19527207c9facce4fe2c51bab20e5ccf1ceb.tar.bz2
openbsd-6c7a19527207c9facce4fe2c51bab20e5ccf1ceb.zip
Handle X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE in new verifier.
Yet another mostly meaningless error value... Noted by and ok tb@
Diffstat (limited to 'src')
-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 }