--- /dev/null
+/* crypto/x509/x509_vfy.h */\r
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\r
+ * All rights reserved.\r
+ *\r
+ * This package is an SSL implementation written\r
+ * by Eric Young (eay@cryptsoft.com).\r
+ * The implementation was written so as to conform with Netscapes SSL.\r
+ * \r
+ * This library is free for commercial and non-commercial use as long as\r
+ * the following conditions are aheared to. The following conditions\r
+ * apply to all code found in this distribution, be it the RC4, RSA,\r
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation\r
+ * included with this distribution is covered by the same copyright terms\r
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).\r
+ * \r
+ * Copyright remains Eric Young's, and as such any Copyright notices in\r
+ * the code are not to be removed.\r
+ * If this package is used in a product, Eric Young should be given attribution\r
+ * as the author of the parts of the library used.\r
+ * This can be in the form of a textual message at program startup or\r
+ * in documentation (online or textual) provided with the package.\r
+ * \r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ * 1. Redistributions of source code must retain the copyright\r
+ * notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the\r
+ * documentation and/or other materials provided with the distribution.\r
+ * 3. All advertising materials mentioning features or use of this software\r
+ * must display the following acknowledgement:\r
+ * "This product includes cryptographic software written by\r
+ * Eric Young (eay@cryptsoft.com)"\r
+ * The word 'cryptographic' can be left out if the rouines from the library\r
+ * being used are not cryptographic related :-).\r
+ * 4. If you include any Windows specific code (or a derivative thereof) from \r
+ * the apps directory (application code) you must include an acknowledgement:\r
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"\r
+ * \r
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\r
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\r
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
+ * SUCH DAMAGE.\r
+ * \r
+ * The licence and distribution terms for any publically available version or\r
+ * derivative of this code cannot be changed. i.e. this code cannot simply be\r
+ * copied and put under another distribution licence\r
+ * [including the GNU Public Licence.]\r
+ */\r
+\r
+#ifndef HEADER_X509_H\r
+#include <openssl/x509.h>\r
+/* openssl/x509.h ends up #include-ing this file at about the only\r
+ * appropriate moment. */\r
+#endif\r
+\r
+#ifndef HEADER_X509_VFY_H\r
+#define HEADER_X509_VFY_H\r
+\r
+#include <openssl/opensslconf.h>\r
+#ifndef OPENSSL_NO_LHASH\r
+#include <openssl/lhash.h>\r
+#endif\r
+#include <openssl/bio.h>\r
+#include <openssl/crypto.h>\r
+#include <openssl/symhacks.h>\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+/* Outer object */\r
+typedef struct x509_hash_dir_st\r
+ {\r
+ int num_dirs;\r
+ char **dirs;\r
+ int *dirs_type;\r
+ int num_dirs_alloced;\r
+ } X509_HASH_DIR_CTX;\r
+\r
+typedef struct x509_file_st\r
+ {\r
+ int num_paths; /* number of paths to files or directories */\r
+ int num_alloced;\r
+ char **paths; /* the list of paths or directories */\r
+ int *path_type;\r
+ } X509_CERT_FILE_CTX;\r
+\r
+/*******************************/\r
+/*\r
+SSL_CTX -> X509_STORE \r
+ -> X509_LOOKUP\r
+ ->X509_LOOKUP_METHOD\r
+ -> X509_LOOKUP\r
+ ->X509_LOOKUP_METHOD\r
+ \r
+SSL -> X509_STORE_CTX\r
+ ->X509_STORE \r
+\r
+The X509_STORE holds the tables etc for verification stuff.\r
+A X509_STORE_CTX is used while validating a single certificate.\r
+The X509_STORE has X509_LOOKUPs for looking up certs.\r
+The X509_STORE then calls a function to actually verify the\r
+certificate chain.\r
+*/\r
+\r
+#define X509_LU_RETRY -1\r
+#define X509_LU_FAIL 0\r
+#define X509_LU_X509 1\r
+#define X509_LU_CRL 2\r
+#define X509_LU_PKEY 3\r
+\r
+typedef struct x509_object_st\r
+ {\r
+ /* one of the above types */\r
+ int type;\r
+ union {\r
+ char *ptr;\r
+ X509 *x509;\r
+ X509_CRL *crl;\r
+ EVP_PKEY *pkey;\r
+ } data;\r
+ } X509_OBJECT;\r
+\r
+typedef struct x509_lookup_st X509_LOOKUP;\r
+\r
+DECLARE_STACK_OF(X509_LOOKUP)\r
+DECLARE_STACK_OF(X509_OBJECT)\r
+\r
+/* This is a static that defines the function interface */\r
+typedef struct x509_lookup_method_st\r
+ {\r
+ const char *name;\r
+ int (*new_item)(X509_LOOKUP *ctx);\r
+ void (*free)(X509_LOOKUP *ctx);\r
+ int (*init)(X509_LOOKUP *ctx);\r
+ int (*shutdown)(X509_LOOKUP *ctx);\r
+ int (*ctrl)(X509_LOOKUP *ctx,int cmd,const char *argc,long argl,\r
+ char **ret);\r
+ int (*get_by_subject)(X509_LOOKUP *ctx,int type,X509_NAME *name,\r
+ X509_OBJECT *ret);\r
+ int (*get_by_issuer_serial)(X509_LOOKUP *ctx,int type,X509_NAME *name,\r
+ ASN1_INTEGER *serial,X509_OBJECT *ret);\r
+ int (*get_by_fingerprint)(X509_LOOKUP *ctx,int type,\r
+ unsigned char *bytes,int len,\r
+ X509_OBJECT *ret);\r
+ int (*get_by_alias)(X509_LOOKUP *ctx,int type,char *str,int len,\r
+ X509_OBJECT *ret);\r
+ } X509_LOOKUP_METHOD;\r
+\r
+/* This structure hold all parameters associated with a verify operation\r
+ * by including an X509_VERIFY_PARAM structure in related structures the\r
+ * parameters used can be customized\r
+ */\r
+\r
+typedef struct X509_VERIFY_PARAM_st\r
+ {\r
+ char *name;\r
+ time_t check_time; /* Time to use */\r
+ unsigned long inh_flags; /* Inheritance flags */\r
+ unsigned long flags; /* Various verify flags */\r
+ int purpose; /* purpose to check untrusted certificates */\r
+ int trust; /* trust setting to check */\r
+ int depth; /* Verify depth */\r
+ STACK_OF(ASN1_OBJECT) *policies; /* Permissible policies */\r
+ } X509_VERIFY_PARAM;\r
+\r
+DECLARE_STACK_OF(X509_VERIFY_PARAM)\r
+\r
+/* This is used to hold everything. It is used for all certificate\r
+ * validation. Once we have a certificate chain, the 'verify'\r
+ * function is then called to actually check the cert chain. */\r
+struct x509_store_st\r
+ {\r
+ /* The following is a cache of trusted certs */\r
+ int cache; /* if true, stash any hits */\r
+ STACK_OF(X509_OBJECT) *objs; /* Cache of all objects */\r
+\r
+ /* These are external lookup methods */\r
+ STACK_OF(X509_LOOKUP) *get_cert_methods;\r
+\r
+ X509_VERIFY_PARAM *param;\r
+\r
+ /* Callbacks for various operations */\r
+ int (*verify)(X509_STORE_CTX *ctx); /* called to verify a certificate */\r
+ int (*verify_cb)(int ok,X509_STORE_CTX *ctx); /* error callback */\r
+ int (*get_issuer)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); /* get issuers cert from ctx */\r
+ int (*check_issued)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); /* check issued */\r
+ int (*check_revocation)(X509_STORE_CTX *ctx); /* Check revocation status of chain */\r
+ int (*get_crl)(X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); /* retrieve CRL */\r
+ int (*check_crl)(X509_STORE_CTX *ctx, X509_CRL *crl); /* Check CRL validity */\r
+ int (*cert_crl)(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); /* Check certificate against CRL */\r
+ int (*cleanup)(X509_STORE_CTX *ctx);\r
+\r
+ CRYPTO_EX_DATA ex_data;\r
+ int references;\r
+ } /* X509_STORE */;\r
+\r
+int X509_STORE_set_depth(X509_STORE *store, int depth);\r
+\r
+#define X509_STORE_set_verify_cb_func(ctx,func) ((ctx)->verify_cb=(func))\r
+#define X509_STORE_set_verify_func(ctx,func) ((ctx)->verify=(func))\r
+\r
+/* This is the functions plus an instance of the local variables. */\r
+struct x509_lookup_st\r
+ {\r
+ int init; /* have we been started */\r
+ int skip; /* don't use us. */\r
+ X509_LOOKUP_METHOD *method; /* the functions */\r
+ char *method_data; /* method data */\r
+\r
+ X509_STORE *store_ctx; /* who owns us */\r
+ } /* X509_LOOKUP */;\r
+\r
+/* This is a used when verifying cert chains. Since the\r
+ * gathering of the cert chain can take some time (and have to be\r
+ * 'retried', this needs to be kept and passed around. */\r
+struct x509_store_ctx_st /* X509_STORE_CTX */\r
+ {\r
+ X509_STORE *ctx;\r
+ int current_method; /* used when looking up certs */\r
+\r
+ /* The following are set by the caller */\r
+ X509 *cert; /* The cert to check */\r
+ STACK_OF(X509) *untrusted; /* chain of X509s - untrusted - passed in */\r
+ STACK_OF(X509_CRL) *crls; /* set of CRLs passed in */\r
+\r
+ X509_VERIFY_PARAM *param;\r
+ void *other_ctx; /* Other info for use with get_issuer() */\r
+\r
+ /* Callbacks for various operations */\r
+ int (*verify)(X509_STORE_CTX *ctx); /* called to verify a certificate */\r
+ int (*verify_cb)(int ok,X509_STORE_CTX *ctx); /* error callback */\r
+ int (*get_issuer)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); /* get issuers cert from ctx */\r
+ int (*check_issued)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); /* check issued */\r
+ int (*check_revocation)(X509_STORE_CTX *ctx); /* Check revocation status of chain */\r
+ int (*get_crl)(X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); /* retrieve CRL */\r
+ int (*check_crl)(X509_STORE_CTX *ctx, X509_CRL *crl); /* Check CRL validity */\r
+ int (*cert_crl)(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); /* Check certificate against CRL */\r
+ int (*check_policy)(X509_STORE_CTX *ctx);\r
+ int (*cleanup)(X509_STORE_CTX *ctx);\r
+\r
+ /* The following is built up */\r
+ int valid; /* if 0, rebuild chain */\r
+ int last_untrusted; /* index of last untrusted cert */\r
+ STACK_OF(X509) *chain; /* chain of X509s - built up and trusted */\r
+ X509_POLICY_TREE *tree; /* Valid policy tree */\r
+\r
+ int explicit_policy; /* Require explicit policy value */\r
+\r
+ /* When something goes wrong, this is why */\r
+ int error_depth;\r
+ int error;\r
+ X509 *current_cert;\r
+ X509 *current_issuer; /* cert currently being tested as valid issuer */\r
+ X509_CRL *current_crl; /* current CRL */\r
+\r
+ CRYPTO_EX_DATA ex_data;\r
+ } /* X509_STORE_CTX */;\r
+\r
+void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);\r
+\r
+#define X509_STORE_CTX_set_app_data(ctx,data) \\r
+ X509_STORE_CTX_set_ex_data(ctx,0,data)\r
+#define X509_STORE_CTX_get_app_data(ctx) \\r
+ X509_STORE_CTX_get_ex_data(ctx,0)\r
+\r
+#define X509_L_FILE_LOAD 1\r
+#define X509_L_ADD_DIR 2\r
+\r
+#define X509_LOOKUP_load_file(x,name,type) \\r
+ X509_LOOKUP_ctrl((x),X509_L_FILE_LOAD,(name),(long)(type),NULL)\r
+\r
+#define X509_LOOKUP_add_dir(x,name,type) \\r
+ X509_LOOKUP_ctrl((x),X509_L_ADD_DIR,(name),(long)(type),NULL)\r
+\r
+#define X509_V_OK 0\r
+/* illegal error (for uninitialized values, to avoid X509_V_OK): 1 */\r
+\r
+#define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 2\r
+#define X509_V_ERR_UNABLE_TO_GET_CRL 3\r
+#define X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE 4\r
+#define X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE 5\r
+#define X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY 6\r
+#define X509_V_ERR_CERT_SIGNATURE_FAILURE 7\r
+#define X509_V_ERR_CRL_SIGNATURE_FAILURE 8\r
+#define X509_V_ERR_CERT_NOT_YET_VALID 9\r
+#define X509_V_ERR_CERT_HAS_EXPIRED 10\r
+#define X509_V_ERR_CRL_NOT_YET_VALID 11\r
+#define X509_V_ERR_CRL_HAS_EXPIRED 12\r
+#define X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD 13\r
+#define X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD 14\r
+#define X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD 15\r
+#define X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD 16\r
+#define X509_V_ERR_OUT_OF_MEM 17\r
+#define X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT 18\r
+#define X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN 19\r
+#define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY 20\r
+#define X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE 21\r
+#define X509_V_ERR_CERT_CHAIN_TOO_LONG 22\r
+#define X509_V_ERR_CERT_REVOKED 23\r
+#define X509_V_ERR_INVALID_CA 24\r
+#define X509_V_ERR_PATH_LENGTH_EXCEEDED 25\r
+#define X509_V_ERR_INVALID_PURPOSE 26\r
+#define X509_V_ERR_CERT_UNTRUSTED 27\r
+#define X509_V_ERR_CERT_REJECTED 28\r
+/* These are 'informational' when looking for issuer cert */\r
+#define X509_V_ERR_SUBJECT_ISSUER_MISMATCH 29\r
+#define X509_V_ERR_AKID_SKID_MISMATCH 30\r
+#define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 31\r
+#define X509_V_ERR_KEYUSAGE_NO_CERTSIGN 32\r
+\r
+#define X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER 33\r
+#define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 34\r
+#define X509_V_ERR_KEYUSAGE_NO_CRL_SIGN 35\r
+#define X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION 36\r
+#define X509_V_ERR_INVALID_NON_CA 37\r
+#define X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED 38\r
+#define X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE 39\r
+#define X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED 40\r
+\r
+#define X509_V_ERR_INVALID_EXTENSION 41\r
+#define X509_V_ERR_INVALID_POLICY_EXTENSION 42\r
+#define X509_V_ERR_NO_EXPLICIT_POLICY 43\r
+\r
+\r
+/* The application is not happy */\r
+#define X509_V_ERR_APPLICATION_VERIFICATION 50\r
+\r
+/* Certificate verify flags */\r
+\r
+/* Send issuer+subject checks to verify_cb */\r
+#define X509_V_FLAG_CB_ISSUER_CHECK 0x1\r
+/* Use check time instead of current time */\r
+#define X509_V_FLAG_USE_CHECK_TIME 0x2\r
+/* Lookup CRLs */\r
+#define X509_V_FLAG_CRL_CHECK 0x4\r
+/* Lookup CRLs for whole chain */\r
+#define X509_V_FLAG_CRL_CHECK_ALL 0x8\r
+/* Ignore unhandled critical extensions */\r
+#define X509_V_FLAG_IGNORE_CRITICAL 0x10\r
+/* Disable workarounds for broken certificates */\r
+#define X509_V_FLAG_X509_STRICT 0x20\r
+/* Enable proxy certificate validation */\r
+#define X509_V_FLAG_ALLOW_PROXY_CERTS 0x40\r
+/* Enable policy checking */\r
+#define X509_V_FLAG_POLICY_CHECK 0x80\r
+/* Policy variable require-explicit-policy */\r
+#define X509_V_FLAG_EXPLICIT_POLICY 0x100\r
+/* Policy variable inhibit-any-policy */\r
+#define X509_V_FLAG_INHIBIT_ANY 0x200\r
+/* Policy variable inhibit-policy-mapping */\r
+#define X509_V_FLAG_INHIBIT_MAP 0x400\r
+/* Notify callback that policy is OK */\r
+#define X509_V_FLAG_NOTIFY_POLICY 0x800\r
+\r
+#define X509_VP_FLAG_DEFAULT 0x1\r
+#define X509_VP_FLAG_OVERWRITE 0x2\r
+#define X509_VP_FLAG_RESET_FLAGS 0x4\r
+#define X509_VP_FLAG_LOCKED 0x8\r
+#define X509_VP_FLAG_ONCE 0x10\r
+\r
+/* Internal use: mask of policy related options */\r
+#define X509_V_FLAG_POLICY_MASK (X509_V_FLAG_POLICY_CHECK \\r
+ | X509_V_FLAG_EXPLICIT_POLICY \\r
+ | X509_V_FLAG_INHIBIT_ANY \\r
+ | X509_V_FLAG_INHIBIT_MAP)\r
+\r
+int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type,\r
+ X509_NAME *name);\r
+X509_OBJECT *X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h,int type,X509_NAME *name);\r
+X509_OBJECT *X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h, X509_OBJECT *x);\r
+void X509_OBJECT_up_ref_count(X509_OBJECT *a);\r
+void X509_OBJECT_free_contents(X509_OBJECT *a);\r
+X509_STORE *X509_STORE_new(void );\r
+void X509_STORE_free(X509_STORE *v);\r
+\r
+int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);\r
+int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);\r
+int X509_STORE_set_trust(X509_STORE *ctx, int trust);\r
+int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);\r
+\r
+X509_STORE_CTX *X509_STORE_CTX_new(void);\r
+\r
+int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);\r
+\r
+void X509_STORE_CTX_free(X509_STORE_CTX *ctx);\r
+int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,\r
+ X509 *x509, STACK_OF(X509) *chain);\r
+void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk);\r
+void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);\r
+\r
+X509_LOOKUP *X509_STORE_add_lookup(X509_STORE *v, X509_LOOKUP_METHOD *m);\r
+\r
+X509_LOOKUP_METHOD *X509_LOOKUP_hash_dir(void);\r
+X509_LOOKUP_METHOD *X509_LOOKUP_file(void);\r
+\r
+int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);\r
+int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);\r
+\r
+int X509_STORE_get_by_subject(X509_STORE_CTX *vs,int type,X509_NAME *name,\r
+ X509_OBJECT *ret);\r
+\r
+int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,\r
+ long argl, char **ret);\r
+\r
+#ifndef OPENSSL_NO_STDIO\r
+int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);\r
+int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);\r
+int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);\r
+#endif\r
+\r
+\r
+X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);\r
+void X509_LOOKUP_free(X509_LOOKUP *ctx);\r
+int X509_LOOKUP_init(X509_LOOKUP *ctx);\r
+int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, int type, X509_NAME *name,\r
+ X509_OBJECT *ret);\r
+int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, int type, X509_NAME *name,\r
+ ASN1_INTEGER *serial, X509_OBJECT *ret);\r
+int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, int type,\r
+ unsigned char *bytes, int len, X509_OBJECT *ret);\r
+int X509_LOOKUP_by_alias(X509_LOOKUP *ctx, int type, char *str,\r
+ int len, X509_OBJECT *ret);\r
+int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);\r
+\r
+#ifndef OPENSSL_NO_STDIO\r
+int X509_STORE_load_locations (X509_STORE *ctx,\r
+ const char *file, const char *dir);\r
+int X509_STORE_set_default_paths(X509_STORE *ctx);\r
+#endif\r
+\r
+int X509_STORE_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,\r
+ CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);\r
+int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx,int idx,void *data);\r
+void * X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx,int idx);\r
+int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);\r
+void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx,int s);\r
+int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);\r
+X509 * X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);\r
+STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);\r
+STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);\r
+void X509_STORE_CTX_set_cert(X509_STORE_CTX *c,X509 *x);\r
+void X509_STORE_CTX_set_chain(X509_STORE_CTX *c,STACK_OF(X509) *sk);\r
+void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c,STACK_OF(X509_CRL) *sk);\r
+int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);\r
+int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);\r
+int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,\r
+ int purpose, int trust);\r
+void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);\r
+void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,\r
+ time_t t);\r
+void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,\r
+ int (*verify_cb)(int, X509_STORE_CTX *));\r
+ \r
+X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);\r
+int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);\r
+\r
+X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);\r
+void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);\r
+int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);\r
+\r
+/* X509_VERIFY_PARAM functions */\r
+\r
+X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void);\r
+void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param);\r
+int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *to,\r
+ const X509_VERIFY_PARAM *from);\r
+int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to, \r
+ const X509_VERIFY_PARAM *from);\r
+int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);\r
+int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param, unsigned long flags);\r
+int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);\r
+int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);\r
+void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);\r
+void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t);\r
+int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param,\r
+ ASN1_OBJECT *policy);\r
+int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param, \r
+ STACK_OF(ASN1_OBJECT) *policies);\r
+int X509_VERIFY_PARAM_get_depth(const X509_VERIFY_PARAM *param);\r
+\r
+int X509_VERIFY_PARAM_add0_table(X509_VERIFY_PARAM *param);\r
+const X509_VERIFY_PARAM *X509_VERIFY_PARAM_lookup(const char *name);\r
+void X509_VERIFY_PARAM_table_cleanup(void);\r
+\r
+int X509_policy_check(X509_POLICY_TREE **ptree, int *pexplicit_policy,\r
+ STACK_OF(X509) *certs,\r
+ STACK_OF(ASN1_OBJECT) *policy_oids,\r
+ unsigned int flags);\r
+\r
+void X509_policy_tree_free(X509_POLICY_TREE *tree);\r
+\r
+int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);\r
+X509_POLICY_LEVEL *\r
+ X509_policy_tree_get0_level(const X509_POLICY_TREE *tree, int i);\r
+\r
+STACK_OF(X509_POLICY_NODE) *\r
+ X509_policy_tree_get0_policies(const X509_POLICY_TREE *tree);\r
+\r
+STACK_OF(X509_POLICY_NODE) *\r
+ X509_policy_tree_get0_user_policies(const X509_POLICY_TREE *tree);\r
+\r
+int X509_policy_level_node_count(X509_POLICY_LEVEL *level);\r
+\r
+X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level, int i);\r
+\r
+const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);\r
+\r
+STACK_OF(POLICYQUALINFO) *\r
+ X509_policy_node_get0_qualifiers(const X509_POLICY_NODE *node);\r
+const X509_POLICY_NODE *\r
+ X509_policy_node_get0_parent(const X509_POLICY_NODE *node);\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+#endif\r
+\r