blob: 89abc172b4c9684faf157f3aae54cc1cc77d595b (
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
|
.\"
.\" $OpenBSD: SSL_get_ciphers.3,v 1.2 2014/12/02 14:11:01 jmc Exp $
.\"
.Dd $Mdocdate: December 2 2014 $
.Dt SSL_GET_CIPHERS 3
.Os
.Sh NAME
.Nm SSL_get_ciphers ,
.Nm SSL_get_cipher_list
.Nd get list of available SSL_CIPHERs
.Sh SYNOPSIS
.In openssl/ssl.h
.Ft STACK_OF(SSL_CIPHER) *
.Fn SSL_get_ciphers "const SSL *ssl"
.Ft const char *
.Fn SSL_get_cipher_list "const SSL *ssl" "int priority"
.Sh DESCRIPTION
.Fn SSL_get_ciphers
returns the stack of available
.Vt SSL_CIPHER Ns s
for
.Fa ssl ,
sorted by preference.
If
.Fa ssl
is
.Dv NULL
or no ciphers are available,
.Dv NULL
is returned.
.Pp
.Fn SSL_get_cipher_list
returns a pointer to the name of the
.Vt SSL_CIPHER
listed for
.Fa ssl
with
.Fa priority .
If
.Fa ssl
is
.Dv NULL ,
no ciphers are available, or there are fewer ciphers than
.Fa priority
available,
.Dv NULL
is returned.
.Sh NOTES
The details of the ciphers obtained by
.Fn SSL_get_ciphers
can be obtained using the
.Xr SSL_CIPHER_get_name 3
family of functions.
.Pp
Call
.Fn SSL_get_cipher_list
with
.Fa priority
starting from 0 to obtain the sorted list of available ciphers, until
.Dv NULL
is returned.
.Sh RETURN VALUES
See
.Sx DESCRIPTION .
.Sh SEE ALSO
.Xr ssl 3 ,
.Xr SSL_CIPHER_get_name 3 ,
.Xr SSL_CTX_set_cipher_list 3
|