Lines Matching refs:chain

164     ctx->current_cert = x != NULL ? x : sk_X509_value(ctx->chain, depth);  in verify_cb_cert()
191 int num = sk_X509_num(ctx->chain); in check_auth_level()
197 X509 *cert = sk_X509_value(ctx->chain, i); in check_auth_level()
242 || (ok = X509_get_pubkey_parameters(NULL, ctx->chain) ? 1 : -1) <= 0 in verify_chain()
246 err = X509_chain_check_suiteb(&ctx->error_depth, NULL, ctx->chain, in verify_chain()
336 if (ctx->chain != NULL) { in x509_verify_x509()
346 if (!ossl_x509_add_cert_new(&ctx->chain, ctx->cert, X509_ADD_FLAG_UP_REF)) { in x509_verify_x509()
393 && !((x->ex_flags & EXFLAG_SI) != 0 && sk_X509_num(ctx->chain) == 1) in get0_best_issuer_sk()
394 && sk_X509_contains(ctx->chain, candidate)) in get0_best_issuer_sk()
551 int purpose, allow_proxy_certs, num = sk_X509_num(ctx->chain); in check_extensions()
575 x = sk_X509_value(ctx->chain, i); in check_extensions()
749 for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) { in check_name_constraints()
750 X509 *x = sk_X509_value(ctx->chain, i); in check_name_constraints()
830 for (j = sk_X509_num(ctx->chain) - 1; j > i; j--) { in check_name_constraints()
831 NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc; in check_name_constraints()
914 int num = sk_X509_num(ctx->chain); in check_trust()
934 x = sk_X509_value(ctx->chain, i); in check_trust()
960 x = sk_X509_value(ctx->chain, i); in check_trust()
978 (void)sk_X509_set(ctx->chain, 0, mx); in check_trust()
1013 last = sk_X509_num(ctx->chain) - 1; in check_revocation()
1035 X509 *x = sk_X509_value(ctx->chain, cnum); in check_cert()
1367 if (cidx != sk_X509_num(ctx->chain) - 1) in crl_akid_check()
1370 crl_issuer = sk_X509_value(ctx->chain, cidx); in crl_akid_check()
1380 for (cidx++; cidx < sk_X509_num(ctx->chain); cidx++) { in crl_akid_check()
1381 crl_issuer = sk_X509_value(ctx->chain, cidx); in crl_akid_check()
1441 ret = check_crl_chain(ctx, ctx->chain, crl_ctx.chain); in check_crl_path()
1629 int chnum = sk_X509_num(ctx->chain) - 1; in check_crl()
1639 issuer = sk_X509_value(ctx->chain, cnum + 1); in check_crl()
1641 issuer = sk_X509_value(ctx->chain, chnum); in check_crl()
1747 if (ctx->bare_ta_signed && !sk_X509_push(ctx->chain, NULL)) { in check_policy()
1751 ret = X509_policy_check(&ctx->tree, &ctx->explicit_policy, ctx->chain, in check_policy()
1754 (void)sk_X509_pop(ctx->chain); in check_policy()
1765 for (i = 0; i < sk_X509_num(ctx->chain); i++) { in check_policy()
1766 X509 *x = sk_X509_value(ctx->chain, i); in check_policy()
1860 n = sk_X509_num(ctx->chain) - 1; in internal_verify()
1861 xi = sk_X509_value(ctx->chain, n); in internal_verify()
1878 xs = sk_X509_value(ctx->chain, n); in internal_verify()
1960 xs = sk_X509_value(ctx->chain, n); in internal_verify()
2097 int X509_get_pubkey_parameters(EVP_PKEY *pkey, STACK_OF(X509) *chain) in X509_get_pubkey_parameters() argument
2105 for (i = 0; i < sk_X509_num(chain); i++) { in X509_get_pubkey_parameters()
2106 ktmp = X509_get0_pubkey(sk_X509_value(chain, i)); in X509_get_pubkey_parameters()
2122 ktmp2 = X509_get0_pubkey(sk_X509_value(chain, j)); in X509_get_pubkey_parameters()
2299 return ctx->chain; in STACK_OF()
2304 if (ctx->chain == NULL) in STACK_OF()
2306 return X509_chain_up_ref(ctx->chain); in STACK_OF()
2465 STACK_OF(X509) *chain) in X509_STORE_CTX_init()
2475 ctx->untrusted = chain; in X509_STORE_CTX_init()
2480 ctx->chain = NULL; in X509_STORE_CTX_init()
2630 OSSL_STACK_OF_X509_free(ctx->chain); in X509_STORE_CTX_cleanup()
2631 ctx->chain = NULL; in X509_STORE_CTX_cleanup()
2680 OSSL_STACK_OF_X509_free(ctx->chain); in X509_STORE_CTX_set0_verified_chain()
2681 ctx->chain = sk; in X509_STORE_CTX_set0_verified_chain()
3003 cert = sk_X509_value(ctx->chain, depth); in check_dane_issuer()
3019 X509 *cert = sk_X509_value(ctx->chain, num - 1); in check_dane_pkeys()
3041 num = sk_X509_num(ctx->chain); in check_dane_pkeys()
3043 X509_free(sk_X509_pop(ctx->chain)); in check_dane_pkeys()
3181 if (done && !X509_get_pubkey_parameters(NULL, ctx->chain)) in dane_verify()
3225 STACK_OF(X509) *saved_chain = ctx->chain; in get1_trusted_issuer()
3228 ctx->chain = NULL; in get1_trusted_issuer()
3230 ctx->chain = saved_chain; in get1_trusted_issuer()
3242 int num = sk_X509_num(ctx->chain); in build_chain()
3320 num = sk_X509_num(ctx->chain); in build_chain()
3356 curr = sk_X509_value(ctx->chain, i - 1); in build_chain()
3395 X509_free(sk_X509_pop(ctx->chain)); in build_chain()
3411 if (!sk_X509_push(ctx->chain, issuer)) { in build_chain()
3436 (void)sk_X509_set(ctx->chain, num, issuer); in build_chain()
3489 num = sk_X509_num(ctx->chain); in build_chain()
3492 curr = sk_X509_value(ctx->chain, num - 1); in build_chain()
3511 if (!X509_add_cert(ctx->chain, issuer, X509_ADD_FLAG_UP_REF)) in build_chain()
3531 num = sk_X509_num(ctx->chain); in build_chain()
3563 if (X509_self_signed(sk_X509_value(ctx->chain, num - 1), 0) > 0) in build_chain()
3606 if (!ossl_x509_add_cert_new(&ctx->chain, target, X509_ADD_FLAG_UP_REF)) { in STACK_OF()
3616 if (sk_X509_num(ctx->chain) > 1 && !with_self_signed) in STACK_OF()
3618 if (!ossl_x509_add_certs_new(&result, ctx->chain, flags)) { in STACK_OF()