diff options
Diffstat (limited to 'src/lib/libcrypto/x509/x509_vfy.h')
-rw-r--r-- | src/lib/libcrypto/x509/x509_vfy.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/x509_vfy.h b/src/lib/libcrypto/x509/x509_vfy.h index ecfd4cf9ed..4637aecedf 100644 --- a/src/lib/libcrypto/x509/x509_vfy.h +++ b/src/lib/libcrypto/x509/x509_vfy.h | |||
@@ -202,6 +202,8 @@ struct x509_store_state_st /* X509_STORE_CTX */ | |||
202 | /* The following are set by the caller */ | 202 | /* The following are set by the caller */ |
203 | X509 *cert; /* The cert to check */ | 203 | X509 *cert; /* The cert to check */ |
204 | STACK_OF(X509) *untrusted; /* chain of X509s - untrusted - passed in */ | 204 | STACK_OF(X509) *untrusted; /* chain of X509s - untrusted - passed in */ |
205 | int purpose; /* purpose to check untrusted certificates */ | ||
206 | int trust; /* trust setting to check */ | ||
205 | 207 | ||
206 | /* The following is built up */ | 208 | /* The following is built up */ |
207 | int depth; /* how far to go looking up certs */ | 209 | int depth; /* how far to go looking up certs */ |
@@ -234,6 +236,7 @@ struct x509_store_state_st /* X509_STORE_CTX */ | |||
234 | X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL) | 236 | X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL) |
235 | 237 | ||
236 | #define X509_V_OK 0 | 238 | #define X509_V_OK 0 |
239 | /* illegal error (for uninitialized values, to avoid X509_V_OK): 1 */ | ||
237 | 240 | ||
238 | #define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 2 | 241 | #define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 2 |
239 | #define X509_V_ERR_UNABLE_TO_GET_CRL 3 | 242 | #define X509_V_ERR_UNABLE_TO_GET_CRL 3 |
@@ -257,6 +260,11 @@ struct x509_store_state_st /* X509_STORE_CTX */ | |||
257 | #define X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE 21 | 260 | #define X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE 21 |
258 | #define X509_V_ERR_CERT_CHAIN_TOO_LONG 22 | 261 | #define X509_V_ERR_CERT_CHAIN_TOO_LONG 22 |
259 | #define X509_V_ERR_CERT_REVOKED 23 | 262 | #define X509_V_ERR_CERT_REVOKED 23 |
263 | #define X509_V_ERR_INVALID_CA 24 | ||
264 | #define X509_V_ERR_PATH_LENGTH_EXCEEDED 25 | ||
265 | #define X509_V_ERR_INVALID_PURPOSE 26 | ||
266 | #define X509_V_ERR_CERT_UNTRUSTED 27 | ||
267 | #define X509_V_ERR_CERT_REJECTED 28 | ||
260 | 268 | ||
261 | /* The application is not happy */ | 269 | /* The application is not happy */ |
262 | #define X509_V_ERR_APPLICATION_VERIFICATION 50 | 270 | #define X509_V_ERR_APPLICATION_VERIFICATION 50 |
@@ -284,6 +292,8 @@ void X509_OBJECT_free_contents(X509_OBJECT *a); | |||
284 | X509_STORE *X509_STORE_new(void ); | 292 | X509_STORE *X509_STORE_new(void ); |
285 | void X509_STORE_free(X509_STORE *v); | 293 | void X509_STORE_free(X509_STORE *v); |
286 | 294 | ||
295 | X509_STORE_CTX *X509_STORE_CTX_new(void); | ||
296 | void X509_STORE_CTX_free(X509_STORE_CTX *ctx); | ||
287 | void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, | 297 | void X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, |
288 | X509 *x509, STACK_OF(X509) *chain); | 298 | X509 *x509, STACK_OF(X509) *chain); |
289 | void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx); | 299 | void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx); |
@@ -305,6 +315,7 @@ int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, | |||
305 | #ifndef NO_STDIO | 315 | #ifndef NO_STDIO |
306 | int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type); | 316 | int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type); |
307 | int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type); | 317 | int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type); |
318 | int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type); | ||
308 | #endif | 319 | #endif |
309 | 320 | ||
310 | 321 | ||
@@ -327,8 +338,8 @@ int X509_STORE_load_locations (X509_STORE *ctx, | |||
327 | int X509_STORE_set_default_paths(X509_STORE *ctx); | 338 | int X509_STORE_set_default_paths(X509_STORE *ctx); |
328 | #endif | 339 | #endif |
329 | 340 | ||
330 | int X509_STORE_CTX_get_ex_new_index(long argl, char *argp, int (*new_func)(), | 341 | int X509_STORE_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, |
331 | int (*dup_func)(), void (*free_func)()); | 342 | CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); |
332 | int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx,int idx,void *data); | 343 | int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx,int idx,void *data); |
333 | void * X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx,int idx); | 344 | void * X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx,int idx); |
334 | int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); | 345 | int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); |
@@ -336,8 +347,13 @@ void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx,int s); | |||
336 | int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); | 347 | int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); |
337 | X509 * X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx); | 348 | X509 * X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx); |
338 | STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx); | 349 | STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx); |
350 | STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx); | ||
339 | void X509_STORE_CTX_set_cert(X509_STORE_CTX *c,X509 *x); | 351 | void X509_STORE_CTX_set_cert(X509_STORE_CTX *c,X509 *x); |
340 | void X509_STORE_CTX_set_chain(X509_STORE_CTX *c,STACK_OF(X509) *sk); | 352 | void X509_STORE_CTX_set_chain(X509_STORE_CTX *c,STACK_OF(X509) *sk); |
353 | int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose); | ||
354 | int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust); | ||
355 | int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose, | ||
356 | int purpose, int trust); | ||
341 | 357 | ||
342 | #ifdef __cplusplus | 358 | #ifdef __cplusplus |
343 | } | 359 | } |