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, SSL_CTX_set_ciphersuites,
7       SSL_set_ciphersuites - choose list of available 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
15        int SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str);
16        int SSL_set_ciphersuites(SSL *s, const char *str);
17

DESCRIPTION

19       SSL_CTX_set_cipher_list() sets the list of available ciphers (TLSv1.2
20       and below) for ctx using the control string str. The format of the
21       string is described in ciphers(1). The list of ciphers is inherited by
22       all ssl objects created from ctx. This function does not impact TLSv1.3
23       ciphersuites. Use SSL_CTX_set_ciphersuites() to configure those.
24
25       SSL_set_cipher_list() sets the list of ciphers (TLSv1.2 and below) only
26       for ssl.
27
28       SSL_CTX_set_ciphersuites() is used to configure the available TLSv1.3
29       ciphersuites for ctx. This is a simple colon (":") separated list of
30       TLSv1.3 ciphersuite names in order of perference. Valid TLSv1.3
31       ciphersuite names are:
32
33       TLS_AES_128_GCM_SHA256
34       TLS_AES_256_GCM_SHA384
35       TLS_CHACHA20_POLY1305_SHA256
36       TLS_AES_128_CCM_SHA256
37       TLS_AES_128_CCM_8_SHA256
38
39       An empty list is permissible. The default value for the this setting
40       is:
41
42       "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256"
43
44       SSL_set_ciphersuites() is the same as SSL_CTX_set_ciphersuites() except
45       it configures the ciphersuites for ssl.
46

NOTES

48       The control string str for SSL_CTX_set_cipher_list() and
49       SSL_set_cipher_list() should be universally usable and not depend on
50       details of the library configuration (ciphers compiled in). Thus no
51       syntax checking takes place. Items that are not recognized, because the
52       corresponding ciphers are not compiled in or because they are mistyped,
53       are simply ignored. Failure is only flagged if no ciphers could be
54       collected at all.
55
56       It should be noted, that inclusion of a cipher to be used into the list
57       is a necessary condition. On the client side, the inclusion into the
58       list is also sufficient unless the security level excludes it. On the
59       server side, additional restrictions apply. All ciphers have additional
60       requirements.  ADH ciphers don't need a certificate, but DH-parameters
61       must have been set.  All other ciphers need a corresponding certificate
62       and key.
63
64       A RSA cipher can only be chosen, when a RSA certificate is available.
65       RSA ciphers using DHE need a certificate and key and additional DH-
66       parameters (see SSL_CTX_set_tmp_dh_callback(3)).
67
68       A DSA cipher can only be chosen, when a DSA certificate is available.
69       DSA ciphers always use DH key exchange and therefore need DH-parameters
70       (see SSL_CTX_set_tmp_dh_callback(3)).
71
72       When these conditions are not met for any cipher in the list (e.g. a
73       client only supports export RSA ciphers with an asymmetric key length
74       of 512 bits and the server is not configured to use temporary RSA
75       keys), the "no shared cipher" (SSL_R_NO_SHARED_CIPHER) error is
76       generated and the handshake will fail.
77

RETURN VALUES

79       SSL_CTX_set_cipher_list() and SSL_set_cipher_list() return 1 if any
80       cipher could be selected and 0 on complete failure.
81
82       SSL_CTX_set_ciphersuites() and SSL_set_ciphersuites() return 1 if the
83       requested ciphersuite list was configured, and 0 otherwise.
84

SEE ALSO

86       ssl(7), SSL_get_ciphers(3), SSL_CTX_use_certificate(3),
87       SSL_CTX_set_tmp_dh_callback(3), ciphers(1)
88
90       Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
91
92       Licensed under the OpenSSL license (the "License").  You may not use
93       this file except in compliance with the License.  You can obtain a copy
94       in the file LICENSE in the source distribution or at
95       <https://www.openssl.org/source/license.html>.
96
97
98
991.1.1c                            2019-05-28        SSL_CTX_SET_CIPHER_LIST(3)
Impressum