assert(sk_X509_POLICY_NODE_is_sorted(level->nodes));
X509_POLICY_NODE node;
node.policy = (ASN1_OBJECT *)policy;
- size_t idx;
- if (!sk_X509_POLICY_NODE_find(level->nodes, &idx, &node)) {
+ int idx;
+ if ((idx = sk_X509_POLICY_NODE_find(level->nodes, &node)) < 0) {
return NULL;
}
return sk_X509_POLICY_NODE_value(level->nodes, idx);
assert(sk_POLICYINFO_is_sorted(policies));
POLICYINFO info;
info.policyid = node->policy;
- if (sk_POLICYINFO_find(policies, NULL, &info)) {
+ if (sk_POLICYINFO_find(policies, &info) >= 0) {
return 0;
}
x509_policy_node_free(node);
assert(sk_POLICY_MAPPING_is_sorted(mappings));
POLICY_MAPPING mapping;
mapping.issuerDomainPolicy = node->policy;
- if (!sk_POLICY_MAPPING_find(mappings, /*out_index=*/NULL, &mapping)) {
+ if (sk_POLICY_MAPPING_find(mappings, &mapping) < 0) {
return 0;
}
x509_policy_node_free(node);
// |node|'s parent is anyPolicy and is part of "valid_policy_node_set".
// If it exists in |user_policies|, the intersection is non-empty and we
// can return immediately.
- if (sk_ASN1_OBJECT_find(user_policies, /*out_index=*/NULL,
- node->policy)) {
+ if (sk_ASN1_OBJECT_find(user_policies, node->policy) >= 0) {
return 1;
}
} else if (i > 0) {