1c2c66affSColin Finck /**
2c2c66affSColin Finck  * \file ssl_ciphersuites.c
3c2c66affSColin Finck  *
4c2c66affSColin Finck  * \brief SSL ciphersuites for mbed TLS
5c2c66affSColin Finck  *
6218e2596SThomas Faber  *  Copyright The Mbed TLS Contributors
7e57126f5SThomas Faber  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
8e57126f5SThomas Faber  *
9e57126f5SThomas Faber  *  This file is provided under the Apache License 2.0, or the
10e57126f5SThomas Faber  *  GNU General Public License v2.0 or later.
11e57126f5SThomas Faber  *
12e57126f5SThomas Faber  *  **********
13e57126f5SThomas Faber  *  Apache License 2.0:
14e57126f5SThomas Faber  *
15e57126f5SThomas Faber  *  Licensed under the Apache License, Version 2.0 (the "License"); you may
16e57126f5SThomas Faber  *  not use this file except in compliance with the License.
17e57126f5SThomas Faber  *  You may obtain a copy of the License at
18e57126f5SThomas Faber  *
19e57126f5SThomas Faber  *  http://www.apache.org/licenses/LICENSE-2.0
20e57126f5SThomas Faber  *
21e57126f5SThomas Faber  *  Unless required by applicable law or agreed to in writing, software
22e57126f5SThomas Faber  *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
23e57126f5SThomas Faber  *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24e57126f5SThomas Faber  *  See the License for the specific language governing permissions and
25e57126f5SThomas Faber  *  limitations under the License.
26e57126f5SThomas Faber  *
27e57126f5SThomas Faber  *  **********
28e57126f5SThomas Faber  *
29e57126f5SThomas Faber  *  **********
30e57126f5SThomas Faber  *  GNU General Public License v2.0 or later:
31c2c66affSColin Finck  *
32c2c66affSColin Finck  *  This program is free software; you can redistribute it and/or modify
33c2c66affSColin Finck  *  it under the terms of the GNU General Public License as published by
34c2c66affSColin Finck  *  the Free Software Foundation; either version 2 of the License, or
35c2c66affSColin Finck  *  (at your option) any later version.
36c2c66affSColin Finck  *
37c2c66affSColin Finck  *  This program is distributed in the hope that it will be useful,
38c2c66affSColin Finck  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
39c2c66affSColin Finck  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
40c2c66affSColin Finck  *  GNU General Public License for more details.
41c2c66affSColin Finck  *
42c2c66affSColin Finck  *  You should have received a copy of the GNU General Public License along
43c2c66affSColin Finck  *  with this program; if not, write to the Free Software Foundation, Inc.,
44c2c66affSColin Finck  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
45c2c66affSColin Finck  *
46e57126f5SThomas Faber  *  **********
47c2c66affSColin Finck  */
48c2c66affSColin Finck 
49c2c66affSColin Finck #if !defined(MBEDTLS_CONFIG_FILE)
50c2c66affSColin Finck #include "mbedtls/config.h"
51c2c66affSColin Finck #else
52c2c66affSColin Finck #include MBEDTLS_CONFIG_FILE
53c2c66affSColin Finck #endif
54c2c66affSColin Finck 
55c2c66affSColin Finck #if defined(MBEDTLS_SSL_TLS_C)
56c2c66affSColin Finck 
57c2c66affSColin Finck #if defined(MBEDTLS_PLATFORM_C)
58c2c66affSColin Finck #include "mbedtls/platform.h"
59c2c66affSColin Finck #else
60c2c66affSColin Finck #include <stdlib.h>
61c2c66affSColin Finck #endif
62c2c66affSColin Finck 
63c2c66affSColin Finck #include "mbedtls/ssl_ciphersuites.h"
64c2c66affSColin Finck #include "mbedtls/ssl.h"
65c2c66affSColin Finck 
66c2c66affSColin Finck #include <string.h>
67c2c66affSColin Finck 
68c2c66affSColin Finck /*
69c2c66affSColin Finck  * Ordered from most preferred to least preferred in terms of security.
70c2c66affSColin Finck  *
71ca86ee9cSThomas Faber  * Current rule (except RC4 and 3DES, weak and null which come last):
72c2c66affSColin Finck  * 1. By key exchange:
73c2c66affSColin Finck  *    Forward-secure non-PSK > forward-secure PSK > ECJPAKE > other non-PSK > other PSK
74c2c66affSColin Finck  * 2. By key length and cipher:
75cbda039fSThomas Faber  *    ChaCha > AES-256 > Camellia-256 > ARIA-256 > AES-128 > Camellia-128 > ARIA-128
76c2c66affSColin Finck  * 3. By cipher mode when relevant GCM > CCM > CBC > CCM_8
77c2c66affSColin Finck  * 4. By hash function used when relevant
78c2c66affSColin Finck  * 5. By key exchange/auth again: EC > non-EC
79c2c66affSColin Finck  */
80c2c66affSColin Finck static const int ciphersuite_preference[] =
81c2c66affSColin Finck {
82c2c66affSColin Finck #if defined(MBEDTLS_SSL_CIPHERSUITES)
83c2c66affSColin Finck     MBEDTLS_SSL_CIPHERSUITES,
84c2c66affSColin Finck #else
85cbda039fSThomas Faber     /* Chacha-Poly ephemeral suites */
86cbda039fSThomas Faber     MBEDTLS_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
87cbda039fSThomas Faber     MBEDTLS_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
88cbda039fSThomas Faber     MBEDTLS_TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
89cbda039fSThomas Faber 
90c2c66affSColin Finck     /* All AES-256 ephemeral suites */
91c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
92c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
93c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
94c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM,
95c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM,
96c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
97c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
98c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
99c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
100c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
101c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
102c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8,
103c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM_8,
104c2c66affSColin Finck 
105c2c66affSColin Finck     /* All CAMELLIA-256 ephemeral suites */
106c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
107c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384,
108c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384,
109c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
110c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,
111c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
112c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,
113c2c66affSColin Finck 
114cbda039fSThomas Faber     /* All ARIA-256 ephemeral suites */
115cbda039fSThomas Faber     MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384,
116cbda039fSThomas Faber     MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384,
117cbda039fSThomas Faber     MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384,
118cbda039fSThomas Faber     MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384,
119cbda039fSThomas Faber     MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384,
120cbda039fSThomas Faber     MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384,
121cbda039fSThomas Faber 
122c2c66affSColin Finck     /* All AES-128 ephemeral suites */
123c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
124c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
125c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,
126c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM,
127c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM,
128c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
129c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
130c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
131c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
132c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
133c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
134c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8,
135c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM_8,
136c2c66affSColin Finck 
137c2c66affSColin Finck     /* All CAMELLIA-128 ephemeral suites */
138c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
139c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256,
140c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256,
141c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
142c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
143c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
144c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,
145c2c66affSColin Finck 
146cbda039fSThomas Faber     /* All ARIA-128 ephemeral suites */
147cbda039fSThomas Faber     MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256,
148cbda039fSThomas Faber     MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256,
149cbda039fSThomas Faber     MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256,
150cbda039fSThomas Faber     MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256,
151cbda039fSThomas Faber     MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256,
152cbda039fSThomas Faber     MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256,
153cbda039fSThomas Faber 
154c2c66affSColin Finck     /* The PSK ephemeral suites */
155cbda039fSThomas Faber     MBEDTLS_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
156cbda039fSThomas Faber     MBEDTLS_TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
157c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384,
158c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM,
159c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
160c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384,
161c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA,
162c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA,
163c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384,
164c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
165c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
166c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM_8,
167cbda039fSThomas Faber     MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384,
168cbda039fSThomas Faber     MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384,
169cbda039fSThomas Faber     MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384,
170c2c66affSColin Finck 
171c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256,
172c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM,
173c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
174c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256,
175c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA,
176c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA,
177c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256,
178c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
179c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
180c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM_8,
181cbda039fSThomas Faber     MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256,
182cbda039fSThomas Faber     MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256,
183cbda039fSThomas Faber     MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256,
184c2c66affSColin Finck 
185c2c66affSColin Finck     /* The ECJPAKE suite */
186c2c66affSColin Finck     MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8,
187c2c66affSColin Finck 
188c2c66affSColin Finck     /* All AES-256 suites */
189c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384,
190c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_AES_256_CCM,
191c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256,
192c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA,
193c2c66affSColin Finck     MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,
194c2c66affSColin Finck     MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,
195c2c66affSColin Finck     MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,
196c2c66affSColin Finck     MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,
197c2c66affSColin Finck     MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,
198c2c66affSColin Finck     MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
199c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_AES_256_CCM_8,
200c2c66affSColin Finck 
201c2c66affSColin Finck     /* All CAMELLIA-256 suites */
202c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384,
203c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256,
204c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,
205c2c66affSColin Finck     MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
206c2c66affSColin Finck     MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384,
207c2c66affSColin Finck     MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
208c2c66affSColin Finck     MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
209c2c66affSColin Finck 
210cbda039fSThomas Faber     /* All ARIA-256 suites */
211cbda039fSThomas Faber     MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384,
212cbda039fSThomas Faber     MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384,
213cbda039fSThomas Faber     MBEDTLS_TLS_RSA_WITH_ARIA_256_GCM_SHA384,
214cbda039fSThomas Faber     MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384,
215cbda039fSThomas Faber     MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384,
216cbda039fSThomas Faber     MBEDTLS_TLS_RSA_WITH_ARIA_256_CBC_SHA384,
217cbda039fSThomas Faber 
218c2c66affSColin Finck     /* All AES-128 suites */
219c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256,
220c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_AES_128_CCM,
221c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256,
222c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA,
223c2c66affSColin Finck     MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,
224c2c66affSColin Finck     MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,
225c2c66affSColin Finck     MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,
226c2c66affSColin Finck     MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,
227c2c66affSColin Finck     MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,
228c2c66affSColin Finck     MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
229c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_AES_128_CCM_8,
230c2c66affSColin Finck 
231c2c66affSColin Finck     /* All CAMELLIA-128 suites */
232c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256,
233c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256,
234c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA,
235c2c66affSColin Finck     MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
236c2c66affSColin Finck     MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
237c2c66affSColin Finck     MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
238c2c66affSColin Finck     MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
239c2c66affSColin Finck 
240cbda039fSThomas Faber     /* All ARIA-128 suites */
241cbda039fSThomas Faber     MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256,
242cbda039fSThomas Faber     MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256,
243cbda039fSThomas Faber     MBEDTLS_TLS_RSA_WITH_ARIA_128_GCM_SHA256,
244cbda039fSThomas Faber     MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256,
245cbda039fSThomas Faber     MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256,
246cbda039fSThomas Faber     MBEDTLS_TLS_RSA_WITH_ARIA_128_CBC_SHA256,
247cbda039fSThomas Faber 
248c2c66affSColin Finck     /* The RSA PSK suites */
249cbda039fSThomas Faber     MBEDTLS_TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256,
250c2c66affSColin Finck     MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384,
251c2c66affSColin Finck     MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384,
252c2c66affSColin Finck     MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA,
253c2c66affSColin Finck     MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384,
254c2c66affSColin Finck     MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384,
255cbda039fSThomas Faber     MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384,
256cbda039fSThomas Faber     MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384,
257c2c66affSColin Finck 
258c2c66affSColin Finck     MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256,
259c2c66affSColin Finck     MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256,
260c2c66affSColin Finck     MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA,
261c2c66affSColin Finck     MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256,
262c2c66affSColin Finck     MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256,
263cbda039fSThomas Faber     MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256,
264cbda039fSThomas Faber     MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256,
265c2c66affSColin Finck 
266c2c66affSColin Finck     /* The PSK suites */
267cbda039fSThomas Faber     MBEDTLS_TLS_PSK_WITH_CHACHA20_POLY1305_SHA256,
268c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384,
269c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_AES_256_CCM,
270c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384,
271c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA,
272c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384,
273c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384,
274c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8,
275cbda039fSThomas Faber     MBEDTLS_TLS_PSK_WITH_ARIA_256_GCM_SHA384,
276cbda039fSThomas Faber     MBEDTLS_TLS_PSK_WITH_ARIA_256_CBC_SHA384,
277c2c66affSColin Finck 
278c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256,
279c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_AES_128_CCM,
280c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256,
281c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA,
282c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256,
283c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256,
284c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8,
285cbda039fSThomas Faber     MBEDTLS_TLS_PSK_WITH_ARIA_128_GCM_SHA256,
286cbda039fSThomas Faber     MBEDTLS_TLS_PSK_WITH_ARIA_128_CBC_SHA256,
287c2c66affSColin Finck 
288ca86ee9cSThomas Faber     /* 3DES suites */
289ca86ee9cSThomas Faber     MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
290ca86ee9cSThomas Faber     MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
291ca86ee9cSThomas Faber     MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
292ca86ee9cSThomas Faber     MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA,
293ca86ee9cSThomas Faber     MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA,
294ca86ee9cSThomas Faber     MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA,
295ca86ee9cSThomas Faber     MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,
296ca86ee9cSThomas Faber     MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,
297ca86ee9cSThomas Faber     MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA,
298c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA,
299c2c66affSColin Finck 
300c2c66affSColin Finck     /* RC4 suites */
301c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
302c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA,
303c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA,
304c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA,
305c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_RC4_128_SHA,
306c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_RC4_128_MD5,
307c2c66affSColin Finck     MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA,
308c2c66affSColin Finck     MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
309c2c66affSColin Finck     MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA,
310c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_RC4_128_SHA,
311c2c66affSColin Finck 
312c2c66affSColin Finck     /* Weak suites */
313c2c66affSColin Finck     MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA,
314c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA,
315c2c66affSColin Finck 
316c2c66affSColin Finck     /* NULL suites */
317c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA,
318c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA,
319c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384,
320c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256,
321c2c66affSColin Finck     MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA,
322c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384,
323c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256,
324c2c66affSColin Finck     MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA,
325c2c66affSColin Finck 
326c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_NULL_SHA256,
327c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_NULL_SHA,
328c2c66affSColin Finck     MBEDTLS_TLS_RSA_WITH_NULL_MD5,
329c2c66affSColin Finck     MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA,
330c2c66affSColin Finck     MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA,
331c2c66affSColin Finck     MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384,
332c2c66affSColin Finck     MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256,
333c2c66affSColin Finck     MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA,
334c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_NULL_SHA384,
335c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_NULL_SHA256,
336c2c66affSColin Finck     MBEDTLS_TLS_PSK_WITH_NULL_SHA,
337c2c66affSColin Finck 
338c2c66affSColin Finck #endif /* MBEDTLS_SSL_CIPHERSUITES */
339c2c66affSColin Finck     0
340c2c66affSColin Finck };
341c2c66affSColin Finck 
342c2c66affSColin Finck static const mbedtls_ssl_ciphersuite_t ciphersuite_definitions[] =
343c2c66affSColin Finck {
344cbda039fSThomas Faber #if defined(MBEDTLS_CHACHAPOLY_C) && \
345cbda039fSThomas Faber     defined(MBEDTLS_SHA256_C) && \
346cbda039fSThomas Faber     defined(MBEDTLS_SSL_PROTO_TLS1_2)
347cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED)
348cbda039fSThomas Faber     { MBEDTLS_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
349cbda039fSThomas Faber       "TLS-ECDHE-RSA-WITH-CHACHA20-POLY1305-SHA256",
350cbda039fSThomas Faber       MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
351cbda039fSThomas Faber       MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
352cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
353cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
354cbda039fSThomas Faber       0 },
355cbda039fSThomas Faber #endif
356cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
357cbda039fSThomas Faber     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
358cbda039fSThomas Faber       "TLS-ECDHE-ECDSA-WITH-CHACHA20-POLY1305-SHA256",
359cbda039fSThomas Faber       MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
360cbda039fSThomas Faber       MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
361cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
362cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
363cbda039fSThomas Faber       0 },
364cbda039fSThomas Faber #endif
365cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
366cbda039fSThomas Faber     { MBEDTLS_TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
367cbda039fSThomas Faber       "TLS-DHE-RSA-WITH-CHACHA20-POLY1305-SHA256",
368cbda039fSThomas Faber       MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
369cbda039fSThomas Faber       MBEDTLS_KEY_EXCHANGE_DHE_RSA,
370cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
371cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
372cbda039fSThomas Faber       0 },
373cbda039fSThomas Faber #endif
374cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
375cbda039fSThomas Faber     { MBEDTLS_TLS_PSK_WITH_CHACHA20_POLY1305_SHA256,
376cbda039fSThomas Faber       "TLS-PSK-WITH-CHACHA20-POLY1305-SHA256",
377cbda039fSThomas Faber       MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
378cbda039fSThomas Faber       MBEDTLS_KEY_EXCHANGE_PSK,
379cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
380cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
381cbda039fSThomas Faber       0 },
382cbda039fSThomas Faber #endif
383cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
384cbda039fSThomas Faber     { MBEDTLS_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
385cbda039fSThomas Faber       "TLS-ECDHE-PSK-WITH-CHACHA20-POLY1305-SHA256",
386cbda039fSThomas Faber       MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
387cbda039fSThomas Faber       MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
388cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
389cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
390cbda039fSThomas Faber       0 },
391cbda039fSThomas Faber #endif
392cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
393cbda039fSThomas Faber     { MBEDTLS_TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
394cbda039fSThomas Faber       "TLS-DHE-PSK-WITH-CHACHA20-POLY1305-SHA256",
395cbda039fSThomas Faber       MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
396cbda039fSThomas Faber       MBEDTLS_KEY_EXCHANGE_DHE_PSK,
397cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
398cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
399cbda039fSThomas Faber       0 },
400cbda039fSThomas Faber #endif
401cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
402cbda039fSThomas Faber     { MBEDTLS_TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256,
403cbda039fSThomas Faber       "TLS-RSA-PSK-WITH-CHACHA20-POLY1305-SHA256",
404cbda039fSThomas Faber       MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
405cbda039fSThomas Faber       MBEDTLS_KEY_EXCHANGE_RSA_PSK,
406cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
407cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
408cbda039fSThomas Faber       0 },
409cbda039fSThomas Faber #endif
410cbda039fSThomas Faber #endif /* MBEDTLS_CHACHAPOLY_C &&
411cbda039fSThomas Faber           MBEDTLS_SHA256_C &&
412cbda039fSThomas Faber           MBEDTLS_SSL_PROTO_TLS1_2 */
413c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
414c2c66affSColin Finck #if defined(MBEDTLS_AES_C)
415c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
416c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
417c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA",
418c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
419c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
420c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
421c2c66affSColin Finck       0 },
422c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA",
423c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
424c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
425c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
426c2c66affSColin Finck       0 },
427c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
428c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
429c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
430c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
431c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA256",
432c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
433c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
434c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
435c2c66affSColin Finck       0 },
436c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
437c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
438c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, "TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256",
439c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
440c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
441c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
442c2c66affSColin Finck       0 },
443c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
444c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
445c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
446c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
447c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA384",
448c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
449c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
450c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
451c2c66affSColin Finck       0 },
452c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
453c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
454c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, "TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384",
455c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
456c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
457c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
458c2c66affSColin Finck       0 },
459c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
460c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
461c2c66affSColin Finck #if defined(MBEDTLS_CCM_C)
462c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM, "TLS-ECDHE-ECDSA-WITH-AES-256-CCM",
463c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
464c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
465c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
466c2c66affSColin Finck       0 },
467c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8, "TLS-ECDHE-ECDSA-WITH-AES-256-CCM-8",
468c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
469c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
470c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
471c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_SHORT_TAG },
472c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM, "TLS-ECDHE-ECDSA-WITH-AES-128-CCM",
473c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
474c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
475c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
476c2c66affSColin Finck       0 },
477c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, "TLS-ECDHE-ECDSA-WITH-AES-128-CCM-8",
478c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
479c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
480c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
481c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_SHORT_TAG },
482c2c66affSColin Finck #endif /* MBEDTLS_CCM_C */
483c2c66affSColin Finck #endif /* MBEDTLS_AES_C */
484c2c66affSColin Finck 
485c2c66affSColin Finck #if defined(MBEDTLS_CAMELLIA_C)
486c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
487c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
488c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-CBC-SHA256",
489c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
490c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
491c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
492c2c66affSColin Finck       0 },
493c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
494c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
495c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-CBC-SHA384",
496c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
497c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
498c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
499c2c66affSColin Finck       0 },
500c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
501c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
502c2c66affSColin Finck 
503c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
504c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
505c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-GCM-SHA256",
506c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
507c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
508c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
509c2c66affSColin Finck       0 },
510c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
511c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
512c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-GCM-SHA384",
513c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
514c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
515c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
516c2c66affSColin Finck       0 },
517c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
518c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
519c2c66affSColin Finck #endif /* MBEDTLS_CAMELLIA_C */
520c2c66affSColin Finck 
521c2c66affSColin Finck #if defined(MBEDTLS_DES_C)
522c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
523c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
524c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-3DES-EDE-CBC-SHA",
525c2c66affSColin Finck       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
526c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
527c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
528c2c66affSColin Finck       0 },
529c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
530c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
531c2c66affSColin Finck #endif /* MBEDTLS_DES_C */
532c2c66affSColin Finck 
533c2c66affSColin Finck #if defined(MBEDTLS_ARC4_C)
534c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
535c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, "TLS-ECDHE-ECDSA-WITH-RC4-128-SHA",
536c2c66affSColin Finck       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
537c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
538c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
539c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_NODTLS },
540c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
541c2c66affSColin Finck #endif /* MBEDTLS_ARC4_C */
542c2c66affSColin Finck 
543c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
544c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
545c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA, "TLS-ECDHE-ECDSA-WITH-NULL-SHA",
546c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
547c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
548c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
549c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
550c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
551c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
552c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */
553c2c66affSColin Finck 
554c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED)
555c2c66affSColin Finck #if defined(MBEDTLS_AES_C)
556c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
557c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
558c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, "TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA",
559c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
560c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
561c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
562c2c66affSColin Finck       0 },
563c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, "TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA",
564c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
565c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
566c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
567c2c66affSColin Finck       0 },
568c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
569c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
570c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
571c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
572c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA256",
573c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
574c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
575c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
576c2c66affSColin Finck       0 },
577c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
578c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
579c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, "TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256",
580c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
581c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
582c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
583c2c66affSColin Finck       0 },
584c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
585c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
586c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
587c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
588c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384",
589c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
590c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
591c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
592c2c66affSColin Finck       0 },
593c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
594c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
595c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, "TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384",
596c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
597c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
598c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
599c2c66affSColin Finck       0 },
600c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
601c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
602c2c66affSColin Finck #endif /* MBEDTLS_AES_C */
603c2c66affSColin Finck 
604c2c66affSColin Finck #if defined(MBEDTLS_CAMELLIA_C)
605c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
606c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
607c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-RSA-WITH-CAMELLIA-128-CBC-SHA256",
608c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
609c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
610c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
611c2c66affSColin Finck       0 },
612c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
613c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
614c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-RSA-WITH-CAMELLIA-256-CBC-SHA384",
615c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
616c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
617c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
618c2c66affSColin Finck       0 },
619c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
620c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
621c2c66affSColin Finck 
622c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
623c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
624c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDHE-RSA-WITH-CAMELLIA-128-GCM-SHA256",
625c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
626c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
627c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
628c2c66affSColin Finck       0 },
629c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
630c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
631c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDHE-RSA-WITH-CAMELLIA-256-GCM-SHA384",
632c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
633c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
634c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
635c2c66affSColin Finck       0 },
636c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
637c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
638c2c66affSColin Finck #endif /* MBEDTLS_CAMELLIA_C */
639c2c66affSColin Finck 
640c2c66affSColin Finck #if defined(MBEDTLS_DES_C)
641c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
642c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
643c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-RSA-WITH-3DES-EDE-CBC-SHA",
644c2c66affSColin Finck       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
645c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
646c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
647c2c66affSColin Finck       0 },
648c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
649c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
650c2c66affSColin Finck #endif /* MBEDTLS_DES_C */
651c2c66affSColin Finck 
652c2c66affSColin Finck #if defined(MBEDTLS_ARC4_C)
653c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
654c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA, "TLS-ECDHE-RSA-WITH-RC4-128-SHA",
655c2c66affSColin Finck       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
656c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
657c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
658c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_NODTLS },
659c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
660c2c66affSColin Finck #endif /* MBEDTLS_ARC4_C */
661c2c66affSColin Finck 
662c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
663c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
664c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA, "TLS-ECDHE-RSA-WITH-NULL-SHA",
665c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
666c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
667c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
668c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
669c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
670c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
671c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED */
672c2c66affSColin Finck 
673c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
674c2c66affSColin Finck #if defined(MBEDTLS_AES_C)
675c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C) && defined(MBEDTLS_GCM_C)
676c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, "TLS-DHE-RSA-WITH-AES-256-GCM-SHA384",
677c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
678c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
679c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
680c2c66affSColin Finck       0 },
681c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C && MBEDTLS_GCM_C */
682c2c66affSColin Finck 
683c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
684c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
685c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, "TLS-DHE-RSA-WITH-AES-128-GCM-SHA256",
686c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
687c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
688c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
689c2c66affSColin Finck       0 },
690c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
691c2c66affSColin Finck 
692c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
693c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, "TLS-DHE-RSA-WITH-AES-128-CBC-SHA256",
694c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
695c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
696c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
697c2c66affSColin Finck       0 },
698c2c66affSColin Finck 
699c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, "TLS-DHE-RSA-WITH-AES-256-CBC-SHA256",
700c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
701c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
702c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
703c2c66affSColin Finck       0 },
704c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
705c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
706c2c66affSColin Finck 
707c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
708c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
709c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA, "TLS-DHE-RSA-WITH-AES-128-CBC-SHA",
710c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
711c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
712c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
713c2c66affSColin Finck       0 },
714c2c66affSColin Finck 
715c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA, "TLS-DHE-RSA-WITH-AES-256-CBC-SHA",
716c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
717c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
718c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
719c2c66affSColin Finck       0 },
720c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
721c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
722c2c66affSColin Finck #if defined(MBEDTLS_CCM_C)
723c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM, "TLS-DHE-RSA-WITH-AES-256-CCM",
724c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
725c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
726c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
727c2c66affSColin Finck       0 },
728c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM_8, "TLS-DHE-RSA-WITH-AES-256-CCM-8",
729c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
730c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
731c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
732c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_SHORT_TAG },
733c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM, "TLS-DHE-RSA-WITH-AES-128-CCM",
734c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
735c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
736c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
737c2c66affSColin Finck       0 },
738c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM_8, "TLS-DHE-RSA-WITH-AES-128-CCM-8",
739c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
740c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
741c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
742c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_SHORT_TAG },
743c2c66affSColin Finck #endif /* MBEDTLS_CCM_C */
744c2c66affSColin Finck #endif /* MBEDTLS_AES_C */
745c2c66affSColin Finck 
746c2c66affSColin Finck #if defined(MBEDTLS_CAMELLIA_C)
747c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
748c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
749c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA256",
750c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
751c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
752c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
753c2c66affSColin Finck       0 },
754c2c66affSColin Finck 
755c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA256",
756c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
757c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
758c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
759c2c66affSColin Finck       0 },
760c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
761c2c66affSColin Finck 
762c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
763c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA",
764c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
765c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
766c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
767c2c66affSColin Finck       0 },
768c2c66affSColin Finck 
769c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA",
770c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
771c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
772c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
773c2c66affSColin Finck       0 },
774c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
775c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
776c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
777c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
778c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-128-GCM-SHA256",
779c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
780c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
781c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
782c2c66affSColin Finck       0 },
783c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
784c2c66affSColin Finck 
785c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
786c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-DHE-RSA-WITH-CAMELLIA-256-GCM-SHA384",
787c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
788c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
789c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
790c2c66affSColin Finck       0 },
791c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
792c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
793c2c66affSColin Finck #endif /* MBEDTLS_CAMELLIA_C */
794c2c66affSColin Finck 
795c2c66affSColin Finck #if defined(MBEDTLS_DES_C)
796c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
797c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
798c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-DHE-RSA-WITH-3DES-EDE-CBC-SHA",
799c2c66affSColin Finck       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
800c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
801c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
802c2c66affSColin Finck       0 },
803c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
804c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
805c2c66affSColin Finck #endif /* MBEDTLS_DES_C */
806c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */
807c2c66affSColin Finck 
808c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
809c2c66affSColin Finck #if defined(MBEDTLS_AES_C)
810c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C) && defined(MBEDTLS_GCM_C)
811c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384, "TLS-RSA-WITH-AES-256-GCM-SHA384",
812c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA,
813c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
814c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
815c2c66affSColin Finck       0 },
816c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C && MBEDTLS_GCM_C */
817c2c66affSColin Finck 
818c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
819c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
820c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256, "TLS-RSA-WITH-AES-128-GCM-SHA256",
821c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
822c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
823c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
824c2c66affSColin Finck       0 },
825c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
826c2c66affSColin Finck 
827c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
828c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256, "TLS-RSA-WITH-AES-128-CBC-SHA256",
829c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
830c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
831c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
832c2c66affSColin Finck       0 },
833c2c66affSColin Finck 
834c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256, "TLS-RSA-WITH-AES-256-CBC-SHA256",
835c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
836c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
837c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
838c2c66affSColin Finck       0 },
839c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
840c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
841c2c66affSColin Finck 
842c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
843c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
844c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA, "TLS-RSA-WITH-AES-128-CBC-SHA",
845c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
846c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
847c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
848c2c66affSColin Finck       0 },
849c2c66affSColin Finck 
850c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA, "TLS-RSA-WITH-AES-256-CBC-SHA",
851c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
852c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
853c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
854c2c66affSColin Finck       0 },
855c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
856c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
857c2c66affSColin Finck #if defined(MBEDTLS_CCM_C)
858c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_AES_256_CCM, "TLS-RSA-WITH-AES-256-CCM",
859c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
860c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
861c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
862c2c66affSColin Finck       0 },
863c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_AES_256_CCM_8, "TLS-RSA-WITH-AES-256-CCM-8",
864c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
865c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
866c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
867c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_SHORT_TAG },
868c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_AES_128_CCM, "TLS-RSA-WITH-AES-128-CCM",
869c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
870c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
871c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
872c2c66affSColin Finck       0 },
873c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_AES_128_CCM_8, "TLS-RSA-WITH-AES-128-CCM-8",
874c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
875c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
876c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
877c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_SHORT_TAG },
878c2c66affSColin Finck #endif /* MBEDTLS_CCM_C */
879c2c66affSColin Finck #endif /* MBEDTLS_AES_C */
880c2c66affSColin Finck 
881c2c66affSColin Finck #if defined(MBEDTLS_CAMELLIA_C)
882c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
883c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
884c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-RSA-WITH-CAMELLIA-128-CBC-SHA256",
885c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
886c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
887c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
888c2c66affSColin Finck       0 },
889c2c66affSColin Finck 
890c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256, "TLS-RSA-WITH-CAMELLIA-256-CBC-SHA256",
891c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
892c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
893c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
894c2c66affSColin Finck       0 },
895c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
896c2c66affSColin Finck 
897c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
898c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, "TLS-RSA-WITH-CAMELLIA-128-CBC-SHA",
899c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
900c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
901c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
902c2c66affSColin Finck       0 },
903c2c66affSColin Finck 
904c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, "TLS-RSA-WITH-CAMELLIA-256-CBC-SHA",
905c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
906c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
907c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
908c2c66affSColin Finck       0 },
909c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
910c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
911c2c66affSColin Finck 
912c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
913c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
914c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-RSA-WITH-CAMELLIA-128-GCM-SHA256",
915c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
916c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
917c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
918c2c66affSColin Finck       0 },
919c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
920c2c66affSColin Finck 
921*103a79ceSThomas Faber #if defined(MBEDTLS_SHA512_C)
922c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-RSA-WITH-CAMELLIA-256-GCM-SHA384",
923c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA,
924c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
925c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
926c2c66affSColin Finck       0 },
927*103a79ceSThomas Faber #endif /* MBEDTLS_SHA512_C */
928c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
929c2c66affSColin Finck #endif /* MBEDTLS_CAMELLIA_C */
930c2c66affSColin Finck 
931c2c66affSColin Finck #if defined(MBEDTLS_DES_C)
932c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
933c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
934c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-RSA-WITH-3DES-EDE-CBC-SHA",
935c2c66affSColin Finck       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
936c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
937c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
938c2c66affSColin Finck       0 },
939c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
940c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
941c2c66affSColin Finck #endif /* MBEDTLS_DES_C */
942c2c66affSColin Finck 
943c2c66affSColin Finck #if defined(MBEDTLS_ARC4_C)
944c2c66affSColin Finck #if defined(MBEDTLS_MD5_C)
945c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_RC4_128_MD5, "TLS-RSA-WITH-RC4-128-MD5",
946c2c66affSColin Finck       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_MD5, MBEDTLS_KEY_EXCHANGE_RSA,
947c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
948c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
949c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_NODTLS },
950c2c66affSColin Finck #endif
951c2c66affSColin Finck 
952c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
953c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_RC4_128_SHA, "TLS-RSA-WITH-RC4-128-SHA",
954c2c66affSColin Finck       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
955c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
956c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
957c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_NODTLS },
958c2c66affSColin Finck #endif
959c2c66affSColin Finck #endif /* MBEDTLS_ARC4_C */
960c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
961c2c66affSColin Finck 
962c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED)
963c2c66affSColin Finck #if defined(MBEDTLS_AES_C)
964c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
965c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
966c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, "TLS-ECDH-RSA-WITH-AES-128-CBC-SHA",
967c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
968c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
969c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
970c2c66affSColin Finck       0 },
971c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, "TLS-ECDH-RSA-WITH-AES-256-CBC-SHA",
972c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
973c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
974c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
975c2c66affSColin Finck       0 },
976c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
977c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
978c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
979c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
980c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, "TLS-ECDH-RSA-WITH-AES-128-CBC-SHA256",
981c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
982c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
983c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
984c2c66affSColin Finck       0 },
985c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
986c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
987c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, "TLS-ECDH-RSA-WITH-AES-128-GCM-SHA256",
988c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
989c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
990c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
991c2c66affSColin Finck       0 },
992c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
993c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
994c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
995c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
996c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, "TLS-ECDH-RSA-WITH-AES-256-CBC-SHA384",
997c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
998c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
999c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1000c2c66affSColin Finck       0 },
1001c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1002c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
1003c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, "TLS-ECDH-RSA-WITH-AES-256-GCM-SHA384",
1004c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1005c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1006c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1007c2c66affSColin Finck       0 },
1008c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
1009c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1010c2c66affSColin Finck #endif /* MBEDTLS_AES_C */
1011c2c66affSColin Finck 
1012c2c66affSColin Finck #if defined(MBEDTLS_CAMELLIA_C)
1013c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1014c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1015c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDH-RSA-WITH-CAMELLIA-128-CBC-SHA256",
1016c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1017c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1018c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1019c2c66affSColin Finck       0 },
1020c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1021c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1022c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDH-RSA-WITH-CAMELLIA-256-CBC-SHA384",
1023c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1024c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1025c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1026c2c66affSColin Finck       0 },
1027c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1028c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1029c2c66affSColin Finck 
1030c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
1031c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1032c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDH-RSA-WITH-CAMELLIA-128-GCM-SHA256",
1033c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1034c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1035c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1036c2c66affSColin Finck       0 },
1037c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1038c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1039c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDH-RSA-WITH-CAMELLIA-256-GCM-SHA384",
1040c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1041c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1042c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1043c2c66affSColin Finck       0 },
1044c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1045c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
1046c2c66affSColin Finck #endif /* MBEDTLS_CAMELLIA_C */
1047c2c66affSColin Finck 
1048c2c66affSColin Finck #if defined(MBEDTLS_DES_C)
1049c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1050c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1051c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDH-RSA-WITH-3DES-EDE-CBC-SHA",
1052c2c66affSColin Finck       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1053c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1054c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1055c2c66affSColin Finck       0 },
1056c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1057c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1058c2c66affSColin Finck #endif /* MBEDTLS_DES_C */
1059c2c66affSColin Finck 
1060c2c66affSColin Finck #if defined(MBEDTLS_ARC4_C)
1061c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1062c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA, "TLS-ECDH-RSA-WITH-RC4-128-SHA",
1063c2c66affSColin Finck       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1064c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1065c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1066c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_NODTLS },
1067c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1068c2c66affSColin Finck #endif /* MBEDTLS_ARC4_C */
1069c2c66affSColin Finck 
1070c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
1071c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1072c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA, "TLS-ECDH-RSA-WITH-NULL-SHA",
1073c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1074c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1075c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1076c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1077c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1078c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
1079c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED */
1080c2c66affSColin Finck 
1081c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
1082c2c66affSColin Finck #if defined(MBEDTLS_AES_C)
1083c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1084c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1085c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, "TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA",
1086c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1087c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1088c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1089c2c66affSColin Finck       0 },
1090c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, "TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA",
1091c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1092c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1093c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1094c2c66affSColin Finck       0 },
1095c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1096c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1097c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1098c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1099c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, "TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA256",
1100c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1101c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1102c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1103c2c66affSColin Finck       0 },
1104c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1105c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
1106c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, "TLS-ECDH-ECDSA-WITH-AES-128-GCM-SHA256",
1107c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1108c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1109c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1110c2c66affSColin Finck       0 },
1111c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
1112c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1113c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1114c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1115c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, "TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA384",
1116c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1117c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1118c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1119c2c66affSColin Finck       0 },
1120c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1121c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
1122c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, "TLS-ECDH-ECDSA-WITH-AES-256-GCM-SHA384",
1123c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1124c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1125c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1126c2c66affSColin Finck       0 },
1127c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
1128c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1129c2c66affSColin Finck #endif /* MBEDTLS_AES_C */
1130c2c66affSColin Finck 
1131c2c66affSColin Finck #if defined(MBEDTLS_CAMELLIA_C)
1132c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1133c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1134c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDH-ECDSA-WITH-CAMELLIA-128-CBC-SHA256",
1135c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1136c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1137c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1138c2c66affSColin Finck       0 },
1139c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1140c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1141c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDH-ECDSA-WITH-CAMELLIA-256-CBC-SHA384",
1142c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1143c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1144c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1145c2c66affSColin Finck       0 },
1146c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1147c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1148c2c66affSColin Finck 
1149c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
1150c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1151c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDH-ECDSA-WITH-CAMELLIA-128-GCM-SHA256",
1152c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1153c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1154c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1155c2c66affSColin Finck       0 },
1156c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1157c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1158c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDH-ECDSA-WITH-CAMELLIA-256-GCM-SHA384",
1159c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1160c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1161c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1162c2c66affSColin Finck       0 },
1163c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1164c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
1165c2c66affSColin Finck #endif /* MBEDTLS_CAMELLIA_C */
1166c2c66affSColin Finck 
1167c2c66affSColin Finck #if defined(MBEDTLS_DES_C)
1168c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1169c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1170c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDH-ECDSA-WITH-3DES-EDE-CBC-SHA",
1171c2c66affSColin Finck       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1172c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1173c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1174c2c66affSColin Finck       0 },
1175c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1176c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1177c2c66affSColin Finck #endif /* MBEDTLS_DES_C */
1178c2c66affSColin Finck 
1179c2c66affSColin Finck #if defined(MBEDTLS_ARC4_C)
1180c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1181c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA, "TLS-ECDH-ECDSA-WITH-RC4-128-SHA",
1182c2c66affSColin Finck       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1183c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1184c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1185c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_NODTLS },
1186c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1187c2c66affSColin Finck #endif /* MBEDTLS_ARC4_C */
1188c2c66affSColin Finck 
1189c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
1190c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1191c2c66affSColin Finck     { MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA, "TLS-ECDH-ECDSA-WITH-NULL-SHA",
1192c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
1193c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1194c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1195c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1196c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1197c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
1198c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */
1199c2c66affSColin Finck 
1200c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
1201c2c66affSColin Finck #if defined(MBEDTLS_AES_C)
1202c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
1203c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1204c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256, "TLS-PSK-WITH-AES-128-GCM-SHA256",
1205c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1206c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1207c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1208c2c66affSColin Finck       0 },
1209c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1210c2c66affSColin Finck 
1211c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1212c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384, "TLS-PSK-WITH-AES-256-GCM-SHA384",
1213c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
1214c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1215c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1216c2c66affSColin Finck       0 },
1217c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1218c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
1219c2c66affSColin Finck 
1220c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1221c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1222c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256, "TLS-PSK-WITH-AES-128-CBC-SHA256",
1223c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1224c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1225c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1226c2c66affSColin Finck       0 },
1227c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1228c2c66affSColin Finck 
1229c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1230c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384, "TLS-PSK-WITH-AES-256-CBC-SHA384",
1231c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
1232c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1233c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1234c2c66affSColin Finck       0 },
1235c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1236c2c66affSColin Finck 
1237c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1238c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA, "TLS-PSK-WITH-AES-128-CBC-SHA",
1239c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
1240c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1241c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1242c2c66affSColin Finck       0 },
1243c2c66affSColin Finck 
1244c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA, "TLS-PSK-WITH-AES-256-CBC-SHA",
1245c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
1246c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1247c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1248c2c66affSColin Finck       0 },
1249c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1250c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1251c2c66affSColin Finck #if defined(MBEDTLS_CCM_C)
1252c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_AES_256_CCM, "TLS-PSK-WITH-AES-256-CCM",
1253c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1254c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1255c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1256c2c66affSColin Finck       0 },
1257c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8, "TLS-PSK-WITH-AES-256-CCM-8",
1258c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1259c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1260c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1261c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_SHORT_TAG },
1262c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_AES_128_CCM, "TLS-PSK-WITH-AES-128-CCM",
1263c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1264c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1265c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1266c2c66affSColin Finck       0 },
1267c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8, "TLS-PSK-WITH-AES-128-CCM-8",
1268c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1269c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1270c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1271c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_SHORT_TAG },
1272c2c66affSColin Finck #endif /* MBEDTLS_CCM_C */
1273c2c66affSColin Finck #endif /* MBEDTLS_AES_C */
1274c2c66affSColin Finck 
1275c2c66affSColin Finck #if defined(MBEDTLS_CAMELLIA_C)
1276c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1277c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1278c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-PSK-WITH-CAMELLIA-128-CBC-SHA256",
1279c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1280c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1281c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1282c2c66affSColin Finck       0 },
1283c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1284c2c66affSColin Finck 
1285c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1286c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-PSK-WITH-CAMELLIA-256-CBC-SHA384",
1287c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
1288c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1289c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1290c2c66affSColin Finck       0 },
1291c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1292c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1293c2c66affSColin Finck 
1294c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
1295c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1296c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-PSK-WITH-CAMELLIA-128-GCM-SHA256",
1297c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1298c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1299c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1300c2c66affSColin Finck       0 },
1301c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1302c2c66affSColin Finck 
1303c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1304c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-PSK-WITH-CAMELLIA-256-GCM-SHA384",
1305c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
1306c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1307c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1308c2c66affSColin Finck       0 },
1309c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1310c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
1311c2c66affSColin Finck #endif /* MBEDTLS_CAMELLIA_C */
1312c2c66affSColin Finck 
1313c2c66affSColin Finck #if defined(MBEDTLS_DES_C)
1314c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1315c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1316c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-PSK-WITH-3DES-EDE-CBC-SHA",
1317c2c66affSColin Finck       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
1318c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1319c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1320c2c66affSColin Finck       0 },
1321c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1322c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1323c2c66affSColin Finck #endif /* MBEDTLS_DES_C */
1324c2c66affSColin Finck 
1325c2c66affSColin Finck #if defined(MBEDTLS_ARC4_C)
1326c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1327c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_RC4_128_SHA, "TLS-PSK-WITH-RC4-128-SHA",
1328c2c66affSColin Finck       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
1329c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1330c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1331c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_NODTLS },
1332c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1333c2c66affSColin Finck #endif /* MBEDTLS_ARC4_C */
1334c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */
1335c2c66affSColin Finck 
1336c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
1337c2c66affSColin Finck #if defined(MBEDTLS_AES_C)
1338c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
1339c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1340c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256, "TLS-DHE-PSK-WITH-AES-128-GCM-SHA256",
1341c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1342c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1343c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1344c2c66affSColin Finck       0 },
1345c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1346c2c66affSColin Finck 
1347c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1348c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384, "TLS-DHE-PSK-WITH-AES-256-GCM-SHA384",
1349c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1350c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1351c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1352c2c66affSColin Finck       0 },
1353c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1354c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
1355c2c66affSColin Finck 
1356c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1357c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1358c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256, "TLS-DHE-PSK-WITH-AES-128-CBC-SHA256",
1359c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1360c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1361c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1362c2c66affSColin Finck       0 },
1363c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1364c2c66affSColin Finck 
1365c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1366c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384, "TLS-DHE-PSK-WITH-AES-256-CBC-SHA384",
1367c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1368c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1369c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1370c2c66affSColin Finck       0 },
1371c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1372c2c66affSColin Finck 
1373c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1374c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA, "TLS-DHE-PSK-WITH-AES-128-CBC-SHA",
1375c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1376c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1377c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1378c2c66affSColin Finck       0 },
1379c2c66affSColin Finck 
1380c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA, "TLS-DHE-PSK-WITH-AES-256-CBC-SHA",
1381c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1382c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1383c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1384c2c66affSColin Finck       0 },
1385c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1386c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1387c2c66affSColin Finck #if defined(MBEDTLS_CCM_C)
1388c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM, "TLS-DHE-PSK-WITH-AES-256-CCM",
1389c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1390c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1391c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1392c2c66affSColin Finck       0 },
1393c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM_8, "TLS-DHE-PSK-WITH-AES-256-CCM-8",
1394c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1395c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1396c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1397c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_SHORT_TAG },
1398c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM, "TLS-DHE-PSK-WITH-AES-128-CCM",
1399c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1400c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1401c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1402c2c66affSColin Finck       0 },
1403c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM_8, "TLS-DHE-PSK-WITH-AES-128-CCM-8",
1404c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1405c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1406c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1407c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_SHORT_TAG },
1408c2c66affSColin Finck #endif /* MBEDTLS_CCM_C */
1409c2c66affSColin Finck #endif /* MBEDTLS_AES_C */
1410c2c66affSColin Finck 
1411c2c66affSColin Finck #if defined(MBEDTLS_CAMELLIA_C)
1412c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1413c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1414c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-DHE-PSK-WITH-CAMELLIA-128-CBC-SHA256",
1415c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1416c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1417c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1418c2c66affSColin Finck       0 },
1419c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1420c2c66affSColin Finck 
1421c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1422c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-DHE-PSK-WITH-CAMELLIA-256-CBC-SHA384",
1423c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1424c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1425c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1426c2c66affSColin Finck       0 },
1427c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1428c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1429c2c66affSColin Finck 
1430c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
1431c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1432c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-DHE-PSK-WITH-CAMELLIA-128-GCM-SHA256",
1433c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1434c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1435c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1436c2c66affSColin Finck       0 },
1437c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1438c2c66affSColin Finck 
1439c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1440c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-DHE-PSK-WITH-CAMELLIA-256-GCM-SHA384",
1441c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1442c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1443c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1444c2c66affSColin Finck       0 },
1445c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1446c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
1447c2c66affSColin Finck #endif /* MBEDTLS_CAMELLIA_C */
1448c2c66affSColin Finck 
1449c2c66affSColin Finck #if defined(MBEDTLS_DES_C)
1450c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1451c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1452c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-DHE-PSK-WITH-3DES-EDE-CBC-SHA",
1453c2c66affSColin Finck       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1454c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1455c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1456c2c66affSColin Finck       0 },
1457c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1458c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1459c2c66affSColin Finck #endif /* MBEDTLS_DES_C */
1460c2c66affSColin Finck 
1461c2c66affSColin Finck #if defined(MBEDTLS_ARC4_C)
1462c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1463c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA, "TLS-DHE-PSK-WITH-RC4-128-SHA",
1464c2c66affSColin Finck       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1465c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1466c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1467c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_NODTLS },
1468c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1469c2c66affSColin Finck #endif /* MBEDTLS_ARC4_C */
1470c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */
1471c2c66affSColin Finck 
1472c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
1473c2c66affSColin Finck #if defined(MBEDTLS_AES_C)
1474c2c66affSColin Finck 
1475c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1476c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1477c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256",
1478c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1479c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1480c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1481c2c66affSColin Finck       0 },
1482c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1483c2c66affSColin Finck 
1484c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1485c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA384",
1486c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1487c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1488c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1489c2c66affSColin Finck       0 },
1490c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1491c2c66affSColin Finck 
1492c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1493c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA, "TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA",
1494c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1495c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1496c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1497c2c66affSColin Finck       0 },
1498c2c66affSColin Finck 
1499c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA, "TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA",
1500c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1501c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1502c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1503c2c66affSColin Finck       0 },
1504c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1505c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1506c2c66affSColin Finck #endif /* MBEDTLS_AES_C */
1507c2c66affSColin Finck 
1508c2c66affSColin Finck #if defined(MBEDTLS_CAMELLIA_C)
1509c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1510c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1511c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-PSK-WITH-CAMELLIA-128-CBC-SHA256",
1512c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1513c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1514c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1515c2c66affSColin Finck       0 },
1516c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1517c2c66affSColin Finck 
1518c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1519c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-PSK-WITH-CAMELLIA-256-CBC-SHA384",
1520c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1521c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1522c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1523c2c66affSColin Finck       0 },
1524c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1525c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1526c2c66affSColin Finck #endif /* MBEDTLS_CAMELLIA_C */
1527c2c66affSColin Finck 
1528c2c66affSColin Finck #if defined(MBEDTLS_DES_C)
1529c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1530c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1531c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-PSK-WITH-3DES-EDE-CBC-SHA",
1532c2c66affSColin Finck       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1533c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1534c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1535c2c66affSColin Finck       0 },
1536c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1537c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1538c2c66affSColin Finck #endif /* MBEDTLS_DES_C */
1539c2c66affSColin Finck 
1540c2c66affSColin Finck #if defined(MBEDTLS_ARC4_C)
1541c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1542c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA, "TLS-ECDHE-PSK-WITH-RC4-128-SHA",
1543c2c66affSColin Finck       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1544c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1545c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1546c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_NODTLS },
1547c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1548c2c66affSColin Finck #endif /* MBEDTLS_ARC4_C */
1549c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
1550c2c66affSColin Finck 
1551c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
1552c2c66affSColin Finck #if defined(MBEDTLS_AES_C)
1553c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
1554c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1555c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256, "TLS-RSA-PSK-WITH-AES-128-GCM-SHA256",
1556c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1557c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1558c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1559c2c66affSColin Finck       0 },
1560c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1561c2c66affSColin Finck 
1562c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1563c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384, "TLS-RSA-PSK-WITH-AES-256-GCM-SHA384",
1564c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1565c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1566c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1567c2c66affSColin Finck       0 },
1568c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1569c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
1570c2c66affSColin Finck 
1571c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1572c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1573c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256, "TLS-RSA-PSK-WITH-AES-128-CBC-SHA256",
1574c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1575c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1576c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1577c2c66affSColin Finck       0 },
1578c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1579c2c66affSColin Finck 
1580c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1581c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384, "TLS-RSA-PSK-WITH-AES-256-CBC-SHA384",
1582c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1583c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1584c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1585c2c66affSColin Finck       0 },
1586c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1587c2c66affSColin Finck 
1588c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1589c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA, "TLS-RSA-PSK-WITH-AES-128-CBC-SHA",
1590c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1591c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1592c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1593c2c66affSColin Finck       0 },
1594c2c66affSColin Finck 
1595c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA, "TLS-RSA-PSK-WITH-AES-256-CBC-SHA",
1596c2c66affSColin Finck       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1597c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1598c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1599c2c66affSColin Finck       0 },
1600c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1601c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1602c2c66affSColin Finck #endif /* MBEDTLS_AES_C */
1603c2c66affSColin Finck 
1604c2c66affSColin Finck #if defined(MBEDTLS_CAMELLIA_C)
1605c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1606c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1607c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-RSA-PSK-WITH-CAMELLIA-128-CBC-SHA256",
1608c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1609c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1610c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1611c2c66affSColin Finck       0 },
1612c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1613c2c66affSColin Finck 
1614c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1615c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-RSA-PSK-WITH-CAMELLIA-256-CBC-SHA384",
1616c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1617c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1618c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1619c2c66affSColin Finck       0 },
1620c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1621c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1622c2c66affSColin Finck 
1623c2c66affSColin Finck #if defined(MBEDTLS_GCM_C)
1624c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1625c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-RSA-PSK-WITH-CAMELLIA-128-GCM-SHA256",
1626c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1627c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1628c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1629c2c66affSColin Finck       0 },
1630c2c66affSColin Finck #endif /* MBEDTLS_SHA256_C */
1631c2c66affSColin Finck 
1632c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1633c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-RSA-PSK-WITH-CAMELLIA-256-GCM-SHA384",
1634c2c66affSColin Finck       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1635c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1636c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1637c2c66affSColin Finck       0 },
1638c2c66affSColin Finck #endif /* MBEDTLS_SHA512_C */
1639c2c66affSColin Finck #endif /* MBEDTLS_GCM_C */
1640c2c66affSColin Finck #endif /* MBEDTLS_CAMELLIA_C */
1641c2c66affSColin Finck 
1642c2c66affSColin Finck #if defined(MBEDTLS_DES_C)
1643c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1644c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1645c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-RSA-PSK-WITH-3DES-EDE-CBC-SHA",
1646c2c66affSColin Finck       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1647c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1648c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1649c2c66affSColin Finck       0 },
1650c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1651c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1652c2c66affSColin Finck #endif /* MBEDTLS_DES_C */
1653c2c66affSColin Finck 
1654c2c66affSColin Finck #if defined(MBEDTLS_ARC4_C)
1655c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1656c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA, "TLS-RSA-PSK-WITH-RC4-128-SHA",
1657c2c66affSColin Finck       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1658c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1659c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1660c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_NODTLS },
1661c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1662c2c66affSColin Finck #endif /* MBEDTLS_ARC4_C */
1663c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */
1664c2c66affSColin Finck 
1665c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
1666c2c66affSColin Finck #if defined(MBEDTLS_AES_C)
1667c2c66affSColin Finck #if defined(MBEDTLS_CCM_C)
1668c2c66affSColin Finck     { MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8, "TLS-ECJPAKE-WITH-AES-128-CCM-8",
1669c2c66affSColin Finck       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECJPAKE,
1670c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1671c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1672c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_SHORT_TAG },
1673c2c66affSColin Finck #endif /* MBEDTLS_CCM_C */
1674c2c66affSColin Finck #endif /* MBEDTLS_AES_C */
1675c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */
1676c2c66affSColin Finck 
1677c2c66affSColin Finck #if defined(MBEDTLS_ENABLE_WEAK_CIPHERSUITES)
1678c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
1679c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
1680c2c66affSColin Finck #if defined(MBEDTLS_MD5_C)
1681c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_NULL_MD5, "TLS-RSA-WITH-NULL-MD5",
1682c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_MD5, MBEDTLS_KEY_EXCHANGE_RSA,
1683c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1684c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1685c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1686c2c66affSColin Finck #endif
1687c2c66affSColin Finck 
1688c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1689c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_NULL_SHA, "TLS-RSA-WITH-NULL-SHA",
1690c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
1691c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1692c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1693c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1694c2c66affSColin Finck #endif
1695c2c66affSColin Finck 
1696c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1697c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_NULL_SHA256, "TLS-RSA-WITH-NULL-SHA256",
1698c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
1699c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1700c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1701c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1702c2c66affSColin Finck #endif
1703c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
1704c2c66affSColin Finck 
1705c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
1706c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1707c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_NULL_SHA, "TLS-PSK-WITH-NULL-SHA",
1708c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
1709c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1710c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1711c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1712c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1713c2c66affSColin Finck 
1714c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1715c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_NULL_SHA256, "TLS-PSK-WITH-NULL-SHA256",
1716c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1717c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1718c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1719c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1720c2c66affSColin Finck #endif
1721c2c66affSColin Finck 
1722c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1723c2c66affSColin Finck     { MBEDTLS_TLS_PSK_WITH_NULL_SHA384, "TLS-PSK-WITH-NULL-SHA384",
1724c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
1725c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1726c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1727c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1728c2c66affSColin Finck #endif
1729c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */
1730c2c66affSColin Finck 
1731c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
1732c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1733c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA, "TLS-DHE-PSK-WITH-NULL-SHA",
1734c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1735c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1736c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1737c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1738c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1739c2c66affSColin Finck 
1740c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1741c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256, "TLS-DHE-PSK-WITH-NULL-SHA256",
1742c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1743c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1744c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1745c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1746c2c66affSColin Finck #endif
1747c2c66affSColin Finck 
1748c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1749c2c66affSColin Finck     { MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384, "TLS-DHE-PSK-WITH-NULL-SHA384",
1750c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
1751c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1752c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1753c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1754c2c66affSColin Finck #endif
1755c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */
1756c2c66affSColin Finck 
1757c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
1758c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1759c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA, "TLS-ECDHE-PSK-WITH-NULL-SHA",
1760c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1761c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1762c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1763c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1764c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1765c2c66affSColin Finck 
1766c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1767c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256, "TLS-ECDHE-PSK-WITH-NULL-SHA256",
1768c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1769c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1770c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1771c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1772c2c66affSColin Finck #endif
1773c2c66affSColin Finck 
1774c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1775c2c66affSColin Finck     { MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384, "TLS-ECDHE-PSK-WITH-NULL-SHA384",
1776c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
1777c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1778c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1779c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1780c2c66affSColin Finck #endif
1781c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
1782c2c66affSColin Finck 
1783c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
1784c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1785c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA, "TLS-RSA-PSK-WITH-NULL-SHA",
1786c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1787c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1788c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1789c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1790c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1791c2c66affSColin Finck 
1792c2c66affSColin Finck #if defined(MBEDTLS_SHA256_C)
1793c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256, "TLS-RSA-PSK-WITH-NULL-SHA256",
1794c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1795c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1796c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1797c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1798c2c66affSColin Finck #endif
1799c2c66affSColin Finck 
1800c2c66affSColin Finck #if defined(MBEDTLS_SHA512_C)
1801c2c66affSColin Finck     { MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384, "TLS-RSA-PSK-WITH-NULL-SHA384",
1802c2c66affSColin Finck       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1803c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
1804c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1805c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1806c2c66affSColin Finck #endif
1807c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */
1808c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
1809c2c66affSColin Finck 
1810c2c66affSColin Finck #if defined(MBEDTLS_DES_C)
1811c2c66affSColin Finck #if defined(MBEDTLS_CIPHER_MODE_CBC)
1812c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
1813c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1814c2c66affSColin Finck     { MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA, "TLS-DHE-RSA-WITH-DES-CBC-SHA",
1815c2c66affSColin Finck       MBEDTLS_CIPHER_DES_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
1816c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1817c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1818c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1819c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1820c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */
1821c2c66affSColin Finck 
1822c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
1823c2c66affSColin Finck #if defined(MBEDTLS_SHA1_C)
1824c2c66affSColin Finck     { MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA, "TLS-RSA-WITH-DES-CBC-SHA",
1825c2c66affSColin Finck       MBEDTLS_CIPHER_DES_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
1826c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
1827c2c66affSColin Finck       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1828c2c66affSColin Finck       MBEDTLS_CIPHERSUITE_WEAK },
1829c2c66affSColin Finck #endif /* MBEDTLS_SHA1_C */
1830c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
1831c2c66affSColin Finck #endif /* MBEDTLS_CIPHER_MODE_CBC */
1832c2c66affSColin Finck #endif /* MBEDTLS_DES_C */
1833c2c66affSColin Finck #endif /* MBEDTLS_ENABLE_WEAK_CIPHERSUITES */
1834c2c66affSColin Finck 
1835cbda039fSThomas Faber #if defined(MBEDTLS_ARIA_C)
1836cbda039fSThomas Faber 
1837cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
1838cbda039fSThomas Faber 
1839cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
1840cbda039fSThomas Faber     { MBEDTLS_TLS_RSA_WITH_ARIA_256_GCM_SHA384,
1841cbda039fSThomas Faber              "TLS-RSA-WITH-ARIA-256-GCM-SHA384",
1842cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA,
1843cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1844cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1845cbda039fSThomas Faber       0 },
1846cbda039fSThomas Faber #endif
1847cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
1848cbda039fSThomas Faber     { MBEDTLS_TLS_RSA_WITH_ARIA_256_CBC_SHA384,
1849cbda039fSThomas Faber              "TLS-RSA-WITH-ARIA-256-CBC-SHA384",
1850cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA,
1851cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1852cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1853cbda039fSThomas Faber       0 },
1854cbda039fSThomas Faber #endif
1855cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
1856cbda039fSThomas Faber     { MBEDTLS_TLS_RSA_WITH_ARIA_128_GCM_SHA256,
1857cbda039fSThomas Faber              "TLS-RSA-WITH-ARIA-128-GCM-SHA256",
1858cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
1859cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1860cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1861cbda039fSThomas Faber       0 },
1862cbda039fSThomas Faber #endif
1863cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
1864cbda039fSThomas Faber     { MBEDTLS_TLS_RSA_WITH_ARIA_128_CBC_SHA256,
1865cbda039fSThomas Faber              "TLS-RSA-WITH-ARIA-128-CBC-SHA256",
1866cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
1867cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1868cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1869cbda039fSThomas Faber       0 },
1870cbda039fSThomas Faber #endif
1871cbda039fSThomas Faber 
1872cbda039fSThomas Faber #endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
1873cbda039fSThomas Faber 
1874cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
1875cbda039fSThomas Faber 
1876cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
1877cbda039fSThomas Faber     { MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384,
1878cbda039fSThomas Faber              "TLS-RSA-PSK-WITH-ARIA-256-GCM-SHA384",
1879cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1880cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1881cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1882cbda039fSThomas Faber       0 },
1883cbda039fSThomas Faber #endif
1884cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
1885cbda039fSThomas Faber     { MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384,
1886cbda039fSThomas Faber              "TLS-RSA-PSK-WITH-ARIA-256-CBC-SHA384",
1887cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1888cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1889cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1890cbda039fSThomas Faber       0 },
1891cbda039fSThomas Faber #endif
1892cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
1893cbda039fSThomas Faber     { MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256,
1894cbda039fSThomas Faber              "TLS-RSA-PSK-WITH-ARIA-128-GCM-SHA256",
1895cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1896cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1897cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1898cbda039fSThomas Faber       0 },
1899cbda039fSThomas Faber #endif
1900cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
1901cbda039fSThomas Faber     { MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256,
1902cbda039fSThomas Faber              "TLS-RSA-PSK-WITH-ARIA-128-CBC-SHA256",
1903cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
1904cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1905cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1906cbda039fSThomas Faber       0 },
1907cbda039fSThomas Faber #endif
1908cbda039fSThomas Faber 
1909cbda039fSThomas Faber #endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */
1910cbda039fSThomas Faber 
1911cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
1912cbda039fSThomas Faber 
1913cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
1914cbda039fSThomas Faber     { MBEDTLS_TLS_PSK_WITH_ARIA_256_GCM_SHA384,
1915cbda039fSThomas Faber              "TLS-PSK-WITH-ARIA-256-GCM-SHA384",
1916cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384,MBEDTLS_KEY_EXCHANGE_PSK,
1917cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1918cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1919cbda039fSThomas Faber       0 },
1920cbda039fSThomas Faber #endif
1921cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
1922cbda039fSThomas Faber     { MBEDTLS_TLS_PSK_WITH_ARIA_256_CBC_SHA384,
1923cbda039fSThomas Faber              "TLS-PSK-WITH-ARIA-256-CBC-SHA384",
1924cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
1925cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1926cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1927cbda039fSThomas Faber       0 },
1928cbda039fSThomas Faber #endif
1929cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
1930cbda039fSThomas Faber     { MBEDTLS_TLS_PSK_WITH_ARIA_128_GCM_SHA256,
1931cbda039fSThomas Faber              "TLS-PSK-WITH-ARIA-128-GCM-SHA256",
1932cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1933cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1934cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1935cbda039fSThomas Faber       0 },
1936cbda039fSThomas Faber #endif
1937cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
1938cbda039fSThomas Faber     { MBEDTLS_TLS_PSK_WITH_ARIA_128_CBC_SHA256,
1939cbda039fSThomas Faber              "TLS-PSK-WITH-ARIA-128-CBC-SHA256",
1940cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
1941cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1942cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1943cbda039fSThomas Faber       0 },
1944cbda039fSThomas Faber #endif
1945cbda039fSThomas Faber 
1946cbda039fSThomas Faber #endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */
1947cbda039fSThomas Faber 
1948cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED)
1949cbda039fSThomas Faber 
1950cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
1951cbda039fSThomas Faber     { MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384,
1952cbda039fSThomas Faber              "TLS-ECDH-RSA-WITH-ARIA-256-GCM-SHA384",
1953cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1954cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1955cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1956cbda039fSThomas Faber       0 },
1957cbda039fSThomas Faber #endif
1958cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
1959cbda039fSThomas Faber     { MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384,
1960cbda039fSThomas Faber              "TLS-ECDH-RSA-WITH-ARIA-256-CBC-SHA384",
1961cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1962cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1963cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1964cbda039fSThomas Faber       0 },
1965cbda039fSThomas Faber #endif
1966cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
1967cbda039fSThomas Faber     { MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256,
1968cbda039fSThomas Faber              "TLS-ECDH-RSA-WITH-ARIA-128-GCM-SHA256",
1969cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1970cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1971cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1972cbda039fSThomas Faber       0 },
1973cbda039fSThomas Faber #endif
1974cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
1975cbda039fSThomas Faber     { MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256,
1976cbda039fSThomas Faber              "TLS-ECDH-RSA-WITH-ARIA-128-CBC-SHA256",
1977cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
1978cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1979cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1980cbda039fSThomas Faber       0 },
1981cbda039fSThomas Faber #endif
1982cbda039fSThomas Faber 
1983cbda039fSThomas Faber #endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED */
1984cbda039fSThomas Faber 
1985cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED)
1986cbda039fSThomas Faber 
1987cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
1988cbda039fSThomas Faber     { MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384,
1989cbda039fSThomas Faber              "TLS-ECDHE-RSA-WITH-ARIA-256-GCM-SHA384",
1990cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
1991cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1992cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
1993cbda039fSThomas Faber       0 },
1994cbda039fSThomas Faber #endif
1995cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
1996cbda039fSThomas Faber     { MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384,
1997cbda039fSThomas Faber              "TLS-ECDHE-RSA-WITH-ARIA-256-CBC-SHA384",
1998cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
1999cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2000cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2001cbda039fSThomas Faber       0 },
2002cbda039fSThomas Faber #endif
2003cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
2004cbda039fSThomas Faber     { MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256,
2005cbda039fSThomas Faber              "TLS-ECDHE-RSA-WITH-ARIA-128-GCM-SHA256",
2006cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
2007cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2008cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2009cbda039fSThomas Faber       0 },
2010cbda039fSThomas Faber #endif
2011cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2012cbda039fSThomas Faber     { MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256,
2013cbda039fSThomas Faber              "TLS-ECDHE-RSA-WITH-ARIA-128-CBC-SHA256",
2014cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
2015cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2016cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2017cbda039fSThomas Faber       0 },
2018cbda039fSThomas Faber #endif
2019cbda039fSThomas Faber 
2020cbda039fSThomas Faber #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED */
2021cbda039fSThomas Faber 
2022cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
2023cbda039fSThomas Faber 
2024cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2025cbda039fSThomas Faber     { MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384,
2026cbda039fSThomas Faber              "TLS-ECDHE-PSK-WITH-ARIA-256-CBC-SHA384",
2027cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
2028cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2029cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2030cbda039fSThomas Faber       0 },
2031cbda039fSThomas Faber #endif
2032cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2033cbda039fSThomas Faber     { MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256,
2034cbda039fSThomas Faber              "TLS-ECDHE-PSK-WITH-ARIA-128-CBC-SHA256",
2035cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
2036cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2037cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2038cbda039fSThomas Faber       0 },
2039cbda039fSThomas Faber #endif
2040cbda039fSThomas Faber 
2041cbda039fSThomas Faber #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
2042cbda039fSThomas Faber 
2043cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
2044cbda039fSThomas Faber 
2045cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
2046cbda039fSThomas Faber     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384,
2047cbda039fSThomas Faber              "TLS-ECDHE-ECDSA-WITH-ARIA-256-GCM-SHA384",
2048cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
2049cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2050cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2051cbda039fSThomas Faber       0 },
2052cbda039fSThomas Faber #endif
2053cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2054cbda039fSThomas Faber     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384,
2055cbda039fSThomas Faber              "TLS-ECDHE-ECDSA-WITH-ARIA-256-CBC-SHA384",
2056cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
2057cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2058cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2059cbda039fSThomas Faber       0 },
2060cbda039fSThomas Faber #endif
2061cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
2062cbda039fSThomas Faber     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256,
2063cbda039fSThomas Faber              "TLS-ECDHE-ECDSA-WITH-ARIA-128-GCM-SHA256",
2064cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
2065cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2066cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2067cbda039fSThomas Faber       0 },
2068cbda039fSThomas Faber #endif
2069cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2070cbda039fSThomas Faber     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256,
2071cbda039fSThomas Faber              "TLS-ECDHE-ECDSA-WITH-ARIA-128-CBC-SHA256",
2072cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
2073cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2074cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2075cbda039fSThomas Faber       0 },
2076cbda039fSThomas Faber #endif
2077cbda039fSThomas Faber 
2078cbda039fSThomas Faber #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */
2079cbda039fSThomas Faber 
2080cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
2081cbda039fSThomas Faber 
2082cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
2083cbda039fSThomas Faber     { MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384,
2084cbda039fSThomas Faber              "TLS-ECDH-ECDSA-WITH-ARIA-256-GCM-SHA384",
2085cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
2086cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2087cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2088cbda039fSThomas Faber       0 },
2089cbda039fSThomas Faber #endif
2090cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2091cbda039fSThomas Faber     { MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384,
2092cbda039fSThomas Faber              "TLS-ECDH-ECDSA-WITH-ARIA-256-CBC-SHA384",
2093cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
2094cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2095cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2096cbda039fSThomas Faber       0 },
2097cbda039fSThomas Faber #endif
2098cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
2099cbda039fSThomas Faber     { MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256,
2100cbda039fSThomas Faber              "TLS-ECDH-ECDSA-WITH-ARIA-128-GCM-SHA256",
2101cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
2102cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2103cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2104cbda039fSThomas Faber       0 },
2105cbda039fSThomas Faber #endif
2106cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2107cbda039fSThomas Faber     { MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256,
2108cbda039fSThomas Faber              "TLS-ECDH-ECDSA-WITH-ARIA-128-CBC-SHA256",
2109cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
2110cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2111cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2112cbda039fSThomas Faber       0 },
2113cbda039fSThomas Faber #endif
2114cbda039fSThomas Faber 
2115cbda039fSThomas Faber #endif /* MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */
2116cbda039fSThomas Faber 
2117cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
2118cbda039fSThomas Faber 
2119cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
2120cbda039fSThomas Faber     { MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384,
2121cbda039fSThomas Faber              "TLS-DHE-RSA-WITH-ARIA-256-GCM-SHA384",
2122cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
2123cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2124cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2125cbda039fSThomas Faber       0 },
2126cbda039fSThomas Faber #endif
2127cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2128cbda039fSThomas Faber     { MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384,
2129cbda039fSThomas Faber              "TLS-DHE-RSA-WITH-ARIA-256-CBC-SHA384",
2130cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
2131cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2132cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2133cbda039fSThomas Faber       0 },
2134cbda039fSThomas Faber #endif
2135cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
2136cbda039fSThomas Faber     { MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256,
2137cbda039fSThomas Faber              "TLS-DHE-RSA-WITH-ARIA-128-GCM-SHA256",
2138cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
2139cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2140cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2141cbda039fSThomas Faber       0 },
2142cbda039fSThomas Faber #endif
2143cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2144cbda039fSThomas Faber     { MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256,
2145cbda039fSThomas Faber              "TLS-DHE-RSA-WITH-ARIA-128-CBC-SHA256",
2146cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
2147cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2148cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2149cbda039fSThomas Faber       0 },
2150cbda039fSThomas Faber #endif
2151cbda039fSThomas Faber 
2152cbda039fSThomas Faber #endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */
2153cbda039fSThomas Faber 
2154cbda039fSThomas Faber #if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
2155cbda039fSThomas Faber 
2156cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA512_C))
2157cbda039fSThomas Faber     { MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384,
2158cbda039fSThomas Faber              "TLS-DHE-PSK-WITH-ARIA-256-GCM-SHA384",
2159cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
2160cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2161cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2162cbda039fSThomas Faber       0 },
2163cbda039fSThomas Faber #endif
2164cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA512_C))
2165cbda039fSThomas Faber     { MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384,
2166cbda039fSThomas Faber              "TLS-DHE-PSK-WITH-ARIA-256-CBC-SHA384",
2167cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
2168cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2169cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2170cbda039fSThomas Faber       0 },
2171cbda039fSThomas Faber #endif
2172cbda039fSThomas Faber #if (defined(MBEDTLS_GCM_C) && defined(MBEDTLS_SHA256_C))
2173cbda039fSThomas Faber     { MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256,
2174cbda039fSThomas Faber              "TLS-DHE-PSK-WITH-ARIA-128-GCM-SHA256",
2175cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
2176cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2177cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2178cbda039fSThomas Faber       0 },
2179cbda039fSThomas Faber #endif
2180cbda039fSThomas Faber #if (defined(MBEDTLS_CIPHER_MODE_CBC) && defined(MBEDTLS_SHA256_C))
2181cbda039fSThomas Faber     { MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256,
2182cbda039fSThomas Faber              "TLS-DHE-PSK-WITH-ARIA-128-CBC-SHA256",
2183cbda039fSThomas Faber       MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
2184cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2185cbda039fSThomas Faber       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
2186cbda039fSThomas Faber       0 },
2187cbda039fSThomas Faber #endif
2188cbda039fSThomas Faber 
2189cbda039fSThomas Faber #endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */
2190cbda039fSThomas Faber 
2191cbda039fSThomas Faber #endif /* MBEDTLS_ARIA_C */
2192cbda039fSThomas Faber 
2193cbda039fSThomas Faber 
2194c2c66affSColin Finck     { 0, "",
2195c2c66affSColin Finck       MBEDTLS_CIPHER_NONE, MBEDTLS_MD_NONE, MBEDTLS_KEY_EXCHANGE_NONE,
2196c2c66affSColin Finck       0, 0, 0, 0, 0 }
2197c2c66affSColin Finck };
2198c2c66affSColin Finck 
2199c2c66affSColin Finck #if defined(MBEDTLS_SSL_CIPHERSUITES)
mbedtls_ssl_list_ciphersuites(void)2200c2c66affSColin Finck const int *mbedtls_ssl_list_ciphersuites( void )
2201c2c66affSColin Finck {
2202c2c66affSColin Finck     return( ciphersuite_preference );
2203c2c66affSColin Finck }
2204c2c66affSColin Finck #else
2205c2c66affSColin Finck #define MAX_CIPHERSUITES    sizeof( ciphersuite_definitions     ) /         \
2206c2c66affSColin Finck                             sizeof( ciphersuite_definitions[0]  )
2207c2c66affSColin Finck static int supported_ciphersuites[MAX_CIPHERSUITES];
2208c2c66affSColin Finck static int supported_init = 0;
2209c2c66affSColin Finck 
ciphersuite_is_removed(const mbedtls_ssl_ciphersuite_t * cs_info)2210ca86ee9cSThomas Faber static int ciphersuite_is_removed( const mbedtls_ssl_ciphersuite_t *cs_info )
2211ca86ee9cSThomas Faber {
2212ca86ee9cSThomas Faber     (void)cs_info;
2213ca86ee9cSThomas Faber 
2214ca86ee9cSThomas Faber #if defined(MBEDTLS_REMOVE_ARC4_CIPHERSUITES)
2215ca86ee9cSThomas Faber     if( cs_info->cipher == MBEDTLS_CIPHER_ARC4_128 )
2216ca86ee9cSThomas Faber         return( 1 );
2217ca86ee9cSThomas Faber #endif /* MBEDTLS_REMOVE_ARC4_CIPHERSUITES */
2218ca86ee9cSThomas Faber 
2219ca86ee9cSThomas Faber #if defined(MBEDTLS_REMOVE_3DES_CIPHERSUITES)
2220ca86ee9cSThomas Faber     if( cs_info->cipher == MBEDTLS_CIPHER_DES_EDE3_ECB ||
2221ca86ee9cSThomas Faber         cs_info->cipher == MBEDTLS_CIPHER_DES_EDE3_CBC )
2222ca86ee9cSThomas Faber     {
2223ca86ee9cSThomas Faber         return( 1 );
2224ca86ee9cSThomas Faber     }
2225ca86ee9cSThomas Faber #endif /* MBEDTLS_REMOVE_3DES_CIPHERSUITES */
2226ca86ee9cSThomas Faber 
2227ca86ee9cSThomas Faber     return( 0 );
2228ca86ee9cSThomas Faber }
2229ca86ee9cSThomas Faber 
mbedtls_ssl_list_ciphersuites(void)2230c2c66affSColin Finck const int *mbedtls_ssl_list_ciphersuites( void )
2231c2c66affSColin Finck {
2232c2c66affSColin Finck     /*
2233c2c66affSColin Finck      * On initial call filter out all ciphersuites not supported by current
2234c2c66affSColin Finck      * build based on presence in the ciphersuite_definitions.
2235c2c66affSColin Finck      */
2236c2c66affSColin Finck     if( supported_init == 0 )
2237c2c66affSColin Finck     {
2238c2c66affSColin Finck         const int *p;
2239c2c66affSColin Finck         int *q;
2240c2c66affSColin Finck 
2241c2c66affSColin Finck         for( p = ciphersuite_preference, q = supported_ciphersuites;
2242c2c66affSColin Finck              *p != 0 && q < supported_ciphersuites + MAX_CIPHERSUITES - 1;
2243c2c66affSColin Finck              p++ )
2244c2c66affSColin Finck         {
2245c2c66affSColin Finck             const mbedtls_ssl_ciphersuite_t *cs_info;
2246c2c66affSColin Finck             if( ( cs_info = mbedtls_ssl_ciphersuite_from_id( *p ) ) != NULL &&
2247ca86ee9cSThomas Faber                 !ciphersuite_is_removed( cs_info ) )
2248ca86ee9cSThomas Faber             {
2249c2c66affSColin Finck                 *(q++) = *p;
2250c2c66affSColin Finck             }
2251ca86ee9cSThomas Faber         }
2252c2c66affSColin Finck         *q = 0;
2253c2c66affSColin Finck 
2254c2c66affSColin Finck         supported_init = 1;
2255c2c66affSColin Finck     }
2256c2c66affSColin Finck 
2257c2c66affSColin Finck     return( supported_ciphersuites );
2258c2c66affSColin Finck }
2259c2c66affSColin Finck #endif /* MBEDTLS_SSL_CIPHERSUITES */
2260c2c66affSColin Finck 
mbedtls_ssl_ciphersuite_from_string(const char * ciphersuite_name)2261c2c66affSColin Finck const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_string(
2262c2c66affSColin Finck                                                 const char *ciphersuite_name )
2263c2c66affSColin Finck {
2264c2c66affSColin Finck     const mbedtls_ssl_ciphersuite_t *cur = ciphersuite_definitions;
2265c2c66affSColin Finck 
2266c2c66affSColin Finck     if( NULL == ciphersuite_name )
2267c2c66affSColin Finck         return( NULL );
2268c2c66affSColin Finck 
2269c2c66affSColin Finck     while( cur->id != 0 )
2270c2c66affSColin Finck     {
2271c2c66affSColin Finck         if( 0 == strcmp( cur->name, ciphersuite_name ) )
2272c2c66affSColin Finck             return( cur );
2273c2c66affSColin Finck 
2274c2c66affSColin Finck         cur++;
2275c2c66affSColin Finck     }
2276c2c66affSColin Finck 
2277c2c66affSColin Finck     return( NULL );
2278c2c66affSColin Finck }
2279c2c66affSColin Finck 
mbedtls_ssl_ciphersuite_from_id(int ciphersuite)2280c2c66affSColin Finck const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_id( int ciphersuite )
2281c2c66affSColin Finck {
2282c2c66affSColin Finck     const mbedtls_ssl_ciphersuite_t *cur = ciphersuite_definitions;
2283c2c66affSColin Finck 
2284c2c66affSColin Finck     while( cur->id != 0 )
2285c2c66affSColin Finck     {
2286c2c66affSColin Finck         if( cur->id == ciphersuite )
2287c2c66affSColin Finck             return( cur );
2288c2c66affSColin Finck 
2289c2c66affSColin Finck         cur++;
2290c2c66affSColin Finck     }
2291c2c66affSColin Finck 
2292c2c66affSColin Finck     return( NULL );
2293c2c66affSColin Finck }
2294c2c66affSColin Finck 
mbedtls_ssl_get_ciphersuite_name(const int ciphersuite_id)2295c2c66affSColin Finck const char *mbedtls_ssl_get_ciphersuite_name( const int ciphersuite_id )
2296c2c66affSColin Finck {
2297c2c66affSColin Finck     const mbedtls_ssl_ciphersuite_t *cur;
2298c2c66affSColin Finck 
2299c2c66affSColin Finck     cur = mbedtls_ssl_ciphersuite_from_id( ciphersuite_id );
2300c2c66affSColin Finck 
2301c2c66affSColin Finck     if( cur == NULL )
2302c2c66affSColin Finck         return( "unknown" );
2303c2c66affSColin Finck 
2304c2c66affSColin Finck     return( cur->name );
2305c2c66affSColin Finck }
2306c2c66affSColin Finck 
mbedtls_ssl_get_ciphersuite_id(const char * ciphersuite_name)2307c2c66affSColin Finck int mbedtls_ssl_get_ciphersuite_id( const char *ciphersuite_name )
2308c2c66affSColin Finck {
2309c2c66affSColin Finck     const mbedtls_ssl_ciphersuite_t *cur;
2310c2c66affSColin Finck 
2311c2c66affSColin Finck     cur = mbedtls_ssl_ciphersuite_from_string( ciphersuite_name );
2312c2c66affSColin Finck 
2313c2c66affSColin Finck     if( cur == NULL )
2314c2c66affSColin Finck         return( 0 );
2315c2c66affSColin Finck 
2316c2c66affSColin Finck     return( cur->id );
2317c2c66affSColin Finck }
2318c2c66affSColin Finck 
2319c2c66affSColin Finck #if defined(MBEDTLS_PK_C)
mbedtls_ssl_get_ciphersuite_sig_pk_alg(const mbedtls_ssl_ciphersuite_t * info)2320c2c66affSColin Finck mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_pk_alg( const mbedtls_ssl_ciphersuite_t *info )
2321c2c66affSColin Finck {
2322c2c66affSColin Finck     switch( info->key_exchange )
2323c2c66affSColin Finck     {
2324c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_RSA:
2325c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_DHE_RSA:
2326c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
2327c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_RSA_PSK:
2328c2c66affSColin Finck             return( MBEDTLS_PK_RSA );
2329c2c66affSColin Finck 
2330c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
2331c2c66affSColin Finck             return( MBEDTLS_PK_ECDSA );
2332c2c66affSColin Finck 
2333c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_ECDH_RSA:
2334c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA:
2335c2c66affSColin Finck             return( MBEDTLS_PK_ECKEY );
2336c2c66affSColin Finck 
2337c2c66affSColin Finck         default:
2338c2c66affSColin Finck             return( MBEDTLS_PK_NONE );
2339c2c66affSColin Finck     }
2340c2c66affSColin Finck }
2341c2c66affSColin Finck 
mbedtls_ssl_get_ciphersuite_sig_alg(const mbedtls_ssl_ciphersuite_t * info)2342c2c66affSColin Finck mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_alg( const mbedtls_ssl_ciphersuite_t *info )
2343c2c66affSColin Finck {
2344c2c66affSColin Finck     switch( info->key_exchange )
2345c2c66affSColin Finck     {
2346c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_RSA:
2347c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_DHE_RSA:
2348c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
2349c2c66affSColin Finck             return( MBEDTLS_PK_RSA );
2350c2c66affSColin Finck 
2351c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
2352c2c66affSColin Finck             return( MBEDTLS_PK_ECDSA );
2353c2c66affSColin Finck 
2354c2c66affSColin Finck         default:
2355c2c66affSColin Finck             return( MBEDTLS_PK_NONE );
2356c2c66affSColin Finck     }
2357c2c66affSColin Finck }
2358c2c66affSColin Finck 
2359c2c66affSColin Finck #endif /* MBEDTLS_PK_C */
2360c2c66affSColin Finck 
2361d9e6c9b5SThomas Faber #if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \
2362d9e6c9b5SThomas Faber     defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
mbedtls_ssl_ciphersuite_uses_ec(const mbedtls_ssl_ciphersuite_t * info)2363c2c66affSColin Finck int mbedtls_ssl_ciphersuite_uses_ec( const mbedtls_ssl_ciphersuite_t *info )
2364c2c66affSColin Finck {
2365c2c66affSColin Finck     switch( info->key_exchange )
2366c2c66affSColin Finck     {
2367c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
2368c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
2369c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK:
2370c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_ECDH_RSA:
2371c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA:
2372d9e6c9b5SThomas Faber         case MBEDTLS_KEY_EXCHANGE_ECJPAKE:
2373c2c66affSColin Finck             return( 1 );
2374c2c66affSColin Finck 
2375c2c66affSColin Finck         default:
2376c2c66affSColin Finck             return( 0 );
2377c2c66affSColin Finck     }
2378c2c66affSColin Finck }
2379d9e6c9b5SThomas Faber #endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C || MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED*/
2380c2c66affSColin Finck 
2381c2c66affSColin Finck #if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
mbedtls_ssl_ciphersuite_uses_psk(const mbedtls_ssl_ciphersuite_t * info)2382c2c66affSColin Finck int mbedtls_ssl_ciphersuite_uses_psk( const mbedtls_ssl_ciphersuite_t *info )
2383c2c66affSColin Finck {
2384c2c66affSColin Finck     switch( info->key_exchange )
2385c2c66affSColin Finck     {
2386c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_PSK:
2387c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_RSA_PSK:
2388c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_DHE_PSK:
2389c2c66affSColin Finck         case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK:
2390c2c66affSColin Finck             return( 1 );
2391c2c66affSColin Finck 
2392c2c66affSColin Finck         default:
2393c2c66affSColin Finck             return( 0 );
2394c2c66affSColin Finck     }
2395c2c66affSColin Finck }
2396c2c66affSColin Finck #endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */
2397c2c66affSColin Finck 
2398c2c66affSColin Finck #endif /* MBEDTLS_SSL_TLS_C */
2399