Build a certificate chain for target using untrusted certs and trusted store.
Declared in <openssl/x509_vfy.h>
stack_st_X509*
X509_build_chain(
X509* target,
stack_st_X509* certs,
X509_STORE* store,
int with_self_signed,
OSSL_LIB_CTX* libctx,
char const* propq);
Newly allocated chain stack (caller frees with sk_X509_pop_free), or NULL on failure.
| Name | Description |
|---|---|
| target | End-entity certificate to chain up from. |
| certs | Optional untrusted intermediate certificates, or NULL. |
| store | Trusted certificate store used for trust anchors, or NULL. |
| with_self_signed | Non-zero to include a self-signed trust anchor in the result. |
| libctx | Library context for algorithm fetches, or NULL for the default. |
| propq | Property query string, or NULL. |