summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_vfy.c
diff options
context:
space:
mode:
authorjsing <>2018-02-22 17:11:30 +0000
committerjsing <>2018-02-22 17:11:30 +0000
commitdc18b99a087245f0dff9151ef1568c40cdbc5f5b (patch)
tree66c4637bce20d46b0ef21598cda39b58ae0dda8e /src/lib/libcrypto/x509/x509_vfy.c
parent638272e9dee92abeb527a8cf07528a81219edc22 (diff)
downloadopenbsd-dc18b99a087245f0dff9151ef1568c40cdbc5f5b.tar.gz
openbsd-dc18b99a087245f0dff9151ef1568c40cdbc5f5b.tar.bz2
openbsd-dc18b99a087245f0dff9151ef1568c40cdbc5f5b.zip
Provide X509_STORE_CTX_get0_chain() and X509_STORE_CTX_get0_store().
Diffstat (limited to 'src/lib/libcrypto/x509/x509_vfy.c')
-rw-r--r--src/lib/libcrypto/x509/x509_vfy.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c
index 70e03cf436..c8ccae5029 100644
--- a/src/lib/libcrypto/x509/x509_vfy.c
+++ b/src/lib/libcrypto/x509/x509_vfy.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_vfy.c,v 1.67 2018/02/14 17:06:34 jsing Exp $ */ 1/* $OpenBSD: x509_vfy.c,v 1.68 2018/02/22 17:11:30 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -2023,12 +2023,20 @@ X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx)
2023 return ctx->current_cert; 2023 return ctx->current_cert;
2024} 2024}
2025 2025
2026STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx) 2026STACK_OF(X509) *
2027X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx)
2027{ 2028{
2028 return ctx->chain; 2029 return ctx->chain;
2029} 2030}
2030 2031
2031STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx) 2032STACK_OF(X509) *
2033X509_STORE_CTX_get0_chain(X509_STORE_CTX *xs)
2034{
2035 return xs->chain;
2036}
2037
2038STACK_OF(X509) *
2039X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx)
2032{ 2040{
2033 int i; 2041 int i;
2034 X509 *x; 2042 X509 *x;
@@ -2061,6 +2069,12 @@ X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx)
2061 return ctx->parent; 2069 return ctx->parent;
2062} 2070}
2063 2071
2072X509_STORE *
2073X509_STORE_CTX_get0_store(X509_STORE_CTX *xs)
2074{
2075 return xs->ctx;
2076}
2077
2064void 2078void
2065X509_STORE_CTX_set_cert(X509_STORE_CTX *ctx, X509 *x) 2079X509_STORE_CTX_set_cert(X509_STORE_CTX *ctx, X509 *x)
2066{ 2080{