1SSL_CTX_set_cipher_list(3)          OpenSSL         SSL_CTX_set_cipher_list(3)
2
3
4

NAME

6       SSL_CTX_set_cipher_list, SSL_set_cipher_list - choose list of available
7       SSL_CIPHERs
8

SYNOPSIS

10        #include <openssl/ssl.h>
11
12        int SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str);
13        int SSL_set_cipher_list(SSL *ssl, const char *str);
14

DESCRIPTION

16       SSL_CTX_set_cipher_list() sets the list of available ciphers for ctx
17       using the control string str. The format of the string is described in
18       ciphers(1). The list of ciphers is inherited by all ssl objects created
19       from ctx.
20
21       SSL_set_cipher_list() sets the list of ciphers only for ssl.
22

NOTES

24       The control string str should be universally usable and not depend on
25       details of the library configuration (ciphers compiled in). Thus no
26       syntax checking takes place. Items that are not recognized, because the
27       corresponding ciphers are not compiled in or because they are mistyped,
28       are simply ignored. Failure is only flagged if no ciphers could be
29       collected at all.
30
31       It should be noted, that inclusion of a cipher to be used into the list
32       is a necessary condition. On the client side, the inclusion into the
33       list is also sufficient. On the server side, additional restrictions
34       apply. All ciphers have additional requirements. ADH ciphers don't need
35       a certificate, but DH-parameters must have been set. All other ciphers
36       need a corresponding certificate and key.
37
38       A RSA cipher can only be chosen, when a RSA certificate is available.
39       RSA export ciphers with a keylength of 512 bits for the RSA key require
40       a temporary 512 bit RSA key, as typically the supplied key has a length
41       of 1024 bit (see SSL_CTX_set_tmp_rsa_callback(3)).  RSA ciphers using
42       DHE need a certificate and key and additional DH-parameters (see
43       SSL_CTX_set_tmp_dh_callback(3)).
44
45       A DSA cipher can only be chosen, when a DSA certificate is available.
46       DSA ciphers always use DH key exchange and therefore need DH-parameters
47       (see SSL_CTX_set_tmp_dh_callback(3)).
48
49       When these conditions are not met for any cipher in the list (e.g. a
50       client only supports export RSA ciphers with a asymmetric key length of
51       512 bits and the server is not configured to use temporary RSA keys),
52       the "no shared cipher" (SSL_R_NO_SHARED_CIPHER) error is generated and
53       the handshake will fail.
54
55       If the cipher list does not contain any SSLv2 cipher suites (this is
56       the default) then SSLv2 is effectively disabled and neither clients nor
57       servers will attempt to use SSLv2.
58

RETURN VALUES

60       SSL_CTX_set_cipher_list() and SSL_set_cipher_list() return 1 if any
61       cipher could be selected and 0 on complete failure.
62

SEE ALSO

64       ssl(3), SSL_get_ciphers(3), SSL_CTX_use_certificate(3),
65       SSL_CTX_set_tmp_rsa_callback(3), SSL_CTX_set_tmp_dh_callback(3),
66       ciphers(1)
67
68
69
701.0.2o                            2018-03-27        SSL_CTX_set_cipher_list(3)
Impressum