summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2021-01-09 10:50:02 +0000
committertb <>2021-01-09 10:50:02 +0000
commit58d3abd1b5ad90b469e5f6e262640b283fcce28b (patch)
tree2c8eb40c47834fcd11886e3611c4be219ac56c67 /src/lib
parent326615a6e0d9c026a95e75db78bdfb2e53aa2972 (diff)
downloadopenbsd-58d3abd1b5ad90b469e5f6e262640b283fcce28b.tar.gz
openbsd-58d3abd1b5ad90b469e5f6e262640b283fcce28b.tar.bz2
openbsd-58d3abd1b5ad90b469e5f6e262640b283fcce28b.zip
Update SSL_get_shared_ciphers() documentation for ssl_lib.c r1.240
From schwarze, who explains: * Even though i wrote the original version of our documentation for this function, i now think the design of this function is so atrocious that it is better to call out the main limitations up front (server side only and silent truncation) rather than first giving the impression that it achieves something it actually doesn't and then later try to row back in a piece-meal manner. * Using a .Bl list for failure conditions in the RETURN VALUES section is no doubt unusual, but the conditions are so numerous and some of them are so surprising that i think it makes sense in this case. If a function is badly designed and has surprising properties, precision and clarity in the description are even more important than usual, and conciseness is better sacrificed. * Adding .Xr SSL_get_ciphers 3 seems helpful. ok beck inoguchi jsing tb
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/man/SSL_get_shared_ciphers.364
1 files changed, 47 insertions, 17 deletions
diff --git a/src/lib/libssl/man/SSL_get_shared_ciphers.3 b/src/lib/libssl/man/SSL_get_shared_ciphers.3
index 6b75439f86..207e8c42eb 100644
--- a/src/lib/libssl/man/SSL_get_shared_ciphers.3
+++ b/src/lib/libssl/man/SSL_get_shared_ciphers.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: SSL_get_shared_ciphers.3,v 1.4 2019/06/12 09:36:30 schwarze Exp $ 1.\" $OpenBSD: SSL_get_shared_ciphers.3,v 1.5 2021/01/09 10:50:02 tb Exp $
2.\" 2.\"
3.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> 3.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
4.\" 4.\"
@@ -14,7 +14,7 @@
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\" 16.\"
17.Dd $Mdocdate: June 12 2019 $ 17.Dd $Mdocdate: January 9 2021 $
18.Dt SSL_GET_SHARED_CIPHERS 3 18.Dt SSL_GET_SHARED_CIPHERS 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -29,12 +29,14 @@
29.Fa "int len" 29.Fa "int len"
30.Fc 30.Fc
31.Sh DESCRIPTION 31.Sh DESCRIPTION
32.Fn SSL_get_shared_ciphers 32If
33puts the names of the ciphers that are supported by both the client
34and the server of
35.Fa ssl 33.Fa ssl
36into the buffer 34contains a session in server mode,
37.Fa buf . 35.Fn SSL_get_shared_ciphers
36puts as many names of ciphers that are supported by both the client
37and the server into the buffer
38.Fa buf
39as the buffer is long enough to contain.
38Names are separated by colons. 40Names are separated by colons.
39At most 41At most
40.Fa len 42.Fa len
@@ -42,19 +44,47 @@ bytes are written to
42.Fa buf 44.Fa buf
43including the terminating NUL character. 45including the terminating NUL character.
44.Sh RETURN VALUES 46.Sh RETURN VALUES
45If
46.Fa ssl
47contains no session, if the session contains no shared ciphers,
48or if
49.Fa len
50is less than 2,
51.Fn SSL_get_shared_ciphers 47.Fn SSL_get_shared_ciphers
52returns 48returns
53.Dv NULL . 49.Fa buf
54Otherwise, it returns 50on success or
55.Fa buf . 51.Dv NULL
52on failure.
53The following situations cause failure:
54.Bl -bullet
55.It
56.Xr SSL_is_server 3
57is false, i.e.,
58.Ar ssl
59is not set to server mode.
60.It
61.Xr SSL_get_ciphers 3
62is
63.Dv NULL
64or empty, i.e., no ciphers are available for use by the server.
65.It
66.Xr SSL_get_session 3
67is
68.Dv NULL ,
69i.e.,
70.Ar ssl
71contains no session.
72.It
73.Xr SSL_get_client_ciphers 3
74is
75.Dv NULL
76or empty, i.e.,
77.Ar ssl
78contains no information about ciphers supported by the client,
79or the client does not support any ciphers.
80.It
81The
82.Fa len
83argument is less than 2.
84.El
56.Sh SEE ALSO 85.Sh SEE ALSO
57.Xr ssl 3 86.Xr ssl 3 ,
87.Xr SSL_get_ciphers 3
58.Sh HISTORY 88.Sh HISTORY
59.Fn SSL_get_shared_ciphers 89.Fn SSL_get_shared_ciphers
60first appeared in SSLeay 0.4.5b and has been available since 90first appeared in SSLeay 0.4.5b and has been available since