Lines Matching refs:ent
149 static void by_dir_entry_free(BY_DIR_ENTRY *ent) in by_dir_entry_free() argument
151 OPENSSL_free(ent->dir); in by_dir_entry_free()
152 sk_BY_DIR_HASH_pop_free(ent->hashes, by_dir_hash_free); in by_dir_entry_free()
153 OPENSSL_free(ent); in by_dir_entry_free()
181 BY_DIR_ENTRY *ent; in add_cert_dir() local
189 ent = sk_BY_DIR_ENTRY_value(ctx->dirs, j); in add_cert_dir()
190 if (strlen(ent->dir) == len && strncmp(ent->dir, ss, len) == 0) in add_cert_dir()
202 ent = OPENSSL_malloc(sizeof(*ent)); in add_cert_dir()
203 if (ent == NULL) in add_cert_dir()
205 ent->dir_type = type; in add_cert_dir()
206 ent->hashes = sk_BY_DIR_HASH_new(by_dir_hash_cmp); in add_cert_dir()
207 ent->dir = OPENSSL_strndup(ss, len); in add_cert_dir()
208 if (ent->dir == NULL || ent->hashes == NULL) { in add_cert_dir()
209 by_dir_entry_free(ent); in add_cert_dir()
212 if (!sk_BY_DIR_ENTRY_push(ctx->dirs, ent)) { in add_cert_dir()
213 by_dir_entry_free(ent); in add_cert_dir()
264 BY_DIR_ENTRY *ent; in get_cert_by_subject_ex() local
268 ent = sk_BY_DIR_ENTRY_value(ctx->dirs, i); in get_cert_by_subject_ex()
269 j = strlen(ent->dir) + 1 + 8 + 6 + 1 + 1; in get_cert_by_subject_ex()
274 if (type == X509_LU_CRL && ent->hashes) { in get_cert_by_subject_ex()
278 idx = sk_BY_DIR_HASH_find(ent->hashes, &htmp); in get_cert_by_subject_ex()
280 hent = sk_BY_DIR_HASH_value(ent->hashes, idx); in get_cert_by_subject_ex()
295 c = ent->dir[strlen(ent->dir) - 1]; in get_cert_by_subject_ex()
314 "%s%08lx.%s%d", ent->dir, h, postfix, k); in get_cert_by_subject_ex()
319 "%s%c%08lx.%s%d", ent->dir, c, h, postfix, k); in get_cert_by_subject_ex()
333 if ((X509_load_cert_file_ex(xl, b->data, ent->dir_type, libctx, in get_cert_by_subject_ex()
337 if ((X509_load_crl_file(xl, b->data, ent->dir_type)) == 0) in get_cert_by_subject_ex()
374 idx = sk_BY_DIR_HASH_find(ent->hashes, &htmp); in get_cert_by_subject_ex()
375 hent = sk_BY_DIR_HASH_value(ent->hashes, idx); in get_cert_by_subject_ex()
386 if (!sk_BY_DIR_HASH_push(ent->hashes, hent)) { in get_cert_by_subject_ex()
398 sk_BY_DIR_HASH_sort(ent->hashes); in get_cert_by_subject_ex()