summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbeck <>2020-09-15 13:34:56 +0000
committerbeck <>2020-09-15 13:34:56 +0000
commit2c1ca37eff900a425e6e7151e749b765ec71eef5 (patch)
tree2667a6e8785d57c4397f9176632cecc470adb60a /src
parent4abed603e66e229dd22adefec8520b9a472ed533 (diff)
downloadopenbsd-2c1ca37eff900a425e6e7151e749b765ec71eef5.tar.gz
openbsd-2c1ca37eff900a425e6e7151e749b765ec71eef5.tar.bz2
openbsd-2c1ca37eff900a425e6e7151e749b765ec71eef5.zip
set error_depth and current_cert to make more legacy callbacks that don't check
happy ok tb@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/x509/x509_verify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_verify.c b/src/lib/libcrypto/x509/x509_verify.c
index c3280774f9..8b12f18bfb 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.7 2020/09/15 11:55:14 beck Exp $ */ 1/* $OpenBSD: x509_verify.c,v 1.8 2020/09/15 13:34:56 beck Exp $ */
2/* 2/*
3 * Copyright (c) 2020 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2020 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -873,6 +873,8 @@ x509_verify(struct x509_verify_ctx *ctx, X509 *leaf, char *name)
873 ctx->error = X509_V_ERR_OUT_OF_MEM; 873 ctx->error = X509_V_ERR_OUT_OF_MEM;
874 return 0; 874 return 0;
875 } 875 }
876 ctx->xsc->error_depth = 0;
877 ctx->xsc->current_cert = leaf;
876 } 878 }
877 879
878 if ((current_chain = x509_verify_chain_new()) == NULL) { 880 if ((current_chain = x509_verify_chain_new()) == NULL) {