summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2020-09-15 13:34:57 +0000
committerBob Beck <beck@cvs.openbsd.org>2020-09-15 13:34:57 +0000
commitab72f907b1a224c1eb1fa9989d7e70ad2491a8bd (patch)
tree5308f6e0a14eff5d2f0040e90c459c29964c6e98 /lib/libcrypto
parent958f0b8b2bc8df6448551b5af640f0228f31a763 (diff)
set error_depth and current_cert to make more legacy callbacks that don't check
happy ok tb@
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/x509/x509_verify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libcrypto/x509/x509_verify.c b/lib/libcrypto/x509/x509_verify.c
index c3280774f9b..8b12f18bfbd 100644
--- a/lib/libcrypto/x509/x509_verify.c
+++ b/lib/libcrypto/x509/x509_verify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_verify.c,v 1.7 2020/09/15 11:55:14 beck Exp $ */
+/* $OpenBSD: x509_verify.c,v 1.8 2020/09/15 13:34:56 beck Exp $ */
/*
* Copyright (c) 2020 Bob Beck <beck@openbsd.org>
*
@@ -873,6 +873,8 @@ x509_verify(struct x509_verify_ctx *ctx, X509 *leaf, char *name)
ctx->error = X509_V_ERR_OUT_OF_MEM;
return 0;
}
+ ctx->xsc->error_depth = 0;
+ ctx->xsc->current_cert = leaf;
}
if ((current_chain = x509_verify_chain_new()) == NULL) {