mbed TLS library
Dependents: HTTPClient-SSL WS_SERVER
ssl_ciphersuites.c
00001 /** 00002 * \file ssl_ciphersuites.c 00003 * 00004 * \brief SSL ciphersuites for mbed TLS 00005 * 00006 * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved 00007 * 00008 * This file is part of mbed TLS (https://tls.mbed.org) 00009 * 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License along 00021 * with this program; if not, write to the Free Software Foundation, Inc., 00022 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00023 */ 00024 00025 #if !defined(POLARSSL_CONFIG_FILE) 00026 #include "polarssl/config.h" 00027 #else 00028 #include POLARSSL_CONFIG_FILE 00029 #endif 00030 00031 #if defined(POLARSSL_SSL_TLS_C) 00032 00033 #include "polarssl/ssl_ciphersuites.h" 00034 #include "polarssl/ssl.h" 00035 00036 // #include <stdlib.h> 00037 #include <string.h> 00038 00039 #if defined(_MSC_VER) && !defined strcasecmp && !defined(EFIX64) && \ 00040 !defined(EFI32) 00041 #define strcasecmp _stricmp 00042 #endif 00043 00044 /* 00045 * Ordered from most preferred to least preferred in terms of security. 00046 * 00047 * Current rule (except rc4, weak and null which come last): 00048 * 1. By key exchange: 00049 * Forward-secure non-PSK > forward-secure PSK > other non-PSK > other PSK 00050 * 2. By key length and cipher: 00051 * AES-256 > Camellia-256 > AES-128 > Camellia-128 > 3DES 00052 * 3. By cipher mode when relevant GCM > CCM > CBC > CCM_8 00053 * 4. By hash function used when relevant 00054 * 5. By key exchange/auth again: EC > non-EC 00055 */ 00056 static const int ciphersuite_preference[] = 00057 { 00058 #if defined(SSL_CIPHERSUITES) 00059 SSL_CIPHERSUITES, 00060 #else 00061 /* All AES-256 ephemeral suites */ 00062 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, 00063 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, 00064 TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, 00065 TLS_ECDHE_ECDSA_WITH_AES_256_CCM, 00066 TLS_DHE_RSA_WITH_AES_256_CCM, 00067 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, 00068 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, 00069 TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, 00070 TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, 00071 TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, 00072 TLS_DHE_RSA_WITH_AES_256_CBC_SHA, 00073 TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8, 00074 TLS_DHE_RSA_WITH_AES_256_CCM_8, 00075 00076 /* All CAMELLIA-256 ephemeral suites */ 00077 TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, 00078 TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, 00079 TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, 00080 TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, 00081 TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384, 00082 TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256, 00083 TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, 00084 00085 /* All AES-128 ephemeral suites */ 00086 TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, 00087 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 00088 TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, 00089 TLS_ECDHE_ECDSA_WITH_AES_128_CCM, 00090 TLS_DHE_RSA_WITH_AES_128_CCM, 00091 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, 00092 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, 00093 TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, 00094 TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, 00095 TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, 00096 TLS_DHE_RSA_WITH_AES_128_CBC_SHA, 00097 TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, 00098 TLS_DHE_RSA_WITH_AES_128_CCM_8, 00099 00100 /* All CAMELLIA-128 ephemeral suites */ 00101 TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, 00102 TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, 00103 TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, 00104 TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, 00105 TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, 00106 TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, 00107 TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, 00108 00109 /* All remaining >= 128-bit ephemeral suites */ 00110 TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, 00111 TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, 00112 TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, 00113 00114 /* The PSK ephemeral suites */ 00115 TLS_DHE_PSK_WITH_AES_256_GCM_SHA384, 00116 TLS_DHE_PSK_WITH_AES_256_CCM, 00117 TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384, 00118 TLS_DHE_PSK_WITH_AES_256_CBC_SHA384, 00119 TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA, 00120 TLS_DHE_PSK_WITH_AES_256_CBC_SHA, 00121 TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384, 00122 TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, 00123 TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, 00124 TLS_DHE_PSK_WITH_AES_256_CCM_8, 00125 00126 TLS_DHE_PSK_WITH_AES_128_GCM_SHA256, 00127 TLS_DHE_PSK_WITH_AES_128_CCM, 00128 TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, 00129 TLS_DHE_PSK_WITH_AES_128_CBC_SHA256, 00130 TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA, 00131 TLS_DHE_PSK_WITH_AES_128_CBC_SHA, 00132 TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256, 00133 TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, 00134 TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, 00135 TLS_DHE_PSK_WITH_AES_128_CCM_8, 00136 00137 TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA, 00138 TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, 00139 00140 /* All AES-256 suites */ 00141 TLS_RSA_WITH_AES_256_GCM_SHA384, 00142 TLS_RSA_WITH_AES_256_CCM, 00143 TLS_RSA_WITH_AES_256_CBC_SHA256, 00144 TLS_RSA_WITH_AES_256_CBC_SHA, 00145 TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, 00146 TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, 00147 TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, 00148 TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, 00149 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, 00150 TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, 00151 TLS_RSA_WITH_AES_256_CCM_8, 00152 00153 /* All CAMELLIA-256 suites */ 00154 TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384, 00155 TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256, 00156 TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, 00157 TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384, 00158 TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384, 00159 TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, 00160 TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, 00161 00162 /* All AES-128 suites */ 00163 TLS_RSA_WITH_AES_128_GCM_SHA256, 00164 TLS_RSA_WITH_AES_128_CCM, 00165 TLS_RSA_WITH_AES_128_CBC_SHA256, 00166 TLS_RSA_WITH_AES_128_CBC_SHA, 00167 TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, 00168 TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, 00169 TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, 00170 TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, 00171 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, 00172 TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, 00173 TLS_RSA_WITH_AES_128_CCM_8, 00174 00175 /* All CAMELLIA-128 suites */ 00176 TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256, 00177 TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, 00178 TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, 00179 TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256, 00180 TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256, 00181 TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, 00182 TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, 00183 00184 /* All remaining >= 128-bit suites */ 00185 TLS_RSA_WITH_3DES_EDE_CBC_SHA, 00186 TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, 00187 TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, 00188 00189 /* The RSA PSK suites */ 00190 TLS_RSA_PSK_WITH_AES_256_GCM_SHA384, 00191 TLS_RSA_PSK_WITH_AES_256_CBC_SHA384, 00192 TLS_RSA_PSK_WITH_AES_256_CBC_SHA, 00193 TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384, 00194 TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384, 00195 00196 TLS_RSA_PSK_WITH_AES_128_GCM_SHA256, 00197 TLS_RSA_PSK_WITH_AES_128_CBC_SHA256, 00198 TLS_RSA_PSK_WITH_AES_128_CBC_SHA, 00199 TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256, 00200 TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256, 00201 00202 TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, 00203 00204 /* The PSK suites */ 00205 TLS_PSK_WITH_AES_256_GCM_SHA384, 00206 TLS_PSK_WITH_AES_256_CCM, 00207 TLS_PSK_WITH_AES_256_CBC_SHA384, 00208 TLS_PSK_WITH_AES_256_CBC_SHA, 00209 TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384, 00210 TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384, 00211 TLS_PSK_WITH_AES_256_CCM_8, 00212 00213 TLS_PSK_WITH_AES_128_GCM_SHA256, 00214 TLS_PSK_WITH_AES_128_CCM, 00215 TLS_PSK_WITH_AES_128_CBC_SHA256, 00216 TLS_PSK_WITH_AES_128_CBC_SHA, 00217 TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256, 00218 TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256, 00219 TLS_PSK_WITH_AES_128_CCM_8, 00220 00221 TLS_PSK_WITH_3DES_EDE_CBC_SHA, 00222 00223 /* RC4 suites */ 00224 TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, 00225 TLS_ECDHE_RSA_WITH_RC4_128_SHA, 00226 TLS_ECDHE_PSK_WITH_RC4_128_SHA, 00227 TLS_DHE_PSK_WITH_RC4_128_SHA, 00228 TLS_RSA_WITH_RC4_128_SHA, 00229 TLS_RSA_WITH_RC4_128_MD5, 00230 TLS_ECDH_RSA_WITH_RC4_128_SHA, 00231 TLS_ECDH_ECDSA_WITH_RC4_128_SHA, 00232 TLS_RSA_PSK_WITH_RC4_128_SHA, 00233 TLS_PSK_WITH_RC4_128_SHA, 00234 00235 /* Weak suites */ 00236 TLS_DHE_RSA_WITH_DES_CBC_SHA, 00237 TLS_RSA_WITH_DES_CBC_SHA, 00238 00239 /* NULL suites */ 00240 TLS_ECDHE_ECDSA_WITH_NULL_SHA, 00241 TLS_ECDHE_RSA_WITH_NULL_SHA, 00242 TLS_ECDHE_PSK_WITH_NULL_SHA384, 00243 TLS_ECDHE_PSK_WITH_NULL_SHA256, 00244 TLS_ECDHE_PSK_WITH_NULL_SHA, 00245 TLS_DHE_PSK_WITH_NULL_SHA384, 00246 TLS_DHE_PSK_WITH_NULL_SHA256, 00247 TLS_DHE_PSK_WITH_NULL_SHA, 00248 00249 TLS_RSA_WITH_NULL_SHA256, 00250 TLS_RSA_WITH_NULL_SHA, 00251 TLS_RSA_WITH_NULL_MD5, 00252 TLS_ECDH_RSA_WITH_NULL_SHA, 00253 TLS_ECDH_ECDSA_WITH_NULL_SHA, 00254 TLS_RSA_PSK_WITH_NULL_SHA384, 00255 TLS_RSA_PSK_WITH_NULL_SHA256, 00256 TLS_RSA_PSK_WITH_NULL_SHA, 00257 TLS_PSK_WITH_NULL_SHA384, 00258 TLS_PSK_WITH_NULL_SHA256, 00259 TLS_PSK_WITH_NULL_SHA, 00260 00261 #endif /* SSL_CIPHERSUITES */ 00262 0 00263 }; 00264 00265 static const ssl_ciphersuite_t ciphersuite_definitions[] = 00266 { 00267 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) 00268 #if defined(POLARSSL_AES_C) 00269 #if defined(POLARSSL_SHA1_C) 00270 #if defined(POLARSSL_CIPHER_MODE_CBC) 00271 { TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA", 00272 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00273 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00274 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00275 0 }, 00276 { TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA", 00277 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00278 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00279 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00280 0 }, 00281 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00282 #endif /* POLARSSL_SHA1_C */ 00283 #if defined(POLARSSL_SHA256_C) 00284 #if defined(POLARSSL_CIPHER_MODE_CBC) 00285 { TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA256", 00286 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00287 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00288 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00289 0 }, 00290 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00291 #if defined(POLARSSL_GCM_C) 00292 { TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, "TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256", 00293 POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00294 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00295 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00296 0 }, 00297 #endif /* POLARSSL_GCM_C */ 00298 #endif /* POLARSSL_SHA256_C */ 00299 #if defined(POLARSSL_SHA512_C) 00300 #if defined(POLARSSL_CIPHER_MODE_CBC) 00301 { TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA384", 00302 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00303 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00304 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00305 0 }, 00306 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00307 #if defined(POLARSSL_GCM_C) 00308 { TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, "TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384", 00309 POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00310 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00311 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00312 0 }, 00313 #endif /* POLARSSL_GCM_C */ 00314 #endif /* POLARSSL_SHA512_C */ 00315 #if defined(POLARSSL_CCM_C) 00316 { TLS_ECDHE_ECDSA_WITH_AES_256_CCM, "TLS-ECDHE-ECDSA-WITH-AES-256-CCM", 00317 POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00318 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00319 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00320 0 }, 00321 { TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8, "TLS-ECDHE-ECDSA-WITH-AES-256-CCM-8", 00322 POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00323 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00324 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00325 POLARSSL_CIPHERSUITE_SHORT_TAG }, 00326 { TLS_ECDHE_ECDSA_WITH_AES_128_CCM, "TLS-ECDHE-ECDSA-WITH-AES-128-CCM", 00327 POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00328 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00329 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00330 0 }, 00331 { TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, "TLS-ECDHE-ECDSA-WITH-AES-128-CCM-8", 00332 POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00333 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00334 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00335 POLARSSL_CIPHERSUITE_SHORT_TAG }, 00336 #endif /* POLARSSL_CCM_C */ 00337 #endif /* POLARSSL_AES_C */ 00338 00339 #if defined(POLARSSL_CAMELLIA_C) 00340 #if defined(POLARSSL_CIPHER_MODE_CBC) 00341 #if defined(POLARSSL_SHA256_C) 00342 { TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-CBC-SHA256", 00343 POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00344 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00345 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00346 0 }, 00347 #endif /* POLARSSL_SHA256_C */ 00348 #if defined(POLARSSL_SHA512_C) 00349 { TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-CBC-SHA384", 00350 POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00351 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00352 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00353 0 }, 00354 #endif /* POLARSSL_SHA512_C */ 00355 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00356 00357 #if defined(POLARSSL_GCM_C) 00358 #if defined(POLARSSL_SHA256_C) 00359 { TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-GCM-SHA256", 00360 POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00361 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00362 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00363 0 }, 00364 #endif /* POLARSSL_SHA256_C */ 00365 #if defined(POLARSSL_SHA512_C) 00366 { TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-GCM-SHA384", 00367 POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00368 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00369 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00370 0 }, 00371 #endif /* POLARSSL_SHA512_C */ 00372 #endif /* POLARSSL_GCM_C */ 00373 #endif /* POLARSSL_CAMELLIA_C */ 00374 00375 #if defined(POLARSSL_DES_C) 00376 #if defined(POLARSSL_CIPHER_MODE_CBC) 00377 #if defined(POLARSSL_SHA1_C) 00378 { TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-3DES-EDE-CBC-SHA", 00379 POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00380 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00381 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00382 0 }, 00383 #endif /* POLARSSL_SHA1_C */ 00384 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00385 #endif /* POLARSSL_DES_C */ 00386 00387 #if defined(POLARSSL_ARC4_C) 00388 #if defined(POLARSSL_SHA1_C) 00389 { TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, "TLS-ECDHE-ECDSA-WITH-RC4-128-SHA", 00390 POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00391 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00392 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00393 0 }, 00394 #endif /* POLARSSL_SHA1_C */ 00395 #endif /* POLARSSL_ARC4_C */ 00396 00397 #if defined(POLARSSL_CIPHER_NULL_CIPHER) 00398 #if defined(POLARSSL_SHA1_C) 00399 { TLS_ECDHE_ECDSA_WITH_NULL_SHA, "TLS-ECDHE-ECDSA-WITH-NULL-SHA", 00400 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA, 00401 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00402 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00403 POLARSSL_CIPHERSUITE_WEAK }, 00404 #endif /* POLARSSL_SHA1_C */ 00405 #endif /* POLARSSL_CIPHER_NULL_CIPHER */ 00406 #endif /* POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */ 00407 00408 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) 00409 #if defined(POLARSSL_AES_C) 00410 #if defined(POLARSSL_SHA1_C) 00411 #if defined(POLARSSL_CIPHER_MODE_CBC) 00412 { TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, "TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA", 00413 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_RSA, 00414 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00415 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00416 0 }, 00417 { TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, "TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA", 00418 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_RSA, 00419 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00420 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00421 0 }, 00422 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00423 #endif /* POLARSSL_SHA1_C */ 00424 #if defined(POLARSSL_SHA256_C) 00425 #if defined(POLARSSL_CIPHER_MODE_CBC) 00426 { TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA256", 00427 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_RSA, 00428 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00429 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00430 0 }, 00431 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00432 #if defined(POLARSSL_GCM_C) 00433 { TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, "TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256", 00434 POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_RSA, 00435 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00436 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00437 0 }, 00438 #endif /* POLARSSL_GCM_C */ 00439 #endif /* POLARSSL_SHA256_C */ 00440 #if defined(POLARSSL_SHA512_C) 00441 #if defined(POLARSSL_CIPHER_MODE_CBC) 00442 { TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384", 00443 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_RSA, 00444 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00445 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00446 0 }, 00447 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00448 #if defined(POLARSSL_GCM_C) 00449 { TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, "TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384", 00450 POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_RSA, 00451 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00452 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00453 0 }, 00454 #endif /* POLARSSL_GCM_C */ 00455 #endif /* POLARSSL_SHA512_C */ 00456 #endif /* POLARSSL_AES_C */ 00457 00458 #if defined(POLARSSL_CAMELLIA_C) 00459 #if defined(POLARSSL_CIPHER_MODE_CBC) 00460 #if defined(POLARSSL_SHA256_C) 00461 { TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-RSA-WITH-CAMELLIA-128-CBC-SHA256", 00462 POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_RSA, 00463 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00464 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00465 0 }, 00466 #endif /* POLARSSL_SHA256_C */ 00467 #if defined(POLARSSL_SHA512_C) 00468 { TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-RSA-WITH-CAMELLIA-256-CBC-SHA384", 00469 POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_RSA, 00470 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00471 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00472 0 }, 00473 #endif /* POLARSSL_SHA512_C */ 00474 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00475 00476 #if defined(POLARSSL_GCM_C) 00477 #if defined(POLARSSL_SHA256_C) 00478 { TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDHE-RSA-WITH-CAMELLIA-128-GCM-SHA256", 00479 POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_RSA, 00480 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00481 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00482 0 }, 00483 #endif /* POLARSSL_SHA256_C */ 00484 #if defined(POLARSSL_SHA512_C) 00485 { TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDHE-RSA-WITH-CAMELLIA-256-GCM-SHA384", 00486 POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_RSA, 00487 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00488 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00489 0 }, 00490 #endif /* POLARSSL_SHA512_C */ 00491 #endif /* POLARSSL_GCM_C */ 00492 #endif /* POLARSSL_CAMELLIA_C */ 00493 00494 #if defined(POLARSSL_DES_C) 00495 #if defined(POLARSSL_CIPHER_MODE_CBC) 00496 #if defined(POLARSSL_SHA1_C) 00497 { TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-RSA-WITH-3DES-EDE-CBC-SHA", 00498 POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_RSA, 00499 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00500 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00501 0 }, 00502 #endif /* POLARSSL_SHA1_C */ 00503 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00504 #endif /* POLARSSL_DES_C */ 00505 00506 #if defined(POLARSSL_ARC4_C) 00507 #if defined(POLARSSL_SHA1_C) 00508 { TLS_ECDHE_RSA_WITH_RC4_128_SHA, "TLS-ECDHE-RSA-WITH-RC4-128-SHA", 00509 POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_RSA, 00510 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00511 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00512 0 }, 00513 #endif /* POLARSSL_SHA1_C */ 00514 #endif /* POLARSSL_ARC4_C */ 00515 00516 #if defined(POLARSSL_CIPHER_NULL_CIPHER) 00517 #if defined(POLARSSL_SHA1_C) 00518 { TLS_ECDHE_RSA_WITH_NULL_SHA, "TLS-ECDHE-RSA-WITH-NULL-SHA", 00519 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_RSA, 00520 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00521 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00522 POLARSSL_CIPHERSUITE_WEAK }, 00523 #endif /* POLARSSL_SHA1_C */ 00524 #endif /* POLARSSL_CIPHER_NULL_CIPHER */ 00525 #endif /* POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED */ 00526 00527 #if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) 00528 #if defined(POLARSSL_AES_C) 00529 #if defined(POLARSSL_SHA512_C) && defined(POLARSSL_GCM_C) 00530 { TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, "TLS-DHE-RSA-WITH-AES-256-GCM-SHA384", 00531 POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00532 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00533 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00534 0 }, 00535 #endif /* POLARSSL_SHA512_C && POLARSSL_GCM_C */ 00536 00537 #if defined(POLARSSL_SHA256_C) 00538 #if defined(POLARSSL_GCM_C) 00539 { TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, "TLS-DHE-RSA-WITH-AES-128-GCM-SHA256", 00540 POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00541 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00542 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00543 0 }, 00544 #endif /* POLARSSL_GCM_C */ 00545 00546 #if defined(POLARSSL_CIPHER_MODE_CBC) 00547 { TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, "TLS-DHE-RSA-WITH-AES-128-CBC-SHA256", 00548 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00549 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00550 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00551 0 }, 00552 00553 { TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, "TLS-DHE-RSA-WITH-AES-256-CBC-SHA256", 00554 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00555 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00556 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00557 0 }, 00558 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00559 #endif /* POLARSSL_SHA256_C */ 00560 00561 #if defined(POLARSSL_CIPHER_MODE_CBC) 00562 #if defined(POLARSSL_SHA1_C) 00563 { TLS_DHE_RSA_WITH_AES_128_CBC_SHA, "TLS-DHE-RSA-WITH-AES-128-CBC-SHA", 00564 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00565 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 00566 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00567 0 }, 00568 00569 { TLS_DHE_RSA_WITH_AES_256_CBC_SHA, "TLS-DHE-RSA-WITH-AES-256-CBC-SHA", 00570 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00571 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 00572 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00573 0 }, 00574 #endif /* POLARSSL_SHA1_C */ 00575 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00576 #if defined(POLARSSL_CCM_C) 00577 { TLS_DHE_RSA_WITH_AES_256_CCM, "TLS-DHE-RSA-WITH-AES-256-CCM", 00578 POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00579 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00580 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00581 0 }, 00582 { TLS_DHE_RSA_WITH_AES_256_CCM_8, "TLS-DHE-RSA-WITH-AES-256-CCM-8", 00583 POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00584 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00585 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00586 POLARSSL_CIPHERSUITE_SHORT_TAG }, 00587 { TLS_DHE_RSA_WITH_AES_128_CCM, "TLS-DHE-RSA-WITH-AES-128-CCM", 00588 POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00589 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00590 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00591 0 }, 00592 { TLS_DHE_RSA_WITH_AES_128_CCM_8, "TLS-DHE-RSA-WITH-AES-128-CCM-8", 00593 POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00594 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00595 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00596 POLARSSL_CIPHERSUITE_SHORT_TAG }, 00597 #endif /* POLARSSL_CCM_C */ 00598 #endif /* POLARSSL_AES_C */ 00599 00600 #if defined(POLARSSL_CAMELLIA_C) 00601 #if defined(POLARSSL_CIPHER_MODE_CBC) 00602 #if defined(POLARSSL_SHA256_C) 00603 { TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA256", 00604 POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00605 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00606 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00607 0 }, 00608 00609 { TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA256", 00610 POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00611 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00612 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00613 0 }, 00614 #endif /* POLARSSL_SHA256_C */ 00615 00616 #if defined(POLARSSL_SHA1_C) 00617 { TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA", 00618 POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00619 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 00620 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00621 0 }, 00622 00623 { TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA", 00624 POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00625 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 00626 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00627 0 }, 00628 #endif /* POLARSSL_SHA1_C */ 00629 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00630 #if defined(POLARSSL_GCM_C) 00631 #if defined(POLARSSL_SHA256_C) 00632 { TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-128-GCM-SHA256", 00633 POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00634 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00635 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00636 0 }, 00637 #endif /* POLARSSL_SHA256_C */ 00638 00639 #if defined(POLARSSL_SHA512_C) 00640 { TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-DHE-RSA-WITH-CAMELLIA-256-GCM-SHA384", 00641 POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00642 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00643 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00644 0 }, 00645 #endif /* POLARSSL_SHA512_C */ 00646 #endif /* POLARSSL_GCM_C */ 00647 #endif /* POLARSSL_CAMELLIA_C */ 00648 00649 #if defined(POLARSSL_DES_C) 00650 #if defined(POLARSSL_CIPHER_MODE_CBC) 00651 #if defined(POLARSSL_SHA1_C) 00652 { TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-DHE-RSA-WITH-3DES-EDE-CBC-SHA", 00653 POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_RSA, 00654 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 00655 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00656 0 }, 00657 #endif /* POLARSSL_SHA1_C */ 00658 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00659 #endif /* POLARSSL_DES_C */ 00660 #endif /* POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED */ 00661 00662 #if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) 00663 #if defined(POLARSSL_AES_C) 00664 #if defined(POLARSSL_SHA512_C) && defined(POLARSSL_GCM_C) 00665 { TLS_RSA_WITH_AES_256_GCM_SHA384, "TLS-RSA-WITH-AES-256-GCM-SHA384", 00666 POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_RSA, 00667 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00668 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00669 0 }, 00670 #endif /* POLARSSL_SHA512_C && POLARSSL_GCM_C */ 00671 00672 #if defined(POLARSSL_SHA256_C) 00673 #if defined(POLARSSL_GCM_C) 00674 { TLS_RSA_WITH_AES_128_GCM_SHA256, "TLS-RSA-WITH-AES-128-GCM-SHA256", 00675 POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA, 00676 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00677 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00678 0 }, 00679 #endif /* POLARSSL_GCM_C */ 00680 00681 #if defined(POLARSSL_CIPHER_MODE_CBC) 00682 { TLS_RSA_WITH_AES_128_CBC_SHA256, "TLS-RSA-WITH-AES-128-CBC-SHA256", 00683 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA, 00684 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00685 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00686 0 }, 00687 00688 { TLS_RSA_WITH_AES_256_CBC_SHA256, "TLS-RSA-WITH-AES-256-CBC-SHA256", 00689 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA, 00690 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00691 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00692 0 }, 00693 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00694 #endif /* POLARSSL_SHA256_C */ 00695 00696 #if defined(POLARSSL_SHA1_C) 00697 #if defined(POLARSSL_CIPHER_MODE_CBC) 00698 { TLS_RSA_WITH_AES_128_CBC_SHA, "TLS-RSA-WITH-AES-128-CBC-SHA", 00699 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA, 00700 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 00701 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00702 0 }, 00703 00704 { TLS_RSA_WITH_AES_256_CBC_SHA, "TLS-RSA-WITH-AES-256-CBC-SHA", 00705 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA, 00706 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 00707 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00708 0 }, 00709 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00710 #endif /* POLARSSL_SHA1_C */ 00711 #if defined(POLARSSL_CCM_C) 00712 { TLS_RSA_WITH_AES_256_CCM, "TLS-RSA-WITH-AES-256-CCM", 00713 POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA, 00714 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00715 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00716 0 }, 00717 { TLS_RSA_WITH_AES_256_CCM_8, "TLS-RSA-WITH-AES-256-CCM-8", 00718 POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA, 00719 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00720 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00721 POLARSSL_CIPHERSUITE_SHORT_TAG }, 00722 { TLS_RSA_WITH_AES_128_CCM, "TLS-RSA-WITH-AES-128-CCM", 00723 POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA, 00724 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00725 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00726 0 }, 00727 { TLS_RSA_WITH_AES_128_CCM_8, "TLS-RSA-WITH-AES-128-CCM-8", 00728 POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA, 00729 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00730 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00731 POLARSSL_CIPHERSUITE_SHORT_TAG }, 00732 #endif /* POLARSSL_CCM_C */ 00733 #endif /* POLARSSL_AES_C */ 00734 00735 #if defined(POLARSSL_CAMELLIA_C) 00736 #if defined(POLARSSL_CIPHER_MODE_CBC) 00737 #if defined(POLARSSL_SHA256_C) 00738 { TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-RSA-WITH-CAMELLIA-128-CBC-SHA256", 00739 POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA, 00740 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00741 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00742 0 }, 00743 00744 { TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256, "TLS-RSA-WITH-CAMELLIA-256-CBC-SHA256", 00745 POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA, 00746 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00747 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00748 0 }, 00749 #endif /* POLARSSL_SHA256_C */ 00750 00751 #if defined(POLARSSL_SHA1_C) 00752 { TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, "TLS-RSA-WITH-CAMELLIA-128-CBC-SHA", 00753 POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA, 00754 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 00755 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00756 0 }, 00757 00758 { TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, "TLS-RSA-WITH-CAMELLIA-256-CBC-SHA", 00759 POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA, 00760 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 00761 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00762 0 }, 00763 #endif /* POLARSSL_SHA1_C */ 00764 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00765 00766 #if defined(POLARSSL_GCM_C) 00767 #if defined(POLARSSL_SHA256_C) 00768 { TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-RSA-WITH-CAMELLIA-128-GCM-SHA256", 00769 POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA, 00770 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00771 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00772 0 }, 00773 #endif /* POLARSSL_SHA256_C */ 00774 00775 #if defined(POLARSSL_SHA1_C) 00776 { TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-RSA-WITH-CAMELLIA-256-GCM-SHA384", 00777 POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_RSA, 00778 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00779 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00780 0 }, 00781 #endif /* POLARSSL_SHA1_C */ 00782 #endif /* POLARSSL_GCM_C */ 00783 #endif /* POLARSSL_CAMELLIA_C */ 00784 00785 #if defined(POLARSSL_DES_C) 00786 #if defined(POLARSSL_CIPHER_MODE_CBC) 00787 #if defined(POLARSSL_SHA1_C) 00788 { TLS_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-RSA-WITH-3DES-EDE-CBC-SHA", 00789 POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA, 00790 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 00791 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00792 0 }, 00793 #endif /* POLARSSL_SHA1_C */ 00794 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00795 #endif /* POLARSSL_DES_C */ 00796 00797 #if defined(POLARSSL_ARC4_C) 00798 #if defined(POLARSSL_MD5_C) 00799 { TLS_RSA_WITH_RC4_128_MD5, "TLS-RSA-WITH-RC4-128-MD5", 00800 POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_MD5, POLARSSL_KEY_EXCHANGE_RSA, 00801 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 00802 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00803 0 }, 00804 #endif 00805 00806 #if defined(POLARSSL_SHA1_C) 00807 { TLS_RSA_WITH_RC4_128_SHA, "TLS-RSA-WITH-RC4-128-SHA", 00808 POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA, 00809 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 00810 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00811 0 }, 00812 #endif 00813 #endif /* POLARSSL_ARC4_C */ 00814 #endif /* POLARSSL_KEY_EXCHANGE_RSA_ENABLED */ 00815 00816 #if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) 00817 #if defined(POLARSSL_AES_C) 00818 #if defined(POLARSSL_SHA1_C) 00819 #if defined(POLARSSL_CIPHER_MODE_CBC) 00820 { TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, "TLS-ECDH-RSA-WITH-AES-128-CBC-SHA", 00821 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_RSA, 00822 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00823 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00824 0 }, 00825 { TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, "TLS-ECDH-RSA-WITH-AES-256-CBC-SHA", 00826 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_RSA, 00827 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00828 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00829 0 }, 00830 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00831 #endif /* POLARSSL_SHA1_C */ 00832 #if defined(POLARSSL_SHA256_C) 00833 #if defined(POLARSSL_CIPHER_MODE_CBC) 00834 { TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, "TLS-ECDH-RSA-WITH-AES-128-CBC-SHA256", 00835 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_RSA, 00836 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00837 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00838 0 }, 00839 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00840 #if defined(POLARSSL_GCM_C) 00841 { TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, "TLS-ECDH-RSA-WITH-AES-128-GCM-SHA256", 00842 POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_RSA, 00843 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00844 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00845 0 }, 00846 #endif /* POLARSSL_GCM_C */ 00847 #endif /* POLARSSL_SHA256_C */ 00848 #if defined(POLARSSL_SHA512_C) 00849 #if defined(POLARSSL_CIPHER_MODE_CBC) 00850 { TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, "TLS-ECDH-RSA-WITH-AES-256-CBC-SHA384", 00851 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_RSA, 00852 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00853 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00854 0 }, 00855 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00856 #if defined(POLARSSL_GCM_C) 00857 { TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, "TLS-ECDH-RSA-WITH-AES-256-GCM-SHA384", 00858 POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_RSA, 00859 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00860 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00861 0 }, 00862 #endif /* POLARSSL_GCM_C */ 00863 #endif /* POLARSSL_SHA512_C */ 00864 #endif /* POLARSSL_AES_C */ 00865 00866 #if defined(POLARSSL_CAMELLIA_C) 00867 #if defined(POLARSSL_CIPHER_MODE_CBC) 00868 #if defined(POLARSSL_SHA256_C) 00869 { TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDH-RSA-WITH-CAMELLIA-128-CBC-SHA256", 00870 POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_RSA, 00871 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00872 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00873 0 }, 00874 #endif /* POLARSSL_SHA256_C */ 00875 #if defined(POLARSSL_SHA512_C) 00876 { TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDH-RSA-WITH-CAMELLIA-256-CBC-SHA384", 00877 POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_RSA, 00878 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00879 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00880 0 }, 00881 #endif /* POLARSSL_SHA512_C */ 00882 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00883 00884 #if defined(POLARSSL_GCM_C) 00885 #if defined(POLARSSL_SHA256_C) 00886 { TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDH-RSA-WITH-CAMELLIA-128-GCM-SHA256", 00887 POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_RSA, 00888 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00889 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00890 0 }, 00891 #endif /* POLARSSL_SHA256_C */ 00892 #if defined(POLARSSL_SHA512_C) 00893 { TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDH-RSA-WITH-CAMELLIA-256-GCM-SHA384", 00894 POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_RSA, 00895 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00896 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00897 0 }, 00898 #endif /* POLARSSL_SHA512_C */ 00899 #endif /* POLARSSL_GCM_C */ 00900 #endif /* POLARSSL_CAMELLIA_C */ 00901 00902 #if defined(POLARSSL_DES_C) 00903 #if defined(POLARSSL_CIPHER_MODE_CBC) 00904 #if defined(POLARSSL_SHA1_C) 00905 { TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDH-RSA-WITH-3DES-EDE-CBC-SHA", 00906 POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_RSA, 00907 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00908 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00909 0 }, 00910 #endif /* POLARSSL_SHA1_C */ 00911 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00912 #endif /* POLARSSL_DES_C */ 00913 00914 #if defined(POLARSSL_ARC4_C) 00915 #if defined(POLARSSL_SHA1_C) 00916 { TLS_ECDH_RSA_WITH_RC4_128_SHA, "TLS-ECDH-RSA-WITH-RC4-128-SHA", 00917 POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_RSA, 00918 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00919 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00920 0 }, 00921 #endif /* POLARSSL_SHA1_C */ 00922 #endif /* POLARSSL_ARC4_C */ 00923 00924 #if defined(POLARSSL_CIPHER_NULL_CIPHER) 00925 #if defined(POLARSSL_SHA1_C) 00926 { TLS_ECDH_RSA_WITH_NULL_SHA, "TLS-ECDH-RSA-WITH-NULL-SHA", 00927 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_RSA, 00928 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00929 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00930 POLARSSL_CIPHERSUITE_WEAK }, 00931 #endif /* POLARSSL_SHA1_C */ 00932 #endif /* POLARSSL_CIPHER_NULL_CIPHER */ 00933 #endif /* POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED */ 00934 00935 #if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) 00936 #if defined(POLARSSL_AES_C) 00937 #if defined(POLARSSL_SHA1_C) 00938 #if defined(POLARSSL_CIPHER_MODE_CBC) 00939 { TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, "TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA", 00940 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA, 00941 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00942 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00943 0 }, 00944 { TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, "TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA", 00945 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA, 00946 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00947 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00948 0 }, 00949 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00950 #endif /* POLARSSL_SHA1_C */ 00951 #if defined(POLARSSL_SHA256_C) 00952 #if defined(POLARSSL_CIPHER_MODE_CBC) 00953 { TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, "TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA256", 00954 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA, 00955 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00956 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00957 0 }, 00958 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00959 #if defined(POLARSSL_GCM_C) 00960 { TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, "TLS-ECDH-ECDSA-WITH-AES-128-GCM-SHA256", 00961 POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA, 00962 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00963 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00964 0 }, 00965 #endif /* POLARSSL_GCM_C */ 00966 #endif /* POLARSSL_SHA256_C */ 00967 #if defined(POLARSSL_SHA512_C) 00968 #if defined(POLARSSL_CIPHER_MODE_CBC) 00969 { TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, "TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA384", 00970 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA, 00971 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00972 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00973 0 }, 00974 #endif /* POLARSSL_CIPHER_MODE_CBC */ 00975 #if defined(POLARSSL_GCM_C) 00976 { TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, "TLS-ECDH-ECDSA-WITH-AES-256-GCM-SHA384", 00977 POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA, 00978 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00979 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00980 0 }, 00981 #endif /* POLARSSL_GCM_C */ 00982 #endif /* POLARSSL_SHA512_C */ 00983 #endif /* POLARSSL_AES_C */ 00984 00985 #if defined(POLARSSL_CAMELLIA_C) 00986 #if defined(POLARSSL_CIPHER_MODE_CBC) 00987 #if defined(POLARSSL_SHA256_C) 00988 { TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDH-ECDSA-WITH-CAMELLIA-128-CBC-SHA256", 00989 POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA, 00990 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00991 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00992 0 }, 00993 #endif /* POLARSSL_SHA256_C */ 00994 #if defined(POLARSSL_SHA512_C) 00995 { TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDH-ECDSA-WITH-CAMELLIA-256-CBC-SHA384", 00996 POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA, 00997 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 00998 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 00999 0 }, 01000 #endif /* POLARSSL_SHA512_C */ 01001 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01002 01003 #if defined(POLARSSL_GCM_C) 01004 #if defined(POLARSSL_SHA256_C) 01005 { TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDH-ECDSA-WITH-CAMELLIA-128-GCM-SHA256", 01006 POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA, 01007 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01008 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01009 0 }, 01010 #endif /* POLARSSL_SHA256_C */ 01011 #if defined(POLARSSL_SHA512_C) 01012 { TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDH-ECDSA-WITH-CAMELLIA-256-GCM-SHA384", 01013 POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA, 01014 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01015 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01016 0 }, 01017 #endif /* POLARSSL_SHA512_C */ 01018 #endif /* POLARSSL_GCM_C */ 01019 #endif /* POLARSSL_CAMELLIA_C */ 01020 01021 #if defined(POLARSSL_DES_C) 01022 #if defined(POLARSSL_CIPHER_MODE_CBC) 01023 #if defined(POLARSSL_SHA1_C) 01024 { TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDH-ECDSA-WITH-3DES-EDE-CBC-SHA", 01025 POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA, 01026 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01027 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01028 0 }, 01029 #endif /* POLARSSL_SHA1_C */ 01030 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01031 #endif /* POLARSSL_DES_C */ 01032 01033 #if defined(POLARSSL_ARC4_C) 01034 #if defined(POLARSSL_SHA1_C) 01035 { TLS_ECDH_ECDSA_WITH_RC4_128_SHA, "TLS-ECDH-ECDSA-WITH-RC4-128-SHA", 01036 POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA, 01037 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01038 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01039 0 }, 01040 #endif /* POLARSSL_SHA1_C */ 01041 #endif /* POLARSSL_ARC4_C */ 01042 01043 #if defined(POLARSSL_CIPHER_NULL_CIPHER) 01044 #if defined(POLARSSL_SHA1_C) 01045 { TLS_ECDH_ECDSA_WITH_NULL_SHA, "TLS-ECDH-ECDSA-WITH-NULL-SHA", 01046 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA, 01047 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01048 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01049 POLARSSL_CIPHERSUITE_WEAK }, 01050 #endif /* POLARSSL_SHA1_C */ 01051 #endif /* POLARSSL_CIPHER_NULL_CIPHER */ 01052 #endif /* POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */ 01053 01054 #if defined(POLARSSL_KEY_EXCHANGE_PSK_ENABLED) 01055 #if defined(POLARSSL_AES_C) 01056 #if defined(POLARSSL_GCM_C) 01057 #if defined(POLARSSL_SHA256_C) 01058 { TLS_PSK_WITH_AES_128_GCM_SHA256, "TLS-PSK-WITH-AES-128-GCM-SHA256", 01059 POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK, 01060 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01061 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01062 0 }, 01063 #endif /* POLARSSL_SHA256_C */ 01064 01065 #if defined(POLARSSL_SHA512_C) 01066 { TLS_PSK_WITH_AES_256_GCM_SHA384, "TLS-PSK-WITH-AES-256-GCM-SHA384", 01067 POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_PSK, 01068 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01069 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01070 0 }, 01071 #endif /* POLARSSL_SHA512_C */ 01072 #endif /* POLARSSL_GCM_C */ 01073 01074 #if defined(POLARSSL_CIPHER_MODE_CBC) 01075 #if defined(POLARSSL_SHA256_C) 01076 { TLS_PSK_WITH_AES_128_CBC_SHA256, "TLS-PSK-WITH-AES-128-CBC-SHA256", 01077 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK, 01078 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01079 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01080 0 }, 01081 #endif /* POLARSSL_SHA256_C */ 01082 01083 #if defined(POLARSSL_SHA512_C) 01084 { TLS_PSK_WITH_AES_256_CBC_SHA384, "TLS-PSK-WITH-AES-256-CBC-SHA384", 01085 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_PSK, 01086 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01087 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01088 0 }, 01089 #endif /* POLARSSL_SHA512_C */ 01090 01091 #if defined(POLARSSL_SHA1_C) 01092 { TLS_PSK_WITH_AES_128_CBC_SHA, "TLS-PSK-WITH-AES-128-CBC-SHA", 01093 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_PSK, 01094 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 01095 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01096 0 }, 01097 01098 { TLS_PSK_WITH_AES_256_CBC_SHA, "TLS-PSK-WITH-AES-256-CBC-SHA", 01099 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_PSK, 01100 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 01101 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01102 0 }, 01103 #endif /* POLARSSL_SHA1_C */ 01104 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01105 #if defined(POLARSSL_CCM_C) 01106 { TLS_PSK_WITH_AES_256_CCM, "TLS-PSK-WITH-AES-256-CCM", 01107 POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK, 01108 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01109 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01110 0 }, 01111 { TLS_PSK_WITH_AES_256_CCM_8, "TLS-PSK-WITH-AES-256-CCM-8", 01112 POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK, 01113 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01114 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01115 POLARSSL_CIPHERSUITE_SHORT_TAG }, 01116 { TLS_PSK_WITH_AES_128_CCM, "TLS-PSK-WITH-AES-128-CCM", 01117 POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK, 01118 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01119 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01120 0 }, 01121 { TLS_PSK_WITH_AES_128_CCM_8, "TLS-PSK-WITH-AES-128-CCM-8", 01122 POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK, 01123 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01124 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01125 POLARSSL_CIPHERSUITE_SHORT_TAG }, 01126 #endif /* POLARSSL_CCM_C */ 01127 #endif /* POLARSSL_AES_C */ 01128 01129 #if defined(POLARSSL_CAMELLIA_C) 01130 #if defined(POLARSSL_CIPHER_MODE_CBC) 01131 #if defined(POLARSSL_SHA256_C) 01132 { TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-PSK-WITH-CAMELLIA-128-CBC-SHA256", 01133 POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK, 01134 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01135 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01136 0 }, 01137 #endif /* POLARSSL_SHA256_C */ 01138 01139 #if defined(POLARSSL_SHA512_C) 01140 { TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-PSK-WITH-CAMELLIA-256-CBC-SHA384", 01141 POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_PSK, 01142 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01143 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01144 0 }, 01145 #endif /* POLARSSL_SHA512_C */ 01146 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01147 01148 #if defined(POLARSSL_GCM_C) 01149 #if defined(POLARSSL_SHA256_C) 01150 { TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-PSK-WITH-CAMELLIA-128-GCM-SHA256", 01151 POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK, 01152 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01153 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01154 0 }, 01155 #endif /* POLARSSL_SHA256_C */ 01156 01157 #if defined(POLARSSL_SHA512_C) 01158 { TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-PSK-WITH-CAMELLIA-256-GCM-SHA384", 01159 POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_PSK, 01160 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01161 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01162 0 }, 01163 #endif /* POLARSSL_SHA512_C */ 01164 #endif /* POLARSSL_GCM_C */ 01165 #endif /* POLARSSL_CAMELLIA_C */ 01166 01167 #if defined(POLARSSL_DES_C) 01168 #if defined(POLARSSL_CIPHER_MODE_CBC) 01169 #if defined(POLARSSL_SHA1_C) 01170 { TLS_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-PSK-WITH-3DES-EDE-CBC-SHA", 01171 POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_PSK, 01172 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 01173 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01174 0 }, 01175 #endif /* POLARSSL_SHA1_C */ 01176 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01177 #endif /* POLARSSL_DES_C */ 01178 01179 #if defined(POLARSSL_ARC4_C) 01180 #if defined(POLARSSL_SHA1_C) 01181 { TLS_PSK_WITH_RC4_128_SHA, "TLS-PSK-WITH-RC4-128-SHA", 01182 POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_PSK, 01183 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 01184 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01185 0 }, 01186 #endif /* POLARSSL_SHA1_C */ 01187 #endif /* POLARSSL_ARC4_C */ 01188 #endif /* POLARSSL_KEY_EXCHANGE_PSK_ENABLED */ 01189 01190 #if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) 01191 #if defined(POLARSSL_AES_C) 01192 #if defined(POLARSSL_GCM_C) 01193 #if defined(POLARSSL_SHA256_C) 01194 { TLS_DHE_PSK_WITH_AES_128_GCM_SHA256, "TLS-DHE-PSK-WITH-AES-128-GCM-SHA256", 01195 POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01196 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01197 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01198 0 }, 01199 #endif /* POLARSSL_SHA256_C */ 01200 01201 #if defined(POLARSSL_SHA512_C) 01202 { TLS_DHE_PSK_WITH_AES_256_GCM_SHA384, "TLS-DHE-PSK-WITH-AES-256-GCM-SHA384", 01203 POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01204 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01205 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01206 0 }, 01207 #endif /* POLARSSL_SHA512_C */ 01208 #endif /* POLARSSL_GCM_C */ 01209 01210 #if defined(POLARSSL_CIPHER_MODE_CBC) 01211 #if defined(POLARSSL_SHA256_C) 01212 { TLS_DHE_PSK_WITH_AES_128_CBC_SHA256, "TLS-DHE-PSK-WITH-AES-128-CBC-SHA256", 01213 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01214 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01215 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01216 0 }, 01217 #endif /* POLARSSL_SHA256_C */ 01218 01219 #if defined(POLARSSL_SHA512_C) 01220 { TLS_DHE_PSK_WITH_AES_256_CBC_SHA384, "TLS-DHE-PSK-WITH-AES-256-CBC-SHA384", 01221 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01222 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01223 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01224 0 }, 01225 #endif /* POLARSSL_SHA512_C */ 01226 01227 #if defined(POLARSSL_SHA1_C) 01228 { TLS_DHE_PSK_WITH_AES_128_CBC_SHA, "TLS-DHE-PSK-WITH-AES-128-CBC-SHA", 01229 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01230 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 01231 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01232 0 }, 01233 01234 { TLS_DHE_PSK_WITH_AES_256_CBC_SHA, "TLS-DHE-PSK-WITH-AES-256-CBC-SHA", 01235 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01236 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 01237 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01238 0 }, 01239 #endif /* POLARSSL_SHA1_C */ 01240 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01241 #if defined(POLARSSL_CCM_C) 01242 { TLS_DHE_PSK_WITH_AES_256_CCM, "TLS-DHE-PSK-WITH-AES-256-CCM", 01243 POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01244 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01245 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01246 0 }, 01247 { TLS_DHE_PSK_WITH_AES_256_CCM_8, "TLS-DHE-PSK-WITH-AES-256-CCM-8", 01248 POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01249 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01250 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01251 POLARSSL_CIPHERSUITE_SHORT_TAG }, 01252 { TLS_DHE_PSK_WITH_AES_128_CCM, "TLS-DHE-PSK-WITH-AES-128-CCM", 01253 POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01254 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01255 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01256 0 }, 01257 { TLS_DHE_PSK_WITH_AES_128_CCM_8, "TLS-DHE-PSK-WITH-AES-128-CCM-8", 01258 POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01259 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01260 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01261 POLARSSL_CIPHERSUITE_SHORT_TAG }, 01262 #endif /* POLARSSL_CCM_C */ 01263 #endif /* POLARSSL_AES_C */ 01264 01265 #if defined(POLARSSL_CAMELLIA_C) 01266 #if defined(POLARSSL_CIPHER_MODE_CBC) 01267 #if defined(POLARSSL_SHA256_C) 01268 { TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-DHE-PSK-WITH-CAMELLIA-128-CBC-SHA256", 01269 POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01270 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01271 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01272 0 }, 01273 #endif /* POLARSSL_SHA256_C */ 01274 01275 #if defined(POLARSSL_SHA512_C) 01276 { TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-DHE-PSK-WITH-CAMELLIA-256-CBC-SHA384", 01277 POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01278 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01279 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01280 0 }, 01281 #endif /* POLARSSL_SHA512_C */ 01282 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01283 01284 #if defined(POLARSSL_GCM_C) 01285 #if defined(POLARSSL_SHA256_C) 01286 { TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-DHE-PSK-WITH-CAMELLIA-128-GCM-SHA256", 01287 POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01288 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01289 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01290 0 }, 01291 #endif /* POLARSSL_SHA256_C */ 01292 01293 #if defined(POLARSSL_SHA512_C) 01294 { TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-DHE-PSK-WITH-CAMELLIA-256-GCM-SHA384", 01295 POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01296 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01297 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01298 0 }, 01299 #endif /* POLARSSL_SHA512_C */ 01300 #endif /* POLARSSL_GCM_C */ 01301 #endif /* POLARSSL_CAMELLIA_C */ 01302 01303 #if defined(POLARSSL_DES_C) 01304 #if defined(POLARSSL_CIPHER_MODE_CBC) 01305 #if defined(POLARSSL_SHA1_C) 01306 { TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-DHE-PSK-WITH-3DES-EDE-CBC-SHA", 01307 POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01308 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 01309 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01310 0 }, 01311 #endif /* POLARSSL_SHA1_C */ 01312 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01313 #endif /* POLARSSL_DES_C */ 01314 01315 #if defined(POLARSSL_ARC4_C) 01316 #if defined(POLARSSL_SHA1_C) 01317 { TLS_DHE_PSK_WITH_RC4_128_SHA, "TLS-DHE-PSK-WITH-RC4-128-SHA", 01318 POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01319 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 01320 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01321 0 }, 01322 #endif /* POLARSSL_SHA1_C */ 01323 #endif /* POLARSSL_ARC4_C */ 01324 #endif /* POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED */ 01325 01326 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) 01327 #if defined(POLARSSL_AES_C) 01328 01329 #if defined(POLARSSL_CIPHER_MODE_CBC) 01330 #if defined(POLARSSL_SHA256_C) 01331 { TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256", 01332 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_PSK, 01333 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01334 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01335 0 }, 01336 #endif /* POLARSSL_SHA256_C */ 01337 01338 #if defined(POLARSSL_SHA512_C) 01339 { TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA384", 01340 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_PSK, 01341 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01342 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01343 0 }, 01344 #endif /* POLARSSL_SHA512_C */ 01345 01346 #if defined(POLARSSL_SHA1_C) 01347 { TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA, "TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA", 01348 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_PSK, 01349 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01350 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01351 0 }, 01352 01353 { TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA, "TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA", 01354 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_PSK, 01355 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01356 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01357 0 }, 01358 #endif /* POLARSSL_SHA1_C */ 01359 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01360 #endif /* POLARSSL_AES_C */ 01361 01362 #if defined(POLARSSL_CAMELLIA_C) 01363 #if defined(POLARSSL_CIPHER_MODE_CBC) 01364 #if defined(POLARSSL_SHA256_C) 01365 { TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-PSK-WITH-CAMELLIA-128-CBC-SHA256", 01366 POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_PSK, 01367 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01368 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01369 0 }, 01370 #endif /* POLARSSL_SHA256_C */ 01371 01372 #if defined(POLARSSL_SHA512_C) 01373 { TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-PSK-WITH-CAMELLIA-256-CBC-SHA384", 01374 POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_PSK, 01375 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01376 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01377 0 }, 01378 #endif /* POLARSSL_SHA512_C */ 01379 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01380 #endif /* POLARSSL_CAMELLIA_C */ 01381 01382 #if defined(POLARSSL_DES_C) 01383 #if defined(POLARSSL_CIPHER_MODE_CBC) 01384 #if defined(POLARSSL_SHA1_C) 01385 { TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-PSK-WITH-3DES-EDE-CBC-SHA", 01386 POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_PSK, 01387 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01388 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01389 0 }, 01390 #endif /* POLARSSL_SHA1_C */ 01391 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01392 #endif /* POLARSSL_DES_C */ 01393 01394 #if defined(POLARSSL_ARC4_C) 01395 #if defined(POLARSSL_SHA1_C) 01396 { TLS_ECDHE_PSK_WITH_RC4_128_SHA, "TLS-ECDHE-PSK-WITH-RC4-128-SHA", 01397 POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_PSK, 01398 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01399 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01400 0 }, 01401 #endif /* POLARSSL_SHA1_C */ 01402 #endif /* POLARSSL_ARC4_C */ 01403 #endif /* POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED */ 01404 01405 #if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) 01406 #if defined(POLARSSL_AES_C) 01407 #if defined(POLARSSL_GCM_C) 01408 #if defined(POLARSSL_SHA256_C) 01409 { TLS_RSA_PSK_WITH_AES_128_GCM_SHA256, "TLS-RSA-PSK-WITH-AES-128-GCM-SHA256", 01410 POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01411 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01412 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01413 0 }, 01414 #endif /* POLARSSL_SHA256_C */ 01415 01416 #if defined(POLARSSL_SHA512_C) 01417 { TLS_RSA_PSK_WITH_AES_256_GCM_SHA384, "TLS-RSA-PSK-WITH-AES-256-GCM-SHA384", 01418 POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01419 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01420 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01421 0 }, 01422 #endif /* POLARSSL_SHA512_C */ 01423 #endif /* POLARSSL_GCM_C */ 01424 01425 #if defined(POLARSSL_CIPHER_MODE_CBC) 01426 #if defined(POLARSSL_SHA256_C) 01427 { TLS_RSA_PSK_WITH_AES_128_CBC_SHA256, "TLS-RSA-PSK-WITH-AES-128-CBC-SHA256", 01428 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01429 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01430 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01431 0 }, 01432 #endif /* POLARSSL_SHA256_C */ 01433 01434 #if defined(POLARSSL_SHA512_C) 01435 { TLS_RSA_PSK_WITH_AES_256_CBC_SHA384, "TLS-RSA-PSK-WITH-AES-256-CBC-SHA384", 01436 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01437 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01438 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01439 0 }, 01440 #endif /* POLARSSL_SHA512_C */ 01441 01442 #if defined(POLARSSL_SHA1_C) 01443 { TLS_RSA_PSK_WITH_AES_128_CBC_SHA, "TLS-RSA-PSK-WITH-AES-128-CBC-SHA", 01444 POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01445 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01446 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01447 0 }, 01448 01449 { TLS_RSA_PSK_WITH_AES_256_CBC_SHA, "TLS-RSA-PSK-WITH-AES-256-CBC-SHA", 01450 POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01451 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01452 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01453 0 }, 01454 #endif /* POLARSSL_SHA1_C */ 01455 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01456 #endif /* POLARSSL_AES_C */ 01457 01458 #if defined(POLARSSL_CAMELLIA_C) 01459 #if defined(POLARSSL_CIPHER_MODE_CBC) 01460 #if defined(POLARSSL_SHA256_C) 01461 { TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-RSA-PSK-WITH-CAMELLIA-128-CBC-SHA256", 01462 POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01463 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01464 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01465 0 }, 01466 #endif /* POLARSSL_SHA256_C */ 01467 01468 #if defined(POLARSSL_SHA512_C) 01469 { TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-RSA-PSK-WITH-CAMELLIA-256-CBC-SHA384", 01470 POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01471 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01472 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01473 0 }, 01474 #endif /* POLARSSL_SHA512_C */ 01475 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01476 01477 #if defined(POLARSSL_GCM_C) 01478 #if defined(POLARSSL_SHA256_C) 01479 { TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-RSA-PSK-WITH-CAMELLIA-128-GCM-SHA256", 01480 POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01481 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01482 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01483 0 }, 01484 #endif /* POLARSSL_SHA256_C */ 01485 01486 #if defined(POLARSSL_SHA512_C) 01487 { TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-RSA-PSK-WITH-CAMELLIA-256-GCM-SHA384", 01488 POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01489 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01490 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01491 0 }, 01492 #endif /* POLARSSL_SHA512_C */ 01493 #endif /* POLARSSL_GCM_C */ 01494 #endif /* POLARSSL_CAMELLIA_C */ 01495 01496 #if defined(POLARSSL_DES_C) 01497 #if defined(POLARSSL_CIPHER_MODE_CBC) 01498 #if defined(POLARSSL_SHA1_C) 01499 { TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-RSA-PSK-WITH-3DES-EDE-CBC-SHA", 01500 POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01501 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01502 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01503 0 }, 01504 #endif /* POLARSSL_SHA1_C */ 01505 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01506 #endif /* POLARSSL_DES_C */ 01507 01508 #if defined(POLARSSL_ARC4_C) 01509 #if defined(POLARSSL_SHA1_C) 01510 { TLS_RSA_PSK_WITH_RC4_128_SHA, "TLS-RSA-PSK-WITH-RC4-128-SHA", 01511 POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01512 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01513 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01514 0 }, 01515 #endif /* POLARSSL_SHA1_C */ 01516 #endif /* POLARSSL_ARC4_C */ 01517 #endif /* POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED */ 01518 01519 #if defined(POLARSSL_ENABLE_WEAK_CIPHERSUITES) 01520 #if defined(POLARSSL_CIPHER_NULL_CIPHER) 01521 #if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) 01522 #if defined(POLARSSL_MD5_C) 01523 { TLS_RSA_WITH_NULL_MD5, "TLS-RSA-WITH-NULL-MD5", 01524 POLARSSL_CIPHER_NULL, POLARSSL_MD_MD5, POLARSSL_KEY_EXCHANGE_RSA, 01525 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 01526 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01527 POLARSSL_CIPHERSUITE_WEAK }, 01528 #endif 01529 01530 #if defined(POLARSSL_SHA1_C) 01531 { TLS_RSA_WITH_NULL_SHA, "TLS-RSA-WITH-NULL-SHA", 01532 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA, 01533 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 01534 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01535 POLARSSL_CIPHERSUITE_WEAK }, 01536 #endif 01537 01538 #if defined(POLARSSL_SHA256_C) 01539 { TLS_RSA_WITH_NULL_SHA256, "TLS-RSA-WITH-NULL-SHA256", 01540 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA, 01541 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01542 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01543 POLARSSL_CIPHERSUITE_WEAK }, 01544 #endif 01545 #endif /* POLARSSL_KEY_EXCHANGE_RSA_ENABLED */ 01546 01547 #if defined(POLARSSL_KEY_EXCHANGE_PSK_ENABLED) 01548 #if defined(POLARSSL_SHA1_C) 01549 { TLS_PSK_WITH_NULL_SHA, "TLS-PSK-WITH-NULL-SHA", 01550 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_PSK, 01551 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 01552 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01553 POLARSSL_CIPHERSUITE_WEAK }, 01554 #endif /* POLARSSL_SHA1_C */ 01555 01556 #if defined(POLARSSL_SHA256_C) 01557 { TLS_PSK_WITH_NULL_SHA256, "TLS-PSK-WITH-NULL-SHA256", 01558 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK, 01559 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01560 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01561 POLARSSL_CIPHERSUITE_WEAK }, 01562 #endif 01563 01564 #if defined(POLARSSL_SHA512_C) 01565 { TLS_PSK_WITH_NULL_SHA384, "TLS-PSK-WITH-NULL-SHA384", 01566 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_PSK, 01567 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01568 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01569 POLARSSL_CIPHERSUITE_WEAK }, 01570 #endif 01571 #endif /* POLARSSL_KEY_EXCHANGE_PSK_ENABLED */ 01572 01573 #if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) 01574 #if defined(POLARSSL_SHA1_C) 01575 { TLS_DHE_PSK_WITH_NULL_SHA, "TLS-DHE-PSK-WITH-NULL-SHA", 01576 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01577 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 01578 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01579 POLARSSL_CIPHERSUITE_WEAK }, 01580 #endif /* POLARSSL_SHA1_C */ 01581 01582 #if defined(POLARSSL_SHA256_C) 01583 { TLS_DHE_PSK_WITH_NULL_SHA256, "TLS-DHE-PSK-WITH-NULL-SHA256", 01584 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01585 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01586 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01587 POLARSSL_CIPHERSUITE_WEAK }, 01588 #endif 01589 01590 #if defined(POLARSSL_SHA512_C) 01591 { TLS_DHE_PSK_WITH_NULL_SHA384, "TLS-DHE-PSK-WITH-NULL-SHA384", 01592 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_DHE_PSK, 01593 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01594 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01595 POLARSSL_CIPHERSUITE_WEAK }, 01596 #endif 01597 #endif /* POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED */ 01598 01599 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) 01600 #if defined(POLARSSL_SHA1_C) 01601 { TLS_ECDHE_PSK_WITH_NULL_SHA, "TLS-ECDHE-PSK-WITH-NULL-SHA", 01602 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_PSK, 01603 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01604 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01605 POLARSSL_CIPHERSUITE_WEAK }, 01606 #endif /* POLARSSL_SHA1_C */ 01607 01608 #if defined(POLARSSL_SHA256_C) 01609 { TLS_ECDHE_PSK_WITH_NULL_SHA256, "TLS-ECDHE-PSK-WITH-NULL-SHA256", 01610 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_PSK, 01611 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01612 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01613 POLARSSL_CIPHERSUITE_WEAK }, 01614 #endif 01615 01616 #if defined(POLARSSL_SHA512_C) 01617 { TLS_ECDHE_PSK_WITH_NULL_SHA384, "TLS-ECDHE-PSK-WITH-NULL-SHA384", 01618 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_PSK, 01619 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01620 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01621 POLARSSL_CIPHERSUITE_WEAK }, 01622 #endif 01623 #endif /* POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED */ 01624 01625 #if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) 01626 #if defined(POLARSSL_SHA1_C) 01627 { TLS_RSA_PSK_WITH_NULL_SHA, "TLS-RSA-PSK-WITH-NULL-SHA", 01628 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01629 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01630 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01631 POLARSSL_CIPHERSUITE_WEAK }, 01632 #endif /* POLARSSL_SHA1_C */ 01633 01634 #if defined(POLARSSL_SHA256_C) 01635 { TLS_RSA_PSK_WITH_NULL_SHA256, "TLS-RSA-PSK-WITH-NULL-SHA256", 01636 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01637 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01638 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01639 POLARSSL_CIPHERSUITE_WEAK }, 01640 #endif 01641 01642 #if defined(POLARSSL_SHA512_C) 01643 { TLS_RSA_PSK_WITH_NULL_SHA384, "TLS-RSA-PSK-WITH-NULL-SHA384", 01644 POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_RSA_PSK, 01645 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1, 01646 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01647 POLARSSL_CIPHERSUITE_WEAK }, 01648 #endif 01649 #endif /* POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED */ 01650 #endif /* POLARSSL_CIPHER_NULL_CIPHER */ 01651 01652 #if defined(POLARSSL_DES_C) 01653 #if defined(POLARSSL_CIPHER_MODE_CBC) 01654 #if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) 01655 #if defined(POLARSSL_SHA1_C) 01656 { TLS_DHE_RSA_WITH_DES_CBC_SHA, "TLS-DHE-RSA-WITH-DES-CBC-SHA", 01657 POLARSSL_CIPHER_DES_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_RSA, 01658 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 01659 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01660 POLARSSL_CIPHERSUITE_WEAK }, 01661 #endif /* POLARSSL_SHA1_C */ 01662 #endif /* POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED */ 01663 01664 #if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) 01665 #if defined(POLARSSL_SHA1_C) 01666 { TLS_RSA_WITH_DES_CBC_SHA, "TLS-RSA-WITH-DES-CBC-SHA", 01667 POLARSSL_CIPHER_DES_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA, 01668 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0, 01669 SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3, 01670 POLARSSL_CIPHERSUITE_WEAK }, 01671 #endif /* POLARSSL_SHA1_C */ 01672 #endif /* POLARSSL_KEY_EXCHANGE_RSA_ENABLED */ 01673 #endif /* POLARSSL_CIPHER_MODE_CBC */ 01674 #endif /* POLARSSL_DES_C */ 01675 #endif /* POLARSSL_ENABLE_WEAK_CIPHERSUITES */ 01676 01677 { 0, "", 01678 POLARSSL_CIPHER_NONE, POLARSSL_MD_NONE, POLARSSL_KEY_EXCHANGE_NONE, 01679 0, 0, 0, 0, 0 } 01680 }; 01681 01682 #if defined(SSL_CIPHERSUITES) 01683 const int *ssl_list_ciphersuites( void ) 01684 { 01685 return( ciphersuite_preference ); 01686 } 01687 #else 01688 #define MAX_CIPHERSUITES sizeof( ciphersuite_definitions ) / \ 01689 sizeof( ciphersuite_definitions[0] ) 01690 static int supported_ciphersuites[MAX_CIPHERSUITES]; 01691 static int supported_init = 0; 01692 01693 const int *ssl_list_ciphersuites( void ) 01694 { 01695 /* 01696 * On initial call filter out all ciphersuites not supported by current 01697 * build based on presence in the ciphersuite_definitions. 01698 */ 01699 if( supported_init == 0 ) 01700 { 01701 const int *p; 01702 int *q; 01703 01704 for( p = ciphersuite_preference, q = supported_ciphersuites; 01705 *p != 0 && q < supported_ciphersuites + MAX_CIPHERSUITES - 1; 01706 p++ ) 01707 { 01708 #if defined(POLARSSL_REMOVE_ARC4_CIPHERSUITES) 01709 const ssl_ciphersuite_t *cs_info; 01710 if( ( cs_info = ssl_ciphersuite_from_id( *p ) ) != NULL && 01711 cs_info->cipher != POLARSSL_CIPHER_ARC4_128 ) 01712 #else 01713 if( ssl_ciphersuite_from_id( *p ) != NULL ) 01714 #endif 01715 *(q++) = *p; 01716 } 01717 *q = 0; 01718 01719 supported_init = 1; 01720 } 01721 01722 return( supported_ciphersuites ); 01723 }; 01724 #endif /* SSL_CIPHERSUITES */ 01725 01726 const ssl_ciphersuite_t *ssl_ciphersuite_from_string( 01727 const char *ciphersuite_name ) 01728 { 01729 const ssl_ciphersuite_t *cur = ciphersuite_definitions; 01730 01731 if( NULL == ciphersuite_name ) 01732 return( NULL ); 01733 01734 while( cur->id != 0 ) 01735 { 01736 if( 0 == strcasecmp( cur->name, ciphersuite_name ) ) 01737 return( cur ); 01738 01739 cur++; 01740 } 01741 01742 return( NULL ); 01743 } 01744 01745 const ssl_ciphersuite_t *ssl_ciphersuite_from_id( int ciphersuite ) 01746 { 01747 const ssl_ciphersuite_t *cur = ciphersuite_definitions; 01748 01749 while( cur->id != 0 ) 01750 { 01751 if( cur->id == ciphersuite ) 01752 return( cur ); 01753 01754 cur++; 01755 } 01756 01757 return( NULL ); 01758 } 01759 01760 const char *ssl_get_ciphersuite_name( const int ciphersuite_id ) 01761 { 01762 const ssl_ciphersuite_t *cur; 01763 01764 cur = ssl_ciphersuite_from_id( ciphersuite_id ); 01765 01766 if( cur == NULL ) 01767 return( "unknown" ); 01768 01769 return( cur->name ); 01770 } 01771 01772 int ssl_get_ciphersuite_id( const char *ciphersuite_name ) 01773 { 01774 const ssl_ciphersuite_t *cur; 01775 01776 cur = ssl_ciphersuite_from_string( ciphersuite_name ); 01777 01778 if( cur == NULL ) 01779 return( 0 ); 01780 01781 return( cur->id ); 01782 } 01783 01784 #if defined(POLARSSL_PK_C) 01785 pk_type_t ssl_get_ciphersuite_sig_pk_alg( const ssl_ciphersuite_t *info ) 01786 { 01787 switch( info->key_exchange ) 01788 { 01789 case POLARSSL_KEY_EXCHANGE_RSA: 01790 case POLARSSL_KEY_EXCHANGE_DHE_RSA: 01791 case POLARSSL_KEY_EXCHANGE_ECDHE_RSA: 01792 case POLARSSL_KEY_EXCHANGE_RSA_PSK: 01793 return( POLARSSL_PK_RSA ); 01794 01795 case POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA: 01796 return( POLARSSL_PK_ECDSA ); 01797 01798 case POLARSSL_KEY_EXCHANGE_ECDH_RSA: 01799 case POLARSSL_KEY_EXCHANGE_ECDH_ECDSA: 01800 return( POLARSSL_PK_ECKEY ); 01801 01802 default: 01803 return( POLARSSL_PK_NONE ); 01804 } 01805 } 01806 #endif /* POLARSSL_PK_C */ 01807 01808 #if defined(POLARSSL_ECDH_C) || defined(POLARSSL_ECDSA_C) 01809 int ssl_ciphersuite_uses_ec( const ssl_ciphersuite_t *info ) 01810 { 01811 switch( info->key_exchange ) 01812 { 01813 case POLARSSL_KEY_EXCHANGE_ECDHE_RSA: 01814 case POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA: 01815 case POLARSSL_KEY_EXCHANGE_ECDHE_PSK: 01816 case POLARSSL_KEY_EXCHANGE_ECDH_RSA: 01817 case POLARSSL_KEY_EXCHANGE_ECDH_ECDSA: 01818 return( 1 ); 01819 01820 default: 01821 return( 0 ); 01822 } 01823 } 01824 #endif /* POLARSSL_ECDH_C || POLARSSL_ECDSA_C */ 01825 01826 #if defined(POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED) 01827 int ssl_ciphersuite_uses_psk( const ssl_ciphersuite_t *info ) 01828 { 01829 switch( info->key_exchange ) 01830 { 01831 case POLARSSL_KEY_EXCHANGE_PSK: 01832 case POLARSSL_KEY_EXCHANGE_RSA_PSK: 01833 case POLARSSL_KEY_EXCHANGE_DHE_PSK: 01834 case POLARSSL_KEY_EXCHANGE_ECDHE_PSK: 01835 return( 1 ); 01836 01837 default: 01838 return( 0 ); 01839 } 01840 } 01841 #endif /* POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED */ 01842 01843 #endif /* POLARSSL_SSL_TLS_C */ 01844
Generated on Tue Jul 12 2022 13:50:38 by 1.7.2