summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/X509_STORE_CTX_new.pod
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/doc/X509_STORE_CTX_new.pod')
-rw-r--r--src/lib/libcrypto/doc/X509_STORE_CTX_new.pod126
1 files changed, 0 insertions, 126 deletions
diff --git a/src/lib/libcrypto/doc/X509_STORE_CTX_new.pod b/src/lib/libcrypto/doc/X509_STORE_CTX_new.pod
deleted file mode 100644
index 66c0da04d2..0000000000
--- a/src/lib/libcrypto/doc/X509_STORE_CTX_new.pod
+++ /dev/null
@@ -1,126 +0,0 @@
1=pod
2
3=head1 NAME
4
5X509_STORE_CTX_new, X509_STORE_CTX_cleanup, X509_STORE_CTX_free,
6X509_STORE_CTX_init, X509_STORE_CTX_trusted_stack, X509_STORE_CTX_set_cert,
7X509_STORE_CTX_set_chain, X509_STORE_CTX_set0_crls, X509_STORE_CTX_get0_param,
8X509_STORE_CTX_set0_param, X509_STORE_CTX_set_default - X509_STORE_CTX
9initialisation
10
11=head1 SYNOPSIS
12
13 #include <openssl/x509_vfy.h>
14
15 X509_STORE_CTX *X509_STORE_CTX_new(void);
16 void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
17 void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
18
19 int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
20 X509 *x509, STACK_OF(X509) *chain);
21
22 void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk);
23
24 void X509_STORE_CTX_set_cert(X509_STORE_CTX *ctx,X509 *x);
25 void X509_STORE_CTX_set_chain(X509_STORE_CTX *ctx,STACK_OF(X509) *sk);
26 void X509_STORE_CTX_set0_crls(X509_STORE_CTX *ctx, STACK_OF(X509_CRL) *sk);
27
28 X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
29 void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
30 int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
31
32=head1 DESCRIPTION
33
34These functions initialise an B<X509_STORE_CTX> structure for subsequent use
35by X509_verify_cert().
36
37X509_STORE_CTX_new() returns a newly initialised B<X509_STORE_CTX> structure.
38
39X509_STORE_CTX_cleanup() internally cleans up an B<X509_STORE_CTX> structure.
40The context can then be reused with an new call to X509_STORE_CTX_init().
41
42X509_STORE_CTX_free() completely frees up B<ctx>. After this call B<ctx>
43is no longer valid.
44
45X509_STORE_CTX_init() sets up B<ctx> for a subsequent verification operation.
46The trusted certificate store is set to B<store>, the end entity certificate
47to be verified is set to B<x509> and a set of additional certificates (which
48will be untrusted but may be used to build the chain) in B<chain>. Any or
49all of the B<store>, B<x509> and B<chain> parameters can be B<NULL>.
50
51X509_STORE_CTX_trusted_stack() sets the set of trusted certificates of B<ctx>
52to B<sk>. This is an alternative way of specifying trusted certificates
53instead of using an B<X509_STORE>.
54
55X509_STORE_CTX_set_cert() sets the certificate to be verified in B<ctx> to
56B<x>.
57
58X509_STORE_CTX_set_chain() sets the additional certificate chain used by B<ctx>
59to B<sk>.
60
61X509_STORE_CTX_set0_crls() sets a set of CRLs to use to aid certificate
62verification to B<sk>. These CRLs will only be used if CRL verification is
63enabled in the associated B<X509_VERIFY_PARAM> structure. This might be
64used where additional "useful" CRLs are supplied as part of a protocol,
65for example in a PKCS#7 structure.
66
67X509_VERIFY_PARAM *X509_STORE_CTX_get0_param() retrieves an internal pointer
68to the verification parameters associated with B<ctx>.
69
70X509_STORE_CTX_set0_param() sets the internal verification parameter pointer
71to B<param>. After this call B<param> should not be used.
72
73X509_STORE_CTX_set_default() looks up and sets the default verification
74method to B<name>. This uses the function X509_VERIFY_PARAM_lookup() to
75find an appropriate set of parameters from B<name>.
76
77=head1 NOTES
78
79The certificates and CRLs in a store are used internally and should B<not>
80be freed up until after the associated B<X509_STORE_CTX> is freed. Legacy
81applications might implicitly use an B<X509_STORE_CTX> like this:
82
83 X509_STORE_CTX ctx;
84 X509_STORE_CTX_init(&ctx, store, cert, chain);
85
86this is B<not> recommended in new applications they should instead do:
87
88 X509_STORE_CTX *ctx;
89 ctx = X509_STORE_CTX_new();
90 if (ctx == NULL)
91 /* Bad error */
92 X509_STORE_CTX_init(ctx, store, cert, chain);
93
94=head1 BUGS
95
96The certificates and CRLs in a context are used internally and should B<not>
97be freed up until after the associated B<X509_STORE_CTX> is freed. Copies
98should be made or reference counts increased instead.
99
100=head1 RETURN VALUES
101
102X509_STORE_CTX_new() returns an newly allocates context or B<NULL> is an
103error occurred.
104
105X509_STORE_CTX_init() returns 1 for success or 0 if an error occurred.
106
107X509_STORE_CTX_get0_param() returns a pointer to an B<X509_VERIFY_PARAM>
108structure or B<NULL> if an error occurred.
109
110X509_STORE_CTX_cleanup(), X509_STORE_CTX_free(), X509_STORE_CTX_trusted_stack(),
111X509_STORE_CTX_set_cert(), X509_STORE_CTX_set_chain(),
112X509_STORE_CTX_set0_crls() and X509_STORE_CTX_set0_param() do not return
113values.
114
115X509_STORE_CTX_set_default() returns 1 for success or 0 if an error occurred.
116
117=head1 SEE ALSO
118
119L<X509_verify_cert(3)|X509_verify_cert(3)>
120L<X509_VERIFY_PARAM_set_flags(3)|X509_VERIFY_PARAM_set_flags(3)>
121
122=head1 HISTORY
123
124X509_STORE_CTX_set0_crls() was first added to OpenSSL 1.0.0
125
126=cut