Lines Matching refs:chain
492 STACK_OF(X509) *chain = NULL;
499 ossl_cmp_debug(ctx, "trying to build chain for newly enrolled cert");
500 chain = X509_build_chain(cert, ctx->untrusted, out_trusted,
519 if (!ossl_x509_add_certs_new(&chain, X509_STORE_CTX_get0_chain(csc),
522 sk_X509_free(chain);
523 chain = NULL;
529 if (sk_X509_num(chain) > 0)
530 X509_free(sk_X509_shift(chain)); /* remove leaf (EE) cert */
532 if (chain == NULL) {
539 } else if (chain == NULL) {
540 ossl_cmp_warn(ctx, "could not build approximate chain for newly enrolled cert, resorting to received extraCerts");
541 chain = OSSL_CMP_CTX_get1_extraCertsIn(ctx);
544 "success building approximate chain for newly enrolled cert");
546 (void)ossl_cmp_ctx_set1_newChain(ctx, chain);
547 sk_X509_pop_free(chain, X509_free);