SSL_CTX_add_extra_chain_cert.pod revision 290207
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 27269682SjkimThe 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. 28269682Sjkim 29269682Sjkim=head1 RESTRICTIONS 30269682Sjkim 31269682SjkimOnly one set of extra chain certificates can be specified per SSL_CTX 32269682Sjkimstructure. Different chains for different certificates (for example if both 33269682SjkimRSA and DSA certificates are specified by the same server) or different SSL 34269682Sjkimstructures with the same parent SSL_CTX cannot be specified using this 35290207Sjkimfunction. For more flexibility functions such as SSL_add1_chain_cert() should 36290207Sjkimbe used instead. 37269682Sjkim 3872613Skris=head1 RETURN VALUES 3972613Skris 4072613SkrisSSL_CTX_add_extra_chain_cert() returns 1 on success. Check out the 4172613Skriserror stack to find out the reason for failure otherwise. 4272613Skris 4372613Skris=head1 SEE ALSO 4472613Skris 4572613SkrisL<ssl(3)|ssl(3)>, 4672613SkrisL<SSL_CTX_use_certificate(3)|SSL_CTX_use_certificate(3)>, 47100928SnectarL<SSL_CTX_set_client_cert_cb(3)|SSL_CTX_set_client_cert_cb(3)>, 4872613SkrisL<SSL_CTX_load_verify_locations(3)|SSL_CTX_load_verify_locations(3)> 49290207SjkimL<SSL_CTX_set0_chain(3)|SSL_CTX_set0_chain(3)> 50290207SjkimL<SSL_CTX_set1_chain(3)|SSL_CTX_set1_chain(3)> 51290207SjkimL<SSL_CTX_add0_chain_cert(3)|SSL_CTX_add0_chain_cert(3)> 52290207SjkimL<SSL_CTX_add1_chain_cert(3)|SSL_CTX_add1_chain_cert(3)> 53290207SjkimL<SSL_set0_chain(3)|SSL_set0_chain(3)> 54290207SjkimL<SSL_set1_chain(3)|SSL_set1_chain(3)> 55290207SjkimL<SSL_add0_chain_cert(3)|SSL_add0_chain_cert(3)> 56290207SjkimL<SSL_add1_chain_cert(3)|SSL_add1_chain_cert(3)> 57290207SjkimL<SSL_CTX_build_cert_chain(3)|SSL_CTX_build_cert_chain(3)> 58290207SjkimL<SSL_build_cert_chain(3)|SSL_build_cert_chain(3)> 5972613Skris 6072613Skris=cut 61