summaryrefslogtreecommitdiff
path: root/lib/libssl/man/SSL_get_shared_ciphers.3
blob: 45228921f9371a06bbf91dc26b538d4ce5887559 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
.\"	$OpenBSD: SSL_get_shared_ciphers.3,v 1.3 2018/03/27 17:35:50 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: March 27 2018 $
.Dt SSL_GET_SHARED_CIPHERS 3
.Os
.Sh NAME
.Nm SSL_get_shared_ciphers
.Nd ciphers supported by both client and server
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft char *
.Fo SSL_get_shared_ciphers
.Fa "const SSL *ssl"
.Fa "char *buf"
.Fa "int len"
.Fc
.Sh DESCRIPTION
.Fn SSL_get_shared_ciphers
puts the names of the ciphers that are supported by both the client
and the server of
.Fa ssl
into the buffer
.Fa buf .
Names are separated by colons.
At most
.Fa len
bytes are written to
.Fa buf
including the terminating NUL character.
.Sh RETURN VALUES
If
.Fa ssl
contains no session, if the session contains no shared ciphers,
or if
.Fa len
is less than 2,
.Fn SSL_get_shared_ciphers
returns
.Dv NULL .
Otherwise, it returns
.Fa buf .
.Sh HISTORY
.Fn SSL_get_shared_ciphers
first appeared in SSLeay 0.4.5b and has been available since
.Ox 2.4 .
.Sh BUGS
If the list is too long to fit into
.Fa len
bytes, it is silently truncated after the last cipher name that fits,
and all following ciphers are skipped.
If the buffer is very short such that even the first cipher name
does not fit, an empty string is returned even when some shared
ciphers are actually available.
.Pp
There is no easy way to find out how much space is required for
.Fa buf
or whether the supplied space was sufficient.