diff options
author | bentley <> | 2014-10-12 09:33:04 +0000 |
---|---|---|
committer | bentley <> | 2014-10-12 09:33:04 +0000 |
commit | 82b7f378b6907ab315a6e50322d2a0a8794a0aa9 (patch) | |
tree | a5087bf8d016a6041c2b6822fbecfd8f6c5e70b1 /src/lib/libssl/doc/SSL_get_peer_certificate.3 | |
parent | 0a63f0cf49369e1926567ab62e04e3355cedf0cd (diff) | |
download | openbsd-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.3 | 50 |
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 | ||
13 | returns a pointer to the X509 certificate the peer presented. | ||
14 | If the peer did not present a certificate, | ||
15 | .Dv NULL | ||
16 | is returned. | ||
17 | .Sh NOTES | ||
18 | Due to the protocol definition, a TLS/SSL server will always send a | ||
19 | certificate, if present. | ||
20 | A client will only send a certificate when explicitly requested to do so by the | ||
21 | server (see | ||
22 | .Xr SSL_CTX_set_verify 3 ) . | ||
23 | If an anonymous cipher is used, no certificates are sent. | ||
24 | .Pp | ||
25 | That a certificate is returned does not indicate information about the | ||
26 | verification state. | ||
27 | Use | ||
28 | .Xr SSL_get_verify_result 3 | ||
29 | to check the verification state. | ||
30 | .Pp | ||
31 | The reference count of the | ||
32 | .Vt X509 | ||
33 | object is incremented by one, so that it will not be destroyed when the session | ||
34 | containing the peer certificate is freed. | ||
35 | The | ||
36 | .Vt X509 | ||
37 | object must be explicitly freed using | ||
38 | .Xr X509_free 3 . | ||
39 | .Sh RETURN VALUES | ||
40 | The following return values can occur: | ||
41 | .Bl -tag -width Ds | ||
42 | .It Dv NULL | ||
43 | No certificate was presented by the peer or no connection was established. | ||
44 | .It Pointer to an X509 certificate | ||
45 | The 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 | ||