summaryrefslogtreecommitdiff
path: root/src/lib/libssl/doc/SSL_get_peer_certificate.3
diff options
context:
space:
mode:
authorbentley <>2014-10-12 09:33:04 +0000
committerbentley <>2014-10-12 09:33:04 +0000
commit82b7f378b6907ab315a6e50322d2a0a8794a0aa9 (patch)
treea5087bf8d016a6041c2b6822fbecfd8f6c5e70b1 /src/lib/libssl/doc/SSL_get_peer_certificate.3
parent0a63f0cf49369e1926567ab62e04e3355cedf0cd (diff)
downloadopenbsd-82b7f378b6907ab315a6e50322d2a0a8794a0aa9.tar.gz
openbsd-82b7f378b6907ab315a6e50322d2a0a8794a0aa9.tar.bz2
openbsd-82b7f378b6907ab315a6e50322d2a0a8794a0aa9.zip
Convert libssl manpages from pod to mdoc(7).
libcrypto has not been started yet. ok schwarze@ miod@
Diffstat (limited to 'src/lib/libssl/doc/SSL_get_peer_certificate.3')
-rw-r--r--src/lib/libssl/doc/SSL_get_peer_certificate.350
1 files changed, 50 insertions, 0 deletions
diff --git a/src/lib/libssl/doc/SSL_get_peer_certificate.3 b/src/lib/libssl/doc/SSL_get_peer_certificate.3
new file mode 100644
index 0000000000..7e4ab3fccf
--- /dev/null
+++ b/src/lib/libssl/doc/SSL_get_peer_certificate.3
@@ -0,0 +1,50 @@
1.Dd $Mdocdate: October 12 2014 $
2.Dt SSL_GET_PEER_CERTIFICATE 3
3.Os
4.Sh NAME
5.Nm SSL_get_peer_certificate
6.Nd get the X509 certificate of the peer
7.Sh SYNOPSIS
8.In openssl/ssl.h
9.Ft X509 *
10.Fn SSL_get_peer_certificate "const SSL *ssl"
11.Sh DESCRIPTION
12.Fn SSL_get_peer_certificate
13returns a pointer to the X509 certificate the peer presented.
14If the peer did not present a certificate,
15.Dv NULL
16is returned.
17.Sh NOTES
18Due to the protocol definition, a TLS/SSL server will always send a
19certificate, if present.
20A client will only send a certificate when explicitly requested to do so by the
21server (see
22.Xr SSL_CTX_set_verify 3 ) .
23If an anonymous cipher is used, no certificates are sent.
24.Pp
25That a certificate is returned does not indicate information about the
26verification state.
27Use
28.Xr SSL_get_verify_result 3
29to check the verification state.
30.Pp
31The reference count of the
32.Vt X509
33object is incremented by one, so that it will not be destroyed when the session
34containing the peer certificate is freed.
35The
36.Vt X509
37object must be explicitly freed using
38.Xr X509_free 3 .
39.Sh RETURN VALUES
40The following return values can occur:
41.Bl -tag -width Ds
42.It Dv NULL
43No certificate was presented by the peer or no connection was established.
44.It Pointer to an X509 certificate
45The return value points to the certificate presented by the peer.
46.El
47.Sh SEE ALSO
48.Xr ssl 3 ,
49.Xr SSL_CTX_set_verify 3 ,
50.Xr SSL_get_verify_result 3