172613Skris=pod
272613Skris
372613Skris=head1 NAME
472613Skris
572613SkrisSSL_CTX_add_extra_chain_cert - add certificate to chain
672613Skris
772613Skris=head1 SYNOPSIS
872613Skris
972613Skris #include <openssl/ssl.h>
1072613Skris
1172613Skris long SSL_CTX_add_extra_chain_cert(SSL_CTX ctx, X509 *x509)
1272613Skris
1372613Skris=head1 DESCRIPTION
1472613Skris
1572613SkrisSSL_CTX_add_extra_chain_cert() adds the certificate B<x509> to the certificate
1672613Skrischain presented together with the certificate. Several certificates
1772613Skriscan be added one after the other.
1872613Skris
1972613Skris=head1 NOTES
2072613Skris
2172613SkrisWhen constructing the certificate chain, the chain will be formed from
2272613Skristhese certificates explicitly specified. If no chain is specified,
2372613Skristhe library will try to complete the chain from the available CA
2472613Skriscertificates in the trusted CA storage, see
2572613SkrisL<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>.
2672613Skris
27269686SjkimThe B<x509> certificate provided to SSL_CTX_add_extra_chain_cert() will be freed by the library when the B<SSL_CTX> is destroyed. An application B<should not> free the B<x509> object.
28269686Sjkim
29269686Sjkim=head1 RESTRICTIONS
30269686Sjkim
31269686SjkimOnly one set of extra chain certificates can be specified per SSL_CTX
32269686Sjkimstructure. Different chains for different certificates (for example if both
33269686SjkimRSA and DSA certificates are specified by the same server) or different SSL
34269686Sjkimstructures with the same parent SSL_CTX cannot be specified using this
35269686Sjkimfunction.
36269686Sjkim
3772613Skris=head1 RETURN VALUES
3872613Skris
3972613SkrisSSL_CTX_add_extra_chain_cert() returns 1 on success. Check out the
4072613Skriserror stack to find out the reason for failure otherwise.
4172613Skris
4272613Skris=head1 SEE ALSO
4372613Skris
4472613SkrisL<ssl(3)|ssl(3)>,
4572613SkrisL<SSL_CTX_use_certificate(3)|SSL_CTX_use_certificate(3)>,
46100928SnectarL<SSL_CTX_set_client_cert_cb(3)|SSL_CTX_set_client_cert_cb(3)>,
4772613SkrisL<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)>
4872613Skris
4972613Skris=cut
50