SSL_get_peer_cert_chain.pod revision 267256
1147531Sru=pod 2147531Sru 3147531Sru=head1 NAME 4147531Sru 5147531SruSSL_get_peer_cert_chain - get the X509 certificate chain of the peer 6147531Sru 7147531Sru=head1 SYNOPSIS 8147531Sru 9147531Sru #include <openssl/ssl.h> 10147531Sru 11147531Sru STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *ssl); 12147531Sru 13147531Sru=head1 DESCRIPTION 14147531Sru 15147531SruSSL_get_peer_cert_chain() returns a pointer to STACK_OF(X509) certificates 16147531Sruforming the certificate chain of the peer. If called on the client side, 17147531Sruthe stack also contains the peer's certificate; if called on the server 18147531Sruside, the peer's certificate must be obtained separately using 19147531SruL<SSL_get_peer_certificate(3)|SSL_get_peer_certificate(3)>. 20147531SruIf the peer did not present a certificate, NULL is returned. 21147531Sru 22147531Sru=head1 NOTES 23147531Sru 24147531SruThe peer certificate chain is not necessarily available after reusing 25147531Srua session, in which case a NULL pointer is returned. 26147531Sru 27147531SruThe reference count of the STACK_OF(X509) object is not incremented. 28147531SruIf the corresponding session is freed, the pointer must not be used 29147531Sruany longer. 30155727Smarius 31147531Sru=head1 RETURN VALUES 32147531Sru 33147531SruThe following return values can occur: 34147531Sru 35147531Sru=over 4 36147531Sru 37147531Sru=item NULL 38147531Sru 39147531SruNo certificate was presented by the peer or no connection was established 40147531Sruor the certificate chain is no longer available when a session is reused. 41147531Sru 42147531Sru=item Pointer to a STACK_OF(X509) 43147531Sru 44147531SruThe return value points to the certificate chain presented by the peer. 45147531Sru 46147531Sru=back 47147531Sru 48155727Smarius=head1 SEE ALSO 49155727Smarius 50147531SruL<ssl(3)|ssl(3)>, L<SSL_get_peer_certificate(3)|SSL_get_peer_certificate(3)> 51155727Smarius 52155727Smarius=cut 53155727Smarius