Home
last modified time | relevance | path

Searched refs:certs (Results 1 – 25 of 184) sorted by relevance

12345678

/freebsd/crypto/heimdal/lib/hx509/
H A Dkeyset.c116 hx509_lock lock, hx509_certs *certs) in hx509_certs_init() argument
124 *certs = NULL; in hx509_certs_init()
165 *certs = c; in hx509_certs_init()
186 hx509_certs certs, in hx509_certs_store() argument
190 if (certs->ops->store == NULL) { in hx509_certs_store()
194 certs->ops->name); in hx509_certs_store()
198 return (*certs->ops->store)(context, certs, certs->ops_data, flags, lock); in hx509_certs_store()
203 hx509_certs_ref(hx509_certs certs) in hx509_certs_ref() argument
205 if (certs == NULL) in hx509_certs_ref()
207 if (certs->ref == 0) in hx509_certs_ref()
[all …]
H A Dks_dir.c47 hx509_certs certs; member
57 hx509_certs certs, void **data, int flags, in dir_init() argument
90 dir_free(hx509_certs certs, void *data) in dir_free() argument
98 hx509_certs certs, void *data, void **cursor) in dir_iter_start() argument
117 d->certs = NULL; in dir_iter_start()
126 hx509_certs certs, void *data, void *iter, hx509_cert *cert) in dir_iter() argument
137 if (d->certs) { in dir_iter()
138 ret = hx509_certs_next_cert(context, d->certs, d->iter, cert); in dir_iter()
140 hx509_certs_end_seq(context, d->certs, d->iter); in dir_iter()
142 hx509_certs_free(&d->certs); in dir_iter()
[all …]
H A Dks_mem.c47 } certs; member
53 hx509_certs certs, void **data, int flags, in mem_init() argument
72 mem_free(hx509_certs certs, void *data) in mem_free() argument
77 for (i = 0; i < mem->certs.len; i++) in mem_free()
78 hx509_cert_free(mem->certs.val[i]); in mem_free()
79 free(mem->certs.val); in mem_free()
90 mem_add(hx509_context context, hx509_certs certs, void *data, hx509_cert c) in mem_add() argument
95 val = realloc(mem->certs.val, in mem_add()
96 (mem->certs.len + 1) * sizeof(mem->certs.val[0])); in mem_add()
100 mem->certs.val = val; in mem_add()
[all …]
H A Dlock.c44 hx509_certs certs; member
75 &l->certs); in hx509_lock_init()
118 return lock->certs; in _hx509_lock_unlock_certs()
135 return hx509_certs_add(context, lock->certs, cert); in hx509_lock_add_cert()
139 hx509_lock_add_certs(hx509_context context, hx509_lock lock, hx509_certs certs) in hx509_lock_add_certs() argument
141 return hx509_certs_merge(context, lock->certs, certs); in hx509_lock_add_certs()
147 hx509_certs certs = lock->certs; in hx509_lock_reset_certs() local
154 &lock->certs); in hx509_lock_reset_certs()
156 hx509_certs_free(&certs); in hx509_lock_reset_certs()
158 lock->certs = certs; in hx509_lock_reset_certs()
[all …]
H A Dcollector.c45 hx509_certs certs; member
77 0, NULL, &c->certs); in _hx509_collector_alloc()
100 return hx509_certs_add(context, c->certs, cert); in _hx509_collector_certs_add()
176 hx509_certs certs) in match_localkeyid() argument
193 ret = hx509_certs_find(context, certs, &q, &cert); in match_localkeyid()
204 match_keys(hx509_context context, struct private_key *value, hx509_certs certs) in match_keys() argument
216 ret = hx509_certs_start_seq(context, certs, &cursor); in match_keys()
222 ret = hx509_certs_next_cert(context, certs, cursor, &c); in match_keys()
242 hx509_certs_end_seq(context, certs, cursor); in match_keys()
255 hx509_certs certs; in _hx509_collector_collect_certs() local
[all …]
H A Dks_file.c39 hx509_certs certs; member
375 hx509_certs certs, void **data, int flags, in file_init_common() argument
413 0, lock, &ksf->certs); in file_init_common()
473 ret = _hx509_collector_collect_certs(context, pem_ctx.c, &ksf->certs); in file_init_common()
482 _hx509_certs_keys_add(context, ksf->certs, keys[i]); in file_init_common()
502 hx509_certs certs, void **data, int flags, in file_init_pem() argument
505 return file_init_common(context, certs, data, flags, residue, lock, USE_PEM); in file_init_pem()
510 hx509_certs certs, void **data, int flags, in file_init_der() argument
513 return file_init_common(context, certs, data, flags, residue, lock, USE_DER); in file_init_der()
517 file_free(hx509_certs certs, void *data) in file_free() argument
[all …]
H A Dks_keychain.c322 hx509_certs certs, void **data, int flags, in keychain_init() argument
361 keychain_free(hx509_certs certs, void *data) in keychain_free() argument
376 hx509_certs certs; member
383 hx509_certs certs, void *data, void **cursor) in keychain_iter_start() argument
400 0, NULL, &iter->certs); in keychain_iter_start()
408 hx509_certs_free(&iter->certs); in keychain_iter_start()
427 ret = hx509_certs_add(context, iter->certs, cert); in keychain_iter_start()
433 if (iter->certs) { in keychain_iter_start()
435 ret = hx509_certs_start_seq(context, iter->certs, &iter->cursor); in keychain_iter_start()
437 hx509_certs_free(&iter->certs); in keychain_iter_start()
[all …]
H A Dks_null.c39 hx509_certs certs, void **data, int flags, in null_init() argument
47 null_free(hx509_certs certs, void *data) in null_free() argument
55 hx509_certs certs, void *data, void **cursor) in null_iter_start() argument
63 hx509_certs certs, void *data, void *iter, hx509_cert *cert) in null_iter() argument
71 hx509_certs certs, in null_iter_end() argument
H A Dhxtool.c83 certs_strings(hx509_context contextp, const char *type, hx509_certs certs, in certs_strings() argument
89 ret = hx509_certs_append(contextp, certs, lock, s->strings[i]); in certs_strings()
514 hx509_certs certs; in cms_unenvelope() local
546 ret = hx509_certs_init(context, "MEMORY:cert-store", 0, NULL, &certs); in cms_unenvelope()
550 certs_strings(context, "store", certs, lock, &opt->certificate_strings); in cms_unenvelope()
555 ret = hx509_cms_unenvelope(context, certs, flags, co.data, co.length, in cms_unenvelope()
564 hx509_certs_free(&certs); in cms_unenvelope()
583 hx509_certs certs; in cms_create_enveloped() local
600 ret = hx509_certs_init(context, "MEMORY:cert-store", 0, NULL, &certs); in cms_create_enveloped()
603 certs_strings(context, "store", certs, lock, &opt->certificate_strings); in cms_create_enveloped()
[all …]
H A Dks_p12.c37 hx509_certs certs; member
323 hx509_certs certs, void **data, int flags, in p12_init() argument
360 0, lock, &p12->certs); in p12_init()
429 ret = _hx509_collector_collect_certs(context, c, &p12->certs); in p12_init()
439 if (p12->certs) in p12_init()
440 hx509_certs_free(&p12->certs); in p12_init()
565 hx509_certs certs, void *data, int flags, hx509_lock lock) in p12_store() argument
577 ret = hx509_certs_iter_f(context, p12->certs, store_func, &as); in p12_store()
643 p12_free(hx509_certs certs, void *data) in p12_free() argument
646 hx509_certs_free(&p12->certs); in p12_free()
[all …]
H A Drevoke.c66 hx509_certs certs; member
128 hx509_certs_free(&ocsp->certs); in free_ocsp()
173 hx509_certs certs, in verify_ocsp() argument
202 ret = hx509_certs_find(context, certs, &q, &signer); in verify_ocsp()
203 if (ret && ocsp->certs) in verify_ocsp()
204 ret = hx509_certs_find(context, ocsp->certs, &q, &signer); in verify_ocsp()
329 hx509_certs certs = NULL; in load_ocsp() local
351 if (basic.certs) { in load_ocsp()
355 NULL, &certs); in load_ocsp()
361 for (i = 0; i < basic.certs->len; i++) { in load_ocsp()
[all …]
H A Dcms.c261 hx509_certs certs, in find_CMSIdentifier() argument
300 ret = hx509_certs_find(context, certs, &q, &cert); in find_CMSIdentifier()
348 hx509_certs certs, in hx509_cms_unenvelope() argument
416 ret = find_CMSIdentifier(context, &ri->rid, certs, in hx509_cms_unenvelope()
720 any_to_certs(hx509_context context, const SignedData *sd, hx509_certs certs) in any_to_certs() argument
737 ret = hx509_certs_add(context, certs, c); in any_to_certs()
792 hx509_certs certs = NULL; in hx509_cms_verify_signed() local
836 0, NULL, &certs); in hx509_cms_verify_signed()
847 ret = any_to_certs(context, &sd, certs); in hx509_cms_verify_signed()
852 ret = hx509_certs_merge(context, certs, pool); in hx509_cms_verify_signed()
[all …]
H A Dks_p11.c54 hx509_certs certs; member
340 slot->certs = NULL; in p11_init_slot()
386 ret = p11_list_keys(context, p, slot, session, lock, &slot->certs); in p11_init_slot()
779 hx509_certs *certs) in p11_list_keys() argument
819 ret = _hx509_collector_collect_certs(context, collector, &slot->certs); in p11_list_keys()
830 hx509_certs certs, void **data, int flags, in p11_init() argument
1020 p11_free(hx509_certs certs, void *data) in p11_free() argument
1026 if (p->slot[i].certs) in p11_free()
1027 hx509_certs_free(&p->slot[i].certs); in p11_free()
1034 hx509_certs certs; member
[all …]
/freebsd/crypto/openssl/test/
H A Dcmp_protect_test.c28 STACK_OF(X509) *certs;
46 sk_X509_free(fixture->certs); in tear_down()
339 X509_build_chain(fixture->cert, fixture->certs, NULL, in execute_cmp_build_cert_chain_test()
354 chain = X509_build_chain(fixture->cert, fixture->certs, store, in execute_cmp_build_cert_chain_test()
373 if (!TEST_ptr(fixture->certs = sk_X509_new_null()) in test_cmp_build_cert_chain()
375 || !TEST_true(sk_X509_push(fixture->certs, endentity1)) in test_cmp_build_cert_chain()
376 || !TEST_true(sk_X509_push(fixture->certs, root)) in test_cmp_build_cert_chain()
377 || !TEST_true(sk_X509_push(fixture->certs, intermediate)) in test_cmp_build_cert_chain()
399 if (!TEST_ptr(fixture->certs = sk_X509_new_null()) in test_cmp_build_cert_chain_missing_intermediate()
401 || !TEST_true(sk_X509_push(fixture->certs, endentity1)) in test_cmp_build_cert_chain_missing_intermediate()
[all …]
/freebsd/crypto/openssl/crypto/ocsp/
H A Docsp_vfy.c17 STACK_OF(X509) *certs, unsigned long flags);
18 static X509 *ocsp_find_signer_sk(STACK_OF(X509) *certs, OCSP_RESPID *id);
26 const X509_NAME *nm, STACK_OF(X509) *certs,
98 int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs, in OCSP_basic_verify() argument
104 int ret = ocsp_find_signer(&signer, bs, certs, flags); in OCSP_basic_verify()
118 if ((untrusted = sk_X509_dup(bs->certs)) == NULL) in OCSP_basic_verify()
120 if (!X509_add_certs(untrusted, certs, X509_ADD_FLAG_DEFAULT)) in OCSP_basic_verify()
169 STACK_OF(X509) *certs, unsigned long flags) in ocsp_find_signer()
174 if ((signer = ocsp_find_signer_sk(certs, rid)) != NULL) { in ocsp_find_signer()
179 (signer = ocsp_find_signer_sk(bs->certs, rid))) { in ocsp_find_signer()
[all …]
/freebsd/lib/libsecureboot/efi/
H A Defi_variables.c86 br_x509_certificate *certs; in efi_get_certs() local
95 certs = NULL; in efi_get_certs()
132 certs = realloc(certs, in efi_get_certs()
134 if (certs == NULL) { in efi_get_certs()
139 certs[cert_count].data_len = list->SignatureSize - sizeof(EFI_GUID); in efi_get_certs()
140 certs[cert_count].data = malloc(certs[cert_count].data_len); in efi_get_certs()
141 if (certs[cert_count].data == NULL) in efi_get_certs()
144 memcpy(certs[cert_count].data, in efi_get_certs()
146 certs[cert_count].data_len); in efi_get_certs()
154 return (certs); in efi_get_certs()
[all …]
/freebsd/crypto/openssl/test/recipes/
H A D25-test_x509.t27 my @certs = qw(test certs);
28 my $pem = srctop_file(@certs, "cyrillic.pem");
33 my $msb = srctop_file(@certs, "cyrillic.msb");
34 my $utf = srctop_file(@certs, "cyrillic.utf8");
70 my $pkey = srctop_file(@certs, "ca-key.pem"); # issuer private key
73 my $signkey = srctop_file(@certs, "serverkey.pem");
75 my $testcert = srctop_file(@certs, "ee-cert.pem");
99 ok(run(test(["v3ext", srctop_file(@certs, "pathlen.pem")])));
102 cert_contains(srctop_file(@certs, "fake-gp.pem"),
108 my $infile = srctop_file(@certs, $cert);
H A D25-test_req.t22 my @certs = qw(test certs);
40 "-key", srctop_file("test", "certs", "ee-key.pem"),
60 "-in", srctop_file(@certs, "x509-check.csr"),
312 "-key", srctop_file("test", "certs", "ee-key.pem"),
329 "-new", "-key", srctop_file(@certs, "sm2.key"),
342 "-new", "-key", srctop_file(@certs, "sm2.key"),
386 # Test both generation and verification of certs w.r.t. RFC 5280 requirements
394 my $ca_key = srctop_file(@certs, "ca-key.pem");
395 my $key = $is_ca ? $ca_key : srctop_file(@certs, "e
[all...]
/freebsd/contrib/wpa/src/crypto/
H A Dtls_openssl_ocsp.c166 STACK_OF(X509) *certs;
214 ASN1_EXP_SEQUENCE_OF_OPT(BasicOCSPResponse, certs, X509, 0)
454 static X509 * ocsp_find_signer(STACK_OF(X509) *certs, ResponderID *rid) in ocsp_find_signer() argument
461 return X509_find_by_subject(certs, rid->value.byName); in ocsp_find_signer()
467 for (i = 0; i < sk_X509_num(certs); i++) { in ocsp_find_signer()
468 X509 *x = sk_X509_value(certs, i); in ocsp_find_signer()
498 STACK_OF(X509) *untrusted = NULL, *certs = NULL, *chain = NULL; in check_ocsp_resp()
558 if (basic->certs) { in check_ocsp_resp()
559 untrusted = sk_X509_dup(basic->certs); in check_ocsp_resp()
563 num = sk_X509_num(basic->certs); in check_ocsp_resp()
[all …]
/freebsd/crypto/openssl/test/testutil/
H A Dload.c35 STACK_OF(X509) *certs; in STACK_OF()
42 certs = sk_X509_new_null(); in STACK_OF()
43 if (certs == NULL) { in STACK_OF()
51 if (x != NULL && !sk_X509_push(certs, x)) { in STACK_OF()
52 sk_X509_pop_free(certs, X509_free); in STACK_OF()
66 return certs; in STACK_OF()
/freebsd/secure/caroot/
H A DMAca-bundle.pl47 my %certs;
228 if (defined $certs{$label."\0".$serial}) {
232 $certs{$label."\0".$serial} = $certdata;
260 if (!exists($certs{$it})) {
263 delete $certs{$it};
276 foreach my $it (sort {uc($a) cmp uc($b)} keys %certs) {
287 printcert($fh, $labels{$it}, $certs{$it});
/freebsd/crypto/openssl/fuzz/
H A Dx509.c45 STACK_OF(X509) *certs = NULL; in FuzzerTestOneInput()
117 certs = sk_X509_new_null(); in FuzzerTestOneInput()
118 if (certs == NULL) in FuzzerTestOneInput()
121 sk_X509_push(certs, x509_1); in FuzzerTestOneInput()
122 sk_X509_push(certs, x509_2); in FuzzerTestOneInput()
124 OCSP_basic_verify(bs, certs, store, OCSP_PARTIAL_CHAIN); in FuzzerTestOneInput()
144 sk_X509_free(certs); in FuzzerTestOneInput()
/freebsd/crypto/openssl/apps/
H A Dnseq.c91 seq->certs = sk_X509_new_null(); in nseq_main()
92 if (seq->certs == NULL) in nseq_main()
95 if (!sk_X509_push(seq->certs, x509)) in nseq_main()
99 if (!sk_X509_num(seq->certs)) { in nseq_main()
118 for (i = 0; i < sk_X509_num(seq->certs); i++) { in nseq_main()
119 x509 = sk_X509_value(seq->certs, i); in nseq_main()
/freebsd/crypto/openssl/crypto/pkcs7/
H A Dpk7_smime.c23 PKCS7 *PKCS7_sign_ex(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, in PKCS7_sign_ex() argument
47 for (i = 0; i < sk_X509_num(certs); i++) { in PKCS7_sign_ex()
48 if (!PKCS7_add_certificate(p7, sk_X509_value(certs, i))) in PKCS7_sign_ex()
67 PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs, in PKCS7_sign() argument
70 return PKCS7_sign_ex(signcert, pkey, certs, data, flags, NULL, NULL); in PKCS7_sign()
213 int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store, in PKCS7_verify() argument
264 signers = PKCS7_get0_signers(p7, certs, flags); in PKCS7_verify()
382 STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, in STACK_OF()
421 if (certs) in STACK_OF()
422 signer = X509_find_by_issuer_and_serial(certs, in STACK_OF()
[all …]
/freebsd/crypto/openssl/crypto/ess/
H A Dess_lib.c25 const STACK_OF(X509) *certs, in OSSL_ESS_signing_cert_new_init()
41 for (i = 0; i < sk_X509_num(certs); ++i) { in OSSL_ESS_signing_cert_new_init()
42 X509 *cert = sk_X509_value(certs, i); in OSSL_ESS_signing_cert_new_init()
102 STACK_OF(X509) *certs, in OSSL_ESS_signing_cert_v2_new_init()
118 for (i = 0; i < sk_X509_num(certs); ++i) { in OSSL_ESS_signing_cert_v2_new_init()
119 X509 *cert = sk_X509_value(certs, i); in OSSL_ESS_signing_cert_v2_new_init()
213 * Find the cert in |certs| referenced by |cid| if not NULL, else by |cid_v2|.
214 * The cert must be the first one in |certs| if and only if |index| is 0.
215 * Return 0 on not found, -1 on error, else 1 + the position in |certs|.
218 int index, const STACK_OF(X509) *certs) in find()
24 OSSL_ESS_signing_cert_new_init(const X509 * signcert,const STACK_OF (X509)* certs,int set_issuer_serial) OSSL_ESS_signing_cert_new_init() argument
99 OSSL_ESS_signing_cert_v2_new_init(const EVP_MD * hash_alg,const X509 * signcert,const STACK_OF (X509)* certs,int set_issuer_serial) OSSL_ESS_signing_cert_v2_new_init() argument
217 find(const ESS_CERT_ID * cid,const ESS_CERT_ID_V2 * cid_v2,int index,const STACK_OF (X509)* certs) find() argument
[all...]

12345678