diff options
author | jsing <> | 2018-02-14 17:06:34 +0000 |
---|---|---|
committer | jsing <> | 2018-02-14 17:06:34 +0000 |
commit | d6fd917a93bf5944b60715bb895744b26c7bfd4e (patch) | |
tree | 64a20b44f90ff6c3b7188730026c824f9e2ac041 /src/lib/libcrypto/x509/x509_vfy.c | |
parent | c46ba7482ab6670501b4e03ceadbf235aa22b0e7 (diff) | |
download | openbsd-d6fd917a93bf5944b60715bb895744b26c7bfd4e.tar.gz openbsd-d6fd917a93bf5944b60715bb895744b26c7bfd4e.tar.bz2 openbsd-d6fd917a93bf5944b60715bb895744b26c7bfd4e.zip |
Provide X509_STORE_CTX_get0_{cert,untrusted}() and
X509_STORE_CTX_set0_{trusted_stack,untrusted}().
Diffstat (limited to 'src/lib/libcrypto/x509/x509_vfy.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_vfy.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c index 8efff680c1..70e03cf436 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.66 2017/08/27 01:39:26 beck Exp $ */ | 1 | /* $OpenBSD: x509_vfy.c,v 1.67 2018/02/14 17:06:34 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 | * |
@@ -2302,6 +2302,12 @@ X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) | |||
2302 | } | 2302 | } |
2303 | 2303 | ||
2304 | void | 2304 | void |
2305 | X509_STORE_CTX_set0_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) | ||
2306 | { | ||
2307 | X509_STORE_CTX_trusted_stack(ctx, sk); | ||
2308 | } | ||
2309 | |||
2310 | void | ||
2305 | X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx) | 2311 | X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx) |
2306 | { | 2312 | { |
2307 | if (ctx->cleanup) | 2313 | if (ctx->cleanup) |
@@ -2349,6 +2355,24 @@ X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, | |||
2349 | ctx->verify_cb = verify_cb; | 2355 | ctx->verify_cb = verify_cb; |
2350 | } | 2356 | } |
2351 | 2357 | ||
2358 | X509 * | ||
2359 | X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx) | ||
2360 | { | ||
2361 | return ctx->cert; | ||
2362 | } | ||
2363 | |||
2364 | STACK_OF(X509) * | ||
2365 | X509_STORE_CTX_get0_untrusted(X509_STORE_CTX *ctx) | ||
2366 | { | ||
2367 | return ctx->untrusted; | ||
2368 | } | ||
2369 | |||
2370 | void | ||
2371 | X509_STORE_CTX_set0_untrusted(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) | ||
2372 | { | ||
2373 | ctx->untrusted = sk; | ||
2374 | } | ||
2375 | |||
2352 | X509_POLICY_TREE * | 2376 | X509_POLICY_TREE * |
2353 | X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx) | 2377 | X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx) |
2354 | { | 2378 | { |