update libressl to v2.7.4
[unleashed.git] / lib / libssl / man / SSL_get_shared_ciphers.3
blob86ec0be660086bfd13a7fcfc4fa44afdda5cece2
1 .\"     $OpenBSD: SSL_get_shared_ciphers.3,v 1.2 2018/03/21 05:07:04 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: March 21 2018 $
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
33 puts the names of the ciphers that are supported by both the client
34 and the server of
35 .Fa ssl
36 into the buffer
37 .Fa buf .
38 Names are separated by colons.
39 At most
40 .Fa len
41 bytes are written to
42 .Fa buf
43 including the terminating NUL character.
44 .Sh RETURN VALUES
46 .Fa ssl
47 contains no session, if the session contains no shared ciphers,
48 or if
49 .Fa len
50 is less than 2,
51 .Fn SSL_get_shared_ciphers
52 returns
53 .Dv NULL .
54 Otherwise, it returns
55 .Fa buf .
56 .Sh HISTORY
57 .Fn SSL_get_shared_ciphers
58 appeared before SSLeay 0.8 and has been available since
59 .Ox 2.4 .
60 .Sh BUGS
61 If the list is too long to fit into
62 .Fa len
63 bytes, it is silently truncated after the last cipher name that fits,
64 and all following ciphers are skipped.
65 If the buffer is very short such that even the first cipher name
66 does not fit, an empty string is returned even when some shared
67 ciphers are actually available.
68 .Pp
69 There is no easy way to find out how much space is required for
70 .Fa buf
71 or whether the supplied space was sufficient.