diff options
author | Christian Heimes <cheimes@redhat.com> | 2016-04-19 21:11:30 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-04-28 20:02:27 +0200 |
commit | f0c58c3212d4796ea25d9baaea992bc5137fde34 (patch) | |
tree | 6e6231fdbf9f111311539be50306a99204ffce90 /crypto/x509/x509_lu.c | |
parent | d5553b4cb5da81c157040fb9d1bedeeed0cf4703 (diff) |
Add getters for X509_STORE and X509_OBJECT members
OpenSSL 1.1.0-pre5 has made some additional structs opaque. Python's ssl
module requires access to some of the struct members. Three new getters
are added:
int X509_OBJECT_get_type(X509_OBJECT *a);
STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(X509_STORE *v);
X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *ctx);
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/x509/x509_lu.c')
-rw-r--r-- | crypto/x509/x509_lu.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c index 92c25996a7..b77a79682d 100644 --- a/crypto/x509/x509_lu.c +++ b/crypto/x509/x509_lu.c @@ -436,6 +436,11 @@ X509 *X509_OBJECT_get0_X509(X509_OBJECT *a) return a->data.x509; } +int X509_OBJECT_get_type(X509_OBJECT *a) +{ + return a->type; +} + void X509_OBJECT_free(X509_OBJECT *a) { if (a == NULL) @@ -515,6 +520,11 @@ X509_OBJECT *X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h, return sk_X509_OBJECT_value(h, idx); } +STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(X509_STORE *v) +{ + return v->objs; +} + STACK_OF(X509) *X509_STORE_get1_certs(X509_STORE_CTX *ctx, X509_NAME *nm) { int i, idx, cnt; @@ -729,6 +739,11 @@ int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *param) return X509_VERIFY_PARAM_set1(ctx->param, param); } +X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *ctx) +{ + return ctx->param; +} + void X509_STORE_set_verify_cb(X509_STORE *ctx, int (*verify_cb) (int, X509_STORE_CTX *)) { |