summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2016-12-10 14:56:56 +0000
committerschwarze <>2016-12-10 14:56:56 +0000
commitb769bcaecab85091f348cf5c186e7b820fe0489f (patch)
treed0236b0245d646660b95370081c543cd0a7920d9 /src/lib
parent7861e7da79ff45f2ba53802840b5e46511f3b002 (diff)
downloadopenbsd-b769bcaecab85091f348cf5c186e7b820fe0489f.tar.gz
openbsd-b769bcaecab85091f348cf5c186e7b820fe0489f.tar.bz2
openbsd-b769bcaecab85091f348cf5c186e7b820fe0489f.zip
Write an SSL_get_shared_ciphers(3) manual from scratch; another one
where BUGS is longer than DESCRIPTION. The function is listed in ssl(3) and <openssl/ssl.h>, so it's clearly public. The code looks slightly mysterious to me, so it would be welcome if somebody more familiar with TLS protocols could check factual accuracy.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/man/Makefile3
-rw-r--r--src/lib/libssl/man/SSL_get_shared_ciphers.370
2 files changed, 72 insertions, 1 deletions
diff --git a/src/lib/libssl/man/Makefile b/src/lib/libssl/man/Makefile
index d1d7bf3cc6..40e0d32a79 100644
--- a/src/lib/libssl/man/Makefile
+++ b/src/lib/libssl/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.51 2016/12/10 13:54:32 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.52 2016/12/10 14:56:56 schwarze Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
@@ -73,6 +73,7 @@ MAN = BIO_f_ssl.3 \
73 SSL_get_peer_certificate.3 \ 73 SSL_get_peer_certificate.3 \
74 SSL_get_rbio.3 \ 74 SSL_get_rbio.3 \
75 SSL_get_session.3 \ 75 SSL_get_session.3 \
76 SSL_get_shared_ciphers.3 \
76 SSL_get_state.3 \ 77 SSL_get_state.3 \
77 SSL_get_verify_result.3 \ 78 SSL_get_verify_result.3 \
78 SSL_get_version.3 \ 79 SSL_get_version.3 \
diff --git a/src/lib/libssl/man/SSL_get_shared_ciphers.3 b/src/lib/libssl/man/SSL_get_shared_ciphers.3
new file mode 100644
index 0000000000..915ad68215
--- /dev/null
+++ b/src/lib/libssl/man/SSL_get_shared_ciphers.3
@@ -0,0 +1,70 @@
1.\" $OpenBSD: SSL_get_shared_ciphers.3,v 1.1 2016/12/10 14:56:56 schwarze Exp $
2.\"
3.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: December 10 2016 $
18.Dt SSL_GET_SHARED_CIPHERS 3
19.Os
20.Sh NAME
21.Nm SSL_get_shared_ciphers
22.Nd ciphers supported by both client and server
23.Sh SYNOPSIS
24.In openssl/ssl.h
25.Ft char *
26.Fo SSL_get_shared_ciphers
27.Fa "const SSL *ssl"
28.Fa "char *buf"
29.Fa "int len"
30.Fc
31.Sh DESCRIPTION
32.Fn SSL_get_shared_ciphers
33puts the names of the ciphers that are supported by both the client
34and the server of
35.Fa ssl
36into the buffer
37.Fa buf .
38Names are separated by colons.
39At most
40.Fa len
41bytes are written to
42.Fa buf
43including the terminating NUL character.
44.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
52returns
53.Dv NULL .
54Otherwise, it returns
55.Fa buf .
56.Sh HISTORY
57.Fn SSL_get_shared_ciphers
58is available in all versions of OpenSSL.
59.Sh BUGS
60If the list is too long to fit into
61.Fa len
62bytes, it is silently truncated after the last cipher name that fits,
63and all following ciphers are skipped.
64If the buffer is very short such that even the first cipher name
65does not fit, an empty string is returned even when some shared
66ciphers are actually available.
67.Pp
68There is no easy way to find out how much space is required for
69.Fa buf
70or whether the supplied space was sufficient.