Lines Matching refs:cache

80     X509_POLICY_CACHE *cache = x->policy_cache;  in policy_cache_create()  local
85 cache->data = sk_X509_POLICY_DATA_new(policy_data_cmp); in policy_cache_create()
86 if (!cache->data) in policy_cache_create()
97 if (cache->anyPolicy) { in policy_cache_create()
101 cache->anyPolicy = data; in policy_cache_create()
102 } else if (sk_X509_POLICY_DATA_find(cache->data, NULL, data)) { in policy_cache_create()
105 } else if (!sk_X509_POLICY_DATA_push(cache->data, data)) in policy_cache_create()
117 sk_X509_POLICY_DATA_pop_free(cache->data, policy_data_free); in policy_cache_create()
118 cache->data = NULL; in policy_cache_create()
125 X509_POLICY_CACHE *cache; in policy_cache_new() local
131 cache = OPENSSL_malloc(sizeof(X509_POLICY_CACHE)); in policy_cache_new()
132 if (!cache) in policy_cache_new()
134 cache->anyPolicy = NULL; in policy_cache_new()
135 cache->data = NULL; in policy_cache_new()
136 cache->any_skip = -1; in policy_cache_new()
137 cache->explicit_skip = -1; in policy_cache_new()
138 cache->map_skip = -1; in policy_cache_new()
140 x->policy_cache = cache; in policy_cache_new()
155 if (!policy_cache_set_int(&cache->explicit_skip, in policy_cache_new()
158 if (!policy_cache_set_int(&cache->map_skip, in policy_cache_new()
201 } else if (!policy_cache_set_int(&cache->any_skip, ext_any)) in policy_cache_new()
219 void policy_cache_free(X509_POLICY_CACHE *cache) in policy_cache_free() argument
221 if (!cache) in policy_cache_free()
223 if (cache->anyPolicy) in policy_cache_free()
224 policy_data_free(cache->anyPolicy); in policy_cache_free()
225 if (cache->data) in policy_cache_free()
226 sk_X509_POLICY_DATA_pop_free(cache->data, policy_data_free); in policy_cache_free()
227 OPENSSL_free(cache); in policy_cache_free()
240 X509_POLICY_CACHE *cache; in policy_cache_set() local
243 cache = x->policy_cache; in policy_cache_set()
246 if (cache != NULL) in policy_cache_set()
247 return cache; in policy_cache_set()
252 cache = x->policy_cache; in policy_cache_set()
255 return cache; in policy_cache_set()
258 X509_POLICY_DATA *policy_cache_find_data(const X509_POLICY_CACHE *cache, in policy_cache_find_data() argument
265 if (!sk_X509_POLICY_DATA_find(cache->data, &idx, &tmp)) in policy_cache_find_data()
267 return sk_X509_POLICY_DATA_value(cache->data, idx); in policy_cache_find_data()