SSL_get_peer_cert_chain.pod 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. =pod
  2. =head1 NAME
  3. SSL_get_peer_cert_chain - get the X509 certificate chain of the peer
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. STACKOF(X509) *SSL_get_peer_cert_chain(const SSL *ssl);
  7. =head1 DESCRIPTION
  8. SSL_get_peer_cert_chain() returns a pointer to STACKOF(X509) certificates
  9. forming the certificate chain of the peer. If called on the client side,
  10. the stack also contains the peer's certificate; if called on the server
  11. side, the peer's certificate must be obtained separately using
  12. L<SSL_get_peer_certificate(3)|SSL_get_peer_certificate(3)>.
  13. If the peer did not present a certificate, NULL is returned.
  14. =head1 NOTES
  15. The peer certificate chain is not necessarily available after reusing
  16. a session, in which case a NULL pointer is returned.
  17. The reference count of the STACKOF(X509) object is not incremented.
  18. If the corresponding session is freed, the pointer must not be used
  19. any longer.
  20. =head1 RETURN VALUES
  21. The following return values can occur:
  22. =over 4
  23. =item NULL
  24. No certificate was presented by the peer or no connection was established
  25. or the certificate chain is no longer available when a session is reused.
  26. =item Pointer to a STACKOF(X509)
  27. The return value points to the certificate chain presented by the peer.
  28. =back
  29. =head1 SEE ALSO
  30. L<ssl(3)|ssl(3)>, L<SSL_get_peer_certificate(3)|SSL_get_peer_certificate(3)>
  31. =cut