5 SSL_CTX_add_extra_chain_cert - add certificate to chain
9 #include <openssl/ssl.h>
11 long SSL_CTX_add_extra_chain_cert(SSL_CTX ctx, X509 *x509)
15 SSL_CTX_add_extra_chain_cert() adds the certificate B<x509> to the certificate
16 chain presented together with the certificate. Several certificates
17 can be added one after the other.
21 When constructing the certificate chain, the chain will be formed from
22 these certificates explicitly specified. If no chain is specified,
23 the library will try to complete the chain from the available CA
24 certificates in the trusted CA storage, see
25 L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>.
29 Only one set of extra chain certificates can be specified per SSL_CTX
30 structure. Different chains for different certificates (for example if both
31 RSA and DSA certificates are specified by the same server) or different SSL
32 structures with the same parent SSL_CTX cannot be specified using this
33 function. For more flexibility functions such as SSL_add1_chain_cert() should
38 SSL_CTX_add_extra_chain_cert() returns 1 on success. Check out the
39 error stack to find out the reason for failure otherwise.
44 L<SSL_CTX_use_certificate(3)|SSL_CTX_use_certificate(3)>,
45 L<SSL_CTX_set_client_cert_cb(3)|SSL_CTX_set_client_cert_cb(3)>,
46 L<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>
47 L<SSL_CTX_set0_chain(3)|SSL_CTX_set0_chain(3)>
48 L<SSL_CTX_set1_chain(3)|SSL_CTX_set1_chain(3)>
49 L<SSL_CTX_add0_chain_cert(3)|SSL_CTX_add0_chain_cert(3)>
50 L<SSL_CTX_add1_chain_cert(3)|SSL_CTX_add1_chain_cert(3)>
51 L<SSL_set0_chain(3)|SSL_set0_chain(3)>
52 L<SSL_set1_chain(3)|SSL_set1_chain(3)>
53 L<SSL_add0_chain_cert(3)|SSL_add0_chain_cert(3)>
54 L<SSL_add1_chain_cert(3)|SSL_add1_chain_cert(3)>
55 L<SSL_CTX_build_cert_chain(3)|SSL_CTX_build_cert_chain(3)>
56 L<SSL_build_cert_chain(3)|SSL_build_cert_chain(3)>