Add X509_STORE_CTX_set0_untrusted function.
authorDr. Stephen Henson <steve@openssl.org>
Sat, 16 Apr 2016 17:23:19 +0000 (18:23 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Sat, 16 Apr 2016 17:26:19 +0000 (18:26 +0100)
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/x509/x509_vfy.c
doc/crypto/X509_STORE_CTX_new.pod
include/openssl/x509_vfy.h
util/libcrypto.num

index 312b112f504f2c5cec5a7e5f3a012455d9b9ee04..c16762632c199540d554ee36fa02a677a2b6f5f1 100644 (file)
@@ -2343,6 +2343,11 @@ 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;
+}
+
 void X509_STORE_CTX_set0_verified_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *sk)
 {
     sk_X509_pop_free(ctx->chain, X509_free);
index 69ff7c453886e8bc3c21d7316261c5b4b74f7d1b..17517b3e16827f7e2ac792c580ab3230cc13d2e5 100644 (file)
@@ -8,7 +8,7 @@ X509_STORE_CTX_set0_crls,
 X509_STORE_CTX_get0_chain, X509_STORE_CTX_set0_verified_chain,
 X509_STORE_CTX_get0_param, X509_STORE_CTX_set0_param,
 X509_STORE_CTX_get0_cert,
-X509_STORE_CTX_get0_untrusted,
+X509_STORE_CTX_get0_untrusted, X509_STORE_CTX_set0_untrusted,
 X509_STORE_CTX_get_num_untrusted,
 X509_STORE_CTX_set_default,
 X509_STORE_CTX_get_verify_cb,
@@ -39,6 +39,7 @@ X509_STORE_CTX_get_verify - X509_STORE_CTX initialisation
 
  X509 *X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx);
  STACK_OF(X509)* X509_STORE_CTX_get0_untrusted(X509_STORE_CTX *ctx);
+ void X509_STORE_CTX_set0_untrusted(X509_STORE_CTX *ctx, STACK_OF(X509) *sk);
 
  int X509_STORE_CTX_get_num_untrusted(X509_STORE_CTX *ctx);
 
@@ -101,6 +102,9 @@ certificate being verified by the B<ctx>.
 X509_STORE_CTX_get0_untrusted() retrieves an internal pointer to the
 stack of untrusted certifieds associated with B<ctx>.
 
+X509_STORE_CTX_set0_untrusted() sets the internal point to the stack
+of unstrusted certificates associated with B<ctx> to B<sk>.
+
 X509_STORE_CTX_set0_param() sets the internal verification parameter pointer
 to B<param>. After this call B<param> should not be used.
 
index 544f2ad6cecbec27c5e9b2a4136284c2de367b30..0ef5855c3aa7ed5c1dd2fd27da311086a7d78f07 100644 (file)
@@ -306,6 +306,7 @@ void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
 X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx);
 X509 *X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx);
 STACK_OF(X509)* X509_STORE_CTX_get0_untrusted(X509_STORE_CTX *ctx);
+void X509_STORE_CTX_set0_untrusted(X509_STORE_CTX *ctx, STACK_OF(X509) *sk);
 typedef int (*X509_STORE_CTX_verify_cb)(int, X509_STORE_CTX *);
 typedef int (*X509_STORE_CTX_verify)(X509_STORE_CTX *);
 void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
index a92286c64cf8d395c61f28d7c922ecdb1d10152b..309b0ad9cf1e51a1a332a4d7f53940dbef6801a2 100644 (file)
@@ -4206,3 +4206,4 @@ X509_STORE_CTX_get_verify               4079      1_1_0   EXIST::FUNCTION:
 X509_STORE_CTX_get_verify_cb            4080   1_1_0   EXIST::FUNCTION:
 X509_STORE_CTX_get_cert                 4081   1_1_0   EXIST::FUNCTION:
 X509_STORE_CTX_set0_verified_chain      4082   1_1_0   EXIST::FUNCTION:
+X509_STORE_CTX_set0_untrusted           4083   1_1_0   EXIST::FUNCTION: