summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_vfy.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/x509/x509_vfy.h')
-rw-r--r--src/lib/libcrypto/x509/x509_vfy.h261
1 files changed, 145 insertions, 116 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.h b/src/lib/libcrypto/x509/x509_vfy.h
index dfc060f899..f0be21f452 100644
--- a/src/lib/libcrypto/x509/x509_vfy.h
+++ b/src/lib/libcrypto/x509/x509_vfy.h
@@ -56,16 +56,26 @@
56 * [including the GNU Public Licence.] 56 * [including the GNU Public Licence.]
57 */ 57 */
58 58
59#ifndef HEADER_X509_H
60#include <openssl/x509.h>
61/* openssl/x509.h ends up #include-ing this file at about the only
62 * appropriate moment. */
63#endif
64
59#ifndef HEADER_X509_VFY_H 65#ifndef HEADER_X509_VFY_H
60#define HEADER_X509_VFY_H 66#define HEADER_X509_VFY_H
61 67
68#ifndef OPENSSL_NO_LHASH
69#include <openssl/lhash.h>
70#endif
71#include <openssl/bio.h>
72#include <openssl/crypto.h>
73#include <openssl/symhacks.h>
74
62#ifdef __cplusplus 75#ifdef __cplusplus
63extern "C" { 76extern "C" {
64#endif 77#endif
65 78
66#include "bio.h"
67#include "crypto.h"
68
69/* Outer object */ 79/* Outer object */
70typedef struct x509_hash_dir_st 80typedef struct x509_hash_dir_st
71 { 81 {
@@ -119,43 +129,66 @@ typedef struct x509_object_st
119 } data; 129 } data;
120 } X509_OBJECT; 130 } X509_OBJECT;
121 131
132typedef struct x509_lookup_st X509_LOOKUP;
133
134DECLARE_STACK_OF(X509_LOOKUP)
135DECLARE_STACK_OF(X509_OBJECT)
136
122/* This is a static that defines the function interface */ 137/* This is a static that defines the function interface */
123typedef struct x509_lookup_method_st 138typedef struct x509_lookup_method_st
124 { 139 {
125 char *name; 140 const char *name;
126 int (*new_item)(); 141 int (*new_item)(X509_LOOKUP *ctx);
127 void (*free)(); 142 void (*free)(X509_LOOKUP *ctx);
128 int (*init)(/* meth, char ** */); 143 int (*init)(X509_LOOKUP *ctx);
129 int (*shutdown)( /* meth, char ** */); 144 int (*shutdown)(X509_LOOKUP *ctx);
130 int (*ctrl)( /* meth, char **, int cmd, char *argp, int argi */); 145 int (*ctrl)(X509_LOOKUP *ctx,int cmd,const char *argc,long argl,
131 int (*get_by_subject)(/* meth, char **, XNAME *, X509 **ret */); 146 char **ret);
132 int (*get_by_issuer_serial)(); 147 int (*get_by_subject)(X509_LOOKUP *ctx,int type,X509_NAME *name,
133 int (*get_by_fingerprint)(); 148 X509_OBJECT *ret);
134 int (*get_by_alias)(); 149 int (*get_by_issuer_serial)(X509_LOOKUP *ctx,int type,X509_NAME *name,
150 ASN1_INTEGER *serial,X509_OBJECT *ret);
151 int (*get_by_fingerprint)(X509_LOOKUP *ctx,int type,
152 unsigned char *bytes,int len,
153 X509_OBJECT *ret);
154 int (*get_by_alias)(X509_LOOKUP *ctx,int type,char *str,int len,
155 X509_OBJECT *ret);
135 } X509_LOOKUP_METHOD; 156 } X509_LOOKUP_METHOD;
136 157
137/* This is used to hold everything. It is used for all certificate 158/* This is used to hold everything. It is used for all certificate
138 * validation. Once we have a certificate chain, the 'verify' 159 * validation. Once we have a certificate chain, the 'verify'
139 * function is then called to actually check the cert chain. */ 160 * function is then called to actually check the cert chain. */
140typedef struct x509_store_st 161struct x509_store_st
141 { 162 {
142 /* The following is a cache of trusted certs */ 163 /* The following is a cache of trusted certs */
143 int cache; /* if true, stash any hits */ 164 int cache; /* if true, stash any hits */
144#ifdef HEADER_LHASH_H 165 STACK_OF(X509_OBJECT) *objs; /* Cache of all objects */
145 LHASH *certs; /* cached certs; */
146#else
147 char *certs;
148#endif
149 166
150 /* These are external lookup methods */ 167 /* These are external lookup methods */
151 STACK *get_cert_methods;/* X509_LOOKUP */ 168 STACK_OF(X509_LOOKUP) *get_cert_methods;
152 int (*verify)(); /* called to verify a certificate */ 169
153 int (*verify_cb)(); /* error callback */ 170 /* The following fields are not used by X509_STORE but are
171 * inherited by X509_STORE_CTX when it is initialised.
172 */
173
174 unsigned long flags; /* Various verify flags */
175 int purpose;
176 int trust;
177 /* Callbacks for various operations */
178 int (*verify)(X509_STORE_CTX *ctx); /* called to verify a certificate */
179 int (*verify_cb)(int ok,X509_STORE_CTX *ctx); /* error callback */
180 int (*get_issuer)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); /* get issuers cert from ctx */
181 int (*check_issued)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); /* check issued */
182 int (*check_revocation)(X509_STORE_CTX *ctx); /* Check revocation status of chain */
183 int (*get_crl)(X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); /* retrieve CRL */
184 int (*check_crl)(X509_STORE_CTX *ctx, X509_CRL *crl); /* Check CRL validity */
185 int (*cert_crl)(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); /* Check certificate against CRL */
186 int (*cleanup)(X509_STORE_CTX *ctx);
154 187
155 CRYPTO_EX_DATA ex_data; 188 CRYPTO_EX_DATA ex_data;
156 int references; 189 int references;
157 int depth; /* how deep to look */ 190 int depth; /* how deep to look (still unused -- X509_STORE_CTX's depth is used) */
158 } X509_STORE; 191 } /* X509_STORE */;
159 192
160#define X509_STORE_set_depth(ctx,d) ((ctx)->depth=(d)) 193#define X509_STORE_set_depth(ctx,d) ((ctx)->depth=(d))
161 194
@@ -163,7 +196,7 @@ typedef struct x509_store_st
163#define X509_STORE_set_verify_func(ctx,func) ((ctx)->verify=(func)) 196#define X509_STORE_set_verify_func(ctx,func) ((ctx)->verify=(func))
164 197
165/* This is the functions plus an instance of the local variables. */ 198/* This is the functions plus an instance of the local variables. */
166typedef struct x509_lookup_st 199struct x509_lookup_st
167 { 200 {
168 int init; /* have we been started */ 201 int init; /* have we been started */
169 int skip; /* don't use us. */ 202 int skip; /* don't use us. */
@@ -171,33 +204,53 @@ typedef struct x509_lookup_st
171 char *method_data; /* method data */ 204 char *method_data; /* method data */
172 205
173 X509_STORE *store_ctx; /* who owns us */ 206 X509_STORE *store_ctx; /* who owns us */
174 } X509_LOOKUP; 207 } /* X509_LOOKUP */;
175 208
176/* This is a temporary used when processing cert chains. Since the 209/* This is a used when verifying cert chains. Since the
177 * gathering of the cert chain can take some time (and have to be 210 * gathering of the cert chain can take some time (and have to be
178 * 'retried', this needs to be kept and passed around. */ 211 * 'retried', this needs to be kept and passed around. */
179typedef struct x509_store_state_st 212struct x509_store_ctx_st /* X509_STORE_CTX */
180 { 213 {
181 X509_STORE *ctx; 214 X509_STORE *ctx;
182 int current_method; /* used when looking up certs */ 215 int current_method; /* used when looking up certs */
183 216
184 /* The following are set by the caller */ 217 /* The following are set by the caller */
185 X509 *cert; /* The cert to check */ 218 X509 *cert; /* The cert to check */
186 STACK *untrusted; /* chain of X509s - untrusted - passed in */ 219 STACK_OF(X509) *untrusted; /* chain of X509s - untrusted - passed in */
220 int purpose; /* purpose to check untrusted certificates */
221 int trust; /* trust setting to check */
222 time_t check_time; /* time to make verify at */
223 unsigned long flags; /* Various verify flags */
224 void *other_ctx; /* Other info for use with get_issuer() */
225
226 /* Callbacks for various operations */
227 int (*verify)(X509_STORE_CTX *ctx); /* called to verify a certificate */
228 int (*verify_cb)(int ok,X509_STORE_CTX *ctx); /* error callback */
229 int (*get_issuer)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); /* get issuers cert from ctx */
230 int (*check_issued)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); /* check issued */
231 int (*check_revocation)(X509_STORE_CTX *ctx); /* Check revocation status of chain */
232 int (*get_crl)(X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); /* retrieve CRL */
233 int (*check_crl)(X509_STORE_CTX *ctx, X509_CRL *crl); /* Check CRL validity */
234 int (*cert_crl)(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); /* Check certificate against CRL */
235 int (*cleanup)(X509_STORE_CTX *ctx);
187 236
188 /* The following is built up */ 237 /* The following is built up */
189 int depth; /* how far to go looking up certs */ 238 int depth; /* how far to go looking up certs */
190 int valid; /* if 0, rebuild chain */ 239 int valid; /* if 0, rebuild chain */
191 int last_untrusted; /* index of last untrusted cert */ 240 int last_untrusted; /* index of last untrusted cert */
192 STACK *chain; /* chain of X509s - built up and trusted */ 241 STACK_OF(X509) *chain; /* chain of X509s - built up and trusted */
193 242
194 /* When something goes wrong, this is why */ 243 /* When something goes wrong, this is why */
195 int error_depth; 244 int error_depth;
196 int error; 245 int error;
197 X509 *current_cert; 246 X509 *current_cert;
247 X509 *current_issuer; /* cert currently being tested as valid issuer */
248 X509_CRL *current_crl; /* current CRL */
198 249
199 CRYPTO_EX_DATA ex_data; 250 CRYPTO_EX_DATA ex_data;
200 } X509_STORE_CTX; 251 } /* X509_STORE_CTX */;
252
253#define X509_STORE_CTX_set_depth(ctx,d) ((ctx)->depth=(d))
201 254
202#define X509_STORE_CTX_set_app_data(ctx,data) \ 255#define X509_STORE_CTX_set_app_data(ctx,data) \
203 X509_STORE_CTX_set_ex_data(ctx,0,data) 256 X509_STORE_CTX_set_ex_data(ctx,0,data)
@@ -207,15 +260,14 @@ typedef struct x509_store_state_st
207#define X509_L_FILE_LOAD 1 260#define X509_L_FILE_LOAD 1
208#define X509_L_ADD_DIR 2 261#define X509_L_ADD_DIR 2
209 262
210X509_LOOKUP_METHOD *X509_LOOKUP_file();
211#define X509_LOOKUP_load_file(x,name,type) \ 263#define X509_LOOKUP_load_file(x,name,type) \
212 X509_LOOKUP_ctrl((x),X509_L_FILE_LOAD,(name),(long)(type),NULL) 264 X509_LOOKUP_ctrl((x),X509_L_FILE_LOAD,(name),(long)(type),NULL)
213 265
214X509_LOOKUP_METHOD *X509_LOOKUP_dir();
215#define X509_LOOKUP_add_dir(x,name,type) \ 266#define X509_LOOKUP_add_dir(x,name,type) \
216 X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL) 267 X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL)
217 268
218#define X509_V_OK 0 269#define X509_V_OK 0
270/* illegal error (for uninitialized values, to avoid X509_V_OK): 1 */
219 271
220#define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 2 272#define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 2
221#define X509_V_ERR_UNABLE_TO_GET_CRL 3 273#define X509_V_ERR_UNABLE_TO_GET_CRL 3
@@ -239,21 +291,52 @@ X509_LOOKUP_METHOD *X509_LOOKUP_dir();
239#define X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE 21 291#define X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE 21
240#define X509_V_ERR_CERT_CHAIN_TOO_LONG 22 292#define X509_V_ERR_CERT_CHAIN_TOO_LONG 22
241#define X509_V_ERR_CERT_REVOKED 23 293#define X509_V_ERR_CERT_REVOKED 23
294#define X509_V_ERR_INVALID_CA 24
295#define X509_V_ERR_PATH_LENGTH_EXCEEDED 25
296#define X509_V_ERR_INVALID_PURPOSE 26
297#define X509_V_ERR_CERT_UNTRUSTED 27
298#define X509_V_ERR_CERT_REJECTED 28
299/* These are 'informational' when looking for issuer cert */
300#define X509_V_ERR_SUBJECT_ISSUER_MISMATCH 29
301#define X509_V_ERR_AKID_SKID_MISMATCH 30
302#define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31
303#define X509_V_ERR_KEYUSAGE_NO_CERTSIGN 32
304
305#define X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER 33
306#define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34
242 307
243/* The application is not happy */ 308/* The application is not happy */
244#define X509_V_ERR_APPLICATION_VERIFICATION 50 309#define X509_V_ERR_APPLICATION_VERIFICATION 50
245 310
246#ifndef NOPROTO 311/* Certificate verify flags */
247#ifdef HEADER_LHASH_H 312
248X509_OBJECT *X509_OBJECT_retrive_by_subject(LHASH *h,int type,X509_NAME *name); 313#define X509_V_FLAG_CB_ISSUER_CHECK 0x1 /* Send issuer+subject checks to verify_cb */
249#endif 314#define X509_V_FLAG_USE_CHECK_TIME 0x2 /* Use check time instead of current time */
315#define X509_V_FLAG_CRL_CHECK 0x4 /* Lookup CRLs */
316#define X509_V_FLAG_CRL_CHECK_ALL 0x8 /* Lookup CRLs for whole chain */
317#define X509_V_FLAG_IGNORE_CRITICAL 0x10 /* Ignore unhandled critical extensions */
318
319int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type,
320 X509_NAME *name);
321X509_OBJECT *X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h,int type,X509_NAME *name);
322X509_OBJECT *X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h, X509_OBJECT *x);
250void X509_OBJECT_up_ref_count(X509_OBJECT *a); 323void X509_OBJECT_up_ref_count(X509_OBJECT *a);
251void X509_OBJECT_free_contents(X509_OBJECT *a); 324void X509_OBJECT_free_contents(X509_OBJECT *a);
252X509_STORE *X509_STORE_new(void ); 325X509_STORE *X509_STORE_new(void );
253void X509_STORE_free(X509_STORE *v); 326void X509_STORE_free(X509_STORE *v);
254 327
255void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, 328void X509_STORE_set_flags(X509_STORE *ctx, long flags);
256 X509 *x509, STACK *chain); 329int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);
330int X509_STORE_set_trust(X509_STORE *ctx, int trust);
331
332X509_STORE_CTX *X509_STORE_CTX_new(void);
333
334int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
335
336void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
337int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
338 X509 *x509, STACK_OF(X509) *chain);
339void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk);
257void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx); 340void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
258 341
259X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m); 342X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m);
@@ -267,17 +350,15 @@ int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
267int X509_STORE_get_by_subject(X509_STORE_CTX *vs,int type,X509_NAME *name, 350int X509_STORE_get_by_subject(X509_STORE_CTX *vs,int type,X509_NAME *name,
268 X509_OBJECT *ret); 351 X509_OBJECT *ret);
269 352
270int X509_LOOKUP_ctrl(X509_LOOKUP *ctx,int cmd,char *argc,long argl,char **ret); 353int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
354 long argl, char **ret);
271 355
272#ifndef NO_STDIO 356#ifndef OPENSSL_NO_STDIO
273int X509_load_cert_file(X509_LOOKUP *ctx, char *file, int type); 357int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
274int X509_load_crl_file(X509_LOOKUP *ctx, char *file, int type); 358int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);
359int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);
275#endif 360#endif
276 361
277void X509v3_cleanup_extensions(void );
278int X509v3_add_extension(X509_EXTENSION_METHOD *x);
279int X509v3_add_netscape_extensions(void );
280int X509v3_add_standard_extensions(void );
281 362
282X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method); 363X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
283void X509_LOOKUP_free(X509_LOOKUP *ctx); 364void X509_LOOKUP_free(X509_LOOKUP *ctx);
@@ -292,84 +373,32 @@ int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str,
292 int len, X509_OBJECT *ret); 373 int len, X509_OBJECT *ret);
293int X509_LOOKUP_shutdown(X509_LOOKUP *ctx); 374int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
294 375
295#ifndef NO_STDIO 376#ifndef OPENSSL_NO_STDIO
296int X509_STORE_load_locations (X509_STORE *ctx, 377int X509_STORE_load_locations (X509_STORE *ctx,
297 char *file, char *dir); 378 const char *file, const char *dir);
298int X509_STORE_set_default_paths(X509_STORE *ctx); 379int X509_STORE_set_default_paths(X509_STORE *ctx);
299#endif 380#endif
300 381
301int X509_STORE_CTX_get_ex_new_index(long argl, char *argp, int (*new_func)(), 382int X509_STORE_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
302 int (*dup_func)(), void (*free_func)()); 383 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
303int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx,int idx,char *data); 384int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx,int idx,void *data);
304char * X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx,int idx); 385void * X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx,int idx);
305int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); 386int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
306void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx,int s); 387void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx,int s);
307int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); 388int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
308X509 * X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx); 389X509 * X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
309STACK * X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx); 390STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
391STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);
310void X509_STORE_CTX_set_cert(X509_STORE_CTX *c,X509 *x); 392void X509_STORE_CTX_set_cert(X509_STORE_CTX *c,X509 *x);
311void X509_STORE_CTX_set_chain(X509_STORE_CTX *c,STACK /* X509 */ *sk); 393void X509_STORE_CTX_set_chain(X509_STORE_CTX *c,STACK_OF(X509) *sk);
312 394int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
313#else 395int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
314 396int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
315#ifdef HEADER_LHASH_H 397 int purpose, int trust);
316X509_OBJECT *X509_OBJECT_retrive_by_subject(); 398void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, long flags);
317#endif 399void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, long flags, time_t t);
318void X509_OBJECT_up_ref_count(); 400void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
319void X509_OBJECT_free_contents(); 401 int (*verify_cb)(int, X509_STORE_CTX *));
320X509_STORE *X509_STORE_new();
321void X509_STORE_free();
322
323void X509_STORE_CTX_init();
324void X509_STORE_CTX_cleanup();
325
326X509_LOOKUP *X509_STORE_add_lookup();
327
328X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir();
329X509_LOOKUP_METHOD *X509_LOOKUP_file();
330
331int X509_STORE_add_cert();
332int X509_STORE_add_crl();
333
334int X509_STORE_get_by_subject();
335
336int X509_LOOKUP_ctrl();
337
338#ifndef NO_STDIO
339int X509_load_cert_file();
340int X509_load_crl_file();
341#endif
342
343void X509v3_cleanup_extensions();
344int X509v3_add_extension();
345int X509v3_add_netscape_extensions();
346int X509v3_add_standard_extensions();
347
348X509_LOOKUP *X509_LOOKUP_new();
349void X509_LOOKUP_free();
350int X509_LOOKUP_init();
351int X509_LOOKUP_by_subject();
352int X509_LOOKUP_by_issuer_serial();
353int X509_LOOKUP_by_fingerprint();
354int X509_LOOKUP_by_alias();
355int X509_LOOKUP_shutdown();
356
357#ifndef NO_STDIO
358int X509_STORE_load_locations ();
359int X509_STORE_set_default_paths();
360#endif
361
362int X509_STORE_CTX_set_ex_data();
363char * X509_STORE_CTX_get_ex_data();
364int X509_STORE_CTX_get_error();
365void X509_STORE_CTX_set_error();
366int X509_STORE_CTX_get_error_depth();
367X509 * X509_STORE_CTX_get_current_cert();
368STACK * X509_STORE_CTX_get_chain();
369void X509_STORE_CTX_set_cert();
370void X509_STORE_CTX_set_chain();
371
372#endif
373 402
374#ifdef __cplusplus 403#ifdef __cplusplus
375} 404}