diff --git a/crypto/x509/x509_vfy.h b/crypto/x509/x509_vfy.h index 6cf3d70ff7419da7f51381ac9ac4e428ae03faeb..41644a9fe2259a5c6b67792f1cff93f7d5c078e3 100644 --- a/crypto/x509/x509_vfy.h +++ b/crypto/x509/x509_vfy.h @@ -441,7 +441,7 @@ 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) * +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); diff --git a/crypto/x509v3/pcy_cache.c b/crypto/x509v3/pcy_cache.c index 23d930dd9c578bebf1bb8b55a13690fc0eac235d..c18beb89f58335a5ad9944546c5f3c554f38846e 100644 --- a/crypto/x509v3/pcy_cache.c +++ b/crypto/x509v3/pcy_cache.c @@ -62,7 +62,8 @@ #include "pcy_int.h" -static int policy_data_cmp(void *pa, void *pb); +static int policy_data_cmp(const X509_POLICY_DATA * const *a, + const X509_POLICY_DATA * const *b); static int policy_cache_set_int(long *out, ASN1_INTEGER *value); /* Set cache entry according to CertificatePolicies extension. @@ -269,9 +270,9 @@ X509_POLICY_DATA *policy_cache_find_data(const X509_POLICY_CACHE *cache, return sk_X509_POLICY_DATA_value(cache->data, idx); } -static int policy_data_cmp(void *pa, void *pb) +static int policy_data_cmp(const X509_POLICY_DATA * const *a, + const X509_POLICY_DATA * const *b) { - X509_POLICY_DATA **a = pa; X509_POLICY_DATA **b = pb; return OBJ_cmp((*a)->valid_policy, (*b)->valid_policy); } diff --git a/crypto/x509v3/pcy_data.c b/crypto/x509v3/pcy_data.c index fae74cac924c56c7afc60e8c68e9851f9b5f4112..614d2b493550790436833e950b880b98ca27450b 100644 --- a/crypto/x509v3/pcy_data.c +++ b/crypto/x509v3/pcy_data.c @@ -69,7 +69,7 @@ void policy_data_free(X509_POLICY_DATA *data) ASN1_OBJECT_free(data->valid_policy); /* Don't free qualifiers if shared */ if (!(data->flags & POLICY_DATA_FLAG_SHARED_QUALIFIERS)) - sk_POLICYINFO_pop_free(data->qualifier_set, + sk_POLICYQUALINFO_pop_free(data->qualifier_set, POLICYQUALINFO_free); sk_ASN1_OBJECT_pop_free(data->expected_policy_set, ASN1_OBJECT_free); OPENSSL_free(data); diff --git a/crypto/x509v3/pcy_int.h b/crypto/x509v3/pcy_int.h index 8efe67397bdecc16ff6c3fca4c105502611ebd10..33d6adfb961f573fba56ce585b8a68074224c013 100644 --- a/crypto/x509v3/pcy_int.h +++ b/crypto/x509v3/pcy_int.h @@ -76,7 +76,7 @@ struct X509_POLICY_DATA_st unsigned int flags; /* Policy OID and qualifiers for this data */ ASN1_OBJECT *valid_policy; - STACK_OF(POLICYQUALIFIER) *qualifier_set; + STACK_OF(POLICYQUALINFO) *qualifier_set; STACK_OF(ASN1_OBJECT) *expected_policy_set; }; @@ -128,7 +128,7 @@ struct X509_POLICY_CACHE_st { /* other policy data */ STACK_OF(X509_POLICY_DATA) *data; /* If policyMappings extension present a table of mapped policies */ - STACK_OF(POLICY_REF) *maps; + STACK_OF(X509_POLICY_REF) *maps; /* If InhibitAnyPolicy present this is its value or -1 if absent. */ long any_skip; /* If policyConstraints and requireExplicitPolicy present this is its @@ -210,11 +210,11 @@ void policy_cache_free(X509_POLICY_CACHE *cache); X509_POLICY_NODE *level_find_node(const X509_POLICY_LEVEL *level, const ASN1_OBJECT *id); -X509_POLICY_NODE *tree_find_sk(STACK_OF(X509_POLICY_TREE) *sk, +X509_POLICY_NODE *tree_find_sk(STACK_OF(X509_POLICY_NODE) *sk, const ASN1_OBJECT *id); X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level, - const X509_POLICY_DATA *data, + X509_POLICY_DATA *data, X509_POLICY_NODE *parent, X509_POLICY_TREE *tree); void policy_node_free(X509_POLICY_NODE *node); diff --git a/crypto/x509v3/pcy_lib.c b/crypto/x509v3/pcy_lib.c index 441a70e925f97af3f522304b6b9bc6ba73050691..dae4840bc5d43b522c39e984d9d7b476617ec3c8 100644 --- a/crypto/x509v3/pcy_lib.c +++ b/crypto/x509v3/pcy_lib.c @@ -148,7 +148,7 @@ int X509_policy_node_get_critical(const X509_POLICY_NODE *node) } #endif -STACK_OF(POLICYQUALIFIER) * +STACK_OF(POLICYQUALINFO) * X509_policy_node_get0_qualifiers(const X509_POLICY_NODE *node) { if (!node) diff --git a/crypto/x509v3/pcy_map.c b/crypto/x509v3/pcy_map.c index 093e4b6a84c9bb6a6ea845d2f5e338e4eac3d125..35221e8ba82b68f0929a2a5aee6dc803e0dd34e1 100644 --- a/crypto/x509v3/pcy_map.c +++ b/crypto/x509v3/pcy_map.c @@ -62,9 +62,9 @@ #include "pcy_int.h" -static int ref_cmp(void *pa, void *pb) +static int ref_cmp(const X509_POLICY_REF * const *a, + const X509_POLICY_REF * const *b) { - X509_POLICY_REF **a = pa; X509_POLICY_REF **b = pb; return OBJ_cmp((*a)->subjectDomainPolicy, (*b)->subjectDomainPolicy); } diff --git a/crypto/x509v3/pcy_node.c b/crypto/x509v3/pcy_node.c index 3d6bd34cc5d75787f8e50aea2530cc4324a93003..254f3484d48783604853ccc1a88e5f6b699f11d6 100644 --- a/crypto/x509v3/pcy_node.c +++ b/crypto/x509v3/pcy_node.c @@ -63,9 +63,9 @@ #include "pcy_int.h" -static int node_cmp(void *pa, void *pb) +static int node_cmp(const X509_POLICY_NODE * const *a, + const X509_POLICY_NODE * const *b) { - X509_POLICY_NODE **a = pa, **b = pb; return OBJ_cmp((*a)->data->valid_policy, (*b)->data->valid_policy); } @@ -99,7 +99,7 @@ X509_POLICY_NODE *level_find_node(const X509_POLICY_LEVEL *level, } X509_POLICY_NODE *level_add_node(X509_POLICY_LEVEL *level, - const X509_POLICY_DATA *data, + X509_POLICY_DATA *data, X509_POLICY_NODE *parent, X509_POLICY_TREE *tree) { diff --git a/crypto/x509v3/pcy_tree.c b/crypto/x509v3/pcy_tree.c index 8871ab88b6a3c539ad73c2306953deab44418fd6..9ac169c00cfba42fe242d314fd78f2f56102f755 100644 --- a/crypto/x509v3/pcy_tree.c +++ b/crypto/x509v3/pcy_tree.c @@ -410,11 +410,11 @@ static int tree_add_auth_node(STACK_OF(X509_POLICY_NODE) **pnodes, */ static int tree_calculate_authority_set(X509_POLICY_TREE *tree, - STACK_OF(X509_POLICY_NODES) **pnodes) + STACK_OF(X509_POLICY_NODE) **pnodes) { X509_POLICY_LEVEL *curr; X509_POLICY_NODE *node, *anyptr; - STACK_OF(X509_POLICY_NODES) **addnodes; + STACK_OF(X509_POLICY_NODE) **addnodes; int i, j; curr = tree->levels + tree->nlevel - 1; @@ -596,7 +596,7 @@ int X509_policy_check(X509_POLICY_TREE **ptree, int *explicit, { int ret; X509_POLICY_TREE *tree = NULL; - STACK_OF(X509_NODE) *nodes, *auth_nodes = NULL; + STACK_OF(X509_POLICY_NODE) *nodes, *auth_nodes = NULL; *ptree = NULL; *explicit = 0;