summaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509_vfy.h
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2004-03-23 14:14:35 +0000
committerDr. Stephen Henson <steve@openssl.org>2004-03-23 14:14:35 +0000
commit4acc3e907d29d8d61ae7e11ad7985a986332a1c1 (patch)
tree97b0e178ea69ae6786e979d62cc480180c7431af /crypto/x509/x509_vfy.h
parent9449e38504dea3e1500cd58f40c1b2b904ef843d (diff)
Initial support for certificate policy checking and evaluation.
This is currently *very* experimental and needs to be more fully integrated with the main verification code.
Diffstat (limited to 'crypto/x509/x509_vfy.h')
-rw-r--r--crypto/x509/x509_vfy.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/crypto/x509/x509_vfy.h b/crypto/x509/x509_vfy.h
index 7e24ded810..6cf3d70ff7 100644
--- a/crypto/x509/x509_vfy.h
+++ b/crypto/x509/x509_vfy.h
@@ -325,6 +325,14 @@ struct x509_store_ctx_st /* X509_STORE_CTX */
#define X509_V_FLAG_IGNORE_CRITICAL 0x10
/* Disable workarounds for broken certificates */
#define X509_V_FLAG_X509_STRICT 0x20
+/* Enable policy checking */
+#define X509_V_FLAG_POLICY_CHECK 0x40
+/* Policy variable require-explicit-policy */
+#define X509_V_FLAG_EXPLICIT_POLICY 0x80
+/* Policy variable inhibit-policy-mapping */
+#define X509_V_FLAG_INHIBIT_ANY 0x100
+/* Policy variable inhibit-any-policy */
+#define X509_V_FLAG_INHIBIT_MAP 0x200
int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, int type,
X509_NAME *name);
@@ -410,6 +418,36 @@ void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, long flags, time_t t);
void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
int (*verify_cb)(int, X509_STORE_CTX *));
+int X509_policy_check(X509_POLICY_TREE **ptree, int *explicit,
+ STACK_OF(X509) *certs,
+ STACK_OF(ASN1_OBJECT) *policy_oids,
+ unsigned int flags);
+
+void X509_policy_tree_free(X509_POLICY_TREE *tree);
+
+int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);
+X509_POLICY_LEVEL *
+ X509_policy_tree_get0_level(const X509_POLICY_TREE *tree, int i);
+
+STACK_OF(X509_POLICY_NODE) *
+ X509_policy_tree_get0_policies(const X509_POLICY_TREE *tree);
+
+STACK_OF(X509_POLICY_NODE) *
+ X509_policy_tree_get0_user_policies(const X509_POLICY_TREE *tree);
+
+int X509_policy_level_node_count(X509_POLICY_LEVEL *level);
+
+X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level, int i);
+
+const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);
+
+STACK_OF(POLICYQUALIFIER) *
+ X509_policy_node_get0_qualifiers(const X509_POLICY_NODE *node);
+const X509_POLICY_NODE *
+ X509_policy_node_get0_parent(const X509_POLICY_NODE *node);
+
+void X509_policy_lib_init(void);
+
#ifdef __cplusplus
}
#endif