diff options
Diffstat (limited to 'src/lib/libcrypto/doc/X509_STORE_CTX_new.pod')
-rw-r--r-- | src/lib/libcrypto/doc/X509_STORE_CTX_new.pod | 126 |
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 | |||
5 | X509_STORE_CTX_new, X509_STORE_CTX_cleanup, X509_STORE_CTX_free, | ||
6 | X509_STORE_CTX_init, X509_STORE_CTX_trusted_stack, X509_STORE_CTX_set_cert, | ||
7 | X509_STORE_CTX_set_chain, X509_STORE_CTX_set0_crls, X509_STORE_CTX_get0_param, | ||
8 | X509_STORE_CTX_set0_param, X509_STORE_CTX_set_default - X509_STORE_CTX | ||
9 | initialisation | ||
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 | |||
34 | These functions initialise an B<X509_STORE_CTX> structure for subsequent use | ||
35 | by X509_verify_cert(). | ||
36 | |||
37 | X509_STORE_CTX_new() returns a newly initialised B<X509_STORE_CTX> structure. | ||
38 | |||
39 | X509_STORE_CTX_cleanup() internally cleans up an B<X509_STORE_CTX> structure. | ||
40 | The context can then be reused with an new call to X509_STORE_CTX_init(). | ||
41 | |||
42 | X509_STORE_CTX_free() completely frees up B<ctx>. After this call B<ctx> | ||
43 | is no longer valid. | ||
44 | |||
45 | X509_STORE_CTX_init() sets up B<ctx> for a subsequent verification operation. | ||
46 | The trusted certificate store is set to B<store>, the end entity certificate | ||
47 | to be verified is set to B<x509> and a set of additional certificates (which | ||
48 | will be untrusted but may be used to build the chain) in B<chain>. Any or | ||
49 | all of the B<store>, B<x509> and B<chain> parameters can be B<NULL>. | ||
50 | |||
51 | X509_STORE_CTX_trusted_stack() sets the set of trusted certificates of B<ctx> | ||
52 | to B<sk>. This is an alternative way of specifying trusted certificates | ||
53 | instead of using an B<X509_STORE>. | ||
54 | |||
55 | X509_STORE_CTX_set_cert() sets the certificate to be verified in B<ctx> to | ||
56 | B<x>. | ||
57 | |||
58 | X509_STORE_CTX_set_chain() sets the additional certificate chain used by B<ctx> | ||
59 | to B<sk>. | ||
60 | |||
61 | X509_STORE_CTX_set0_crls() sets a set of CRLs to use to aid certificate | ||
62 | verification to B<sk>. These CRLs will only be used if CRL verification is | ||
63 | enabled in the associated B<X509_VERIFY_PARAM> structure. This might be | ||
64 | used where additional "useful" CRLs are supplied as part of a protocol, | ||
65 | for example in a PKCS#7 structure. | ||
66 | |||
67 | X509_VERIFY_PARAM *X509_STORE_CTX_get0_param() retrieves an internal pointer | ||
68 | to the verification parameters associated with B<ctx>. | ||
69 | |||
70 | X509_STORE_CTX_set0_param() sets the internal verification parameter pointer | ||
71 | to B<param>. After this call B<param> should not be used. | ||
72 | |||
73 | X509_STORE_CTX_set_default() looks up and sets the default verification | ||
74 | method to B<name>. This uses the function X509_VERIFY_PARAM_lookup() to | ||
75 | find an appropriate set of parameters from B<name>. | ||
76 | |||
77 | =head1 NOTES | ||
78 | |||
79 | The certificates and CRLs in a store are used internally and should B<not> | ||
80 | be freed up until after the associated B<X509_STORE_CTX> is freed. Legacy | ||
81 | applications 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 | |||
86 | this 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 | |||
96 | The certificates and CRLs in a context are used internally and should B<not> | ||
97 | be freed up until after the associated B<X509_STORE_CTX> is freed. Copies | ||
98 | should be made or reference counts increased instead. | ||
99 | |||
100 | =head1 RETURN VALUES | ||
101 | |||
102 | X509_STORE_CTX_new() returns an newly allocates context or B<NULL> is an | ||
103 | error occurred. | ||
104 | |||
105 | X509_STORE_CTX_init() returns 1 for success or 0 if an error occurred. | ||
106 | |||
107 | X509_STORE_CTX_get0_param() returns a pointer to an B<X509_VERIFY_PARAM> | ||
108 | structure or B<NULL> if an error occurred. | ||
109 | |||
110 | X509_STORE_CTX_cleanup(), X509_STORE_CTX_free(), X509_STORE_CTX_trusted_stack(), | ||
111 | X509_STORE_CTX_set_cert(), X509_STORE_CTX_set_chain(), | ||
112 | X509_STORE_CTX_set0_crls() and X509_STORE_CTX_set0_param() do not return | ||
113 | values. | ||
114 | |||
115 | X509_STORE_CTX_set_default() returns 1 for success or 0 if an error occurred. | ||
116 | |||
117 | =head1 SEE ALSO | ||
118 | |||
119 | L<X509_verify_cert(3)|X509_verify_cert(3)> | ||
120 | L<X509_VERIFY_PARAM_set_flags(3)|X509_VERIFY_PARAM_set_flags(3)> | ||
121 | |||
122 | =head1 HISTORY | ||
123 | |||
124 | X509_STORE_CTX_set0_crls() was first added to OpenSSL 1.0.0 | ||
125 | |||
126 | =cut | ||