summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2018-04-10 21:37:20 +0000
committerschwarze <>2018-04-10 21:37:20 +0000
commitab5441dabf7863796dfb9a9fa4b4fc32a5330169 (patch)
tree943620cc08801ac81ca46f3706518832591b4c17 /src
parent4080c8d7f9a983719cec4f6e0bc108dfb59be2e9 (diff)
downloadopenbsd-ab5441dabf7863796dfb9a9fa4b4fc32a5330169.tar.gz
openbsd-ab5441dabf7863796dfb9a9fa4b4fc32a5330169.tar.bz2
openbsd-ab5441dabf7863796dfb9a9fa4b4fc32a5330169.zip
Write documentation for the control string parameter from scratch,
collecting the information by inspecting the source code.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/man/SSL_CTX_set_cipher_list.3303
1 files changed, 273 insertions, 30 deletions
diff --git a/src/lib/libssl/man/SSL_CTX_set_cipher_list.3 b/src/lib/libssl/man/SSL_CTX_set_cipher_list.3
index 59bcfb5fc5..a64826e578 100644
--- a/src/lib/libssl/man/SSL_CTX_set_cipher_list.3
+++ b/src/lib/libssl/man/SSL_CTX_set_cipher_list.3
@@ -1,7 +1,24 @@
1.\" $OpenBSD: SSL_CTX_set_cipher_list.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $ 1.\" $OpenBSD: SSL_CTX_set_cipher_list.3,v 1.7 2018/04/10 21:37:20 schwarze Exp $
2.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 2.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
3.\" 3.\"
4.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. 4.\" This file is a derived work.
5.\" The changes are covered by the following Copyright and license:
6.\"
7.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
8.\"
9.\" Permission to use, copy, modify, and distribute this software for any
10.\" purpose with or without fee is hereby granted, provided that the above
11.\" copyright notice and this permission notice appear in all copies.
12.\"
13.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20.\"
21.\" The original file was written by Lutz Jaenicke <jaenicke@openssl.org>.
5.\" Copyright (c) 2000, 2001, 2013 The OpenSSL Project. All rights reserved. 22.\" Copyright (c) 2000, 2001, 2013 The OpenSSL Project. All rights reserved.
6.\" 23.\"
7.\" Redistribution and use in source and binary forms, with or without 24.\" Redistribution and use in source and binary forms, with or without
@@ -48,7 +65,7 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 65.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 66.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 67.\"
51.Dd $Mdocdate: March 27 2018 $ 68.Dd $Mdocdate: April 10 2018 $
52.Dt SSL_CTX_SET_CIPHER_LIST 3 69.Dt SSL_CTX_SET_CIPHER_LIST 3
53.Os 70.Os
54.Sh NAME 71.Sh NAME
@@ -58,43 +75,268 @@
58.Sh SYNOPSIS 75.Sh SYNOPSIS
59.In openssl/ssl.h 76.In openssl/ssl.h
60.Ft int 77.Ft int
61.Fn SSL_CTX_set_cipher_list "SSL_CTX *ctx" "const char *str" 78.Fn SSL_CTX_set_cipher_list "SSL_CTX *ctx" "const char *control"
62.Ft int 79.Ft int
63.Fn SSL_set_cipher_list "SSL *ssl" "const char *str" 80.Fn SSL_set_cipher_list "SSL *ssl" "const char *control"
64.Sh DESCRIPTION 81.Sh DESCRIPTION
65.Fn SSL_CTX_set_cipher_list 82.Fn SSL_CTX_set_cipher_list
66sets the list of available ciphers for 83sets the list of available cipher suites for
67.Fa ctx 84.Fa ctx
68using the control string 85using the
69.Fa str . 86.Fa control
70The format of the string is described 87string.
71in 88The list of cipher suites is inherited by all
72.Xr openssl 1 .
73The list of ciphers is inherited by all
74.Fa ssl 89.Fa ssl
75objects created from 90objects created from
76.Fa ctx . 91.Fa ctx .
77.Pp 92.Pp
78.Fn SSL_set_cipher_list 93.Fn SSL_set_cipher_list
79sets the list of ciphers only for 94sets the list of cipher suites only for
80.Fa ssl . 95.Fa ssl .
81.Pp 96.Pp
82The control string 97The control string consists of one or more control words
83.Fa str 98separated by colon characters
84should be universally usable and not depend on details of the library 99.Pq Ql \&: .
85configuration (ciphers compiled in). 100Space
86Thus no syntax checking takes place. 101.Pq Ql \ \& ,
87Items that are not recognized, because the corresponding ciphers are not 102semicolon
88compiled in or because they are mistyped, are simply ignored. 103.Pq Ql \&; ,
89Failure is only flagged if no ciphers could be collected at all. 104and comma
105.Pq Ql \&,
106characters can also be used as separators.
107Each control words selects a set of cipher suites
108and can take one of the following optional prefix characters:
109.Bl -tag -width Ds
110.It \&No prefix:
111Those of the selected cipher suites that have not been made available
112yet are added to the end of the list of available cipher suites,
113preserving their order.
114.It Prefixed minus sign Pq Ql \- :
115Those of the selected cipher suites that have been made available
116earlier are moved back from the list of available cipher suites to
117the beginning of the list of unavailable cipher suites,
118also preserving their order.
119.It Prefixed plus sign Pq Ql + :
120Those of the selected cipher suites have been made available earlier
121are moved to end of the list of available cipher suites, reducing
122their priority, but preserving the order among themselves.
123.It Prefixed exclamation mark Pq Ql \&! :
124The selected cipher suites are permanently deleted, no matter whether
125they had earlier been made available or not, and can no longer
126be added or re-added by later words.
127.El
128.Pp
129The following special words can only be used without a prefix:
130.Bl -tag -width Ds
131.It Cm DEFAULT
132An alias for
133.Sm off
134.Cm ALL No :! Cm aNULL No :! Cm eNULL .
135.Sm on
136It can only be used as the first word.
137.It Cm @STRENGTH
138Sort the list by decreasing encryption strength,
139preserving the order of cipher suites that have the same strength.
140It is usally given as the last word.
141.El
142.Pp
143The following words can be used to select groups of cipher suites,
144with or without a prefix character.
145If two or more of these words are joined with plus signs
146.Pq Ql +
147to form a longer word, only the intersection of the specified sets
148is selected.
149.Bl -tag -width Ds
150.It Cm ADH
151Cipher suites using ephemeral DH for key exchange
152without doing any server authentication.
153Equivalent to
154.Cm kEDH Ns + Ns Cm aNULL .
155.It Cm aDSS
156Cipher suites using DSS server authentication.
157LibreSSL does not provide any such cipher suites.
158.It Cm AEAD
159Cipher suites using Authenticated Encryption with Additional Data.
160.It Cm AECDH
161Cipher suites using ephemeral ECDH for key exchange
162without doing any server authentication.
163Equivalent to
164.Cm kEECDH Ns + Ns Cm aNULL .
165.It Cm aECDSA
166Cipher suites using ECDSA server authentication.
167.It Cm AES
168Cipher suites using AES or AESGCM for symmetric encryption.
169.It Cm AES128
170Cipher suites using AES(128) or AESGCM(128) for symmetric encryption.
171.It Cm AES256
172Cipher suites using AES(256) or AESGCM(256) for symmetric encryption.
173.It Cm AESGCM
174Cipher suites using AESGCM for symmetric encryption.
175.It Cm aGOST
176An alias for
177.Cm aGOST01 .
178.It Cm aGOST01
179Cipher suites using GOST R 34.10-2001 server authentication.
180.It Cm ALL
181All cipher suites except those selected by
182.Cm eNULL .
183.It Cm aNULL
184Cipher suites that don't do any server authentication.
185Not enabled by
186.Cm DEFAULT .
187Beware of man-in-the-middle attacks.
188.It Cm aRSA
189Cipher suites using RSA server authentication.
190.It Cm CAMELLIA
191Cipher suites using Camellia for symmetric encryption.
192.It Cm CAMELLIA128
193Cipher suites using Camellia(128) for symmetric encryption.
194.It Cm CAMELLIA256
195Cipher suites using Camellia(256) for symmetric encryption.
196.It Cm CHACHA20
197Cipher suites using ChaCha20-Poly1305 for symmetric encryption.
198.It Cm COMPLEMENTOFALL
199Cipher suites that are not included in
200.Cm ALL .
201Currently an alias for
202.Cm eNULL .
203.It Cm COMPLEMENTOFDEFAULT
204Cipher suites that are included in
205.Cm ALL ,
206but not included in
207.Cm DEFAULT .
208Currently similar to
209.Cm aNULL Ns :! Ns Cm eNULL
210except for the order of the cipher suites which are
211.Em not
212selected.
213.It Cm DES
214Cipher suites using single DES for symmetric encryption.
215.It Cm 3DES
216Cipher suites using triple DES for symmetric encryption.
217.It Cm DH
218An alias for
219.Cm kEDH .
220.It Cm DHE
221Cipher suites using ephemeral DH for key exchange,
222but excluding those that don't do any server authentication.
223Similar to
224.Cm kEDH Ns :! Ns Cm aNULL
225except for the order of the cipher suites which are
226.Em not
227selected.
228.It Cm DSS
229An alias for
230.Cm aDSS .
231.It Cm ECDH
232An alias for
233.Cm kEECHD .
234.It Cm ECDHE
235Cipher suites using ephemeral ECDH for key exchange,
236but excluding those that don't do any server authentication.
237Similar to
238.Cm kEECDH Ns :! Ns Cm aNULL
239except for the order of the cipher suites which are
240.Em not
241selected.
242.It Cm ECDSA
243An alias for
244.Cm aECDSA .
245.It Cm EDH
246An alias for
247.Cm DHE .
248.It Cm EECHD
249An alias for
250.Cm ECDHE .
251.It Cm eNULL
252Cipher suites that do not use any encryption.
253Not enabled by
254.Cm DEFAULT ,
255and not even included in
256.Cm ALL .
257.It Cm GOST89MAC
258Cipher suites using GOST 28147-89 for message authentication
259instead of HMAC.
260.It Cm GOST94
261Cipher suites using HMAC based on GOST R 34.11-94
262for message authentication.
263.It Cm HIGH
264Cipher suites of high strength.
265Currently, these are cipher suites using
266.Cm CHACHA20 ,
267.Cm AES ,
268.Cm CAMELLIA ,
269or GOST-28178-89-CNT symmetric encryption.
270.It Cm IDEA
271Cipher suites using IDEA for symmetric encryption.
272LibreSSL does not provide any such cipher suites.
273.It Cm kEDH
274Cipher suites using ephemeral DH for key exchange.
275.It Cm kEECDH
276Cipher suites using ephemeral ECDH for key exchange.
277.It Cm kGOST
278Cipher suites using VKO 34.10 key exchange, specified in RFC 4357.
279.It Cm kRSA
280Cipher suites using RSA key exchange.
281.It Cm LOW
282Cipher suites of low strength.
283Currently, these are cipher suites using
284.Cm DES
285or
286.Cm RC4
287symmetric encryption.
288.It Cm MD5
289Cipher suites using MD5 for message authentication.
290.It Cm MEDIUM
291Cipher suites of medium strength.
292Currently, these are cipher suites using
293.Cm 3DES
294symmetric encryption.
295.It Cm NULL
296An alias for
297.Cm eNULL .
298.It Cm RC4
299Cipher suites using RC4 for symmetric encryption.
300.It Cm RSA
301Cipher suites using RSA for both key exchange and server authentication.
302Equivalent to
303.Cm kRSA Ns + Ns Cm aRSA .
304.It Cm SHA
305An alias for
306.Cm SHA1 .
307.It Cm SHA1
308Cipher suites using SHA1 for message authentication.
309.It Cm SHA256
310Cipher suites using SHA256 for message authentication.
311.It Cm SHA384
312Cipher suites using SHA384 for message authentication.
313.It Cm SSLv3
314An alias for
315.Cm TLSv1 .
316.It Cm STREEBOG256
317Cipher suites using STREEBOG256 for message authentication.
318.It Cm TLSv1
319Cipher suites usable with any TLS protocol.
320.It Cm TLSv1.2
321Cipher suites for the TLSv1.2 protocol.
322.El
323.Pp
324The full words returned by the
325.Xr openssl 1
326.Cm ciphers
327command can be used to select individual cipher suites.
328.Pp
329Unknown words are silently ignored, selecting no cipher suites.
330Failure is only flagged if the
331.Fa control
332string contains invalid bytes
333or if no matching cipher suites are available at all.
90.Pp 334.Pp
91It should be noted that inclusion of a cipher to be used into the list is a 335On the client side, including a cipher suite into the list of
92necessary condition. 336available cipher suites is sufficient for using it.
93On the client side, the inclusion into the list is also sufficient. 337On the server side, all cipher suites have additional requirements.
94On the server side, additional restrictions apply.
95All ciphers have additional requirements.
96ADH ciphers don't need a certificate, but DH-parameters must have been set. 338ADH ciphers don't need a certificate, but DH-parameters must have been set.
97All other ciphers need a corresponding certificate and key. 339All other cipher suites need a corresponding certificate and key.
98.Pp 340.Pp
99A RSA cipher can only be chosen when a RSA certificate is available. 341A RSA cipher can only be chosen when a RSA certificate is available.
100RSA ciphers using DHE need a certificate and key and additional DH-parameters 342RSA ciphers using DHE need a certificate and key and additional DH-parameters
@@ -105,7 +347,8 @@ A DSA cipher can only be chosen when a DSA certificate is available.
105DSA ciphers always use DH key exchange and therefore need DH-parameters (see 347DSA ciphers always use DH key exchange and therefore need DH-parameters (see
106.Xr SSL_CTX_set_tmp_dh_callback 3 ) . 348.Xr SSL_CTX_set_tmp_dh_callback 3 ) .
107.Pp 349.Pp
108When these conditions are not met for any cipher in the list (for example, a 350When these conditions are not met
351for any cipher suite in the list (for example, a
109client only supports export RSA ciphers with an asymmetric key length of 512 352client only supports export RSA ciphers with an asymmetric key length of 512
110bits and the server is not configured to use temporary RSA keys), the 353bits and the server is not configured to use temporary RSA keys), the
111.Dq no shared cipher 354.Dq no shared cipher
@@ -115,7 +358,7 @@ error is generated and the handshake will fail.
115.Fn SSL_CTX_set_cipher_list 358.Fn SSL_CTX_set_cipher_list
116and 359and
117.Fn SSL_set_cipher_list 360.Fn SSL_set_cipher_list
118return 1 if any cipher could be selected and 0 on complete failure. 361return 1 if any cipher suite could be selected and 0 on complete failure.
119.Sh SEE ALSO 362.Sh SEE ALSO
120.Xr ssl 3 , 363.Xr ssl 3 ,
121.Xr SSL_CTX_set1_groups 3 , 364.Xr SSL_CTX_set1_groups 3 ,