Lines Matching refs:cache
30 X509_POLICY_CACHE *cache = x->policy_cache; in policy_cache_create() local
36 cache->data = sk_X509_POLICY_DATA_new(policy_data_cmp); in policy_cache_create()
37 if (cache->data == NULL) { in policy_cache_create()
52 if (cache->anyPolicy) { in policy_cache_create()
56 cache->anyPolicy = data; in policy_cache_create()
57 } else if (sk_X509_POLICY_DATA_find(cache->data, data) >=0) { in policy_cache_create()
60 } else if (!sk_X509_POLICY_DATA_push(cache->data, data)) { in policy_cache_create()
67 sk_X509_POLICY_DATA_sort(cache->data); in policy_cache_create()
77 sk_X509_POLICY_DATA_pop_free(cache->data, ossl_policy_data_free); in policy_cache_create()
78 cache->data = NULL; in policy_cache_create()
85 X509_POLICY_CACHE *cache; in policy_cache_new() local
94 cache = OPENSSL_malloc(sizeof(*cache)); in policy_cache_new()
95 if (cache == NULL) in policy_cache_new()
97 cache->anyPolicy = NULL; in policy_cache_new()
98 cache->data = NULL; in policy_cache_new()
99 cache->any_skip = -1; in policy_cache_new()
100 cache->explicit_skip = -1; in policy_cache_new()
101 cache->map_skip = -1; in policy_cache_new()
103 x->policy_cache = cache; in policy_cache_new()
118 if (!policy_cache_set_int(&cache->explicit_skip, in policy_cache_new()
121 if (!policy_cache_set_int(&cache->map_skip, in policy_cache_new()
164 } else if (!policy_cache_set_int(&cache->any_skip, ext_any)) in policy_cache_new()
178 void ossl_policy_cache_free(X509_POLICY_CACHE *cache) in ossl_policy_cache_free() argument
180 if (!cache) in ossl_policy_cache_free()
182 ossl_policy_data_free(cache->anyPolicy); in ossl_policy_cache_free()
183 sk_X509_POLICY_DATA_pop_free(cache->data, ossl_policy_data_free); in ossl_policy_cache_free()
184 OPENSSL_free(cache); in ossl_policy_cache_free()
201 X509_POLICY_DATA *ossl_policy_cache_find_data(const X509_POLICY_CACHE *cache, in ossl_policy_cache_find_data() argument
207 idx = sk_X509_POLICY_DATA_find(cache->data, &tmp); in ossl_policy_cache_find_data()
208 return sk_X509_POLICY_DATA_value(cache->data, idx); in ossl_policy_cache_find_data()