forked from mysql/mysql-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtls_ciphers.h
182 lines (159 loc) · 5.07 KB
/
tls_ciphers.h
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/*
Copyright (c) 2018, 2024, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
as published by the Free Software Foundation.
This program is designed to work with certain software (including
but not limited to OpenSSL) that is licensed under separate terms,
as designated in a particular file or component or in included license
documentation. The authors of MySQL hereby grant you an additional
permission to link the program and your derivative works with the
separately licensed software that they have either included with
the program or referenced in the documentation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef TLS_CIPHERS_INCLUDED
#define TLS_CIPHERS_INCLUDED
namespace {
/**
Configuring list of ciphers
TLSv1.2
=======
Server: Specify in folllowing order:
1. Blocked ciphers
2. Approved ciphers
Client: Specify in following order:
1. Blocked ciphers
2. Approved ciphers
3. Client specific ciphers
TLSv1.3
=======
Server: Specify in folllowing order:
1. Blocked ciphers (None atm)
2. Approved ciphers
Client: Specify in following order:
1. Blocked ciphers (None atm)
2. Approved ciphers
3. Client specific ciphers (None atm)
*/
/*
List of TLSv1.3 ciphers in order to their priority.
Addition to the list must be done keeping priority of the
new cipher in mind.
The last entry must not contain a trailing ":".
Current criteria for inclusion is:
1. Must provide Perfect Forward Secrecy
2. Uses SHA2 in cipher/certificate
3. Uses AES in GCM or any other AEAD algorithms/modes
*/
const char default_tls13_ciphers[] = {
"TLS_AES_128_GCM_SHA256:"
"TLS_AES_256_GCM_SHA384:"
"TLS_CHACHA20_POLY1305_SHA256:"
"TLS_AES_128_CCM_SHA256"};
/*
List of TLSv1.2 ciphers in order to their priority.
Addition to the list must be done keeping priority of the
new cipher in mind.
The last entry must not contain a trailing ":".
Current criteria for inclusion is:
1. Must provide Perfect Forward Secrecy
2. Uses SHA2 in cipher/certificate
3. Uses AES in GCM or any other AEAD algorithms/modes
*/
const char default_tls12_ciphers[] = {
"ECDHE-ECDSA-AES128-GCM-SHA256:"
"ECDHE-ECDSA-AES256-GCM-SHA384:"
"ECDHE-ECDSA-CHACHA20-POLY1305:"
"ECDHE-ECDSA-AES256-CCM:"
"ECDHE-ECDSA-AES128-CCM:"
"ECDHE-RSA-AES128-GCM-SHA256:"
"ECDHE-RSA-AES256-GCM-SHA384:"
"ECDHE-RSA-CHACHA20-POLY1305:"
"DHE-RSA-AES128-GCM-SHA256:"
"DHE-RSA-AES256-GCM-SHA384:"
"DHE-RSA-AES256-CCM:"
"DHE-RSA-AES128-CCM:"
"DHE-RSA-CHACHA20-POLY1305"};
/*
Following ciphers (or categories of ciphers) are not permitted
because they are too weak to provide required security.
New cipher/category can be added at any position.
Care must be taken to prefix cipher/category with "!"
*/
const char blocked_tls12_ciphers[] = {
"!aNULL:"
"!eNULL:"
"!EXPORT:"
"!LOW:"
"!MD5:"
"!DES:"
"!3DES:"
"!RC2:"
"!RC4:"
"!PSK:"
"!kDH"};
/*
Following ciphers are added to the list of permissible ciphers
while configuring the ciphers on client side.
This is done to provide backward compatbility.
*/
const char additional_client_ciphers[] = {
"ECDHE-ECDSA-AES256-CCM8:"
"ECDHE-ECDSA-AES128-CCM8:"
"ECDHE-ECDSA-AES128-SHA256:"
"ECDHE-ECDSA-AES256-SHA384:"
"ECDHE-ECDSA-AES128-SHA:"
"ECDHE-ECDSA-AES256-SHA:"
"ECDH-ECDSA-AES128-SHA256:"
"ECDH-ECDSA-AES256-SHA384:"
"ECDH-ECDSA-AES128-SHA:"
"ECDH-ECDSA-AES256-SHA:"
"ECDH-ECDSA-AES128-GCM-SHA256:"
"ECDH-ECDSA-AES256-GCM-SHA384:"
"DHE-RSA-AES256-CCM8:"
"DHE-RSA-AES128-CCM8:"
"ECDHE-RSA-AES128-SHA256:"
"ECDHE-RSA-AES256-SHA384:"
"DHE-DSS-AES256-GCM-SHA384:"
"DHE-DSS-AES128-GCM-SHA256:"
"DHE-DSS-AES128-SHA256:"
"DHE-DSS-AES256-SHA256:"
"DHE-RSA-AES256-SHA256:"
"DHE-RSA-AES128-SHA256:"
"DHE-RSA-CAMELLIA256-SHA256:"
"DHE-RSA-CAMELLIA128-SHA256:"
"ECDHE-RSA-AES128-SHA:"
"ECDHE-RSA-AES256-SHA:"
"DHE-DSS-AES128-SHA:"
"DHE-RSA-AES128-SHA:"
"DHE-RSA-AES256-SHA:"
"DHE-DSS-AES256-SHA:"
"DHE-RSA-CAMELLIA256-SHA:"
"DHE-RSA-CAMELLIA128-SHA:"
"ECDH-RSA-AES128-SHA256:"
"ECDH-RSA-AES256-SHA384:"
"ECDH-RSA-AES128-SHA:"
"ECDH-RSA-AES256-SHA:"
"AES128-GCM-SHA256:"
"AES128-CCM:"
"AES128-CCM8:"
"AES256-GCM-SHA384:"
"AES256-CCM:"
"AES256-CCM8:"
"AES128-SHA256:"
"AES256-SHA256:"
"AES128-SHA:"
"AES256-SHA:"
"CAMELLIA256-SHA:"
"CAMELLIA128-SHA:"
"ECDH-RSA-AES128-GCM-SHA256:"
"ECDH-RSA-AES256-GCM-SHA384"};
} // namespace
#endif /* TLS_CIPHERS_INCLUDED */