From: jsing Date: Thu, 22 Feb 2018 17:19:31 +0000 (+0000) Subject: Provide X509_STORE_get0_objects(), X509_STORE_get_ex_data() and X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=289a329b1dbc1f26b5a38d240175d06f47f4715a;p=openbsd Provide X509_STORE_get0_objects(), X509_STORE_get_ex_data() and X509_STORE_set_ex_data(). --- 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);