diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2018-02-14 17:06:35 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2018-02-14 17:06:35 +0000 |
commit | 759cdbda23df88a4f94c1e3f943a26fa6f3ddc5a (patch) | |
tree | 76cc2cbed77fac1ba78d43f13eec39e5b4d9e4bb /lib/libcrypto/x509/x509_vfy.c | |
parent | 95eae4f4ac94eec8e4c531e42e39e9eda11f5e21 (diff) |
Provide X509_STORE_CTX_get0_{cert,untrusted}() and
X509_STORE_CTX_set0_{trusted_stack,untrusted}().
Diffstat (limited to 'lib/libcrypto/x509/x509_vfy.c')
-rw-r--r-- | lib/libcrypto/x509/x509_vfy.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/libcrypto/x509/x509_vfy.c b/lib/libcrypto/x509/x509_vfy.c index 8efff680c10..70e03cf436c 100644 --- a/lib/libcrypto/x509/x509_vfy.c +++ b/lib/libcrypto/x509/x509_vfy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vfy.c,v 1.66 2017/08/27 01:39:26 beck Exp $ */ +/* $OpenBSD: x509_vfy.c,v 1.67 2018/02/14 17:06:34 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -2302,6 +2302,12 @@ X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) } void +X509_STORE_CTX_set0_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) +{ + X509_STORE_CTX_trusted_stack(ctx, sk); +} + +void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx) { if (ctx->cleanup) @@ -2349,6 +2355,24 @@ X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, ctx->verify_cb = verify_cb; } +X509 * +X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx) +{ + return ctx->cert; +} + +STACK_OF(X509) * +X509_STORE_CTX_get0_untrusted(X509_STORE_CTX *ctx) +{ + return ctx->untrusted; +} + +void +X509_STORE_CTX_set0_untrusted(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) +{ + ctx->untrusted = sk; +} + X509_POLICY_TREE * X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx) { |