SSL_CTX_add_extra_chain_cert.pod 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. =pod
  2. =head1 NAME
  3. SSL_CTX_add_extra_chain_cert, SSL_CTX_clear_extra_chain_certs - add or clear
  4. extra chain certificates
  5. =head1 SYNOPSIS
  6. #include <openssl/ssl.h>
  7. long SSL_CTX_add_extra_chain_cert(SSL_CTX *ctx, X509 *x509);
  8. long SSL_CTX_clear_extra_chain_certs(SSL_CTX *ctx);
  9. =head1 DESCRIPTION
  10. SSL_CTX_add_extra_chain_cert() adds the certificate B<x509> to the extra chain
  11. certificates associated with B<ctx>. Several certificates can be added one
  12. after another.
  13. SSL_CTX_clear_extra_chain_certs() clears all extra chain certificates
  14. associated with B<ctx>.
  15. These functions are implemented as macros.
  16. =head1 NOTES
  17. When sending a certificate chain, extra chain certificates are sent in order
  18. following the end entity certificate.
  19. If no chain is specified, the library will try to complete the chain from the
  20. available CA certificates in the trusted CA storage, see
  21. L<SSL_CTX_load_verify_locations(3)>.
  22. The B<x509> certificate provided to SSL_CTX_add_extra_chain_cert() will be
  23. freed by the library when the B<SSL_CTX> is destroyed. An application
  24. B<should not> free the B<x509> object.
  25. =head1 RESTRICTIONS
  26. Only one set of extra chain certificates can be specified per SSL_CTX
  27. structure. Different chains for different certificates (for example if both
  28. RSA and DSA certificates are specified by the same server) or different SSL
  29. structures with the same parent SSL_CTX cannot be specified using this
  30. function. For more flexibility functions such as SSL_add1_chain_cert() should
  31. be used instead.
  32. =head1 RETURN VALUES
  33. SSL_CTX_add_extra_chain_cert() and SSL_CTX_clear_extra_chain_certs() return
  34. 1 on success and 0 for failure. Check out the error stack to find out the
  35. reason for failure.
  36. =head1 SEE ALSO
  37. L<ssl(7)>,
  38. L<SSL_CTX_use_certificate(3)>,
  39. L<SSL_CTX_set_client_cert_cb(3)>,
  40. L<SSL_CTX_load_verify_locations(3)>
  41. L<SSL_CTX_set0_chain(3)>
  42. L<SSL_CTX_set1_chain(3)>
  43. L<SSL_CTX_add0_chain_cert(3)>
  44. L<SSL_CTX_add1_chain_cert(3)>
  45. L<SSL_set0_chain(3)>
  46. L<SSL_set1_chain(3)>
  47. L<SSL_add0_chain_cert(3)>
  48. L<SSL_add1_chain_cert(3)>
  49. L<SSL_CTX_build_cert_chain(3)>
  50. L<SSL_build_cert_chain(3)>
  51. =head1 COPYRIGHT
  52. Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
  53. Licensed under the OpenSSL license (the "License"). You may not use
  54. this file except in compliance with the License. You can obtain a copy
  55. in the file LICENSE in the source distribution or at
  56. L<https://www.openssl.org/source/license.html>.
  57. =cut