text
[RRG-proxmark3.git] / common / mbedtls / ssl_ciphersuites.c
blob54af7f55697b0de015d95cf0f875815fd13e0984
1 /**
2 * \file ssl_ciphersuites.c
4 * \brief SSL ciphersuites for mbed TLS
6 * Copyright The Mbed TLS Contributors
7 * SPDX-License-Identifier: Apache-2.0
9 * Licensed under the Apache License, Version 2.0 (the "License"); you may
10 * not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
17 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
22 #include "common.h"
24 #if defined(MBEDTLS_SSL_TLS_C)
26 #if defined(MBEDTLS_PLATFORM_C)
27 #include "mbedtls/platform.h"
28 #else
29 #include <stdlib.h>
30 #endif
32 #include "mbedtls/ssl_ciphersuites.h"
33 #include "mbedtls/ssl.h"
35 #include <string.h>
38 * Ordered from most preferred to least preferred in terms of security.
40 * Current rule (except RC4 and 3DES, weak and null which come last):
41 * 1. By key exchange:
42 * Forward-secure non-PSK > forward-secure PSK > ECJPAKE > other non-PSK > other PSK
43 * 2. By key length and cipher:
44 * ChaCha > AES-256 > Camellia-256 > ARIA-256 > AES-128 > Camellia-128 > ARIA-128
45 * 3. By cipher mode when relevant GCM > CCM > CBC > CCM_8
46 * 4. By hash function used when relevant
47 * 5. By key exchange/auth again: EC > non-EC
49 static const int ciphersuite_preference[] = {
50 #if defined(MBEDTLS_SSL_CIPHERSUITES)
51 MBEDTLS_SSL_CIPHERSUITES,
52 #else
53 /* Chacha-Poly ephemeral suites */
54 MBEDTLS_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
55 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
56 MBEDTLS_TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
58 /* All AES-256 ephemeral suites */
59 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
60 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
61 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
62 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM,
63 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM,
64 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
65 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
66 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
67 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
68 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
69 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
70 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8,
71 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM_8,
73 /* All CAMELLIA-256 ephemeral suites */
74 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
75 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384,
76 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384,
77 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
78 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,
79 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
80 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,
82 /* All ARIA-256 ephemeral suites */
83 MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384,
84 MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384,
85 MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384,
86 MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384,
87 MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384,
88 MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384,
90 /* All AES-128 ephemeral suites */
91 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
92 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
93 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,
94 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM,
95 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM,
96 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
97 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
98 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
99 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
100 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
101 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
102 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8,
103 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM_8,
105 /* All CAMELLIA-128 ephemeral suites */
106 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
107 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256,
108 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256,
109 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
110 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
111 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
112 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,
114 /* All ARIA-128 ephemeral suites */
115 MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256,
116 MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256,
117 MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256,
118 MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256,
119 MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256,
120 MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256,
122 /* The PSK ephemeral suites */
123 MBEDTLS_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
124 MBEDTLS_TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
125 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384,
126 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM,
127 MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
128 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384,
129 MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA,
130 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA,
131 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384,
132 MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
133 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
134 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM_8,
135 MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384,
136 MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384,
137 MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384,
139 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256,
140 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM,
141 MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
142 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256,
143 MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA,
144 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA,
145 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256,
146 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
147 MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
148 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM_8,
149 MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256,
150 MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256,
151 MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256,
153 /* The ECJPAKE suite */
154 MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8,
156 /* All AES-256 suites */
157 MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384,
158 MBEDTLS_TLS_RSA_WITH_AES_256_CCM,
159 MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256,
160 MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA,
161 MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,
162 MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,
163 MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,
164 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,
165 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,
166 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
167 MBEDTLS_TLS_RSA_WITH_AES_256_CCM_8,
169 /* All CAMELLIA-256 suites */
170 MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384,
171 MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256,
172 MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,
173 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
174 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384,
175 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
176 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
178 /* All ARIA-256 suites */
179 MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384,
180 MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384,
181 MBEDTLS_TLS_RSA_WITH_ARIA_256_GCM_SHA384,
182 MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384,
183 MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384,
184 MBEDTLS_TLS_RSA_WITH_ARIA_256_CBC_SHA384,
186 /* All AES-128 suites */
187 MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256,
188 MBEDTLS_TLS_RSA_WITH_AES_128_CCM,
189 MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256,
190 MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA,
191 MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,
192 MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,
193 MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,
194 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,
195 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,
196 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
197 MBEDTLS_TLS_RSA_WITH_AES_128_CCM_8,
199 /* All CAMELLIA-128 suites */
200 MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256,
201 MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256,
202 MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA,
203 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
204 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
205 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
206 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
208 /* All ARIA-128 suites */
209 MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256,
210 MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256,
211 MBEDTLS_TLS_RSA_WITH_ARIA_128_GCM_SHA256,
212 MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256,
213 MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256,
214 MBEDTLS_TLS_RSA_WITH_ARIA_128_CBC_SHA256,
216 /* The RSA PSK suites */
217 MBEDTLS_TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256,
218 MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384,
219 MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384,
220 MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA,
221 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384,
222 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384,
223 MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384,
224 MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384,
226 MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256,
227 MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256,
228 MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA,
229 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256,
230 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256,
231 MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256,
232 MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256,
234 /* The PSK suites */
235 MBEDTLS_TLS_PSK_WITH_CHACHA20_POLY1305_SHA256,
236 MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384,
237 MBEDTLS_TLS_PSK_WITH_AES_256_CCM,
238 MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384,
239 MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA,
240 MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384,
241 MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384,
242 MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8,
243 MBEDTLS_TLS_PSK_WITH_ARIA_256_GCM_SHA384,
244 MBEDTLS_TLS_PSK_WITH_ARIA_256_CBC_SHA384,
246 MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256,
247 MBEDTLS_TLS_PSK_WITH_AES_128_CCM,
248 MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256,
249 MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA,
250 MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256,
251 MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256,
252 MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8,
253 MBEDTLS_TLS_PSK_WITH_ARIA_128_GCM_SHA256,
254 MBEDTLS_TLS_PSK_WITH_ARIA_128_CBC_SHA256,
256 /* 3DES suites */
257 MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
258 MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
259 MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
260 MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA,
261 MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA,
262 MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA,
263 MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,
264 MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,
265 MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA,
266 MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA,
268 /* RC4 suites */
269 MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
270 MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA,
271 MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA,
272 MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA,
273 MBEDTLS_TLS_RSA_WITH_RC4_128_SHA,
274 MBEDTLS_TLS_RSA_WITH_RC4_128_MD5,
275 MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA,
276 MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
277 MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA,
278 MBEDTLS_TLS_PSK_WITH_RC4_128_SHA,
280 /* Weak suites */
281 MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA,
282 MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA,
284 /* NULL suites */
285 MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA,
286 MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA,
287 MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384,
288 MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256,
289 MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA,
290 MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384,
291 MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256,
292 MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA,
294 MBEDTLS_TLS_RSA_WITH_NULL_SHA256,
295 MBEDTLS_TLS_RSA_WITH_NULL_SHA,
296 MBEDTLS_TLS_RSA_WITH_NULL_MD5,
297 MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA,
298 MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA,
299 MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384,
300 MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256,
301 MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA,
302 MBEDTLS_TLS_PSK_WITH_NULL_SHA384,
303 MBEDTLS_TLS_PSK_WITH_NULL_SHA256,
304 MBEDTLS_TLS_PSK_WITH_NULL_SHA,
306 #endif /* MBEDTLS_SSL_CIPHERSUITES */
310 static const mbedtls_ssl_ciphersuite_t ciphersuite_definitions[] = {
311 #if defined(MBEDTLS_CHACHAPOLY_C) && \
312 defined(MBEDTLS_SHA256_C) && \
313 defined(MBEDTLS_SSL_PROTO_TLS1_2)
314 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED)
316 MBEDTLS_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
317 "TLS-ECDHE-RSA-WITH-CHACHA20-POLY1305-SHA256",
318 MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
319 MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
320 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
321 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
324 #endif
325 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
327 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
328 "TLS-ECDHE-ECDSA-WITH-CHACHA20-POLY1305-SHA256",
329 MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
330 MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
331 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
332 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
335 #endif
336 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
338 MBEDTLS_TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
339 "TLS-DHE-RSA-WITH-CHACHA20-POLY1305-SHA256",
340 MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
341 MBEDTLS_KEY_EXCHANGE_DHE_RSA,
342 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
343 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
346 #endif
347 #if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
349 MBEDTLS_TLS_PSK_WITH_CHACHA20_POLY1305_SHA256,
350 "TLS-PSK-WITH-CHACHA20-POLY1305-SHA256",
351 MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
352 MBEDTLS_KEY_EXCHANGE_PSK,
353 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
354 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
357 #endif
358 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
360 MBEDTLS_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
361 "TLS-ECDHE-PSK-WITH-CHACHA20-POLY1305-SHA256",
362 MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
363 MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
364 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
365 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
368 #endif
369 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
371 MBEDTLS_TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
372 "TLS-DHE-PSK-WITH-CHACHA20-POLY1305-SHA256",
373 MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
374 MBEDTLS_KEY_EXCHANGE_DHE_PSK,
375 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
376 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
379 #endif
380 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
382 MBEDTLS_TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256,
383 "TLS-RSA-PSK-WITH-CHACHA20-POLY1305-SHA256",
384 MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
385 MBEDTLS_KEY_EXCHANGE_RSA_PSK,
386 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
387 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
390 #endif
391 #endif /* MBEDTLS_CHACHAPOLY_C &&
392 MBEDTLS_SHA256_C &&
393 MBEDTLS_SSL_PROTO_TLS1_2 */
394 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
395 #if defined(MBEDTLS_AES_C)
396 #if defined(MBEDTLS_SHA1_C)
397 #if defined(MBEDTLS_CIPHER_MODE_CBC)
399 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA",
400 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
401 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
402 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
406 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA",
407 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
408 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
409 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
412 #endif /* MBEDTLS_CIPHER_MODE_CBC */
413 #endif /* MBEDTLS_SHA1_C */
414 #if defined(MBEDTLS_SHA256_C)
415 #if defined(MBEDTLS_CIPHER_MODE_CBC)
417 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA256",
418 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
419 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
420 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
423 #endif /* MBEDTLS_CIPHER_MODE_CBC */
424 #if defined(MBEDTLS_GCM_C)
426 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, "TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256",
427 MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
428 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
429 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
432 #endif /* MBEDTLS_GCM_C */
433 #endif /* MBEDTLS_SHA256_C */
434 #if defined(MBEDTLS_SHA512_C)
435 #if defined(MBEDTLS_CIPHER_MODE_CBC)
437 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA384",
438 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
439 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
440 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
443 #endif /* MBEDTLS_CIPHER_MODE_CBC */
444 #if defined(MBEDTLS_GCM_C)
446 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, "TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384",
447 MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
448 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
449 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
452 #endif /* MBEDTLS_GCM_C */
453 #endif /* MBEDTLS_SHA512_C */
454 #if defined(MBEDTLS_CCM_C)
456 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM, "TLS-ECDHE-ECDSA-WITH-AES-256-CCM",
457 MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
458 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
459 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
463 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8, "TLS-ECDHE-ECDSA-WITH-AES-256-CCM-8",
464 MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
465 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
466 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
467 MBEDTLS_CIPHERSUITE_SHORT_TAG
470 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM, "TLS-ECDHE-ECDSA-WITH-AES-128-CCM",
471 MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
472 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
473 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
477 MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, "TLS-ECDHE-ECDSA-WITH-AES-128-CCM-8",
478 MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
479 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
480 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
481 MBEDTLS_CIPHERSUITE_SHORT_TAG
483 #endif /* MBEDTLS_CCM_C */
484 #endif /* MBEDTLS_AES_C */
486 #if defined(MBEDTLS_CAMELLIA_C)
487 #if defined(MBEDTLS_CIPHER_MODE_CBC)
488 #if defined(MBEDTLS_SHA256_C)
490 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-CBC-SHA256",
491 MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
492 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
493 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
496 #endif /* MBEDTLS_SHA256_C */
497 #if defined(MBEDTLS_SHA512_C)
499 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-CBC-SHA384",
500 MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
501 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
502 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
505 #endif /* MBEDTLS_SHA512_C */
506 #endif /* MBEDTLS_CIPHER_MODE_CBC */
508 #if defined(MBEDTLS_GCM_C)
509 #if defined(MBEDTLS_SHA256_C)
511 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-GCM-SHA256",
512 MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
513 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
514 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
517 #endif /* MBEDTLS_SHA256_C */
518 #if defined(MBEDTLS_SHA512_C)
520 MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-GCM-SHA384",
521 MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
522 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
523 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
526 #endif /* MBEDTLS_SHA512_C */
527 #endif /* MBEDTLS_GCM_C */
528 #endif /* MBEDTLS_CAMELLIA_C */
530 #if defined(MBEDTLS_DES_C)
531 #if defined(MBEDTLS_CIPHER_MODE_CBC)
532 #if defined(MBEDTLS_SHA1_C)
534 MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-3DES-EDE-CBC-SHA",
535 MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
536 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
537 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
540 #endif /* MBEDTLS_SHA1_C */
541 #endif /* MBEDTLS_CIPHER_MODE_CBC */
542 #endif /* MBEDTLS_DES_C */
544 #if defined(MBEDTLS_ARC4_C)
545 #if defined(MBEDTLS_SHA1_C)
547 MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, "TLS-ECDHE-ECDSA-WITH-RC4-128-SHA",
548 MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
549 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
550 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
551 MBEDTLS_CIPHERSUITE_NODTLS
553 #endif /* MBEDTLS_SHA1_C */
554 #endif /* MBEDTLS_ARC4_C */
556 #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
557 #if defined(MBEDTLS_SHA1_C)
559 MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA, "TLS-ECDHE-ECDSA-WITH-NULL-SHA",
560 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
561 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
562 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
563 MBEDTLS_CIPHERSUITE_WEAK
565 #endif /* MBEDTLS_SHA1_C */
566 #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
567 #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */
569 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED)
570 #if defined(MBEDTLS_AES_C)
571 #if defined(MBEDTLS_SHA1_C)
572 #if defined(MBEDTLS_CIPHER_MODE_CBC)
574 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, "TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA",
575 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
576 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
577 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
581 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, "TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA",
582 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
583 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
584 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
587 #endif /* MBEDTLS_CIPHER_MODE_CBC */
588 #endif /* MBEDTLS_SHA1_C */
589 #if defined(MBEDTLS_SHA256_C)
590 #if defined(MBEDTLS_CIPHER_MODE_CBC)
592 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA256",
593 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
594 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
595 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
598 #endif /* MBEDTLS_CIPHER_MODE_CBC */
599 #if defined(MBEDTLS_GCM_C)
601 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, "TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256",
602 MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
603 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
604 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
607 #endif /* MBEDTLS_GCM_C */
608 #endif /* MBEDTLS_SHA256_C */
609 #if defined(MBEDTLS_SHA512_C)
610 #if defined(MBEDTLS_CIPHER_MODE_CBC)
612 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384",
613 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
614 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
615 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
618 #endif /* MBEDTLS_CIPHER_MODE_CBC */
619 #if defined(MBEDTLS_GCM_C)
621 MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, "TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384",
622 MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
623 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
624 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
627 #endif /* MBEDTLS_GCM_C */
628 #endif /* MBEDTLS_SHA512_C */
629 #endif /* MBEDTLS_AES_C */
631 #if defined(MBEDTLS_CAMELLIA_C)
632 #if defined(MBEDTLS_CIPHER_MODE_CBC)
633 #if defined(MBEDTLS_SHA256_C)
635 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-RSA-WITH-CAMELLIA-128-CBC-SHA256",
636 MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
637 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
638 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
641 #endif /* MBEDTLS_SHA256_C */
642 #if defined(MBEDTLS_SHA512_C)
644 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-RSA-WITH-CAMELLIA-256-CBC-SHA384",
645 MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
646 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
647 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
650 #endif /* MBEDTLS_SHA512_C */
651 #endif /* MBEDTLS_CIPHER_MODE_CBC */
653 #if defined(MBEDTLS_GCM_C)
654 #if defined(MBEDTLS_SHA256_C)
656 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDHE-RSA-WITH-CAMELLIA-128-GCM-SHA256",
657 MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
658 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
659 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
662 #endif /* MBEDTLS_SHA256_C */
663 #if defined(MBEDTLS_SHA512_C)
665 MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDHE-RSA-WITH-CAMELLIA-256-GCM-SHA384",
666 MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
667 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
668 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
671 #endif /* MBEDTLS_SHA512_C */
672 #endif /* MBEDTLS_GCM_C */
673 #endif /* MBEDTLS_CAMELLIA_C */
675 #if defined(MBEDTLS_DES_C)
676 #if defined(MBEDTLS_CIPHER_MODE_CBC)
677 #if defined(MBEDTLS_SHA1_C)
679 MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-RSA-WITH-3DES-EDE-CBC-SHA",
680 MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
681 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
682 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
685 #endif /* MBEDTLS_SHA1_C */
686 #endif /* MBEDTLS_CIPHER_MODE_CBC */
687 #endif /* MBEDTLS_DES_C */
689 #if defined(MBEDTLS_ARC4_C)
690 #if defined(MBEDTLS_SHA1_C)
692 MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA, "TLS-ECDHE-RSA-WITH-RC4-128-SHA",
693 MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
694 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
695 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
696 MBEDTLS_CIPHERSUITE_NODTLS
698 #endif /* MBEDTLS_SHA1_C */
699 #endif /* MBEDTLS_ARC4_C */
701 #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
702 #if defined(MBEDTLS_SHA1_C)
704 MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA, "TLS-ECDHE-RSA-WITH-NULL-SHA",
705 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
706 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
707 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
708 MBEDTLS_CIPHERSUITE_WEAK
710 #endif /* MBEDTLS_SHA1_C */
711 #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
712 #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED */
714 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
715 #if defined(MBEDTLS_AES_C)
716 #if defined(MBEDTLS_SHA512_C) && defined(MBEDTLS_GCM_C)
718 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, "TLS-DHE-RSA-WITH-AES-256-GCM-SHA384",
719 MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
720 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
721 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
724 #endif /* MBEDTLS_SHA512_C && MBEDTLS_GCM_C */
726 #if defined(MBEDTLS_SHA256_C)
727 #if defined(MBEDTLS_GCM_C)
729 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, "TLS-DHE-RSA-WITH-AES-128-GCM-SHA256",
730 MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
731 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
732 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
735 #endif /* MBEDTLS_GCM_C */
737 #if defined(MBEDTLS_CIPHER_MODE_CBC)
739 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, "TLS-DHE-RSA-WITH-AES-128-CBC-SHA256",
740 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
741 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
742 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
747 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, "TLS-DHE-RSA-WITH-AES-256-CBC-SHA256",
748 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
749 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
750 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
753 #endif /* MBEDTLS_CIPHER_MODE_CBC */
754 #endif /* MBEDTLS_SHA256_C */
756 #if defined(MBEDTLS_CIPHER_MODE_CBC)
757 #if defined(MBEDTLS_SHA1_C)
759 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA, "TLS-DHE-RSA-WITH-AES-128-CBC-SHA",
760 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
761 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
762 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
767 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA, "TLS-DHE-RSA-WITH-AES-256-CBC-SHA",
768 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
769 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
770 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
773 #endif /* MBEDTLS_SHA1_C */
774 #endif /* MBEDTLS_CIPHER_MODE_CBC */
775 #if defined(MBEDTLS_CCM_C)
777 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM, "TLS-DHE-RSA-WITH-AES-256-CCM",
778 MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
779 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
780 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
784 MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM_8, "TLS-DHE-RSA-WITH-AES-256-CCM-8",
785 MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
786 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
787 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
788 MBEDTLS_CIPHERSUITE_SHORT_TAG
791 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM, "TLS-DHE-RSA-WITH-AES-128-CCM",
792 MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
793 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
794 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
798 MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM_8, "TLS-DHE-RSA-WITH-AES-128-CCM-8",
799 MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
800 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
801 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
802 MBEDTLS_CIPHERSUITE_SHORT_TAG
804 #endif /* MBEDTLS_CCM_C */
805 #endif /* MBEDTLS_AES_C */
807 #if defined(MBEDTLS_CAMELLIA_C)
808 #if defined(MBEDTLS_CIPHER_MODE_CBC)
809 #if defined(MBEDTLS_SHA256_C)
811 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA256",
812 MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
813 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
814 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
819 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA256",
820 MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
821 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
822 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
825 #endif /* MBEDTLS_SHA256_C */
827 #if defined(MBEDTLS_SHA1_C)
829 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA",
830 MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
831 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
832 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
837 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA",
838 MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
839 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
840 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
843 #endif /* MBEDTLS_SHA1_C */
844 #endif /* MBEDTLS_CIPHER_MODE_CBC */
845 #if defined(MBEDTLS_GCM_C)
846 #if defined(MBEDTLS_SHA256_C)
848 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-128-GCM-SHA256",
849 MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
850 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
851 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
854 #endif /* MBEDTLS_SHA256_C */
856 #if defined(MBEDTLS_SHA512_C)
858 MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-DHE-RSA-WITH-CAMELLIA-256-GCM-SHA384",
859 MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
860 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
861 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
864 #endif /* MBEDTLS_SHA512_C */
865 #endif /* MBEDTLS_GCM_C */
866 #endif /* MBEDTLS_CAMELLIA_C */
868 #if defined(MBEDTLS_DES_C)
869 #if defined(MBEDTLS_CIPHER_MODE_CBC)
870 #if defined(MBEDTLS_SHA1_C)
872 MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-DHE-RSA-WITH-3DES-EDE-CBC-SHA",
873 MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
874 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
875 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
878 #endif /* MBEDTLS_SHA1_C */
879 #endif /* MBEDTLS_CIPHER_MODE_CBC */
880 #endif /* MBEDTLS_DES_C */
881 #endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */
883 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
884 #if defined(MBEDTLS_AES_C)
885 #if defined(MBEDTLS_SHA512_C) && defined(MBEDTLS_GCM_C)
887 MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384, "TLS-RSA-WITH-AES-256-GCM-SHA384",
888 MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA,
889 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
890 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
893 #endif /* MBEDTLS_SHA512_C && MBEDTLS_GCM_C */
895 #if defined(MBEDTLS_SHA256_C)
896 #if defined(MBEDTLS_GCM_C)
898 MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256, "TLS-RSA-WITH-AES-128-GCM-SHA256",
899 MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
900 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
901 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
904 #endif /* MBEDTLS_GCM_C */
906 #if defined(MBEDTLS_CIPHER_MODE_CBC)
908 MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256, "TLS-RSA-WITH-AES-128-CBC-SHA256",
909 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
910 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
911 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
916 MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256, "TLS-RSA-WITH-AES-256-CBC-SHA256",
917 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
918 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
919 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
922 #endif /* MBEDTLS_CIPHER_MODE_CBC */
923 #endif /* MBEDTLS_SHA256_C */
925 #if defined(MBEDTLS_SHA1_C)
926 #if defined(MBEDTLS_CIPHER_MODE_CBC)
928 MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA, "TLS-RSA-WITH-AES-128-CBC-SHA",
929 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
930 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
931 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
936 MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA, "TLS-RSA-WITH-AES-256-CBC-SHA",
937 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
938 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
939 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
942 #endif /* MBEDTLS_CIPHER_MODE_CBC */
943 #endif /* MBEDTLS_SHA1_C */
944 #if defined(MBEDTLS_CCM_C)
946 MBEDTLS_TLS_RSA_WITH_AES_256_CCM, "TLS-RSA-WITH-AES-256-CCM",
947 MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
948 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
949 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
953 MBEDTLS_TLS_RSA_WITH_AES_256_CCM_8, "TLS-RSA-WITH-AES-256-CCM-8",
954 MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
955 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
956 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
957 MBEDTLS_CIPHERSUITE_SHORT_TAG
960 MBEDTLS_TLS_RSA_WITH_AES_128_CCM, "TLS-RSA-WITH-AES-128-CCM",
961 MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
962 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
963 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
967 MBEDTLS_TLS_RSA_WITH_AES_128_CCM_8, "TLS-RSA-WITH-AES-128-CCM-8",
968 MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
969 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
970 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
971 MBEDTLS_CIPHERSUITE_SHORT_TAG
973 #endif /* MBEDTLS_CCM_C */
974 #endif /* MBEDTLS_AES_C */
976 #if defined(MBEDTLS_CAMELLIA_C)
977 #if defined(MBEDTLS_CIPHER_MODE_CBC)
978 #if defined(MBEDTLS_SHA256_C)
980 MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-RSA-WITH-CAMELLIA-128-CBC-SHA256",
981 MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
982 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
983 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
988 MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256, "TLS-RSA-WITH-CAMELLIA-256-CBC-SHA256",
989 MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
990 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
991 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
994 #endif /* MBEDTLS_SHA256_C */
996 #if defined(MBEDTLS_SHA1_C)
998 MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, "TLS-RSA-WITH-CAMELLIA-128-CBC-SHA",
999 MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
1000 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1001 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1006 MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, "TLS-RSA-WITH-CAMELLIA-256-CBC-SHA",
1007 MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
1008 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1009 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1012 #endif /* MBEDTLS_SHA1_C */
1013 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1015 #if defined(MBEDTLS_GCM_C)
1016 #if defined(MBEDTLS_SHA256_C)
1018 MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-RSA-WITH-CAMELLIA-128-GCM-SHA256",
1019 MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
1020 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1021 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1024 #endif /* MBEDTLS_SHA256_C */
1026 #if defined(MBEDTLS_SHA1_C)
1028 MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-RSA-WITH-CAMELLIA-256-GCM-SHA384",
1029 MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA,
1030 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1031 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1034 #endif /* MBEDTLS_SHA1_C */
1035 #endif /* MBEDTLS_GCM_C */
1036 #endif /* MBEDTLS_CAMELLIA_C */
1038 #if defined(MBEDTLS_DES_C)
1039 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1040 #if defined(MBEDTLS_SHA1_C)
1042 MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-RSA-WITH-3DES-EDE-CBC-SHA",
1043 MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
1044 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1045 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1048 #endif /* MBEDTLS_SHA1_C */
1049 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1050 #endif /* MBEDTLS_DES_C */
1052 #if defined(MBEDTLS_ARC4_C)
1053 #if defined(MBEDTLS_MD5_C)
1055 MBEDTLS_TLS_RSA_WITH_RC4_128_MD5, "TLS-RSA-WITH-RC4-128-MD5",
1056 MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_MD5, MBEDTLS_KEY_EXCHANGE_RSA,
1057 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1058 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1059 MBEDTLS_CIPHERSUITE_NODTLS
1061 #endif
1063 #if defined(MBEDTLS_SHA1_C)
1065 MBEDTLS_TLS_RSA_WITH_RC4_128_SHA, "TLS-RSA-WITH-RC4-128-SHA",
1066 MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
1067 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1068 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1069 MBEDTLS_CIPHERSUITE_NODTLS
1071 #endif
1072 #endif /* MBEDTLS_ARC4_C */
1073 #endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
1075 #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED)
1076 #if defined(MBEDTLS_AES_C)
1077 #if defined(MBEDTLS_SHA1_C)
1078 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1080 MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, "TLS-ECDH-RSA-WITH-AES-128-CBC-SHA",
1081 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1082 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1083 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1087 MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, "TLS-ECDH-RSA-WITH-AES-256-CBC-SHA",
1088 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1089 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1090 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1093 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1094 #endif /* MBEDTLS_SHA1_C */
1095 #if defined(MBEDTLS_SHA256_C)
1096 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1098 MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, "TLS-ECDH-RSA-WITH-AES-128-CBC-SHA256",
1099 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1100 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1101 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1104 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1105 #if defined(MBEDTLS_GCM_C)
1107 MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, "TLS-ECDH-RSA-WITH-AES-128-GCM-SHA256",
1108 MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1109 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1110 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1113 #endif /* MBEDTLS_GCM_C */
1114 #endif /* MBEDTLS_SHA256_C */
1115 #if defined(MBEDTLS_SHA512_C)
1116 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1118 MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, "TLS-ECDH-RSA-WITH-AES-256-CBC-SHA384",
1119 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1120 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1121 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1124 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1125 #if defined(MBEDTLS_GCM_C)
1127 MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, "TLS-ECDH-RSA-WITH-AES-256-GCM-SHA384",
1128 MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1129 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1130 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1133 #endif /* MBEDTLS_GCM_C */
1134 #endif /* MBEDTLS_SHA512_C */
1135 #endif /* MBEDTLS_AES_C */
1137 #if defined(MBEDTLS_CAMELLIA_C)
1138 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1139 #if defined(MBEDTLS_SHA256_C)
1141 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDH-RSA-WITH-CAMELLIA-128-CBC-SHA256",
1142 MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1143 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1144 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1147 #endif /* MBEDTLS_SHA256_C */
1148 #if defined(MBEDTLS_SHA512_C)
1150 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDH-RSA-WITH-CAMELLIA-256-CBC-SHA384",
1151 MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1152 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1153 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1156 #endif /* MBEDTLS_SHA512_C */
1157 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1159 #if defined(MBEDTLS_GCM_C)
1160 #if defined(MBEDTLS_SHA256_C)
1162 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDH-RSA-WITH-CAMELLIA-128-GCM-SHA256",
1163 MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1164 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1165 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1168 #endif /* MBEDTLS_SHA256_C */
1169 #if defined(MBEDTLS_SHA512_C)
1171 MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDH-RSA-WITH-CAMELLIA-256-GCM-SHA384",
1172 MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1173 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1174 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1177 #endif /* MBEDTLS_SHA512_C */
1178 #endif /* MBEDTLS_GCM_C */
1179 #endif /* MBEDTLS_CAMELLIA_C */
1181 #if defined(MBEDTLS_DES_C)
1182 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1183 #if defined(MBEDTLS_SHA1_C)
1185 MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDH-RSA-WITH-3DES-EDE-CBC-SHA",
1186 MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1187 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1188 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1191 #endif /* MBEDTLS_SHA1_C */
1192 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1193 #endif /* MBEDTLS_DES_C */
1195 #if defined(MBEDTLS_ARC4_C)
1196 #if defined(MBEDTLS_SHA1_C)
1198 MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA, "TLS-ECDH-RSA-WITH-RC4-128-SHA",
1199 MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1200 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1201 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1202 MBEDTLS_CIPHERSUITE_NODTLS
1204 #endif /* MBEDTLS_SHA1_C */
1205 #endif /* MBEDTLS_ARC4_C */
1207 #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
1208 #if defined(MBEDTLS_SHA1_C)
1210 MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA, "TLS-ECDH-RSA-WITH-NULL-SHA",
1211 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1212 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1213 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1214 MBEDTLS_CIPHERSUITE_WEAK
1216 #endif /* MBEDTLS_SHA1_C */
1217 #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
1218 #endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED */
1220 #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
1221 #if defined(MBEDTLS_AES_C)
1222 #if defined(MBEDTLS_SHA1_C)
1223 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1225 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, "TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA",
1226 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1227 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1228 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1232 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, "TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA",
1233 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1234 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1235 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1238 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1239 #endif /* MBEDTLS_SHA1_C */
1240 #if defined(MBEDTLS_SHA256_C)
1241 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1243 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, "TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA256",
1244 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1245 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1246 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1249 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1250 #if defined(MBEDTLS_GCM_C)
1252 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, "TLS-ECDH-ECDSA-WITH-AES-128-GCM-SHA256",
1253 MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1254 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1255 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1258 #endif /* MBEDTLS_GCM_C */
1259 #endif /* MBEDTLS_SHA256_C */
1260 #if defined(MBEDTLS_SHA512_C)
1261 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1263 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, "TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA384",
1264 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1265 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1266 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1269 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1270 #if defined(MBEDTLS_GCM_C)
1272 MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, "TLS-ECDH-ECDSA-WITH-AES-256-GCM-SHA384",
1273 MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1274 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1275 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1278 #endif /* MBEDTLS_GCM_C */
1279 #endif /* MBEDTLS_SHA512_C */
1280 #endif /* MBEDTLS_AES_C */
1282 #if defined(MBEDTLS_CAMELLIA_C)
1283 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1284 #if defined(MBEDTLS_SHA256_C)
1286 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDH-ECDSA-WITH-CAMELLIA-128-CBC-SHA256",
1287 MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1288 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1289 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1292 #endif /* MBEDTLS_SHA256_C */
1293 #if defined(MBEDTLS_SHA512_C)
1295 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDH-ECDSA-WITH-CAMELLIA-256-CBC-SHA384",
1296 MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1297 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1298 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1301 #endif /* MBEDTLS_SHA512_C */
1302 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1304 #if defined(MBEDTLS_GCM_C)
1305 #if defined(MBEDTLS_SHA256_C)
1307 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDH-ECDSA-WITH-CAMELLIA-128-GCM-SHA256",
1308 MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1309 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1310 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1313 #endif /* MBEDTLS_SHA256_C */
1314 #if defined(MBEDTLS_SHA512_C)
1316 MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDH-ECDSA-WITH-CAMELLIA-256-GCM-SHA384",
1317 MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1318 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1319 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1322 #endif /* MBEDTLS_SHA512_C */
1323 #endif /* MBEDTLS_GCM_C */
1324 #endif /* MBEDTLS_CAMELLIA_C */
1326 #if defined(MBEDTLS_DES_C)
1327 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1328 #if defined(MBEDTLS_SHA1_C)
1330 MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDH-ECDSA-WITH-3DES-EDE-CBC-SHA",
1331 MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1332 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1333 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1336 #endif /* MBEDTLS_SHA1_C */
1337 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1338 #endif /* MBEDTLS_DES_C */
1340 #if defined(MBEDTLS_ARC4_C)
1341 #if defined(MBEDTLS_SHA1_C)
1343 MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA, "TLS-ECDH-ECDSA-WITH-RC4-128-SHA",
1344 MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1345 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1346 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1347 MBEDTLS_CIPHERSUITE_NODTLS
1349 #endif /* MBEDTLS_SHA1_C */
1350 #endif /* MBEDTLS_ARC4_C */
1352 #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
1353 #if defined(MBEDTLS_SHA1_C)
1355 MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA, "TLS-ECDH-ECDSA-WITH-NULL-SHA",
1356 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1357 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1358 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1359 MBEDTLS_CIPHERSUITE_WEAK
1361 #endif /* MBEDTLS_SHA1_C */
1362 #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
1363 #endif /* MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */
1365 #if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
1366 #if defined(MBEDTLS_AES_C)
1367 #if defined(MBEDTLS_GCM_C)
1368 #if defined(MBEDTLS_SHA256_C)
1370 MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256, "TLS-PSK-WITH-AES-128-GCM-SHA256",
1371 MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1372 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1373 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1376 #endif /* MBEDTLS_SHA256_C */
1378 #if defined(MBEDTLS_SHA512_C)
1380 MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384, "TLS-PSK-WITH-AES-256-GCM-SHA384",
1381 MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
1382 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1383 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1386 #endif /* MBEDTLS_SHA512_C */
1387 #endif /* MBEDTLS_GCM_C */
1389 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1390 #if defined(MBEDTLS_SHA256_C)
1392 MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256, "TLS-PSK-WITH-AES-128-CBC-SHA256",
1393 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1394 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1395 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1398 #endif /* MBEDTLS_SHA256_C */
1400 #if defined(MBEDTLS_SHA512_C)
1402 MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384, "TLS-PSK-WITH-AES-256-CBC-SHA384",
1403 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
1404 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1405 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1408 #endif /* MBEDTLS_SHA512_C */
1410 #if defined(MBEDTLS_SHA1_C)
1412 MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA, "TLS-PSK-WITH-AES-128-CBC-SHA",
1413 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
1414 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1415 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1420 MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA, "TLS-PSK-WITH-AES-256-CBC-SHA",
1421 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
1422 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1423 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1426 #endif /* MBEDTLS_SHA1_C */
1427 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1428 #if defined(MBEDTLS_CCM_C)
1430 MBEDTLS_TLS_PSK_WITH_AES_256_CCM, "TLS-PSK-WITH-AES-256-CCM",
1431 MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1432 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1433 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1437 MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8, "TLS-PSK-WITH-AES-256-CCM-8",
1438 MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1439 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1440 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1441 MBEDTLS_CIPHERSUITE_SHORT_TAG
1444 MBEDTLS_TLS_PSK_WITH_AES_128_CCM, "TLS-PSK-WITH-AES-128-CCM",
1445 MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1446 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1447 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1451 MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8, "TLS-PSK-WITH-AES-128-CCM-8",
1452 MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1453 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1454 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1455 MBEDTLS_CIPHERSUITE_SHORT_TAG
1457 #endif /* MBEDTLS_CCM_C */
1458 #endif /* MBEDTLS_AES_C */
1460 #if defined(MBEDTLS_CAMELLIA_C)
1461 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1462 #if defined(MBEDTLS_SHA256_C)
1464 MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-PSK-WITH-CAMELLIA-128-CBC-SHA256",
1465 MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1466 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1467 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1470 #endif /* MBEDTLS_SHA256_C */
1472 #if defined(MBEDTLS_SHA512_C)
1474 MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-PSK-WITH-CAMELLIA-256-CBC-SHA384",
1475 MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
1476 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1477 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1480 #endif /* MBEDTLS_SHA512_C */
1481 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1483 #if defined(MBEDTLS_GCM_C)
1484 #if defined(MBEDTLS_SHA256_C)
1486 MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-PSK-WITH-CAMELLIA-128-GCM-SHA256",
1487 MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1488 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1489 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1492 #endif /* MBEDTLS_SHA256_C */
1494 #if defined(MBEDTLS_SHA512_C)
1496 MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-PSK-WITH-CAMELLIA-256-GCM-SHA384",
1497 MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
1498 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1499 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1502 #endif /* MBEDTLS_SHA512_C */
1503 #endif /* MBEDTLS_GCM_C */
1504 #endif /* MBEDTLS_CAMELLIA_C */
1506 #if defined(MBEDTLS_DES_C)
1507 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1508 #if defined(MBEDTLS_SHA1_C)
1510 MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-PSK-WITH-3DES-EDE-CBC-SHA",
1511 MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
1512 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1513 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1516 #endif /* MBEDTLS_SHA1_C */
1517 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1518 #endif /* MBEDTLS_DES_C */
1520 #if defined(MBEDTLS_ARC4_C)
1521 #if defined(MBEDTLS_SHA1_C)
1523 MBEDTLS_TLS_PSK_WITH_RC4_128_SHA, "TLS-PSK-WITH-RC4-128-SHA",
1524 MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
1525 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1526 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1527 MBEDTLS_CIPHERSUITE_NODTLS
1529 #endif /* MBEDTLS_SHA1_C */
1530 #endif /* MBEDTLS_ARC4_C */
1531 #endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */
1533 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
1534 #if defined(MBEDTLS_AES_C)
1535 #if defined(MBEDTLS_GCM_C)
1536 #if defined(MBEDTLS_SHA256_C)
1538 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256, "TLS-DHE-PSK-WITH-AES-128-GCM-SHA256",
1539 MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1540 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1541 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1544 #endif /* MBEDTLS_SHA256_C */
1546 #if defined(MBEDTLS_SHA512_C)
1548 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384, "TLS-DHE-PSK-WITH-AES-256-GCM-SHA384",
1549 MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1550 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1551 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1554 #endif /* MBEDTLS_SHA512_C */
1555 #endif /* MBEDTLS_GCM_C */
1557 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1558 #if defined(MBEDTLS_SHA256_C)
1560 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256, "TLS-DHE-PSK-WITH-AES-128-CBC-SHA256",
1561 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1562 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1563 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1566 #endif /* MBEDTLS_SHA256_C */
1568 #if defined(MBEDTLS_SHA512_C)
1570 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384, "TLS-DHE-PSK-WITH-AES-256-CBC-SHA384",
1571 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1572 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1573 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1576 #endif /* MBEDTLS_SHA512_C */
1578 #if defined(MBEDTLS_SHA1_C)
1580 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA, "TLS-DHE-PSK-WITH-AES-128-CBC-SHA",
1581 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1582 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1583 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1588 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA, "TLS-DHE-PSK-WITH-AES-256-CBC-SHA",
1589 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1590 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1591 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1594 #endif /* MBEDTLS_SHA1_C */
1595 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1596 #if defined(MBEDTLS_CCM_C)
1598 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM, "TLS-DHE-PSK-WITH-AES-256-CCM",
1599 MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1600 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1601 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1605 MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM_8, "TLS-DHE-PSK-WITH-AES-256-CCM-8",
1606 MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1607 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1608 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1609 MBEDTLS_CIPHERSUITE_SHORT_TAG
1612 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM, "TLS-DHE-PSK-WITH-AES-128-CCM",
1613 MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1614 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1615 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1619 MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM_8, "TLS-DHE-PSK-WITH-AES-128-CCM-8",
1620 MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1621 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1622 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1623 MBEDTLS_CIPHERSUITE_SHORT_TAG
1625 #endif /* MBEDTLS_CCM_C */
1626 #endif /* MBEDTLS_AES_C */
1628 #if defined(MBEDTLS_CAMELLIA_C)
1629 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1630 #if defined(MBEDTLS_SHA256_C)
1632 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-DHE-PSK-WITH-CAMELLIA-128-CBC-SHA256",
1633 MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1634 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1635 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1638 #endif /* MBEDTLS_SHA256_C */
1640 #if defined(MBEDTLS_SHA512_C)
1642 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-DHE-PSK-WITH-CAMELLIA-256-CBC-SHA384",
1643 MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1644 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1645 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1648 #endif /* MBEDTLS_SHA512_C */
1649 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1651 #if defined(MBEDTLS_GCM_C)
1652 #if defined(MBEDTLS_SHA256_C)
1654 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-DHE-PSK-WITH-CAMELLIA-128-GCM-SHA256",
1655 MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1656 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1657 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1660 #endif /* MBEDTLS_SHA256_C */
1662 #if defined(MBEDTLS_SHA512_C)
1664 MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-DHE-PSK-WITH-CAMELLIA-256-GCM-SHA384",
1665 MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1666 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1667 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1670 #endif /* MBEDTLS_SHA512_C */
1671 #endif /* MBEDTLS_GCM_C */
1672 #endif /* MBEDTLS_CAMELLIA_C */
1674 #if defined(MBEDTLS_DES_C)
1675 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1676 #if defined(MBEDTLS_SHA1_C)
1678 MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-DHE-PSK-WITH-3DES-EDE-CBC-SHA",
1679 MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1680 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1681 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1684 #endif /* MBEDTLS_SHA1_C */
1685 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1686 #endif /* MBEDTLS_DES_C */
1688 #if defined(MBEDTLS_ARC4_C)
1689 #if defined(MBEDTLS_SHA1_C)
1691 MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA, "TLS-DHE-PSK-WITH-RC4-128-SHA",
1692 MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1693 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1694 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1695 MBEDTLS_CIPHERSUITE_NODTLS
1697 #endif /* MBEDTLS_SHA1_C */
1698 #endif /* MBEDTLS_ARC4_C */
1699 #endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */
1701 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
1702 #if defined(MBEDTLS_AES_C)
1704 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1705 #if defined(MBEDTLS_SHA256_C)
1707 MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256",
1708 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1709 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1710 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1713 #endif /* MBEDTLS_SHA256_C */
1715 #if defined(MBEDTLS_SHA512_C)
1717 MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA384",
1718 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1719 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1720 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1723 #endif /* MBEDTLS_SHA512_C */
1725 #if defined(MBEDTLS_SHA1_C)
1727 MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA, "TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA",
1728 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1729 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1730 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1735 MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA, "TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA",
1736 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1737 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1738 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1741 #endif /* MBEDTLS_SHA1_C */
1742 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1743 #endif /* MBEDTLS_AES_C */
1745 #if defined(MBEDTLS_CAMELLIA_C)
1746 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1747 #if defined(MBEDTLS_SHA256_C)
1749 MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-PSK-WITH-CAMELLIA-128-CBC-SHA256",
1750 MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1751 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1752 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1755 #endif /* MBEDTLS_SHA256_C */
1757 #if defined(MBEDTLS_SHA512_C)
1759 MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-PSK-WITH-CAMELLIA-256-CBC-SHA384",
1760 MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1761 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1762 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1765 #endif /* MBEDTLS_SHA512_C */
1766 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1767 #endif /* MBEDTLS_CAMELLIA_C */
1769 #if defined(MBEDTLS_DES_C)
1770 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1771 #if defined(MBEDTLS_SHA1_C)
1773 MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-PSK-WITH-3DES-EDE-CBC-SHA",
1774 MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1775 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1776 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1779 #endif /* MBEDTLS_SHA1_C */
1780 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1781 #endif /* MBEDTLS_DES_C */
1783 #if defined(MBEDTLS_ARC4_C)
1784 #if defined(MBEDTLS_SHA1_C)
1786 MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA, "TLS-ECDHE-PSK-WITH-RC4-128-SHA",
1787 MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1788 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1789 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1790 MBEDTLS_CIPHERSUITE_NODTLS
1792 #endif /* MBEDTLS_SHA1_C */
1793 #endif /* MBEDTLS_ARC4_C */
1794 #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
1796 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
1797 #if defined(MBEDTLS_AES_C)
1798 #if defined(MBEDTLS_GCM_C)
1799 #if defined(MBEDTLS_SHA256_C)
1801 MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256, "TLS-RSA-PSK-WITH-AES-128-GCM-SHA256",
1802 MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1803 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1804 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1807 #endif /* MBEDTLS_SHA256_C */
1809 #if defined(MBEDTLS_SHA512_C)
1811 MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384, "TLS-RSA-PSK-WITH-AES-256-GCM-SHA384",
1812 MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1813 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1814 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1817 #endif /* MBEDTLS_SHA512_C */
1818 #endif /* MBEDTLS_GCM_C */
1820 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1821 #if defined(MBEDTLS_SHA256_C)
1823 MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256, "TLS-RSA-PSK-WITH-AES-128-CBC-SHA256",
1824 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1825 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1826 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1829 #endif /* MBEDTLS_SHA256_C */
1831 #if defined(MBEDTLS_SHA512_C)
1833 MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384, "TLS-RSA-PSK-WITH-AES-256-CBC-SHA384",
1834 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1835 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1836 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1839 #endif /* MBEDTLS_SHA512_C */
1841 #if defined(MBEDTLS_SHA1_C)
1843 MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA, "TLS-RSA-PSK-WITH-AES-128-CBC-SHA",
1844 MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1845 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1846 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1851 MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA, "TLS-RSA-PSK-WITH-AES-256-CBC-SHA",
1852 MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1853 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1854 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1857 #endif /* MBEDTLS_SHA1_C */
1858 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1859 #endif /* MBEDTLS_AES_C */
1861 #if defined(MBEDTLS_CAMELLIA_C)
1862 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1863 #if defined(MBEDTLS_SHA256_C)
1865 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-RSA-PSK-WITH-CAMELLIA-128-CBC-SHA256",
1866 MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1867 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1868 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1871 #endif /* MBEDTLS_SHA256_C */
1873 #if defined(MBEDTLS_SHA512_C)
1875 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-RSA-PSK-WITH-CAMELLIA-256-CBC-SHA384",
1876 MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1877 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1878 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1881 #endif /* MBEDTLS_SHA512_C */
1882 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1884 #if defined(MBEDTLS_GCM_C)
1885 #if defined(MBEDTLS_SHA256_C)
1887 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-RSA-PSK-WITH-CAMELLIA-128-GCM-SHA256",
1888 MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1889 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1890 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1893 #endif /* MBEDTLS_SHA256_C */
1895 #if defined(MBEDTLS_SHA512_C)
1897 MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-RSA-PSK-WITH-CAMELLIA-256-GCM-SHA384",
1898 MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1899 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1900 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1903 #endif /* MBEDTLS_SHA512_C */
1904 #endif /* MBEDTLS_GCM_C */
1905 #endif /* MBEDTLS_CAMELLIA_C */
1907 #if defined(MBEDTLS_DES_C)
1908 #if defined(MBEDTLS_CIPHER_MODE_CBC)
1909 #if defined(MBEDTLS_SHA1_C)
1911 MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-RSA-PSK-WITH-3DES-EDE-CBC-SHA",
1912 MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1913 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1914 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1917 #endif /* MBEDTLS_SHA1_C */
1918 #endif /* MBEDTLS_CIPHER_MODE_CBC */
1919 #endif /* MBEDTLS_DES_C */
1921 #if defined(MBEDTLS_ARC4_C)
1922 #if defined(MBEDTLS_SHA1_C)
1924 MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA, "TLS-RSA-PSK-WITH-RC4-128-SHA",
1925 MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1926 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1927 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1928 MBEDTLS_CIPHERSUITE_NODTLS
1930 #endif /* MBEDTLS_SHA1_C */
1931 #endif /* MBEDTLS_ARC4_C */
1932 #endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */
1934 #if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
1935 #if defined(MBEDTLS_AES_C)
1936 #if defined(MBEDTLS_CCM_C)
1938 MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8, "TLS-ECJPAKE-WITH-AES-128-CCM-8",
1939 MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECJPAKE,
1940 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1941 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1942 MBEDTLS_CIPHERSUITE_SHORT_TAG
1944 #endif /* MBEDTLS_CCM_C */
1945 #endif /* MBEDTLS_AES_C */
1946 #endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */
1948 #if defined(MBEDTLS_ENABLE_WEAK_CIPHERSUITES)
1949 #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
1950 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
1951 #if defined(MBEDTLS_MD5_C)
1953 MBEDTLS_TLS_RSA_WITH_NULL_MD5, "TLS-RSA-WITH-NULL-MD5",
1954 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_MD5, MBEDTLS_KEY_EXCHANGE_RSA,
1955 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1956 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1957 MBEDTLS_CIPHERSUITE_WEAK
1959 #endif
1961 #if defined(MBEDTLS_SHA1_C)
1963 MBEDTLS_TLS_RSA_WITH_NULL_SHA, "TLS-RSA-WITH-NULL-SHA",
1964 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
1965 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1966 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1967 MBEDTLS_CIPHERSUITE_WEAK
1969 #endif
1971 #if defined(MBEDTLS_SHA256_C)
1973 MBEDTLS_TLS_RSA_WITH_NULL_SHA256, "TLS-RSA-WITH-NULL-SHA256",
1974 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
1975 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1976 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1977 MBEDTLS_CIPHERSUITE_WEAK
1979 #endif
1980 #endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
1982 #if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
1983 #if defined(MBEDTLS_SHA1_C)
1985 MBEDTLS_TLS_PSK_WITH_NULL_SHA, "TLS-PSK-WITH-NULL-SHA",
1986 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
1987 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1988 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1989 MBEDTLS_CIPHERSUITE_WEAK
1991 #endif /* MBEDTLS_SHA1_C */
1993 #if defined(MBEDTLS_SHA256_C)
1995 MBEDTLS_TLS_PSK_WITH_NULL_SHA256, "TLS-PSK-WITH-NULL-SHA256",
1996 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1997 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1998 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1999 MBEDTLS_CIPHERSUITE_WEAK
2001 #endif
2003 #if defined(MBEDTLS_SHA512_C)
2005 MBEDTLS_TLS_PSK_WITH_NULL_SHA384, "TLS-PSK-WITH-NULL-SHA384",
2006 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
2007 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
2008 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2009 MBEDTLS_CIPHERSUITE_WEAK
2011 #endif
2012 #endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */
2014 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
2015 #if defined(MBEDTLS_SHA1_C)
2017 MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA, "TLS-DHE-PSK-WITH-NULL-SHA",
2018 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
2019 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
2020 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2021 MBEDTLS_CIPHERSUITE_WEAK
2023 #endif /* MBEDTLS_SHA1_C */
2025 #if defined(MBEDTLS_SHA256_C)
2027 MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256, "TLS-DHE-PSK-WITH-NULL-SHA256",
2028 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
2029 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
2030 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2031 MBEDTLS_CIPHERSUITE_WEAK
2033 #endif
2035 #if defined(MBEDTLS_SHA512_C)
2037 MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384, "TLS-DHE-PSK-WITH-NULL-SHA384",
2038 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
2039 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
2040 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2041 MBEDTLS_CIPHERSUITE_WEAK
2043 #endif
2044 #endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */
2046 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
2047 #if defined(MBEDTLS_SHA1_C)
2049 MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA, "TLS-ECDHE-PSK-WITH-NULL-SHA",
2050 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
2051 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
2052 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2053 MBEDTLS_CIPHERSUITE_WEAK
2055 #endif /* MBEDTLS_SHA1_C */
2057 #if defined(MBEDTLS_SHA256_C)
2059 MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256, "TLS-ECDHE-PSK-WITH-NULL-SHA256",
2060 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
2061 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
2062 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2063 MBEDTLS_CIPHERSUITE_WEAK
2065 #endif
2067 #if defined(MBEDTLS_SHA512_C)
2069 MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384, "TLS-ECDHE-PSK-WITH-NULL-SHA384",
2070 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
2071 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
2072 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2073 MBEDTLS_CIPHERSUITE_WEAK
2075 #endif
2076 #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
2078 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
2079 #if defined(MBEDTLS_SHA1_C)
2081 MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA, "TLS-RSA-PSK-WITH-NULL-SHA",
2082 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
2083 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
2084 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2085 MBEDTLS_CIPHERSUITE_WEAK
2087 #endif /* MBEDTLS_SHA1_C */
2089 #if defined(MBEDTLS_SHA256_C)
2091 MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256, "TLS-RSA-PSK-WITH-NULL-SHA256",
2092 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
2093 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
2094 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2095 MBEDTLS_CIPHERSUITE_WEAK
2097 #endif
2099 #if defined(MBEDTLS_SHA512_C)
2101 MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384, "TLS-RSA-PSK-WITH-NULL-SHA384",
2102 MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
2103 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
2104 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2105 MBEDTLS_CIPHERSUITE_WEAK
2107 #endif
2108 #endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */
2109 #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
2111 #if defined(MBEDTLS_DES_C)
2112 #if defined(MBEDTLS_CIPHER_MODE_CBC)
2113 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
2114 #if defined(MBEDTLS_SHA1_C)
2116 MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA, "TLS-DHE-RSA-WITH-DES-CBC-SHA",
2117 MBEDTLS_CIPHER_DES_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
2118 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
2119 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2120 MBEDTLS_CIPHERSUITE_WEAK
2122 #endif /* MBEDTLS_SHA1_C */
2123 #endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */
2125 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
2126 #if defined(MBEDTLS_SHA1_C)
2128 MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA, "TLS-RSA-WITH-DES-CBC-SHA",
2129 MBEDTLS_CIPHER_DES_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
2130 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
2131 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2132 MBEDTLS_CIPHERSUITE_WEAK
2134 #endif /* MBEDTLS_SHA1_C */
2135 #endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
2136 #endif /* MBEDTLS_CIPHER_MODE_CBC */
2137 #endif /* MBEDTLS_DES_C */
2138 #endif /* MBEDTLS_ENABLE_WEAK_CIPHERSUITES */
2140 #if defined(MBEDTLS_ARIA_C)
2142 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
2144 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
2146 MBEDTLS_TLS_RSA_WITH_ARIA_256_GCM_SHA384,
2147 "TLS-RSA-WITH-ARIA-256-GCM-SHA384",
2148 MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA,
2149 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2150 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2153 #endif
2154 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2156 MBEDTLS_TLS_RSA_WITH_ARIA_256_CBC_SHA384,
2157 "TLS-RSA-WITH-ARIA-256-CBC-SHA384",
2158 MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA,
2159 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2160 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2163 #endif
2164 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
2166 MBEDTLS_TLS_RSA_WITH_ARIA_128_GCM_SHA256,
2167 "TLS-RSA-WITH-ARIA-128-GCM-SHA256",
2168 MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
2169 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2170 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2173 #endif
2174 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2176 MBEDTLS_TLS_RSA_WITH_ARIA_128_CBC_SHA256,
2177 "TLS-RSA-WITH-ARIA-128-CBC-SHA256",
2178 MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
2179 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2180 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2183 #endif
2185 #endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
2187 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
2189 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
2191 MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384,
2192 "TLS-RSA-PSK-WITH-ARIA-256-GCM-SHA384",
2193 MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
2194 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2195 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2198 #endif
2199 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2201 MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384,
2202 "TLS-RSA-PSK-WITH-ARIA-256-CBC-SHA384",
2203 MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
2204 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2205 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2208 #endif
2209 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
2211 MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256,
2212 "TLS-RSA-PSK-WITH-ARIA-128-GCM-SHA256",
2213 MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
2214 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2215 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2218 #endif
2219 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2221 MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256,
2222 "TLS-RSA-PSK-WITH-ARIA-128-CBC-SHA256",
2223 MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
2224 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2225 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2228 #endif
2230 #endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */
2232 #if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
2234 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
2236 MBEDTLS_TLS_PSK_WITH_ARIA_256_GCM_SHA384,
2237 "TLS-PSK-WITH-ARIA-256-GCM-SHA384",
2238 MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
2239 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2240 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2243 #endif
2244 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2246 MBEDTLS_TLS_PSK_WITH_ARIA_256_CBC_SHA384,
2247 "TLS-PSK-WITH-ARIA-256-CBC-SHA384",
2248 MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
2249 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2250 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2253 #endif
2254 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
2256 MBEDTLS_TLS_PSK_WITH_ARIA_128_GCM_SHA256,
2257 "TLS-PSK-WITH-ARIA-128-GCM-SHA256",
2258 MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
2259 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2260 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2263 #endif
2264 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2266 MBEDTLS_TLS_PSK_WITH_ARIA_128_CBC_SHA256,
2267 "TLS-PSK-WITH-ARIA-128-CBC-SHA256",
2268 MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
2269 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2270 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2273 #endif
2275 #endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */
2277 #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED)
2279 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
2281 MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384,
2282 "TLS-ECDH-RSA-WITH-ARIA-256-GCM-SHA384",
2283 MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
2284 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2285 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2288 #endif
2289 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2291 MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384,
2292 "TLS-ECDH-RSA-WITH-ARIA-256-CBC-SHA384",
2293 MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
2294 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2295 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2298 #endif
2299 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
2301 MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256,
2302 "TLS-ECDH-RSA-WITH-ARIA-128-GCM-SHA256",
2303 MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
2304 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2305 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2308 #endif
2309 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2311 MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256,
2312 "TLS-ECDH-RSA-WITH-ARIA-128-CBC-SHA256",
2313 MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
2314 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2315 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2318 #endif
2320 #endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED */
2322 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED)
2324 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
2326 MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384,
2327 "TLS-ECDHE-RSA-WITH-ARIA-256-GCM-SHA384",
2328 MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
2329 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2330 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2333 #endif
2334 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2336 MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384,
2337 "TLS-ECDHE-RSA-WITH-ARIA-256-CBC-SHA384",
2338 MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
2339 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2340 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2343 #endif
2344 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
2346 MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256,
2347 "TLS-ECDHE-RSA-WITH-ARIA-128-GCM-SHA256",
2348 MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
2349 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2350 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2353 #endif
2354 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2356 MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256,
2357 "TLS-ECDHE-RSA-WITH-ARIA-128-CBC-SHA256",
2358 MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
2359 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2360 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2363 #endif
2365 #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED */
2367 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
2369 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2371 MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384,
2372 "TLS-ECDHE-PSK-WITH-ARIA-256-CBC-SHA384",
2373 MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
2374 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2375 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2378 #endif
2379 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2381 MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256,
2382 "TLS-ECDHE-PSK-WITH-ARIA-128-CBC-SHA256",
2383 MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
2384 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2385 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2388 #endif
2390 #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
2392 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
2394 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
2396 MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384,
2397 "TLS-ECDHE-ECDSA-WITH-ARIA-256-GCM-SHA384",
2398 MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
2399 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2400 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2403 #endif
2404 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2406 MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384,
2407 "TLS-ECDHE-ECDSA-WITH-ARIA-256-CBC-SHA384",
2408 MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
2409 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2410 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2413 #endif
2414 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
2416 MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256,
2417 "TLS-ECDHE-ECDSA-WITH-ARIA-128-GCM-SHA256",
2418 MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
2419 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2420 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2423 #endif
2424 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2426 MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256,
2427 "TLS-ECDHE-ECDSA-WITH-ARIA-128-CBC-SHA256",
2428 MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
2429 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2430 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2433 #endif
2435 #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */
2437 #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
2439 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
2441 MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384,
2442 "TLS-ECDH-ECDSA-WITH-ARIA-256-GCM-SHA384",
2443 MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
2444 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2445 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2448 #endif
2449 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2451 MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384,
2452 "TLS-ECDH-ECDSA-WITH-ARIA-256-CBC-SHA384",
2453 MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
2454 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2455 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2458 #endif
2459 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
2461 MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256,
2462 "TLS-ECDH-ECDSA-WITH-ARIA-128-GCM-SHA256",
2463 MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
2464 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2465 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2468 #endif
2469 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2471 MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256,
2472 "TLS-ECDH-ECDSA-WITH-ARIA-128-CBC-SHA256",
2473 MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
2474 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2475 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2478 #endif
2480 #endif /* MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */
2482 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
2484 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
2486 MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384,
2487 "TLS-DHE-RSA-WITH-ARIA-256-GCM-SHA384",
2488 MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
2489 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2490 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2493 #endif
2494 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2496 MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384,
2497 "TLS-DHE-RSA-WITH-ARIA-256-CBC-SHA384",
2498 MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
2499 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2500 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2503 #endif
2504 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
2506 MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256,
2507 "TLS-DHE-RSA-WITH-ARIA-128-GCM-SHA256",
2508 MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
2509 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2510 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2513 #endif
2514 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2516 MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256,
2517 "TLS-DHE-RSA-WITH-ARIA-128-CBC-SHA256",
2518 MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
2519 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2520 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2523 #endif
2525 #endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */
2527 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
2529 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
2531 MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384,
2532 "TLS-DHE-PSK-WITH-ARIA-256-GCM-SHA384",
2533 MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
2534 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2535 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2538 #endif
2539 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2541 MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384,
2542 "TLS-DHE-PSK-WITH-ARIA-256-CBC-SHA384",
2543 MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
2544 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2545 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2548 #endif
2549 #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
2551 MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256,
2552 "TLS-DHE-PSK-WITH-ARIA-128-GCM-SHA256",
2553 MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
2554 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2555 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2558 #endif
2559 #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2561 MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256,
2562 "TLS-DHE-PSK-WITH-ARIA-128-CBC-SHA256",
2563 MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
2564 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2565 MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2568 #endif
2570 #endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */
2572 #endif /* MBEDTLS_ARIA_C */
2576 0, "",
2577 MBEDTLS_CIPHER_NONE, MBEDTLS_MD_NONE, MBEDTLS_KEY_EXCHANGE_NONE,
2578 0, 0, 0, 0, 0
2582 #if defined(MBEDTLS_SSL_CIPHERSUITES)
2583 const int *mbedtls_ssl_list_ciphersuites(void) {
2584 return (ciphersuite_preference);
2586 #else
2587 #define MAX_CIPHERSUITES sizeof( ciphersuite_definitions ) / \
2588 sizeof( ciphersuite_definitions[0] )
2589 static int supported_ciphersuites[MAX_CIPHERSUITES];
2590 static int supported_init = 0;
2592 static int ciphersuite_is_removed(const mbedtls_ssl_ciphersuite_t *cs_info) {
2593 (void)cs_info;
2595 #if defined(MBEDTLS_REMOVE_ARC4_CIPHERSUITES)
2596 if (cs_info->cipher == MBEDTLS_CIPHER_ARC4_128)
2597 return (1);
2598 #endif /* MBEDTLS_REMOVE_ARC4_CIPHERSUITES */
2600 #if defined(MBEDTLS_REMOVE_3DES_CIPHERSUITES)
2601 if (cs_info->cipher == MBEDTLS_CIPHER_DES_EDE3_ECB ||
2602 cs_info->cipher == MBEDTLS_CIPHER_DES_EDE3_CBC) {
2603 return (1);
2605 #endif /* MBEDTLS_REMOVE_3DES_CIPHERSUITES */
2607 return (0);
2610 const int *mbedtls_ssl_list_ciphersuites(void) {
2612 * On initial call filter out all ciphersuites not supported by current
2613 * build based on presence in the ciphersuite_definitions.
2615 if (supported_init == 0) {
2616 const int *p;
2617 int *q;
2619 for (p = ciphersuite_preference, q = supported_ciphersuites;
2620 *p != 0 && q < supported_ciphersuites + MAX_CIPHERSUITES - 1;
2621 p++) {
2622 const mbedtls_ssl_ciphersuite_t *cs_info;
2623 if ((cs_info = mbedtls_ssl_ciphersuite_from_id(*p)) != NULL &&
2624 !ciphersuite_is_removed(cs_info)) {
2625 *(q++) = *p;
2628 *q = 0;
2630 supported_init = 1;
2633 return (supported_ciphersuites);
2635 #endif /* MBEDTLS_SSL_CIPHERSUITES */
2637 const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_string(
2638 const char *ciphersuite_name) {
2639 const mbedtls_ssl_ciphersuite_t *cur = ciphersuite_definitions;
2641 if (NULL == ciphersuite_name)
2642 return (NULL);
2644 while (cur->id != 0) {
2645 if (0 == strcmp(cur->name, ciphersuite_name))
2646 return (cur);
2648 cur++;
2651 return (NULL);
2654 const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_id(int ciphersuite) {
2655 const mbedtls_ssl_ciphersuite_t *cur = ciphersuite_definitions;
2657 while (cur->id != 0) {
2658 if (cur->id == ciphersuite)
2659 return (cur);
2661 cur++;
2664 return (NULL);
2667 const char *mbedtls_ssl_get_ciphersuite_name(const int ciphersuite_id) {
2668 const mbedtls_ssl_ciphersuite_t *cur;
2670 cur = mbedtls_ssl_ciphersuite_from_id(ciphersuite_id);
2672 if (cur == NULL)
2673 return ("unknown");
2675 return (cur->name);
2678 int mbedtls_ssl_get_ciphersuite_id(const char *ciphersuite_name) {
2679 const mbedtls_ssl_ciphersuite_t *cur;
2681 cur = mbedtls_ssl_ciphersuite_from_string(ciphersuite_name);
2683 if (cur == NULL)
2684 return (0);
2686 return (cur->id);
2689 #if defined(MBEDTLS_PK_C)
2690 mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_pk_alg(const mbedtls_ssl_ciphersuite_t *info) {
2691 switch (info->key_exchange) {
2692 case MBEDTLS_KEY_EXCHANGE_RSA:
2693 case MBEDTLS_KEY_EXCHANGE_DHE_RSA:
2694 case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
2695 case MBEDTLS_KEY_EXCHANGE_RSA_PSK:
2696 return (MBEDTLS_PK_RSA);
2698 case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
2699 return (MBEDTLS_PK_ECDSA);
2701 case MBEDTLS_KEY_EXCHANGE_ECDH_RSA:
2702 case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA:
2703 return (MBEDTLS_PK_ECKEY);
2705 default:
2706 return (MBEDTLS_PK_NONE);
2710 mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_alg(const mbedtls_ssl_ciphersuite_t *info) {
2711 switch (info->key_exchange) {
2712 case MBEDTLS_KEY_EXCHANGE_RSA:
2713 case MBEDTLS_KEY_EXCHANGE_DHE_RSA:
2714 case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
2715 return (MBEDTLS_PK_RSA);
2717 case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
2718 return (MBEDTLS_PK_ECDSA);
2720 default:
2721 return (MBEDTLS_PK_NONE);
2725 #endif /* MBEDTLS_PK_C */
2727 #if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \
2728 defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
2729 int mbedtls_ssl_ciphersuite_uses_ec(const mbedtls_ssl_ciphersuite_t *info) {
2730 switch (info->key_exchange) {
2731 case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
2732 case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
2733 case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK:
2734 case MBEDTLS_KEY_EXCHANGE_ECDH_RSA:
2735 case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA:
2736 case MBEDTLS_KEY_EXCHANGE_ECJPAKE:
2737 return (1);
2739 default:
2740 return (0);
2743 #endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C || MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED*/
2745 #if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED)
2746 int mbedtls_ssl_ciphersuite_uses_psk(const mbedtls_ssl_ciphersuite_t *info) {
2747 switch (info->key_exchange) {
2748 case MBEDTLS_KEY_EXCHANGE_PSK:
2749 case MBEDTLS_KEY_EXCHANGE_RSA_PSK:
2750 case MBEDTLS_KEY_EXCHANGE_DHE_PSK:
2751 case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK:
2752 return (1);
2754 default:
2755 return (0);
2758 #endif /* MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED */
2760 #endif /* MBEDTLS_SSL_TLS_C */