From 1e19be2bbd27af0df9ea06c8c0a46f5ab687d976 Mon Sep 17 00:00:00 2001 From: tb <> Date: Tue, 25 Apr 2023 18:28:05 +0000 Subject: Move the policy tree code to internal-only A few hooks remain in the legacy validator, which will soon be replaced with something better. The rest of the tentacles are now largely contained. --- src/lib/libcrypto/x509/pcy_int.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/x509/pcy_int.h') diff --git a/src/lib/libcrypto/x509/pcy_int.h b/src/lib/libcrypto/x509/pcy_int.h index 5e9edcb933..e4a20d6ca9 100644 --- a/src/lib/libcrypto/x509/pcy_int.h +++ b/src/lib/libcrypto/x509/pcy_int.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcy_int.h,v 1.2 2023/04/16 07:36:43 tb Exp $ */ +/* $OpenBSD: pcy_int.h,v 1.3 2023/04/25 18:28:05 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2004. */ @@ -64,6 +64,7 @@ __BEGIN_HIDDEN_DECLS typedef struct X509_POLICY_DATA_st X509_POLICY_DATA; DECLARE_STACK_OF(X509_POLICY_DATA) +DECLARE_STACK_OF(X509_POLICY_NODE) /* Internal structures */ @@ -209,4 +210,26 @@ int policy_node_match(const X509_POLICY_LEVEL *lvl, const X509_POLICY_CACHE *policy_cache_set(X509 *x); +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(POLICYQUALINFO) * + X509_policy_node_get0_qualifiers(const X509_POLICY_NODE *node); +const X509_POLICY_NODE * + X509_policy_node_get0_parent(const X509_POLICY_NODE *node); + + __END_HIDDEN_DECLS -- cgit v1.2.3-55-g6feb