mbedtls ported to mbed-classic

Fork of mbedtls by Christopher Haster

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ssl_ciphersuites.c Source File

ssl_ciphersuites.c

Go to the documentation of this file.
00001 /**
00002  * \file ssl_ciphersuites.c
00003  *
00004  * \brief SSL ciphersuites for mbed TLS
00005  *
00006  *  Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
00007  *  SPDX-License-Identifier: Apache-2.0
00008  *
00009  *  Licensed under the Apache License, Version 2.0 (the "License"); you may
00010  *  not use this file except in compliance with the License.
00011  *  You may obtain a copy of the License at
00012  *
00013  *  http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  *  Unless required by applicable law or agreed to in writing, software
00016  *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00017  *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00018  *  See the License for the specific language governing permissions and
00019  *  limitations under the License.
00020  *
00021  *  This file is part of mbed TLS (https://tls.mbed.org)
00022  */
00023 
00024 #if !defined(MBEDTLS_CONFIG_FILE)
00025 #include "mbedtls/config.h"
00026 #else
00027 #include MBEDTLS_CONFIG_FILE
00028 #endif
00029 
00030 #if defined(MBEDTLS_SSL_TLS_C)
00031 
00032 #include "mbedtls/ssl_ciphersuites.h"
00033 #include "mbedtls/ssl.h"
00034 
00035 // #include <stdlib.h>
00036 #include <string.h>
00037 
00038 /*
00039  * Ordered from most preferred to least preferred in terms of security.
00040  *
00041  * Current rule (except rc4, weak and null which come last):
00042  * 1. By key exchange:
00043  *    Forward-secure non-PSK > forward-secure PSK > ECJPAKE > other non-PSK > other PSK
00044  * 2. By key length and cipher:
00045  *    AES-256 > Camellia-256 > AES-128 > Camellia-128 > 3DES
00046  * 3. By cipher mode when relevant GCM > CCM > CBC > CCM_8
00047  * 4. By hash function used when relevant
00048  * 5. By key exchange/auth again: EC > non-EC
00049  */
00050 static const int ciphersuite_preference[] =
00051 {
00052 #if defined(MBEDTLS_SSL_CIPHERSUITES)
00053     MBEDTLS_SSL_CIPHERSUITES,
00054 #else
00055     /* All AES-256 ephemeral suites */
00056     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
00057     MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
00058     MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
00059     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM,
00060     MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM,
00061     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
00062     MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
00063     MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
00064     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
00065     MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
00066     MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
00067     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8,
00068     MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM_8,
00069 
00070     /* All CAMELLIA-256 ephemeral suites */
00071     MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
00072     MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384,
00073     MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384,
00074     MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
00075     MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,
00076     MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
00077     MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,
00078 
00079     /* All AES-128 ephemeral suites */
00080     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
00081     MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
00082     MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,
00083     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM,
00084     MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM,
00085     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
00086     MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
00087     MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
00088     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
00089     MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
00090     MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
00091     MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8,
00092     MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM_8,
00093 
00094     /* All CAMELLIA-128 ephemeral suites */
00095     MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
00096     MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256,
00097     MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256,
00098     MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
00099     MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
00100     MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
00101     MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,
00102 
00103     /* All remaining >= 128-bit ephemeral suites */
00104     MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
00105     MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
00106     MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
00107 
00108     /* The PSK ephemeral suites */
00109     MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384,
00110     MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM,
00111     MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
00112     MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384,
00113     MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA,
00114     MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA,
00115     MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384,
00116     MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
00117     MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
00118     MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM_8,
00119 
00120     MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256,
00121     MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM,
00122     MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
00123     MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256,
00124     MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA,
00125     MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA,
00126     MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256,
00127     MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
00128     MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
00129     MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM_8,
00130 
00131     MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA,
00132     MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA,
00133 
00134     /* The ECJPAKE suite */
00135     MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8,
00136 
00137     /* All AES-256 suites */
00138     MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384,
00139     MBEDTLS_TLS_RSA_WITH_AES_256_CCM,
00140     MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256,
00141     MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA,
00142     MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,
00143     MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,
00144     MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,
00145     MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,
00146     MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,
00147     MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
00148     MBEDTLS_TLS_RSA_WITH_AES_256_CCM_8,
00149 
00150     /* All CAMELLIA-256 suites */
00151     MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384,
00152     MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256,
00153     MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,
00154     MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
00155     MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384,
00156     MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
00157     MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
00158 
00159     /* All AES-128 suites */
00160     MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256,
00161     MBEDTLS_TLS_RSA_WITH_AES_128_CCM,
00162     MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256,
00163     MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA,
00164     MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,
00165     MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,
00166     MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,
00167     MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,
00168     MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,
00169     MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
00170     MBEDTLS_TLS_RSA_WITH_AES_128_CCM_8,
00171 
00172     /* All CAMELLIA-128 suites */
00173     MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256,
00174     MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256,
00175     MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA,
00176     MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
00177     MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
00178     MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
00179     MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
00180 
00181     /* All remaining >= 128-bit suites */
00182     MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA,
00183     MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,
00184     MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,
00185 
00186     /* The RSA PSK suites */
00187     MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384,
00188     MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384,
00189     MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA,
00190     MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384,
00191     MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384,
00192 
00193     MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256,
00194     MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256,
00195     MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA,
00196     MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256,
00197     MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256,
00198 
00199     MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA,
00200 
00201     /* The PSK suites */
00202     MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384,
00203     MBEDTLS_TLS_PSK_WITH_AES_256_CCM,
00204     MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384,
00205     MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA,
00206     MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384,
00207     MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384,
00208     MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8,
00209 
00210     MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256,
00211     MBEDTLS_TLS_PSK_WITH_AES_128_CCM,
00212     MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256,
00213     MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA,
00214     MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256,
00215     MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256,
00216     MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8,
00217 
00218     MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA,
00219 
00220     /* RC4 suites */
00221     MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
00222     MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA,
00223     MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA,
00224     MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA,
00225     MBEDTLS_TLS_RSA_WITH_RC4_128_SHA,
00226     MBEDTLS_TLS_RSA_WITH_RC4_128_MD5,
00227     MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA,
00228     MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
00229     MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA,
00230     MBEDTLS_TLS_PSK_WITH_RC4_128_SHA,
00231 
00232     /* Weak suites */
00233     MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA,
00234     MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA,
00235 
00236     /* NULL suites */
00237     MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA,
00238     MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA,
00239     MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384,
00240     MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256,
00241     MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA,
00242     MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384,
00243     MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256,
00244     MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA,
00245 
00246     MBEDTLS_TLS_RSA_WITH_NULL_SHA256,
00247     MBEDTLS_TLS_RSA_WITH_NULL_SHA,
00248     MBEDTLS_TLS_RSA_WITH_NULL_MD5,
00249     MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA,
00250     MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA,
00251     MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384,
00252     MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256,
00253     MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA,
00254     MBEDTLS_TLS_PSK_WITH_NULL_SHA384,
00255     MBEDTLS_TLS_PSK_WITH_NULL_SHA256,
00256     MBEDTLS_TLS_PSK_WITH_NULL_SHA,
00257 
00258 #endif /* MBEDTLS_SSL_CIPHERSUITES */
00259     0
00260 };
00261 
00262 static const mbedtls_ssl_ciphersuite_t ciphersuite_definitions[] =
00263 {
00264 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
00265 #if defined(MBEDTLS_AES_C)
00266 #if defined(MBEDTLS_SHA1_C)
00267 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00268     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA",
00269       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00270       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00271       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00272       0 },
00273     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA",
00274       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00275       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00276       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00277       0 },
00278 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00279 #endif /* MBEDTLS_SHA1_C */
00280 #if defined(MBEDTLS_SHA256_C)
00281 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00282     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA256",
00283       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00284       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00285       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00286       0 },
00287 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00288 #if defined(MBEDTLS_GCM_C)
00289     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, "TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256",
00290       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00291       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00292       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00293       0 },
00294 #endif /* MBEDTLS_GCM_C */
00295 #endif /* MBEDTLS_SHA256_C */
00296 #if defined(MBEDTLS_SHA512_C)
00297 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00298     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA384",
00299       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00300       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00301       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00302       0 },
00303 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00304 #if defined(MBEDTLS_GCM_C)
00305     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, "TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384",
00306       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00307       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00308       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00309       0 },
00310 #endif /* MBEDTLS_GCM_C */
00311 #endif /* MBEDTLS_SHA512_C */
00312 #if defined(MBEDTLS_CCM_C)
00313     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM, "TLS-ECDHE-ECDSA-WITH-AES-256-CCM",
00314       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00315       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00316       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00317       0 },
00318     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8, "TLS-ECDHE-ECDSA-WITH-AES-256-CCM-8",
00319       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00320       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00321       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00322       MBEDTLS_CIPHERSUITE_SHORT_TAG },
00323     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM, "TLS-ECDHE-ECDSA-WITH-AES-128-CCM",
00324       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00325       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00326       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00327       0 },
00328     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, "TLS-ECDHE-ECDSA-WITH-AES-128-CCM-8",
00329       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00330       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00331       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00332       MBEDTLS_CIPHERSUITE_SHORT_TAG },
00333 #endif /* MBEDTLS_CCM_C */
00334 #endif /* MBEDTLS_AES_C */
00335 
00336 #if defined(MBEDTLS_CAMELLIA_C)
00337 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00338 #if defined(MBEDTLS_SHA256_C)
00339     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-CBC-SHA256",
00340       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00341       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00342       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00343       0 },
00344 #endif /* MBEDTLS_SHA256_C */
00345 #if defined(MBEDTLS_SHA512_C)
00346     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-CBC-SHA384",
00347       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00348       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00349       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00350       0 },
00351 #endif /* MBEDTLS_SHA512_C */
00352 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00353 
00354 #if defined(MBEDTLS_GCM_C)
00355 #if defined(MBEDTLS_SHA256_C)
00356     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-GCM-SHA256",
00357       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00358       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00359       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00360       0 },
00361 #endif /* MBEDTLS_SHA256_C */
00362 #if defined(MBEDTLS_SHA512_C)
00363     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-GCM-SHA384",
00364       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00365       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00366       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00367       0 },
00368 #endif /* MBEDTLS_SHA512_C */
00369 #endif /* MBEDTLS_GCM_C */
00370 #endif /* MBEDTLS_CAMELLIA_C */
00371 
00372 #if defined(MBEDTLS_DES_C)
00373 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00374 #if defined(MBEDTLS_SHA1_C)
00375     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-3DES-EDE-CBC-SHA",
00376       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00377       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00378       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00379       0 },
00380 #endif /* MBEDTLS_SHA1_C */
00381 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00382 #endif /* MBEDTLS_DES_C */
00383 
00384 #if defined(MBEDTLS_ARC4_C)
00385 #if defined(MBEDTLS_SHA1_C)
00386     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, "TLS-ECDHE-ECDSA-WITH-RC4-128-SHA",
00387       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00388       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00389       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00390       MBEDTLS_CIPHERSUITE_NODTLS },
00391 #endif /* MBEDTLS_SHA1_C */
00392 #endif /* MBEDTLS_ARC4_C */
00393 
00394 #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
00395 #if defined(MBEDTLS_SHA1_C)
00396     { MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA, "TLS-ECDHE-ECDSA-WITH-NULL-SHA",
00397       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
00398       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00399       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00400       MBEDTLS_CIPHERSUITE_WEAK },
00401 #endif /* MBEDTLS_SHA1_C */
00402 #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
00403 #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */
00404 
00405 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED)
00406 #if defined(MBEDTLS_AES_C)
00407 #if defined(MBEDTLS_SHA1_C)
00408 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00409     { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, "TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA",
00410       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
00411       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00412       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00413       0 },
00414     { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, "TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA",
00415       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
00416       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00417       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00418       0 },
00419 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00420 #endif /* MBEDTLS_SHA1_C */
00421 #if defined(MBEDTLS_SHA256_C)
00422 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00423     { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA256",
00424       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
00425       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00426       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00427       0 },
00428 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00429 #if defined(MBEDTLS_GCM_C)
00430     { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, "TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256",
00431       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
00432       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00433       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00434       0 },
00435 #endif /* MBEDTLS_GCM_C */
00436 #endif /* MBEDTLS_SHA256_C */
00437 #if defined(MBEDTLS_SHA512_C)
00438 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00439     { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384",
00440       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
00441       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00442       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00443       0 },
00444 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00445 #if defined(MBEDTLS_GCM_C)
00446     { MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, "TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384",
00447       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
00448       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00449       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00450       0 },
00451 #endif /* MBEDTLS_GCM_C */
00452 #endif /* MBEDTLS_SHA512_C */
00453 #endif /* MBEDTLS_AES_C */
00454 
00455 #if defined(MBEDTLS_CAMELLIA_C)
00456 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00457 #if defined(MBEDTLS_SHA256_C)
00458     { MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-RSA-WITH-CAMELLIA-128-CBC-SHA256",
00459       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
00460       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00461       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00462       0 },
00463 #endif /* MBEDTLS_SHA256_C */
00464 #if defined(MBEDTLS_SHA512_C)
00465     { MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-RSA-WITH-CAMELLIA-256-CBC-SHA384",
00466       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
00467       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00468       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00469       0 },
00470 #endif /* MBEDTLS_SHA512_C */
00471 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00472 
00473 #if defined(MBEDTLS_GCM_C)
00474 #if defined(MBEDTLS_SHA256_C)
00475     { MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDHE-RSA-WITH-CAMELLIA-128-GCM-SHA256",
00476       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
00477       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00478       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00479       0 },
00480 #endif /* MBEDTLS_SHA256_C */
00481 #if defined(MBEDTLS_SHA512_C)
00482     { MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDHE-RSA-WITH-CAMELLIA-256-GCM-SHA384",
00483       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
00484       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00485       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00486       0 },
00487 #endif /* MBEDTLS_SHA512_C */
00488 #endif /* MBEDTLS_GCM_C */
00489 #endif /* MBEDTLS_CAMELLIA_C */
00490 
00491 #if defined(MBEDTLS_DES_C)
00492 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00493 #if defined(MBEDTLS_SHA1_C)
00494     { MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-RSA-WITH-3DES-EDE-CBC-SHA",
00495       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
00496       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00497       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00498       0 },
00499 #endif /* MBEDTLS_SHA1_C */
00500 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00501 #endif /* MBEDTLS_DES_C */
00502 
00503 #if defined(MBEDTLS_ARC4_C)
00504 #if defined(MBEDTLS_SHA1_C)
00505     { MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA, "TLS-ECDHE-RSA-WITH-RC4-128-SHA",
00506       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
00507       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00508       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00509       MBEDTLS_CIPHERSUITE_NODTLS },
00510 #endif /* MBEDTLS_SHA1_C */
00511 #endif /* MBEDTLS_ARC4_C */
00512 
00513 #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
00514 #if defined(MBEDTLS_SHA1_C)
00515     { MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA, "TLS-ECDHE-RSA-WITH-NULL-SHA",
00516       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
00517       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00518       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00519       MBEDTLS_CIPHERSUITE_WEAK },
00520 #endif /* MBEDTLS_SHA1_C */
00521 #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
00522 #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED */
00523 
00524 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
00525 #if defined(MBEDTLS_AES_C)
00526 #if defined(MBEDTLS_SHA512_C) && defined(MBEDTLS_GCM_C)
00527     { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, "TLS-DHE-RSA-WITH-AES-256-GCM-SHA384",
00528       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00529       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00530       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00531       0 },
00532 #endif /* MBEDTLS_SHA512_C && MBEDTLS_GCM_C */
00533 
00534 #if defined(MBEDTLS_SHA256_C)
00535 #if defined(MBEDTLS_GCM_C)
00536     { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, "TLS-DHE-RSA-WITH-AES-128-GCM-SHA256",
00537       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00538       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00539       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00540       0 },
00541 #endif /* MBEDTLS_GCM_C */
00542 
00543 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00544     { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, "TLS-DHE-RSA-WITH-AES-128-CBC-SHA256",
00545       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00546       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00547       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00548       0 },
00549 
00550     { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, "TLS-DHE-RSA-WITH-AES-256-CBC-SHA256",
00551       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00552       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00553       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00554       0 },
00555 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00556 #endif /* MBEDTLS_SHA256_C */
00557 
00558 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00559 #if defined(MBEDTLS_SHA1_C)
00560     { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA, "TLS-DHE-RSA-WITH-AES-128-CBC-SHA",
00561       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00562       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
00563       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00564       0 },
00565 
00566     { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA, "TLS-DHE-RSA-WITH-AES-256-CBC-SHA",
00567       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00568       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
00569       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00570       0 },
00571 #endif /* MBEDTLS_SHA1_C */
00572 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00573 #if defined(MBEDTLS_CCM_C)
00574     { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM, "TLS-DHE-RSA-WITH-AES-256-CCM",
00575       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00576       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00577       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00578       0 },
00579     { MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM_8, "TLS-DHE-RSA-WITH-AES-256-CCM-8",
00580       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00581       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00582       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00583       MBEDTLS_CIPHERSUITE_SHORT_TAG },
00584     { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM, "TLS-DHE-RSA-WITH-AES-128-CCM",
00585       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00586       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00587       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00588       0 },
00589     { MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM_8, "TLS-DHE-RSA-WITH-AES-128-CCM-8",
00590       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00591       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00592       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00593       MBEDTLS_CIPHERSUITE_SHORT_TAG },
00594 #endif /* MBEDTLS_CCM_C */
00595 #endif /* MBEDTLS_AES_C */
00596 
00597 #if defined(MBEDTLS_CAMELLIA_C)
00598 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00599 #if defined(MBEDTLS_SHA256_C)
00600     { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA256",
00601       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00602       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00603       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00604       0 },
00605 
00606     { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA256",
00607       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00608       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00609       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00610       0 },
00611 #endif /* MBEDTLS_SHA256_C */
00612 
00613 #if defined(MBEDTLS_SHA1_C)
00614     { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA",
00615       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00616       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
00617       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00618       0 },
00619 
00620     { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA",
00621       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00622       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
00623       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00624       0 },
00625 #endif /* MBEDTLS_SHA1_C */
00626 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00627 #if defined(MBEDTLS_GCM_C)
00628 #if defined(MBEDTLS_SHA256_C)
00629     { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-128-GCM-SHA256",
00630       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00631       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00632       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00633       0 },
00634 #endif /* MBEDTLS_SHA256_C */
00635 
00636 #if defined(MBEDTLS_SHA512_C)
00637     { MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-DHE-RSA-WITH-CAMELLIA-256-GCM-SHA384",
00638       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00639       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00640       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00641       0 },
00642 #endif /* MBEDTLS_SHA512_C */
00643 #endif /* MBEDTLS_GCM_C */
00644 #endif /* MBEDTLS_CAMELLIA_C */
00645 
00646 #if defined(MBEDTLS_DES_C)
00647 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00648 #if defined(MBEDTLS_SHA1_C)
00649     { MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-DHE-RSA-WITH-3DES-EDE-CBC-SHA",
00650       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
00651       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
00652       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00653       0 },
00654 #endif /* MBEDTLS_SHA1_C */
00655 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00656 #endif /* MBEDTLS_DES_C */
00657 #endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */
00658 
00659 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
00660 #if defined(MBEDTLS_AES_C)
00661 #if defined(MBEDTLS_SHA512_C) && defined(MBEDTLS_GCM_C)
00662     { MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384, "TLS-RSA-WITH-AES-256-GCM-SHA384",
00663       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA,
00664       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00665       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00666       0 },
00667 #endif /* MBEDTLS_SHA512_C && MBEDTLS_GCM_C */
00668 
00669 #if defined(MBEDTLS_SHA256_C)
00670 #if defined(MBEDTLS_GCM_C)
00671     { MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256, "TLS-RSA-WITH-AES-128-GCM-SHA256",
00672       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
00673       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00674       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00675       0 },
00676 #endif /* MBEDTLS_GCM_C */
00677 
00678 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00679     { MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256, "TLS-RSA-WITH-AES-128-CBC-SHA256",
00680       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
00681       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00682       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00683       0 },
00684 
00685     { MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256, "TLS-RSA-WITH-AES-256-CBC-SHA256",
00686       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
00687       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00688       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00689       0 },
00690 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00691 #endif /* MBEDTLS_SHA256_C */
00692 
00693 #if defined(MBEDTLS_SHA1_C)
00694 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00695     { MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA, "TLS-RSA-WITH-AES-128-CBC-SHA",
00696       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
00697       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
00698       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00699       0 },
00700 
00701     { MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA, "TLS-RSA-WITH-AES-256-CBC-SHA",
00702       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
00703       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
00704       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00705       0 },
00706 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00707 #endif /* MBEDTLS_SHA1_C */
00708 #if defined(MBEDTLS_CCM_C)
00709     { MBEDTLS_TLS_RSA_WITH_AES_256_CCM, "TLS-RSA-WITH-AES-256-CCM",
00710       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
00711       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00712       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00713       0 },
00714     { MBEDTLS_TLS_RSA_WITH_AES_256_CCM_8, "TLS-RSA-WITH-AES-256-CCM-8",
00715       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
00716       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00717       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00718       MBEDTLS_CIPHERSUITE_SHORT_TAG },
00719     { MBEDTLS_TLS_RSA_WITH_AES_128_CCM, "TLS-RSA-WITH-AES-128-CCM",
00720       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
00721       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00722       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00723       0 },
00724     { MBEDTLS_TLS_RSA_WITH_AES_128_CCM_8, "TLS-RSA-WITH-AES-128-CCM-8",
00725       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
00726       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00727       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00728       MBEDTLS_CIPHERSUITE_SHORT_TAG },
00729 #endif /* MBEDTLS_CCM_C */
00730 #endif /* MBEDTLS_AES_C */
00731 
00732 #if defined(MBEDTLS_CAMELLIA_C)
00733 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00734 #if defined(MBEDTLS_SHA256_C)
00735     { MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-RSA-WITH-CAMELLIA-128-CBC-SHA256",
00736       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
00737       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00738       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00739       0 },
00740 
00741     { MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256, "TLS-RSA-WITH-CAMELLIA-256-CBC-SHA256",
00742       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
00743       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00744       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00745       0 },
00746 #endif /* MBEDTLS_SHA256_C */
00747 
00748 #if defined(MBEDTLS_SHA1_C)
00749     { MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, "TLS-RSA-WITH-CAMELLIA-128-CBC-SHA",
00750       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
00751       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
00752       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00753       0 },
00754 
00755     { MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, "TLS-RSA-WITH-CAMELLIA-256-CBC-SHA",
00756       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
00757       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
00758       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00759       0 },
00760 #endif /* MBEDTLS_SHA1_C */
00761 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00762 
00763 #if defined(MBEDTLS_GCM_C)
00764 #if defined(MBEDTLS_SHA256_C)
00765     { MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-RSA-WITH-CAMELLIA-128-GCM-SHA256",
00766       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
00767       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00768       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00769       0 },
00770 #endif /* MBEDTLS_SHA256_C */
00771 
00772 #if defined(MBEDTLS_SHA1_C)
00773     { MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-RSA-WITH-CAMELLIA-256-GCM-SHA384",
00774       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA,
00775       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00776       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00777       0 },
00778 #endif /* MBEDTLS_SHA1_C */
00779 #endif /* MBEDTLS_GCM_C */
00780 #endif /* MBEDTLS_CAMELLIA_C */
00781 
00782 #if defined(MBEDTLS_DES_C)
00783 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00784 #if defined(MBEDTLS_SHA1_C)
00785     { MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-RSA-WITH-3DES-EDE-CBC-SHA",
00786       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
00787       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
00788       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00789       0 },
00790 #endif /* MBEDTLS_SHA1_C */
00791 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00792 #endif /* MBEDTLS_DES_C */
00793 
00794 #if defined(MBEDTLS_ARC4_C)
00795 #if defined(MBEDTLS_MD5_C)
00796     { MBEDTLS_TLS_RSA_WITH_RC4_128_MD5, "TLS-RSA-WITH-RC4-128-MD5",
00797       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_MD5, MBEDTLS_KEY_EXCHANGE_RSA,
00798       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
00799       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00800       MBEDTLS_CIPHERSUITE_NODTLS },
00801 #endif
00802 
00803 #if defined(MBEDTLS_SHA1_C)
00804     { MBEDTLS_TLS_RSA_WITH_RC4_128_SHA, "TLS-RSA-WITH-RC4-128-SHA",
00805       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
00806       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
00807       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00808       MBEDTLS_CIPHERSUITE_NODTLS },
00809 #endif
00810 #endif /* MBEDTLS_ARC4_C */
00811 #endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
00812 
00813 #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED)
00814 #if defined(MBEDTLS_AES_C)
00815 #if defined(MBEDTLS_SHA1_C)
00816 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00817     { MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, "TLS-ECDH-RSA-WITH-AES-128-CBC-SHA",
00818       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
00819       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00820       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00821       0 },
00822     { MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, "TLS-ECDH-RSA-WITH-AES-256-CBC-SHA",
00823       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
00824       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00825       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00826       0 },
00827 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00828 #endif /* MBEDTLS_SHA1_C */
00829 #if defined(MBEDTLS_SHA256_C)
00830 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00831     { MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, "TLS-ECDH-RSA-WITH-AES-128-CBC-SHA256",
00832       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
00833       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00834       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00835       0 },
00836 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00837 #if defined(MBEDTLS_GCM_C)
00838     { MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, "TLS-ECDH-RSA-WITH-AES-128-GCM-SHA256",
00839       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
00840       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00841       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00842       0 },
00843 #endif /* MBEDTLS_GCM_C */
00844 #endif /* MBEDTLS_SHA256_C */
00845 #if defined(MBEDTLS_SHA512_C)
00846 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00847     { MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, "TLS-ECDH-RSA-WITH-AES-256-CBC-SHA384",
00848       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
00849       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00850       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00851       0 },
00852 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00853 #if defined(MBEDTLS_GCM_C)
00854     { MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, "TLS-ECDH-RSA-WITH-AES-256-GCM-SHA384",
00855       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
00856       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00857       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00858       0 },
00859 #endif /* MBEDTLS_GCM_C */
00860 #endif /* MBEDTLS_SHA512_C */
00861 #endif /* MBEDTLS_AES_C */
00862 
00863 #if defined(MBEDTLS_CAMELLIA_C)
00864 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00865 #if defined(MBEDTLS_SHA256_C)
00866     { MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDH-RSA-WITH-CAMELLIA-128-CBC-SHA256",
00867       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
00868       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00869       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00870       0 },
00871 #endif /* MBEDTLS_SHA256_C */
00872 #if defined(MBEDTLS_SHA512_C)
00873     { MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDH-RSA-WITH-CAMELLIA-256-CBC-SHA384",
00874       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
00875       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00876       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00877       0 },
00878 #endif /* MBEDTLS_SHA512_C */
00879 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00880 
00881 #if defined(MBEDTLS_GCM_C)
00882 #if defined(MBEDTLS_SHA256_C)
00883     { MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDH-RSA-WITH-CAMELLIA-128-GCM-SHA256",
00884       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
00885       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00886       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00887       0 },
00888 #endif /* MBEDTLS_SHA256_C */
00889 #if defined(MBEDTLS_SHA512_C)
00890     { MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDH-RSA-WITH-CAMELLIA-256-GCM-SHA384",
00891       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
00892       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00893       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00894       0 },
00895 #endif /* MBEDTLS_SHA512_C */
00896 #endif /* MBEDTLS_GCM_C */
00897 #endif /* MBEDTLS_CAMELLIA_C */
00898 
00899 #if defined(MBEDTLS_DES_C)
00900 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00901 #if defined(MBEDTLS_SHA1_C)
00902     { MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDH-RSA-WITH-3DES-EDE-CBC-SHA",
00903       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
00904       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00905       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00906       0 },
00907 #endif /* MBEDTLS_SHA1_C */
00908 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00909 #endif /* MBEDTLS_DES_C */
00910 
00911 #if defined(MBEDTLS_ARC4_C)
00912 #if defined(MBEDTLS_SHA1_C)
00913     { MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA, "TLS-ECDH-RSA-WITH-RC4-128-SHA",
00914       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
00915       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00916       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00917       MBEDTLS_CIPHERSUITE_NODTLS },
00918 #endif /* MBEDTLS_SHA1_C */
00919 #endif /* MBEDTLS_ARC4_C */
00920 
00921 #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
00922 #if defined(MBEDTLS_SHA1_C)
00923     { MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA, "TLS-ECDH-RSA-WITH-NULL-SHA",
00924       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
00925       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00926       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00927       MBEDTLS_CIPHERSUITE_WEAK },
00928 #endif /* MBEDTLS_SHA1_C */
00929 #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
00930 #endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED */
00931 
00932 #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
00933 #if defined(MBEDTLS_AES_C)
00934 #if defined(MBEDTLS_SHA1_C)
00935 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00936     { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, "TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA",
00937       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
00938       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00939       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00940       0 },
00941     { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, "TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA",
00942       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
00943       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00944       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00945       0 },
00946 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00947 #endif /* MBEDTLS_SHA1_C */
00948 #if defined(MBEDTLS_SHA256_C)
00949 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00950     { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, "TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA256",
00951       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
00952       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00953       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00954       0 },
00955 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00956 #if defined(MBEDTLS_GCM_C)
00957     { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, "TLS-ECDH-ECDSA-WITH-AES-128-GCM-SHA256",
00958       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
00959       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00960       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00961       0 },
00962 #endif /* MBEDTLS_GCM_C */
00963 #endif /* MBEDTLS_SHA256_C */
00964 #if defined(MBEDTLS_SHA512_C)
00965 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00966     { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, "TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA384",
00967       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
00968       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00969       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00970       0 },
00971 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00972 #if defined(MBEDTLS_GCM_C)
00973     { MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, "TLS-ECDH-ECDSA-WITH-AES-256-GCM-SHA384",
00974       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
00975       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00976       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00977       0 },
00978 #endif /* MBEDTLS_GCM_C */
00979 #endif /* MBEDTLS_SHA512_C */
00980 #endif /* MBEDTLS_AES_C */
00981 
00982 #if defined(MBEDTLS_CAMELLIA_C)
00983 #if defined(MBEDTLS_CIPHER_MODE_CBC)
00984 #if defined(MBEDTLS_SHA256_C)
00985     { MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDH-ECDSA-WITH-CAMELLIA-128-CBC-SHA256",
00986       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
00987       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00988       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00989       0 },
00990 #endif /* MBEDTLS_SHA256_C */
00991 #if defined(MBEDTLS_SHA512_C)
00992     { MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDH-ECDSA-WITH-CAMELLIA-256-CBC-SHA384",
00993       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
00994       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
00995       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
00996       0 },
00997 #endif /* MBEDTLS_SHA512_C */
00998 #endif /* MBEDTLS_CIPHER_MODE_CBC */
00999 
01000 #if defined(MBEDTLS_GCM_C)
01001 #if defined(MBEDTLS_SHA256_C)
01002     { MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDH-ECDSA-WITH-CAMELLIA-128-GCM-SHA256",
01003       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
01004       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01005       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01006       0 },
01007 #endif /* MBEDTLS_SHA256_C */
01008 #if defined(MBEDTLS_SHA512_C)
01009     { MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDH-ECDSA-WITH-CAMELLIA-256-GCM-SHA384",
01010       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
01011       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01012       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01013       0 },
01014 #endif /* MBEDTLS_SHA512_C */
01015 #endif /* MBEDTLS_GCM_C */
01016 #endif /* MBEDTLS_CAMELLIA_C */
01017 
01018 #if defined(MBEDTLS_DES_C)
01019 #if defined(MBEDTLS_CIPHER_MODE_CBC)
01020 #if defined(MBEDTLS_SHA1_C)
01021     { MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDH-ECDSA-WITH-3DES-EDE-CBC-SHA",
01022       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
01023       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01024       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01025       0 },
01026 #endif /* MBEDTLS_SHA1_C */
01027 #endif /* MBEDTLS_CIPHER_MODE_CBC */
01028 #endif /* MBEDTLS_DES_C */
01029 
01030 #if defined(MBEDTLS_ARC4_C)
01031 #if defined(MBEDTLS_SHA1_C)
01032     { MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA, "TLS-ECDH-ECDSA-WITH-RC4-128-SHA",
01033       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
01034       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01035       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01036       MBEDTLS_CIPHERSUITE_NODTLS },
01037 #endif /* MBEDTLS_SHA1_C */
01038 #endif /* MBEDTLS_ARC4_C */
01039 
01040 #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
01041 #if defined(MBEDTLS_SHA1_C)
01042     { MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA, "TLS-ECDH-ECDSA-WITH-NULL-SHA",
01043       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
01044       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01045       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01046       MBEDTLS_CIPHERSUITE_WEAK },
01047 #endif /* MBEDTLS_SHA1_C */
01048 #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
01049 #endif /* MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */
01050 
01051 #if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
01052 #if defined(MBEDTLS_AES_C)
01053 #if defined(MBEDTLS_GCM_C)
01054 #if defined(MBEDTLS_SHA256_C)
01055     { MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256, "TLS-PSK-WITH-AES-128-GCM-SHA256",
01056       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
01057       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01058       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01059       0 },
01060 #endif /* MBEDTLS_SHA256_C */
01061 
01062 #if defined(MBEDTLS_SHA512_C)
01063     { MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384, "TLS-PSK-WITH-AES-256-GCM-SHA384",
01064       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
01065       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01066       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01067       0 },
01068 #endif /* MBEDTLS_SHA512_C */
01069 #endif /* MBEDTLS_GCM_C */
01070 
01071 #if defined(MBEDTLS_CIPHER_MODE_CBC)
01072 #if defined(MBEDTLS_SHA256_C)
01073     { MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256, "TLS-PSK-WITH-AES-128-CBC-SHA256",
01074       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
01075       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01076       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01077       0 },
01078 #endif /* MBEDTLS_SHA256_C */
01079 
01080 #if defined(MBEDTLS_SHA512_C)
01081     { MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384, "TLS-PSK-WITH-AES-256-CBC-SHA384",
01082       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
01083       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01084       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01085       0 },
01086 #endif /* MBEDTLS_SHA512_C */
01087 
01088 #if defined(MBEDTLS_SHA1_C)
01089     { MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA, "TLS-PSK-WITH-AES-128-CBC-SHA",
01090       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
01091       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
01092       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01093       0 },
01094 
01095     { MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA, "TLS-PSK-WITH-AES-256-CBC-SHA",
01096       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
01097       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
01098       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01099       0 },
01100 #endif /* MBEDTLS_SHA1_C */
01101 #endif /* MBEDTLS_CIPHER_MODE_CBC */
01102 #if defined(MBEDTLS_CCM_C)
01103     { MBEDTLS_TLS_PSK_WITH_AES_256_CCM, "TLS-PSK-WITH-AES-256-CCM",
01104       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
01105       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01106       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01107       0 },
01108     { MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8, "TLS-PSK-WITH-AES-256-CCM-8",
01109       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
01110       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01111       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01112       MBEDTLS_CIPHERSUITE_SHORT_TAG },
01113     { MBEDTLS_TLS_PSK_WITH_AES_128_CCM, "TLS-PSK-WITH-AES-128-CCM",
01114       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
01115       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01116       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01117       0 },
01118     { MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8, "TLS-PSK-WITH-AES-128-CCM-8",
01119       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
01120       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01121       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01122       MBEDTLS_CIPHERSUITE_SHORT_TAG },
01123 #endif /* MBEDTLS_CCM_C */
01124 #endif /* MBEDTLS_AES_C */
01125 
01126 #if defined(MBEDTLS_CAMELLIA_C)
01127 #if defined(MBEDTLS_CIPHER_MODE_CBC)
01128 #if defined(MBEDTLS_SHA256_C)
01129     { MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-PSK-WITH-CAMELLIA-128-CBC-SHA256",
01130       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
01131       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01132       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01133       0 },
01134 #endif /* MBEDTLS_SHA256_C */
01135 
01136 #if defined(MBEDTLS_SHA512_C)
01137     { MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-PSK-WITH-CAMELLIA-256-CBC-SHA384",
01138       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
01139       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01140       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01141       0 },
01142 #endif /* MBEDTLS_SHA512_C */
01143 #endif /* MBEDTLS_CIPHER_MODE_CBC */
01144 
01145 #if defined(MBEDTLS_GCM_C)
01146 #if defined(MBEDTLS_SHA256_C)
01147     { MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-PSK-WITH-CAMELLIA-128-GCM-SHA256",
01148       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
01149       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01150       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01151       0 },
01152 #endif /* MBEDTLS_SHA256_C */
01153 
01154 #if defined(MBEDTLS_SHA512_C)
01155     { MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-PSK-WITH-CAMELLIA-256-GCM-SHA384",
01156       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
01157       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01158       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01159       0 },
01160 #endif /* MBEDTLS_SHA512_C */
01161 #endif /* MBEDTLS_GCM_C */
01162 #endif /* MBEDTLS_CAMELLIA_C */
01163 
01164 #if defined(MBEDTLS_DES_C)
01165 #if defined(MBEDTLS_CIPHER_MODE_CBC)
01166 #if defined(MBEDTLS_SHA1_C)
01167     { MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-PSK-WITH-3DES-EDE-CBC-SHA",
01168       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
01169       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
01170       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01171       0 },
01172 #endif /* MBEDTLS_SHA1_C */
01173 #endif /* MBEDTLS_CIPHER_MODE_CBC */
01174 #endif /* MBEDTLS_DES_C */
01175 
01176 #if defined(MBEDTLS_ARC4_C)
01177 #if defined(MBEDTLS_SHA1_C)
01178     { MBEDTLS_TLS_PSK_WITH_RC4_128_SHA, "TLS-PSK-WITH-RC4-128-SHA",
01179       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
01180       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
01181       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01182       MBEDTLS_CIPHERSUITE_NODTLS },
01183 #endif /* MBEDTLS_SHA1_C */
01184 #endif /* MBEDTLS_ARC4_C */
01185 #endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */
01186 
01187 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
01188 #if defined(MBEDTLS_AES_C)
01189 #if defined(MBEDTLS_GCM_C)
01190 #if defined(MBEDTLS_SHA256_C)
01191     { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256, "TLS-DHE-PSK-WITH-AES-128-GCM-SHA256",
01192       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01193       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01194       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01195       0 },
01196 #endif /* MBEDTLS_SHA256_C */
01197 
01198 #if defined(MBEDTLS_SHA512_C)
01199     { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384, "TLS-DHE-PSK-WITH-AES-256-GCM-SHA384",
01200       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01201       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01202       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01203       0 },
01204 #endif /* MBEDTLS_SHA512_C */
01205 #endif /* MBEDTLS_GCM_C */
01206 
01207 #if defined(MBEDTLS_CIPHER_MODE_CBC)
01208 #if defined(MBEDTLS_SHA256_C)
01209     { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256, "TLS-DHE-PSK-WITH-AES-128-CBC-SHA256",
01210       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01211       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01212       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01213       0 },
01214 #endif /* MBEDTLS_SHA256_C */
01215 
01216 #if defined(MBEDTLS_SHA512_C)
01217     { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384, "TLS-DHE-PSK-WITH-AES-256-CBC-SHA384",
01218       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01219       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01220       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01221       0 },
01222 #endif /* MBEDTLS_SHA512_C */
01223 
01224 #if defined(MBEDTLS_SHA1_C)
01225     { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA, "TLS-DHE-PSK-WITH-AES-128-CBC-SHA",
01226       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01227       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
01228       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01229       0 },
01230 
01231     { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA, "TLS-DHE-PSK-WITH-AES-256-CBC-SHA",
01232       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01233       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
01234       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01235       0 },
01236 #endif /* MBEDTLS_SHA1_C */
01237 #endif /* MBEDTLS_CIPHER_MODE_CBC */
01238 #if defined(MBEDTLS_CCM_C)
01239     { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM, "TLS-DHE-PSK-WITH-AES-256-CCM",
01240       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01241       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01242       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01243       0 },
01244     { MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM_8, "TLS-DHE-PSK-WITH-AES-256-CCM-8",
01245       MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01246       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01247       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01248       MBEDTLS_CIPHERSUITE_SHORT_TAG },
01249     { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM, "TLS-DHE-PSK-WITH-AES-128-CCM",
01250       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01251       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01252       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01253       0 },
01254     { MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM_8, "TLS-DHE-PSK-WITH-AES-128-CCM-8",
01255       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01256       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01257       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01258       MBEDTLS_CIPHERSUITE_SHORT_TAG },
01259 #endif /* MBEDTLS_CCM_C */
01260 #endif /* MBEDTLS_AES_C */
01261 
01262 #if defined(MBEDTLS_CAMELLIA_C)
01263 #if defined(MBEDTLS_CIPHER_MODE_CBC)
01264 #if defined(MBEDTLS_SHA256_C)
01265     { MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-DHE-PSK-WITH-CAMELLIA-128-CBC-SHA256",
01266       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01267       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01268       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01269       0 },
01270 #endif /* MBEDTLS_SHA256_C */
01271 
01272 #if defined(MBEDTLS_SHA512_C)
01273     { MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-DHE-PSK-WITH-CAMELLIA-256-CBC-SHA384",
01274       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01275       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01276       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01277       0 },
01278 #endif /* MBEDTLS_SHA512_C */
01279 #endif /* MBEDTLS_CIPHER_MODE_CBC */
01280 
01281 #if defined(MBEDTLS_GCM_C)
01282 #if defined(MBEDTLS_SHA256_C)
01283     { MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-DHE-PSK-WITH-CAMELLIA-128-GCM-SHA256",
01284       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01285       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01286       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01287       0 },
01288 #endif /* MBEDTLS_SHA256_C */
01289 
01290 #if defined(MBEDTLS_SHA512_C)
01291     { MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-DHE-PSK-WITH-CAMELLIA-256-GCM-SHA384",
01292       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01293       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01294       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01295       0 },
01296 #endif /* MBEDTLS_SHA512_C */
01297 #endif /* MBEDTLS_GCM_C */
01298 #endif /* MBEDTLS_CAMELLIA_C */
01299 
01300 #if defined(MBEDTLS_DES_C)
01301 #if defined(MBEDTLS_CIPHER_MODE_CBC)
01302 #if defined(MBEDTLS_SHA1_C)
01303     { MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-DHE-PSK-WITH-3DES-EDE-CBC-SHA",
01304       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01305       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
01306       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01307       0 },
01308 #endif /* MBEDTLS_SHA1_C */
01309 #endif /* MBEDTLS_CIPHER_MODE_CBC */
01310 #endif /* MBEDTLS_DES_C */
01311 
01312 #if defined(MBEDTLS_ARC4_C)
01313 #if defined(MBEDTLS_SHA1_C)
01314     { MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA, "TLS-DHE-PSK-WITH-RC4-128-SHA",
01315       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01316       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
01317       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01318       MBEDTLS_CIPHERSUITE_NODTLS },
01319 #endif /* MBEDTLS_SHA1_C */
01320 #endif /* MBEDTLS_ARC4_C */
01321 #endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */
01322 
01323 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
01324 #if defined(MBEDTLS_AES_C)
01325 
01326 #if defined(MBEDTLS_CIPHER_MODE_CBC)
01327 #if defined(MBEDTLS_SHA256_C)
01328     { MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256",
01329       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
01330       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01331       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01332       0 },
01333 #endif /* MBEDTLS_SHA256_C */
01334 
01335 #if defined(MBEDTLS_SHA512_C)
01336     { MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA384",
01337       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
01338       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01339       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01340       0 },
01341 #endif /* MBEDTLS_SHA512_C */
01342 
01343 #if defined(MBEDTLS_SHA1_C)
01344     { MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA, "TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA",
01345       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
01346       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01347       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01348       0 },
01349 
01350     { MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA, "TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA",
01351       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
01352       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01353       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01354       0 },
01355 #endif /* MBEDTLS_SHA1_C */
01356 #endif /* MBEDTLS_CIPHER_MODE_CBC */
01357 #endif /* MBEDTLS_AES_C */
01358 
01359 #if defined(MBEDTLS_CAMELLIA_C)
01360 #if defined(MBEDTLS_CIPHER_MODE_CBC)
01361 #if defined(MBEDTLS_SHA256_C)
01362     { MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-PSK-WITH-CAMELLIA-128-CBC-SHA256",
01363       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
01364       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01365       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01366       0 },
01367 #endif /* MBEDTLS_SHA256_C */
01368 
01369 #if defined(MBEDTLS_SHA512_C)
01370     { MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-PSK-WITH-CAMELLIA-256-CBC-SHA384",
01371       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
01372       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01373       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01374       0 },
01375 #endif /* MBEDTLS_SHA512_C */
01376 #endif /* MBEDTLS_CIPHER_MODE_CBC */
01377 #endif /* MBEDTLS_CAMELLIA_C */
01378 
01379 #if defined(MBEDTLS_DES_C)
01380 #if defined(MBEDTLS_CIPHER_MODE_CBC)
01381 #if defined(MBEDTLS_SHA1_C)
01382     { MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-PSK-WITH-3DES-EDE-CBC-SHA",
01383       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
01384       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01385       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01386       0 },
01387 #endif /* MBEDTLS_SHA1_C */
01388 #endif /* MBEDTLS_CIPHER_MODE_CBC */
01389 #endif /* MBEDTLS_DES_C */
01390 
01391 #if defined(MBEDTLS_ARC4_C)
01392 #if defined(MBEDTLS_SHA1_C)
01393     { MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA, "TLS-ECDHE-PSK-WITH-RC4-128-SHA",
01394       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
01395       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01396       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01397       MBEDTLS_CIPHERSUITE_NODTLS },
01398 #endif /* MBEDTLS_SHA1_C */
01399 #endif /* MBEDTLS_ARC4_C */
01400 #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
01401 
01402 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
01403 #if defined(MBEDTLS_AES_C)
01404 #if defined(MBEDTLS_GCM_C)
01405 #if defined(MBEDTLS_SHA256_C)
01406     { MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256, "TLS-RSA-PSK-WITH-AES-128-GCM-SHA256",
01407       MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01408       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01409       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01410       0 },
01411 #endif /* MBEDTLS_SHA256_C */
01412 
01413 #if defined(MBEDTLS_SHA512_C)
01414     { MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384, "TLS-RSA-PSK-WITH-AES-256-GCM-SHA384",
01415       MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01416       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01417       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01418       0 },
01419 #endif /* MBEDTLS_SHA512_C */
01420 #endif /* MBEDTLS_GCM_C */
01421 
01422 #if defined(MBEDTLS_CIPHER_MODE_CBC)
01423 #if defined(MBEDTLS_SHA256_C)
01424     { MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256, "TLS-RSA-PSK-WITH-AES-128-CBC-SHA256",
01425       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01426       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01427       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01428       0 },
01429 #endif /* MBEDTLS_SHA256_C */
01430 
01431 #if defined(MBEDTLS_SHA512_C)
01432     { MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384, "TLS-RSA-PSK-WITH-AES-256-CBC-SHA384",
01433       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01434       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01435       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01436       0 },
01437 #endif /* MBEDTLS_SHA512_C */
01438 
01439 #if defined(MBEDTLS_SHA1_C)
01440     { MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA, "TLS-RSA-PSK-WITH-AES-128-CBC-SHA",
01441       MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01442       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01443       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01444       0 },
01445 
01446     { MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA, "TLS-RSA-PSK-WITH-AES-256-CBC-SHA",
01447       MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01448       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01449       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01450       0 },
01451 #endif /* MBEDTLS_SHA1_C */
01452 #endif /* MBEDTLS_CIPHER_MODE_CBC */
01453 #endif /* MBEDTLS_AES_C */
01454 
01455 #if defined(MBEDTLS_CAMELLIA_C)
01456 #if defined(MBEDTLS_CIPHER_MODE_CBC)
01457 #if defined(MBEDTLS_SHA256_C)
01458     { MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-RSA-PSK-WITH-CAMELLIA-128-CBC-SHA256",
01459       MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01460       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01461       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01462       0 },
01463 #endif /* MBEDTLS_SHA256_C */
01464 
01465 #if defined(MBEDTLS_SHA512_C)
01466     { MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-RSA-PSK-WITH-CAMELLIA-256-CBC-SHA384",
01467       MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01468       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01469       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01470       0 },
01471 #endif /* MBEDTLS_SHA512_C */
01472 #endif /* MBEDTLS_CIPHER_MODE_CBC */
01473 
01474 #if defined(MBEDTLS_GCM_C)
01475 #if defined(MBEDTLS_SHA256_C)
01476     { MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-RSA-PSK-WITH-CAMELLIA-128-GCM-SHA256",
01477       MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01478       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01479       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01480       0 },
01481 #endif /* MBEDTLS_SHA256_C */
01482 
01483 #if defined(MBEDTLS_SHA512_C)
01484     { MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-RSA-PSK-WITH-CAMELLIA-256-GCM-SHA384",
01485       MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01486       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01487       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01488       0 },
01489 #endif /* MBEDTLS_SHA512_C */
01490 #endif /* MBEDTLS_GCM_C */
01491 #endif /* MBEDTLS_CAMELLIA_C */
01492 
01493 #if defined(MBEDTLS_DES_C)
01494 #if defined(MBEDTLS_CIPHER_MODE_CBC)
01495 #if defined(MBEDTLS_SHA1_C)
01496     { MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-RSA-PSK-WITH-3DES-EDE-CBC-SHA",
01497       MBEDTLS_CIPHER_DES_EDE3_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01498       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01499       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01500       0 },
01501 #endif /* MBEDTLS_SHA1_C */
01502 #endif /* MBEDTLS_CIPHER_MODE_CBC */
01503 #endif /* MBEDTLS_DES_C */
01504 
01505 #if defined(MBEDTLS_ARC4_C)
01506 #if defined(MBEDTLS_SHA1_C)
01507     { MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA, "TLS-RSA-PSK-WITH-RC4-128-SHA",
01508       MBEDTLS_CIPHER_ARC4_128, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01509       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01510       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01511       MBEDTLS_CIPHERSUITE_NODTLS },
01512 #endif /* MBEDTLS_SHA1_C */
01513 #endif /* MBEDTLS_ARC4_C */
01514 #endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */
01515 
01516 #if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
01517 #if defined(MBEDTLS_AES_C)
01518 #if defined(MBEDTLS_CCM_C)
01519     { MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8, "TLS-ECJPAKE-WITH-AES-128-CCM-8",
01520       MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECJPAKE,
01521       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01522       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01523       MBEDTLS_CIPHERSUITE_SHORT_TAG },
01524 #endif /* MBEDTLS_CCM_C */
01525 #endif /* MBEDTLS_AES_C */
01526 #endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */
01527 
01528 #if defined(MBEDTLS_ENABLE_WEAK_CIPHERSUITES)
01529 #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
01530 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
01531 #if defined(MBEDTLS_MD5_C)
01532     { MBEDTLS_TLS_RSA_WITH_NULL_MD5, "TLS-RSA-WITH-NULL-MD5",
01533       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_MD5, MBEDTLS_KEY_EXCHANGE_RSA,
01534       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
01535       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01536       MBEDTLS_CIPHERSUITE_WEAK },
01537 #endif
01538 
01539 #if defined(MBEDTLS_SHA1_C)
01540     { MBEDTLS_TLS_RSA_WITH_NULL_SHA, "TLS-RSA-WITH-NULL-SHA",
01541       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
01542       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
01543       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01544       MBEDTLS_CIPHERSUITE_WEAK },
01545 #endif
01546 
01547 #if defined(MBEDTLS_SHA256_C)
01548     { MBEDTLS_TLS_RSA_WITH_NULL_SHA256, "TLS-RSA-WITH-NULL-SHA256",
01549       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
01550       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01551       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01552       MBEDTLS_CIPHERSUITE_WEAK },
01553 #endif
01554 #endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
01555 
01556 #if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
01557 #if defined(MBEDTLS_SHA1_C)
01558     { MBEDTLS_TLS_PSK_WITH_NULL_SHA, "TLS-PSK-WITH-NULL-SHA",
01559       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
01560       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
01561       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01562       MBEDTLS_CIPHERSUITE_WEAK },
01563 #endif /* MBEDTLS_SHA1_C */
01564 
01565 #if defined(MBEDTLS_SHA256_C)
01566     { MBEDTLS_TLS_PSK_WITH_NULL_SHA256, "TLS-PSK-WITH-NULL-SHA256",
01567       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
01568       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01569       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01570       MBEDTLS_CIPHERSUITE_WEAK },
01571 #endif
01572 
01573 #if defined(MBEDTLS_SHA512_C)
01574     { MBEDTLS_TLS_PSK_WITH_NULL_SHA384, "TLS-PSK-WITH-NULL-SHA384",
01575       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
01576       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01577       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01578       MBEDTLS_CIPHERSUITE_WEAK },
01579 #endif
01580 #endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */
01581 
01582 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
01583 #if defined(MBEDTLS_SHA1_C)
01584     { MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA, "TLS-DHE-PSK-WITH-NULL-SHA",
01585       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01586       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
01587       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01588       MBEDTLS_CIPHERSUITE_WEAK },
01589 #endif /* MBEDTLS_SHA1_C */
01590 
01591 #if defined(MBEDTLS_SHA256_C)
01592     { MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256, "TLS-DHE-PSK-WITH-NULL-SHA256",
01593       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01594       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01595       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01596       MBEDTLS_CIPHERSUITE_WEAK },
01597 #endif
01598 
01599 #if defined(MBEDTLS_SHA512_C)
01600     { MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384, "TLS-DHE-PSK-WITH-NULL-SHA384",
01601       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
01602       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01603       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01604       MBEDTLS_CIPHERSUITE_WEAK },
01605 #endif
01606 #endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */
01607 
01608 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
01609 #if defined(MBEDTLS_SHA1_C)
01610     { MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA, "TLS-ECDHE-PSK-WITH-NULL-SHA",
01611       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
01612       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01613       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01614       MBEDTLS_CIPHERSUITE_WEAK },
01615 #endif /* MBEDTLS_SHA1_C */
01616 
01617 #if defined(MBEDTLS_SHA256_C)
01618     { MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256, "TLS-ECDHE-PSK-WITH-NULL-SHA256",
01619       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
01620       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01621       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01622       MBEDTLS_CIPHERSUITE_WEAK },
01623 #endif
01624 
01625 #if defined(MBEDTLS_SHA512_C)
01626     { MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384, "TLS-ECDHE-PSK-WITH-NULL-SHA384",
01627       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
01628       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01629       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01630       MBEDTLS_CIPHERSUITE_WEAK },
01631 #endif
01632 #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
01633 
01634 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
01635 #if defined(MBEDTLS_SHA1_C)
01636     { MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA, "TLS-RSA-PSK-WITH-NULL-SHA",
01637       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01638       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01639       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01640       MBEDTLS_CIPHERSUITE_WEAK },
01641 #endif /* MBEDTLS_SHA1_C */
01642 
01643 #if defined(MBEDTLS_SHA256_C)
01644     { MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256, "TLS-RSA-PSK-WITH-NULL-SHA256",
01645       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01646       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01647       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01648       MBEDTLS_CIPHERSUITE_WEAK },
01649 #endif
01650 
01651 #if defined(MBEDTLS_SHA512_C)
01652     { MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384, "TLS-RSA-PSK-WITH-NULL-SHA384",
01653       MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
01654       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_1,
01655       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01656       MBEDTLS_CIPHERSUITE_WEAK },
01657 #endif
01658 #endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */
01659 #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
01660 
01661 #if defined(MBEDTLS_DES_C)
01662 #if defined(MBEDTLS_CIPHER_MODE_CBC)
01663 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
01664 #if defined(MBEDTLS_SHA1_C)
01665     { MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA, "TLS-DHE-RSA-WITH-DES-CBC-SHA",
01666       MBEDTLS_CIPHER_DES_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
01667       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
01668       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01669       MBEDTLS_CIPHERSUITE_WEAK },
01670 #endif /* MBEDTLS_SHA1_C */
01671 #endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */
01672 
01673 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
01674 #if defined(MBEDTLS_SHA1_C)
01675     { MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA, "TLS-RSA-WITH-DES-CBC-SHA",
01676       MBEDTLS_CIPHER_DES_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
01677       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_0,
01678       MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3,
01679       MBEDTLS_CIPHERSUITE_WEAK },
01680 #endif /* MBEDTLS_SHA1_C */
01681 #endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
01682 #endif /* MBEDTLS_CIPHER_MODE_CBC */
01683 #endif /* MBEDTLS_DES_C */
01684 #endif /* MBEDTLS_ENABLE_WEAK_CIPHERSUITES */
01685 
01686     { 0, "",
01687       MBEDTLS_CIPHER_NONE, MBEDTLS_MD_NONE, MBEDTLS_KEY_EXCHANGE_NONE,
01688       0, 0, 0, 0, 0 }
01689 };
01690 
01691 #if defined(MBEDTLS_SSL_CIPHERSUITES)
01692 const int *mbedtls_ssl_list_ciphersuites( void )
01693 {
01694     return( ciphersuite_preference );
01695 }
01696 #else
01697 #define MAX_CIPHERSUITES    sizeof( ciphersuite_definitions     ) /         \
01698                             sizeof( ciphersuite_definitions[0]  )
01699 static int supported_ciphersuites[MAX_CIPHERSUITES];
01700 static int supported_init = 0;
01701 
01702 const int *mbedtls_ssl_list_ciphersuites( void )
01703 {
01704     /*
01705      * On initial call filter out all ciphersuites not supported by current
01706      * build based on presence in the ciphersuite_definitions.
01707      */
01708     if( supported_init == 0 )
01709     {
01710         const int *p;
01711         int *q;
01712 
01713         for( p = ciphersuite_preference, q = supported_ciphersuites;
01714              *p != 0 && q < supported_ciphersuites + MAX_CIPHERSUITES - 1;
01715              p++ )
01716         {
01717 #if defined(MBEDTLS_REMOVE_ARC4_CIPHERSUITES)
01718             const mbedtls_ssl_ciphersuite_t *cs_info;
01719             if( ( cs_info = mbedtls_ssl_ciphersuite_from_id( *p ) ) != NULL &&
01720                 cs_info->cipher != MBEDTLS_CIPHER_ARC4_128 )
01721 #else
01722             if( mbedtls_ssl_ciphersuite_from_id( *p ) != NULL )
01723 #endif
01724                 *(q++) = *p;
01725         }
01726         *q = 0;
01727 
01728         supported_init = 1;
01729     }
01730 
01731     return( supported_ciphersuites );
01732 }
01733 #endif /* MBEDTLS_SSL_CIPHERSUITES */
01734 
01735 const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_string(
01736                                                 const char *ciphersuite_name )
01737 {
01738     const mbedtls_ssl_ciphersuite_t *cur = ciphersuite_definitions;
01739 
01740     if( NULL == ciphersuite_name )
01741         return( NULL );
01742 
01743     while( cur->id != 0 )
01744     {
01745         if( 0 == strcmp( cur->name, ciphersuite_name ) )
01746             return( cur );
01747 
01748         cur++;
01749     }
01750 
01751     return( NULL );
01752 }
01753 
01754 const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_id( int ciphersuite )
01755 {
01756     const mbedtls_ssl_ciphersuite_t *cur = ciphersuite_definitions;
01757 
01758     while( cur->id != 0 )
01759     {
01760         if( cur->id == ciphersuite )
01761             return( cur );
01762 
01763         cur++;
01764     }
01765 
01766     return( NULL );
01767 }
01768 
01769 const char *mbedtls_ssl_get_ciphersuite_name( const int ciphersuite_id )
01770 {
01771     const mbedtls_ssl_ciphersuite_t *cur;
01772 
01773     cur = mbedtls_ssl_ciphersuite_from_id( ciphersuite_id );
01774 
01775     if( cur == NULL )
01776         return( "unknown" );
01777 
01778     return( cur->name );
01779 }
01780 
01781 int mbedtls_ssl_get_ciphersuite_id( const char *ciphersuite_name )
01782 {
01783     const mbedtls_ssl_ciphersuite_t *cur;
01784 
01785     cur = mbedtls_ssl_ciphersuite_from_string( ciphersuite_name );
01786 
01787     if( cur == NULL )
01788         return( 0 );
01789 
01790     return( cur->id );
01791 }
01792 
01793 #if defined(MBEDTLS_PK_C)
01794 mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_pk_alg( const mbedtls_ssl_ciphersuite_t *info )
01795 {
01796     switch( info->key_exchange )
01797     {
01798         case MBEDTLS_KEY_EXCHANGE_RSA:
01799         case MBEDTLS_KEY_EXCHANGE_DHE_RSA:
01800         case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
01801         case MBEDTLS_KEY_EXCHANGE_RSA_PSK:
01802             return( MBEDTLS_PK_RSA );
01803 
01804         case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
01805             return( MBEDTLS_PK_ECDSA );
01806 
01807         case MBEDTLS_KEY_EXCHANGE_ECDH_RSA:
01808         case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA:
01809             return( MBEDTLS_PK_ECKEY );
01810 
01811         default:
01812             return( MBEDTLS_PK_NONE );
01813     }
01814 }
01815 #endif /* MBEDTLS_PK_C */
01816 
01817 #if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C)
01818 int mbedtls_ssl_ciphersuite_uses_ec( const mbedtls_ssl_ciphersuite_t *info )
01819 {
01820     switch( info->key_exchange )
01821     {
01822         case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
01823         case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
01824         case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK:
01825         case MBEDTLS_KEY_EXCHANGE_ECDH_RSA:
01826         case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA:
01827             return( 1 );
01828 
01829         default:
01830             return( 0 );
01831     }
01832 }
01833 #endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C */
01834 
01835 #if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
01836 int mbedtls_ssl_ciphersuite_uses_psk( const mbedtls_ssl_ciphersuite_t *info )
01837 {
01838     switch( info->key_exchange )
01839     {
01840         case MBEDTLS_KEY_EXCHANGE_PSK:
01841         case MBEDTLS_KEY_EXCHANGE_RSA_PSK:
01842         case MBEDTLS_KEY_EXCHANGE_DHE_PSK:
01843         case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK:
01844             return( 1 );
01845 
01846         default:
01847             return( 0 );
01848     }
01849 }
01850 #endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */
01851 
01852 #endif /* MBEDTLS_SSL_TLS_C */