From 48c471e6a98e03acff50a033e9a20091e4842f90 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sun, 24 Oct 2021 13:48:15 +0000 Subject: Prepare to provide X509_STORE_CTX_get_num_untrusted() ok beck jsing --- src/lib/libcrypto/x509/x509_vfy.c | 8 +++++++- src/lib/libcrypto/x509/x509_vfy.h | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c index 2f69017e96..17dfb52c62 100644 --- a/src/lib/libcrypto/x509/x509_vfy.c +++ b/src/lib/libcrypto/x509/x509_vfy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vfy.c,v 1.89 2021/09/03 08:58:53 beck Exp $ */ +/* $OpenBSD: x509_vfy.c,v 1.90 2021/10/24 13:48:15 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -2505,6 +2505,12 @@ X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx) return ctx->explicit_policy; } +int +X509_STORE_CTX_get_num_untrusted(X509_STORE_CTX *ctx) +{ + return ctx->last_untrusted; /* XXX */ +} + int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name) { diff --git a/src/lib/libcrypto/x509/x509_vfy.h b/src/lib/libcrypto/x509/x509_vfy.h index e80e7de45e..c6adb41b3d 100644 --- a/src/lib/libcrypto/x509/x509_vfy.h +++ b/src/lib/libcrypto/x509/x509_vfy.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vfy.h,v 1.35 2021/10/24 09:27:48 tb Exp $ */ +/* $OpenBSD: x509_vfy.h,v 1.36 2021/10/24 13:48:15 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -539,6 +539,9 @@ void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx); int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx); +#if defined(LIBRESSL_NEW_API) +int X509_STORE_CTX_get_num_untrusted(X509_STORE_CTX *ctx); +#endif X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx); void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param); -- cgit v1.2.3-55-g6feb