summaryrefslogtreecommitdiff
path: root/src/lib/libssl/doc/SSL_get_peer_cert_chain.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/doc/SSL_get_peer_cert_chain.3')
-rw-r--r--src/lib/libssl/doc/SSL_get_peer_cert_chain.344
1 files changed, 44 insertions, 0 deletions
diff --git a/src/lib/libssl/doc/SSL_get_peer_cert_chain.3 b/src/lib/libssl/doc/SSL_get_peer_cert_chain.3
new file mode 100644
index 0000000000..850e8cf913
--- /dev/null
+++ b/src/lib/libssl/doc/SSL_get_peer_cert_chain.3
@@ -0,0 +1,44 @@
1.Dd $Mdocdate: October 12 2014 $
2.Dt SSL_GET_PEER_CERT_CHAIN 3
3.Os
4.Sh NAME
5.Nm SSL_get_peer_cert_chain
6.Nd get the X509 certificate chain of the peer
7.Sh SYNOPSIS
8.In openssl/ssl.h
9.Ft STACK_OF(X509) *
10.Fn SSL_get_peer_cert_chain "const SSL *ssl"
11.Sh DESCRIPTION
12.Fn SSL_get_peer_cert_chain
13returns a pointer to
14.Dv STACK_OF Ns Po Vt X509 Pc
15certificates forming the certificate chain of the peer.
16If called on the client side, the stack also contains the peer's certificate;
17if called on the server side, the peer's certificate must be obtained
18separately using
19.Xr SSL_get_peer_certificate 3 .
20If the peer did not present a certificate,
21.Dv NULL
22is returned.
23.Sh NOTES
24The peer certificate chain is not necessarily available after reusing a
25session, in which case a
26.Dv NULL
27pointer is returned.
28.Pp
29The reference count of the
30.Dv STACK_OF Ns Po Vt X509 Pc
31object is not incremented.
32If the corresponding session is freed, the pointer must not be used any longer.
33.Sh RETURN VALUES
34The following return values can occur:
35.Bl -tag -width Ds
36.It Dv NULL
37No certificate was presented by the peer or no connection was established or
38the certificate chain is no longer available when a session is reused.
39.It Pointer to a Dv STACK_OF Ns Po X509 Pc
40The return value points to the certificate chain presented by the peer.
41.El
42.Sh SEE ALSO
43.Xr ssl 3 ,
44.Xr SSL_get_peer_certificate 3