SSL_get_peer_cert_chain.pod revision 68651
1296403Sbdrewery=pod 2296403Sbdrewery 3296403Sbdrewery=head1 NAME 4296403Sbdrewery 5296403SbdrewerySSL_get_peer_cert_chain - get the X509 certificate chain of the peer 6296403Sbdrewery 7296403Sbdrewery=head1 SYNOPSIS 8296403Sbdrewery 9296403Sbdrewery #include <openssl/ssl.h> 10296403Sbdrewery 11296403Sbdrewery STACKOF(X509) *SSL_get_peer_cert_chain(SSL *ssl); 12296403Sbdrewery 13296403Sbdrewery=head1 DESCRIPTION 14296403Sbdrewery 15296403SbdrewerySSL_get_peer_cert_chain() returns a pointer to STACKOF(X509) certificates 16296403Sbdreweryforming the certificate chain of the peer. If called on the client side, 17296403Sbdrewerythe stack also contains the peer's certificate; if called on the server 18296403Sbdreweryside, the peer's certificate must be obtained seperately using 19296403SbdreweryL<SSL_get_peer_certificate(3)|SSL_get_peer_certificate(3)>. 20296403SbdreweryIf the peer did not present a certificate, NULL is returned. 21296403Sbdrewery 22296403Sbdrewery=head1 NOTES 23296403Sbdrewery 24The peer certificate chain is not necessarily available after reusing 25a session, in which case a NULL pointer is returned. 26 27The reference count of the STACKOF(X509) object is not incremented. 28If the corresponding session is freed, the pointer must not be used 29any longer. 30 31=head1 RETURN VALUES 32 33The following return values can occur: 34 35=over 4 36 37=item NULL 38 39No certificate was presented by the peer or no connection was established 40or the certificate chain is no longer available when a session is reused. 41 42=item Pointer to a STACKOF(X509) 43 44The return value points to the certificate chain presented by the peer. 45 46=back 47 48=head1 SEE ALSO 49 50L<ssl(3)|ssl(3)>, L<SSL_get_peer_certificate(3)|SSL_get_peer_certificate(3)> 51 52=cut 53