Lines Matching refs:curr

55                        X509_POLICY_LEVEL *curr)  in tree_print()  argument
59 if (!curr) in tree_print()
60 curr = tree->levels + tree->nlevel; in tree_print()
62 curr++; in tree_print()
66 (long)(curr - tree->levels)); in tree_print()
67 for (plev = tree->levels; plev != curr; plev++) { in tree_print()
85 #define TREE_PRINT(str, tree, curr) \ argument
87 tree_print(trc_out, "before tree_prune()", tree, curr); \
256 static int tree_link_matching_nodes(X509_POLICY_LEVEL *curr, in tree_link_matching_nodes() argument
260 X509_POLICY_LEVEL *last = curr - 1; in tree_link_matching_nodes()
268 if (ossl_policy_level_add_node(curr, data, node, tree, 0) == NULL) in tree_link_matching_nodes()
274 if (ossl_policy_level_add_node(curr, data, last->anyPolicy, tree, 0) == NULL) in tree_link_matching_nodes()
286 static int tree_link_nodes(X509_POLICY_LEVEL *curr, in tree_link_nodes() argument
296 if (!tree_link_matching_nodes(curr, data, tree)) in tree_link_nodes()
308 static int tree_add_unmatched(X509_POLICY_LEVEL *curr, in tree_add_unmatched() argument
327 if (ossl_policy_level_add_node(curr, data, node, tree, 1) == NULL) { in tree_add_unmatched()
337 static int tree_link_unmatched(X509_POLICY_LEVEL *curr, in tree_link_unmatched() argument
341 const X509_POLICY_LEVEL *last = curr - 1; in tree_link_unmatched()
349 if (!tree_add_unmatched(curr, cache, NULL, node, tree)) in tree_link_unmatched()
360 if (ossl_policy_level_find_node(curr, node, oid)) in tree_link_unmatched()
362 if (!tree_add_unmatched(curr, cache, oid, node, tree)) in tree_link_unmatched()
373 static int tree_link_any(X509_POLICY_LEVEL *curr, in tree_link_any() argument
379 X509_POLICY_LEVEL *last = curr - 1; in tree_link_any()
384 if (!tree_link_unmatched(curr, cache, node, tree)) in tree_link_any()
389 ossl_policy_level_add_node(curr, cache->anyPolicy, in tree_link_any()
405 static int tree_prune(X509_POLICY_TREE *tree, X509_POLICY_LEVEL *curr) in tree_prune() argument
410 nodes = curr->nodes; in tree_prune()
411 if (curr->flags & X509_V_FLAG_INHIBIT_MAP) { in tree_prune()
424 --curr; in tree_prune()
425 nodes = curr->nodes; in tree_prune()
434 if (curr->anyPolicy && !curr->anyPolicy->nchild) { in tree_prune()
435 if (curr->anyPolicy->parent) in tree_prune()
436 curr->anyPolicy->parent->nchild--; in tree_prune()
437 OPENSSL_free(curr->anyPolicy); in tree_prune()
438 curr->anyPolicy = NULL; in tree_prune()
440 if (curr == tree->levels) { in tree_prune()
442 if (!curr->anyPolicy) in tree_prune()
483 X509_POLICY_LEVEL *curr; in tree_calculate_authority_set() local
487 curr = tree->levels + tree->nlevel - 1; in tree_calculate_authority_set()
490 if (curr->anyPolicy) { in tree_calculate_authority_set()
491 if (!tree_add_auth_node(&tree->auth_policies, curr->anyPolicy)) in tree_calculate_authority_set()
498 curr = tree->levels; in tree_calculate_authority_set()
504 if ((anyptr = curr->anyPolicy) == NULL) in tree_calculate_authority_set()
506 curr++; in tree_calculate_authority_set()
507 for (j = 0; j < sk_X509_POLICY_NODE_num(curr->nodes); j++) { in tree_calculate_authority_set()
508 node = sk_X509_POLICY_NODE_value(curr->nodes, j); in tree_calculate_authority_set()
603 X509_POLICY_LEVEL *curr = tree->levels + 1; in tree_evaluate() local
606 for (i = 1; i < tree->nlevel; i++, curr++) { in tree_evaluate()
607 cache = ossl_policy_cache_set(curr->cert); in tree_evaluate()
608 if (!tree_link_nodes(curr, cache, tree)) in tree_evaluate()
611 if (!(curr->flags & X509_V_FLAG_INHIBIT_ANY) in tree_evaluate()
612 && !tree_link_any(curr, cache, tree)) in tree_evaluate()
614 TREE_PRINT("before tree_prune()", tree, curr); in tree_evaluate()
615 ret = tree_prune(tree, curr); in tree_evaluate()
630 X509_POLICY_LEVEL *curr; in X509_policy_tree_free() local
639 for (i = 0, curr = tree->levels; i < tree->nlevel; i++, curr++) { in X509_policy_tree_free()
640 X509_free(curr->cert); in X509_policy_tree_free()
641 sk_X509_POLICY_NODE_pop_free(curr->nodes, ossl_policy_node_free); in X509_policy_tree_free()
642 ossl_policy_node_free(curr->anyPolicy); in X509_policy_tree_free()