]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/ssl/SSL_get_peer_cert_chain.pod
Fix L<> content in manpages
[thirdparty/openssl.git] / doc / ssl / SSL_get_peer_cert_chain.pod
CommitLineData
4759abc5
RL
1=pod
2
3=head1 NAME
4
5SSL_get_peer_cert_chain - get the X509 certificate chain of the peer
6
7=head1 SYNOPSIS
8
9 #include <openssl/ssl.h>
10
e5676b83 11 STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *ssl);
4759abc5
RL
12
13=head1 DESCRIPTION
14
e5676b83 15SSL_get_peer_cert_chain() returns a pointer to STACK_OF(X509) certificates
4759abc5
RL
16forming the certificate chain of the peer. If called on the client side,
17the stack also contains the peer's certificate; if called on the server
52d160d8 18side, the peer's certificate must be obtained separately using
9b86974e 19L<SSL_get_peer_certificate(3)>.
4759abc5
RL
20If the peer did not present a certificate, NULL is returned.
21
22=head1 NOTES
23
24The peer certificate chain is not necessarily available after reusing
25a session, in which case a NULL pointer is returned.
26
e5676b83 27The reference count of the STACK_OF(X509) object is not incremented.
4759abc5
RL
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
e5676b83 42=item Pointer to a STACK_OF(X509)
4759abc5
RL
43
44The return value points to the certificate chain presented by the peer.
45
46=back
47
48=head1 SEE ALSO
49
9b86974e 50L<ssl(3)>, L<SSL_get_peer_certificate(3)>
4759abc5
RL
51
52=cut