summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2018-02-22 17:19:32 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2018-02-22 17:19:32 +0000
commit6b881802f60ceba35653f9ecb8c48627ca4c5c7f (patch)
tree3e430cea3643bdd0c8bab8aa57371aabaa1c7644
parent78986d5bc316a4f587b9b5e5ddd32f8bd3ab2282 (diff)
Provide X509_STORE_get0_objects(), X509_STORE_get_ex_data() and
X509_STORE_set_ex_data().
-rw-r--r--lib/libcrypto/Symbols.list3
-rw-r--r--lib/libcrypto/x509/x509_lu.c20
-rw-r--r--lib/libcrypto/x509/x509_vfy.h5
3 files changed, 26 insertions, 2 deletions
diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list
index ac0f39918e1..3fdce4de5ac 100644
--- a/lib/libcrypto/Symbols.list
+++ b/lib/libcrypto/Symbols.list
@@ -2875,15 +2875,18 @@ X509_STORE_add_cert
X509_STORE_add_crl
X509_STORE_add_lookup
X509_STORE_free
+X509_STORE_get0_objects
X509_STORE_get1_certs
X509_STORE_get1_crls
X509_STORE_get_by_subject
+X509_STORE_get_ex_data
X509_STORE_load_locations
X509_STORE_load_mem
X509_STORE_new
X509_STORE_set1_param
X509_STORE_set_default_paths
X509_STORE_set_depth
+X509_STORE_set_ex_data
X509_STORE_set_flags
X509_STORE_set_purpose
X509_STORE_set_trust
diff --git a/lib/libcrypto/x509/x509_lu.c b/lib/libcrypto/x509/x509_lu.c
index 3a28c06d20a..9276a0e2d5d 100644
--- a/lib/libcrypto/x509/x509_lu.c
+++ b/lib/libcrypto/x509/x509_lu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_lu.c,v 1.25 2018/02/22 17:17:09 jsing Exp $ */
+/* $OpenBSD: x509_lu.c,v 1.26 2018/02/22 17:19:31 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -748,6 +748,24 @@ X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x)
return ret;
}
+STACK_OF(X509_OBJECT) *
+X509_STORE_get0_objects(X509_STORE *xs)
+{
+ return xs->objs;
+}
+
+void *
+X509_STORE_get_ex_data(X509_STORE *xs, int idx)
+{
+ return CRYPTO_get_ex_data(&xs->ex_data, idx);
+}
+
+int
+X509_STORE_set_ex_data(X509_STORE *xs, int idx, void *data)
+{
+ return CRYPTO_set_ex_data(&xs->ex_data, idx, data);
+}
+
int
X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags)
{
diff --git a/lib/libcrypto/x509/x509_vfy.h b/lib/libcrypto/x509/x509_vfy.h
index a62f89a64e1..f9b215ee65a 100644
--- a/lib/libcrypto/x509/x509_vfy.h
+++ b/lib/libcrypto/x509/x509_vfy.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_vfy.h,v 1.23 2018/02/22 17:17:09 jsing Exp $ */
+/* $OpenBSD: x509_vfy.h,v 1.24 2018/02/22 17:19:31 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -434,6 +434,9 @@ void X509_STORE_free(X509_STORE *v);
int X509_STORE_up_ref(X509_STORE *x);
STACK_OF(X509)* X509_STORE_get1_certs(X509_STORE_CTX *st, X509_NAME *nm);
STACK_OF(X509_CRL)* X509_STORE_get1_crls(X509_STORE_CTX *st, X509_NAME *nm);
+STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(X509_STORE *xs);
+void *X509_STORE_get_ex_data(X509_STORE *xs, int idx);
+int X509_STORE_set_ex_data(X509_STORE *xs, int idx, void *data);
int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);
int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);