2013-01-07 18:20:04 +01:00
|
|
|
/**
|
|
|
|
* \file ssl_ciphersuites.c
|
|
|
|
*
|
2015-01-22 17:11:05 +01:00
|
|
|
* \brief SSL ciphersuites for mbed TLS
|
2013-01-07 18:20:04 +01:00
|
|
|
*
|
2015-01-23 10:45:19 +01:00
|
|
|
* Copyright (C) 2006-2014, ARM Limited, All Rights Reserved
|
2013-01-07 18:20:04 +01:00
|
|
|
*
|
2015-03-06 14:17:10 +01:00
|
|
|
* This file is part of mbed TLS (https://tls.mbed.org)
|
2013-01-07 18:20:04 +01:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
2014-04-29 12:39:06 +02:00
|
|
|
#if !defined(POLARSSL_CONFIG_FILE)
|
2013-01-07 18:20:04 +01:00
|
|
|
#include "polarssl/config.h"
|
2014-04-29 12:39:06 +02:00
|
|
|
#else
|
|
|
|
#include POLARSSL_CONFIG_FILE
|
|
|
|
#endif
|
2013-01-07 18:20:04 +01:00
|
|
|
|
|
|
|
#if defined(POLARSSL_SSL_TLS_C)
|
|
|
|
|
|
|
|
#include "polarssl/ssl_ciphersuites.h"
|
|
|
|
#include "polarssl/ssl.h"
|
|
|
|
|
2015-02-06 14:43:58 +01:00
|
|
|
// #include <stdlib.h>
|
|
|
|
#include <string.h>
|
2013-01-07 18:20:04 +01:00
|
|
|
|
2013-10-29 15:22:54 +01:00
|
|
|
#if defined(_MSC_VER) && !defined strcasecmp && !defined(EFIX64) && \
|
|
|
|
!defined(EFI32)
|
2013-10-03 11:53:05 +02:00
|
|
|
#define strcasecmp _stricmp
|
|
|
|
#endif
|
|
|
|
|
2013-03-20 14:39:14 +01:00
|
|
|
/*
|
|
|
|
* Ordered from most preferred to least preferred in terms of security.
|
2013-10-25 17:08:15 +02:00
|
|
|
*
|
2014-04-29 18:23:07 +02:00
|
|
|
* Current rule (except rc4, weak and null which come last):
|
2013-10-25 17:08:15 +02:00
|
|
|
* 1. By key exchange:
|
|
|
|
* Forward-secure non-PSK > forward-secure PSK > other non-PSK > other PSK
|
|
|
|
* 2. By key length and cipher:
|
2014-04-29 18:23:07 +02:00
|
|
|
* AES-256 > Camellia-256 > AES-128 > Camellia-128 > 3DES
|
2014-06-19 16:18:26 +02:00
|
|
|
* 3. By cipher mode when relevant GCM > CCM > CBC > CCM_8
|
2014-05-14 12:26:51 +02:00
|
|
|
* 4. By hash function used when relevant
|
2013-10-25 17:08:15 +02:00
|
|
|
* 5. By key exchange/auth again: EC > non-EC
|
2013-03-20 14:39:14 +01:00
|
|
|
*/
|
|
|
|
static const int ciphersuite_preference[] =
|
2013-01-07 18:20:04 +01:00
|
|
|
{
|
2014-06-30 17:59:55 +02:00
|
|
|
#if defined(SSL_CIPHERSUITES)
|
|
|
|
SSL_CIPHERSUITES,
|
|
|
|
#else
|
2013-04-07 23:07:12 +02:00
|
|
|
/* All AES-256 ephemeral suites */
|
2013-08-17 17:39:04 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
|
2013-03-20 15:31:54 +01:00
|
|
|
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
|
2013-01-07 18:20:04 +01:00
|
|
|
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
|
2014-06-19 16:18:26 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_AES_256_CCM,
|
|
|
|
TLS_DHE_RSA_WITH_AES_256_CCM,
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
|
|
|
|
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
|
|
|
|
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
|
2013-08-17 17:39:04 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
|
2013-03-20 14:39:14 +01:00
|
|
|
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
|
2013-01-07 18:20:04 +01:00
|
|
|
TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
|
2014-05-14 12:26:51 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8,
|
|
|
|
TLS_DHE_RSA_WITH_AES_256_CCM_8,
|
2013-04-07 23:07:12 +02:00
|
|
|
|
|
|
|
/* All CAMELLIA-256 ephemeral suites */
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384,
|
2013-08-17 17:39:04 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
|
2013-04-07 23:07:12 +02:00
|
|
|
TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,
|
2013-03-20 14:39:14 +01:00
|
|
|
TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
|
|
|
|
TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,
|
2013-04-07 23:07:12 +02:00
|
|
|
|
|
|
|
/* All AES-128 ephemeral suites */
|
2013-08-17 17:39:04 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
|
2013-03-20 15:31:54 +01:00
|
|
|
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
|
2013-01-07 18:20:04 +01:00
|
|
|
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,
|
2014-06-19 16:18:26 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_AES_128_CCM,
|
|
|
|
TLS_DHE_RSA_WITH_AES_128_CCM,
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
|
|
|
|
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
|
|
|
|
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
|
2013-08-17 17:39:04 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
|
2013-03-20 14:39:14 +01:00
|
|
|
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
|
2013-01-07 18:20:04 +01:00
|
|
|
TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
|
2014-05-14 12:26:51 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8,
|
|
|
|
TLS_DHE_RSA_WITH_AES_128_CCM_8,
|
2013-04-07 23:07:12 +02:00
|
|
|
|
|
|
|
/* All CAMELLIA-128 ephemeral suites */
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256,
|
2013-08-17 17:39:04 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
|
2013-04-07 23:07:12 +02:00
|
|
|
TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
|
2013-01-07 18:20:04 +01:00
|
|
|
TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,
|
2013-04-07 23:07:12 +02:00
|
|
|
|
2013-10-11 19:07:56 +02:00
|
|
|
/* All remaining >= 128-bit ephemeral suites */
|
2013-08-17 17:39:04 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
|
2013-03-20 14:39:14 +01:00
|
|
|
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
|
2013-01-07 18:20:04 +01:00
|
|
|
TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
|
2013-04-07 23:07:12 +02:00
|
|
|
|
2013-04-16 18:05:29 +02:00
|
|
|
/* The PSK ephemeral suites */
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_DHE_PSK_WITH_AES_256_GCM_SHA384,
|
2014-06-19 16:18:26 +02:00
|
|
|
TLS_DHE_PSK_WITH_AES_256_CCM,
|
2013-10-11 19:07:56 +02:00
|
|
|
TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
|
2013-04-19 22:03:30 +02:00
|
|
|
TLS_DHE_PSK_WITH_AES_256_CBC_SHA384,
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA,
|
2013-04-16 18:05:29 +02:00
|
|
|
TLS_DHE_PSK_WITH_AES_256_CBC_SHA,
|
2013-10-24 19:49:07 +02:00
|
|
|
TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384,
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
|
2013-07-26 15:03:31 +02:00
|
|
|
TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
|
2014-05-14 12:26:51 +02:00
|
|
|
TLS_DHE_PSK_WITH_AES_256_CCM_8,
|
2013-10-25 17:08:15 +02:00
|
|
|
|
|
|
|
TLS_DHE_PSK_WITH_AES_128_GCM_SHA256,
|
2014-06-19 16:18:26 +02:00
|
|
|
TLS_DHE_PSK_WITH_AES_128_CCM,
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
|
2013-04-19 22:03:30 +02:00
|
|
|
TLS_DHE_PSK_WITH_AES_128_CBC_SHA256,
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA,
|
2013-04-16 18:05:29 +02:00
|
|
|
TLS_DHE_PSK_WITH_AES_128_CBC_SHA,
|
2013-10-24 19:49:07 +02:00
|
|
|
TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256,
|
2013-07-26 15:03:31 +02:00
|
|
|
TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
|
2014-05-14 12:26:51 +02:00
|
|
|
TLS_DHE_PSK_WITH_AES_128_CCM_8,
|
2013-10-25 17:08:15 +02:00
|
|
|
|
|
|
|
TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA,
|
2013-04-16 18:05:29 +02:00
|
|
|
TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA,
|
|
|
|
|
2013-04-07 23:07:12 +02:00
|
|
|
/* All AES-256 suites */
|
2013-01-07 18:20:04 +01:00
|
|
|
TLS_RSA_WITH_AES_256_GCM_SHA384,
|
2014-06-19 16:18:26 +02:00
|
|
|
TLS_RSA_WITH_AES_256_CCM,
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_RSA_WITH_AES_256_CBC_SHA256,
|
2013-01-07 18:20:04 +01:00
|
|
|
TLS_RSA_WITH_AES_256_CBC_SHA,
|
2013-12-11 16:17:10 +01:00
|
|
|
TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,
|
|
|
|
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,
|
|
|
|
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,
|
|
|
|
TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,
|
|
|
|
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,
|
|
|
|
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
|
2014-05-14 12:26:51 +02:00
|
|
|
TLS_RSA_WITH_AES_256_CCM_8,
|
2013-04-07 23:07:12 +02:00
|
|
|
|
|
|
|
/* All CAMELLIA-256 suites */
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384,
|
2013-01-07 18:20:04 +01:00
|
|
|
TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256,
|
|
|
|
TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,
|
2013-12-11 16:17:10 +01:00
|
|
|
TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384,
|
|
|
|
TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
|
2013-04-07 23:07:12 +02:00
|
|
|
|
|
|
|
/* All AES-128 suites */
|
2013-01-07 18:20:04 +01:00
|
|
|
TLS_RSA_WITH_AES_128_GCM_SHA256,
|
2014-06-19 16:18:26 +02:00
|
|
|
TLS_RSA_WITH_AES_128_CCM,
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_RSA_WITH_AES_128_CBC_SHA256,
|
2013-01-07 18:20:04 +01:00
|
|
|
TLS_RSA_WITH_AES_128_CBC_SHA,
|
2013-12-11 16:17:10 +01:00
|
|
|
TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,
|
|
|
|
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,
|
|
|
|
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,
|
|
|
|
TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,
|
|
|
|
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,
|
|
|
|
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
|
2014-05-14 12:26:51 +02:00
|
|
|
TLS_RSA_WITH_AES_128_CCM_8,
|
2013-04-07 23:07:12 +02:00
|
|
|
|
|
|
|
/* All CAMELLIA-128 suites */
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256,
|
2013-01-07 18:20:04 +01:00
|
|
|
TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
TLS_RSA_WITH_CAMELLIA_128_CBC_SHA,
|
2013-12-11 16:17:10 +01:00
|
|
|
TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
|
2013-04-07 23:07:12 +02:00
|
|
|
|
2013-10-11 19:07:56 +02:00
|
|
|
/* All remaining >= 128-bit suites */
|
2013-01-07 18:20:04 +01:00
|
|
|
TLS_RSA_WITH_3DES_EDE_CBC_SHA,
|
2013-12-11 16:17:10 +01:00
|
|
|
TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,
|
|
|
|
TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,
|
2013-04-07 23:07:12 +02:00
|
|
|
|
2013-04-16 18:05:29 +02:00
|
|
|
/* The RSA PSK suites */
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_RSA_PSK_WITH_AES_256_GCM_SHA384,
|
2013-04-19 22:03:30 +02:00
|
|
|
TLS_RSA_PSK_WITH_AES_256_CBC_SHA384,
|
2013-04-16 18:05:29 +02:00
|
|
|
TLS_RSA_PSK_WITH_AES_256_CBC_SHA,
|
2013-10-24 19:49:07 +02:00
|
|
|
TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384,
|
2013-07-26 15:03:31 +02:00
|
|
|
TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384,
|
2013-10-25 17:08:15 +02:00
|
|
|
|
|
|
|
TLS_RSA_PSK_WITH_AES_128_GCM_SHA256,
|
2013-04-19 22:03:30 +02:00
|
|
|
TLS_RSA_PSK_WITH_AES_128_CBC_SHA256,
|
2013-04-16 18:05:29 +02:00
|
|
|
TLS_RSA_PSK_WITH_AES_128_CBC_SHA,
|
2013-10-24 19:49:07 +02:00
|
|
|
TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256,
|
2013-07-26 15:03:31 +02:00
|
|
|
TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256,
|
2013-10-25 17:08:15 +02:00
|
|
|
|
2013-04-16 18:05:29 +02:00
|
|
|
TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA,
|
|
|
|
|
|
|
|
/* The PSK suites */
|
2013-10-25 17:08:15 +02:00
|
|
|
TLS_PSK_WITH_AES_256_GCM_SHA384,
|
2014-06-19 16:18:26 +02:00
|
|
|
TLS_PSK_WITH_AES_256_CCM,
|
2013-04-19 22:03:30 +02:00
|
|
|
TLS_PSK_WITH_AES_256_CBC_SHA384,
|
2013-04-16 18:05:29 +02:00
|
|
|
TLS_PSK_WITH_AES_256_CBC_SHA,
|
2013-10-24 19:49:07 +02:00
|
|
|
TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384,
|
2013-07-26 15:03:31 +02:00
|
|
|
TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384,
|
2014-05-14 12:26:51 +02:00
|
|
|
TLS_PSK_WITH_AES_256_CCM_8,
|
2013-10-25 17:08:15 +02:00
|
|
|
|
|
|
|
TLS_PSK_WITH_AES_128_GCM_SHA256,
|
2014-06-19 16:18:26 +02:00
|
|
|
TLS_PSK_WITH_AES_128_CCM,
|
2013-04-19 22:03:30 +02:00
|
|
|
TLS_PSK_WITH_AES_128_CBC_SHA256,
|
2013-04-16 18:05:29 +02:00
|
|
|
TLS_PSK_WITH_AES_128_CBC_SHA,
|
2013-10-24 19:49:07 +02:00
|
|
|
TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256,
|
2013-07-26 15:03:31 +02:00
|
|
|
TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256,
|
2014-05-14 12:26:51 +02:00
|
|
|
TLS_PSK_WITH_AES_128_CCM_8,
|
2013-10-25 17:08:15 +02:00
|
|
|
|
2013-04-16 18:05:29 +02:00
|
|
|
TLS_PSK_WITH_3DES_EDE_CBC_SHA,
|
2014-04-29 18:23:07 +02:00
|
|
|
|
|
|
|
/* RC4 suites */
|
|
|
|
TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
|
|
|
|
TLS_ECDHE_RSA_WITH_RC4_128_SHA,
|
|
|
|
TLS_ECDHE_PSK_WITH_RC4_128_SHA,
|
|
|
|
TLS_DHE_PSK_WITH_RC4_128_SHA,
|
|
|
|
TLS_RSA_WITH_RC4_128_SHA,
|
|
|
|
TLS_RSA_WITH_RC4_128_MD5,
|
|
|
|
TLS_ECDH_RSA_WITH_RC4_128_SHA,
|
|
|
|
TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
|
|
|
|
TLS_RSA_PSK_WITH_RC4_128_SHA,
|
2013-04-16 18:05:29 +02:00
|
|
|
TLS_PSK_WITH_RC4_128_SHA,
|
|
|
|
|
2013-10-11 19:07:56 +02:00
|
|
|
/* Weak suites */
|
2013-01-07 18:20:04 +01:00
|
|
|
TLS_DHE_RSA_WITH_DES_CBC_SHA,
|
|
|
|
TLS_RSA_WITH_DES_CBC_SHA,
|
2013-10-11 19:07:56 +02:00
|
|
|
|
|
|
|
/* NULL suites */
|
2013-08-17 17:39:04 +02:00
|
|
|
TLS_ECDHE_ECDSA_WITH_NULL_SHA,
|
2013-03-20 14:39:14 +01:00
|
|
|
TLS_ECDHE_RSA_WITH_NULL_SHA,
|
2013-10-11 19:07:56 +02:00
|
|
|
TLS_ECDHE_PSK_WITH_NULL_SHA384,
|
|
|
|
TLS_ECDHE_PSK_WITH_NULL_SHA256,
|
|
|
|
TLS_ECDHE_PSK_WITH_NULL_SHA,
|
2013-04-19 22:03:30 +02:00
|
|
|
TLS_DHE_PSK_WITH_NULL_SHA384,
|
|
|
|
TLS_DHE_PSK_WITH_NULL_SHA256,
|
2013-04-19 19:48:45 +02:00
|
|
|
TLS_DHE_PSK_WITH_NULL_SHA,
|
2013-10-25 17:08:15 +02:00
|
|
|
|
2013-10-11 19:07:56 +02:00
|
|
|
TLS_RSA_WITH_NULL_SHA256,
|
|
|
|
TLS_RSA_WITH_NULL_SHA,
|
|
|
|
TLS_RSA_WITH_NULL_MD5,
|
2013-12-11 16:17:10 +01:00
|
|
|
TLS_ECDH_RSA_WITH_NULL_SHA,
|
|
|
|
TLS_ECDH_ECDSA_WITH_NULL_SHA,
|
2013-04-19 22:03:30 +02:00
|
|
|
TLS_RSA_PSK_WITH_NULL_SHA384,
|
|
|
|
TLS_RSA_PSK_WITH_NULL_SHA256,
|
2013-04-19 19:48:45 +02:00
|
|
|
TLS_RSA_PSK_WITH_NULL_SHA,
|
2013-10-11 19:07:56 +02:00
|
|
|
TLS_PSK_WITH_NULL_SHA384,
|
|
|
|
TLS_PSK_WITH_NULL_SHA256,
|
|
|
|
TLS_PSK_WITH_NULL_SHA,
|
2013-04-07 23:07:12 +02:00
|
|
|
|
2014-10-20 13:59:19 +02:00
|
|
|
#endif /* SSL_CIPHERSUITES */
|
2013-01-07 18:20:04 +01:00
|
|
|
0
|
|
|
|
};
|
|
|
|
|
|
|
|
static const ssl_ciphersuite_t ciphersuite_definitions[] =
|
|
|
|
{
|
2013-08-17 17:39:04 +02:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
|
|
|
|
#if defined(POLARSSL_AES_C)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-08-17 17:39:04 +02:00
|
|
|
{ TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-08-17 17:39:04 +02:00
|
|
|
{ TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-08-17 17:39:04 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-08-17 17:39:04 +02:00
|
|
|
{ TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-08-17 17:39:04 +02:00
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
{ TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, "TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-08-17 17:39:04 +02:00
|
|
|
#endif /* POLARSSL_GCM_C */
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-08-17 17:39:04 +02:00
|
|
|
{ TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-08-17 17:39:04 +02:00
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
{ TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, "TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-08-17 17:39:04 +02:00
|
|
|
#endif /* POLARSSL_GCM_C */
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
2014-05-14 12:26:51 +02:00
|
|
|
#if defined(POLARSSL_CCM_C)
|
|
|
|
{ TLS_ECDHE_ECDSA_WITH_AES_256_CCM, "TLS-ECDHE-ECDSA-WITH-AES-256-CCM",
|
|
|
|
POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
{ TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8, "TLS-ECDHE-ECDSA-WITH-AES-256-CCM-8",
|
|
|
|
POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_SHORT_TAG },
|
|
|
|
{ TLS_ECDHE_ECDSA_WITH_AES_128_CCM, "TLS-ECDHE-ECDSA-WITH-AES-128-CCM",
|
|
|
|
POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
{ TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, "TLS-ECDHE-ECDSA-WITH-AES-128-CCM-8",
|
|
|
|
POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_SHORT_TAG },
|
|
|
|
#endif /* POLARSSL_CCM_C */
|
2013-08-17 17:39:04 +02:00
|
|
|
#endif /* POLARSSL_AES_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_CAMELLIA_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-08-17 17:39:04 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
2013-11-26 13:27:45 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-08-17 17:39:04 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-08-17 17:39:04 +02:00
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
2013-11-26 13:27:45 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-08-17 17:39:04 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-08-17 17:39:04 +02:00
|
|
|
#endif /* POLARSSL_SHA512_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-10-24 19:49:07 +02:00
|
|
|
|
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
2013-08-17 17:39:04 +02:00
|
|
|
#endif /* POLARSSL_CAMELLIA_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_DES_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-08-17 17:39:04 +02:00
|
|
|
{ TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-3DES-EDE-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-08-17 17:39:04 +02:00
|
|
|
#endif /* POLARSSL_DES_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_ARC4_C)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-08-17 17:39:04 +02:00
|
|
|
{ TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, "TLS-ECDHE-ECDSA-WITH-RC4-128-SHA",
|
|
|
|
POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-08-17 17:39:04 +02:00
|
|
|
#endif /* POLARSSL_ARC4_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_CIPHER_NULL_CIPHER)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-08-17 17:39:04 +02:00
|
|
|
{ TLS_ECDHE_ECDSA_WITH_NULL_SHA, "TLS-ECDHE-ECDSA-WITH-NULL-SHA",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-08-17 17:39:04 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_NULL_CIPHER */
|
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */
|
|
|
|
|
2013-04-19 09:08:57 +02:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED)
|
2013-03-20 14:39:14 +01:00
|
|
|
#if defined(POLARSSL_AES_C)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-03-20 14:39:14 +01:00
|
|
|
{ TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, "TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-03-20 14:39:14 +01:00
|
|
|
{ TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, "TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-03-20 15:31:54 +01:00
|
|
|
{ TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-03-20 15:31:54 +01:00
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
{ TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, "TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-03-20 15:31:54 +01:00
|
|
|
#endif /* POLARSSL_GCM_C */
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-03-20 15:31:54 +01:00
|
|
|
{ TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-03-20 15:31:54 +01:00
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
{ TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, "TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-03-20 15:31:54 +01:00
|
|
|
#endif /* POLARSSL_GCM_C */
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA512_C */
|
2013-03-20 15:31:54 +01:00
|
|
|
#endif /* POLARSSL_AES_C */
|
2013-04-07 23:07:12 +02:00
|
|
|
|
|
|
|
#if defined(POLARSSL_CAMELLIA_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-04-07 23:07:12 +02:00
|
|
|
{ TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-RSA-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_RSA,
|
2013-11-26 13:27:45 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-04-07 23:07:12 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
2013-04-07 23:07:12 +02:00
|
|
|
{ TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-RSA-WITH-CAMELLIA-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_RSA,
|
2013-11-26 13:27:45 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-04-07 23:07:12 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA512_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-10-24 19:49:07 +02:00
|
|
|
|
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDHE-RSA-WITH-CAMELLIA-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDHE-RSA-WITH-CAMELLIA-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
2013-04-07 23:07:12 +02:00
|
|
|
#endif /* POLARSSL_CAMELLIA_C */
|
|
|
|
|
2013-03-20 14:39:14 +01:00
|
|
|
#if defined(POLARSSL_DES_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-03-20 14:39:14 +01:00
|
|
|
{ TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-RSA-WITH-3DES-EDE-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-03-20 14:39:14 +01:00
|
|
|
#endif /* POLARSSL_DES_C */
|
2013-04-07 23:07:12 +02:00
|
|
|
|
2013-03-20 14:39:14 +01:00
|
|
|
#if defined(POLARSSL_ARC4_C)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-03-20 14:39:14 +01:00
|
|
|
{ TLS_ECDHE_RSA_WITH_RC4_128_SHA, "TLS-ECDHE-RSA-WITH-RC4-128-SHA",
|
|
|
|
POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-04-18 22:46:23 +02:00
|
|
|
#endif /* POLARSSL_ARC4_C */
|
2013-04-07 23:07:12 +02:00
|
|
|
|
2013-03-20 14:39:14 +01:00
|
|
|
#if defined(POLARSSL_CIPHER_NULL_CIPHER)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-03-20 14:39:14 +01:00
|
|
|
{ TLS_ECDHE_RSA_WITH_NULL_SHA, "TLS-ECDHE-RSA-WITH-NULL-SHA",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
2013-09-17 12:06:25 +02:00
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-04-18 22:46:23 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_NULL_CIPHER */
|
2013-04-19 09:08:57 +02:00
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED */
|
2013-03-20 14:39:14 +01:00
|
|
|
|
2013-04-19 09:08:57 +02:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED)
|
2013-01-07 18:20:04 +01:00
|
|
|
#if defined(POLARSSL_AES_C)
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA512_C) && defined(POLARSSL_GCM_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, "TLS-DHE-RSA-WITH-AES-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA512_C && POLARSSL_GCM_C */
|
2013-01-07 18:20:04 +01:00
|
|
|
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
{ TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, "TLS-DHE-RSA-WITH-AES-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
|
|
|
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, "TLS-DHE-RSA-WITH-AES-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
|
|
|
|
{ TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, "TLS-DHE-RSA-WITH-AES-256-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA256_C */
|
2013-01-07 18:20:04 +01:00
|
|
|
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_DHE_RSA_WITH_AES_128_CBC_SHA, "TLS-DHE-RSA-WITH-AES-128-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
|
|
|
|
{ TLS_DHE_RSA_WITH_AES_256_CBC_SHA, "TLS-DHE-RSA-WITH-AES-256-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2014-05-14 12:26:51 +02:00
|
|
|
#if defined(POLARSSL_CCM_C)
|
|
|
|
{ TLS_DHE_RSA_WITH_AES_256_CCM, "TLS-DHE-RSA-WITH-AES-256-CCM",
|
|
|
|
POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
{ TLS_DHE_RSA_WITH_AES_256_CCM_8, "TLS-DHE-RSA-WITH-AES-256-CCM-8",
|
|
|
|
POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_SHORT_TAG },
|
|
|
|
{ TLS_DHE_RSA_WITH_AES_128_CCM, "TLS-DHE-RSA-WITH-AES-128-CCM",
|
|
|
|
POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
{ TLS_DHE_RSA_WITH_AES_128_CCM_8, "TLS-DHE-RSA-WITH-AES-128-CCM-8",
|
|
|
|
POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_SHORT_TAG },
|
|
|
|
#endif /* POLARSSL_CCM_C */
|
2013-01-07 18:20:04 +01:00
|
|
|
#endif /* POLARSSL_AES_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_CAMELLIA_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
|
|
|
|
{ TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA256_C */
|
2013-01-07 18:20:04 +01:00
|
|
|
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
|
|
|
|
{ TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-10-24 19:49:07 +02:00
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-DHE-RSA-WITH-CAMELLIA-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
2013-01-07 18:20:04 +01:00
|
|
|
#endif /* POLARSSL_CAMELLIA_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_DES_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-DHE-RSA-WITH-3DES-EDE-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-01-07 18:20:04 +01:00
|
|
|
#endif /* POLARSSL_DES_C */
|
2013-04-19 09:08:57 +02:00
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED */
|
2013-01-07 18:20:04 +01:00
|
|
|
|
2013-04-19 09:08:57 +02:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED)
|
2013-01-07 18:20:04 +01:00
|
|
|
#if defined(POLARSSL_AES_C)
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA512_C) && defined(POLARSSL_GCM_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_RSA_WITH_AES_256_GCM_SHA384, "TLS-RSA-WITH-AES-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA512_C && POLARSSL_GCM_C */
|
2013-01-07 18:20:04 +01:00
|
|
|
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
{ TLS_RSA_WITH_AES_128_GCM_SHA256, "TLS-RSA-WITH-AES-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
|
|
|
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_RSA_WITH_AES_128_CBC_SHA256, "TLS-RSA-WITH-AES-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
|
|
|
|
{ TLS_RSA_WITH_AES_256_CBC_SHA256, "TLS-RSA-WITH-AES-256-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA256_C */
|
2013-01-07 18:20:04 +01:00
|
|
|
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_RSA_WITH_AES_128_CBC_SHA, "TLS-RSA-WITH-AES-128-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
|
|
|
|
{ TLS_RSA_WITH_AES_256_CBC_SHA, "TLS-RSA-WITH-AES-256-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2014-05-14 12:26:51 +02:00
|
|
|
#if defined(POLARSSL_CCM_C)
|
|
|
|
{ TLS_RSA_WITH_AES_256_CCM, "TLS-RSA-WITH-AES-256-CCM",
|
|
|
|
POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
{ TLS_RSA_WITH_AES_256_CCM_8, "TLS-RSA-WITH-AES-256-CCM-8",
|
|
|
|
POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_SHORT_TAG },
|
|
|
|
{ TLS_RSA_WITH_AES_128_CCM, "TLS-RSA-WITH-AES-128-CCM",
|
|
|
|
POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
{ TLS_RSA_WITH_AES_128_CCM_8, "TLS-RSA-WITH-AES-128-CCM-8",
|
|
|
|
POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_SHORT_TAG },
|
|
|
|
#endif /* POLARSSL_CCM_C */
|
2013-01-07 18:20:04 +01:00
|
|
|
#endif /* POLARSSL_AES_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_CAMELLIA_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-RSA-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
|
|
|
|
{ TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256, "TLS-RSA-WITH-CAMELLIA-256-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA256_C */
|
2013-01-07 18:20:04 +01:00
|
|
|
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, "TLS-RSA-WITH-CAMELLIA-128-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
|
|
|
|
{ TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, "TLS-RSA-WITH-CAMELLIA-256-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-10-24 19:49:07 +02:00
|
|
|
|
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-RSA-WITH-CAMELLIA-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA1_C)
|
|
|
|
{ TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-RSA-WITH-CAMELLIA-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA1_C */
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
2013-01-07 18:20:04 +01:00
|
|
|
#endif /* POLARSSL_CAMELLIA_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_DES_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-RSA-WITH-3DES-EDE-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-01-07 18:20:04 +01:00
|
|
|
#endif /* POLARSSL_DES_C */
|
2013-04-19 09:08:57 +02:00
|
|
|
|
|
|
|
#if defined(POLARSSL_ARC4_C)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_MD5_C)
|
2013-04-19 09:08:57 +02:00
|
|
|
{ TLS_RSA_WITH_RC4_128_MD5, "TLS-RSA-WITH-RC4-128-MD5",
|
|
|
|
POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_MD5, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif
|
2013-04-19 09:08:57 +02:00
|
|
|
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-04-19 09:08:57 +02:00
|
|
|
{ TLS_RSA_WITH_RC4_128_SHA, "TLS-RSA-WITH-RC4-128-SHA",
|
|
|
|
POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif
|
2013-04-19 09:08:57 +02:00
|
|
|
#endif /* POLARSSL_ARC4_C */
|
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_RSA_ENABLED */
|
2013-01-07 18:20:04 +01:00
|
|
|
|
2013-12-11 16:17:10 +01:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED)
|
|
|
|
#if defined(POLARSSL_AES_C)
|
|
|
|
#if defined(POLARSSL_SHA1_C)
|
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
|
|
|
{ TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, "TLS-ECDH-RSA-WITH-AES-128-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
{ TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, "TLS-ECDH-RSA-WITH-AES-256-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
|
|
|
#endif /* POLARSSL_SHA1_C */
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
|
|
|
{ TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, "TLS-ECDH-RSA-WITH-AES-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
{ TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, "TLS-ECDH-RSA-WITH-AES-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
|
|
|
{ TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, "TLS-ECDH-RSA-WITH-AES-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
{ TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, "TLS-ECDH-RSA-WITH-AES-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
|
|
|
#endif /* POLARSSL_AES_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_CAMELLIA_C)
|
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDH-RSA-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDH-RSA-WITH-CAMELLIA-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDH-RSA-WITH-CAMELLIA-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDH-RSA-WITH-CAMELLIA-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
|
|
|
#endif /* POLARSSL_CAMELLIA_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_DES_C)
|
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
|
|
|
#if defined(POLARSSL_SHA1_C)
|
|
|
|
{ TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDH-RSA-WITH-3DES-EDE-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA1_C */
|
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
|
|
|
#endif /* POLARSSL_DES_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_ARC4_C)
|
|
|
|
#if defined(POLARSSL_SHA1_C)
|
|
|
|
{ TLS_ECDH_RSA_WITH_RC4_128_SHA, "TLS-ECDH-RSA-WITH-RC4-128-SHA",
|
|
|
|
POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA1_C */
|
|
|
|
#endif /* POLARSSL_ARC4_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_CIPHER_NULL_CIPHER)
|
|
|
|
#if defined(POLARSSL_SHA1_C)
|
|
|
|
{ TLS_ECDH_RSA_WITH_NULL_SHA, "TLS-ECDH-RSA-WITH-NULL-SHA",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
|
|
|
#endif /* POLARSSL_SHA1_C */
|
|
|
|
#endif /* POLARSSL_CIPHER_NULL_CIPHER */
|
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
|
|
|
|
#if defined(POLARSSL_AES_C)
|
|
|
|
#if defined(POLARSSL_SHA1_C)
|
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
|
|
|
{ TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, "TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
{ TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, "TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
|
|
|
#endif /* POLARSSL_SHA1_C */
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
|
|
|
{ TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, "TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
{ TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, "TLS-ECDH-ECDSA-WITH-AES-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
|
|
|
{ TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, "TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
{ TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, "TLS-ECDH-ECDSA-WITH-AES-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
|
|
|
#endif /* POLARSSL_AES_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_CAMELLIA_C)
|
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDH-ECDSA-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDH-ECDSA-WITH-CAMELLIA-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-ECDH-ECDSA-WITH-CAMELLIA-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-ECDH-ECDSA-WITH-CAMELLIA-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
|
|
|
#endif /* POLARSSL_CAMELLIA_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_DES_C)
|
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
|
|
|
#if defined(POLARSSL_SHA1_C)
|
|
|
|
{ TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, "TLS-ECDH-ECDSA-WITH-3DES-EDE-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA1_C */
|
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
|
|
|
#endif /* POLARSSL_DES_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_ARC4_C)
|
|
|
|
#if defined(POLARSSL_SHA1_C)
|
|
|
|
{ TLS_ECDH_ECDSA_WITH_RC4_128_SHA, "TLS-ECDH-ECDSA-WITH-RC4-128-SHA",
|
|
|
|
POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA1_C */
|
|
|
|
#endif /* POLARSSL_ARC4_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_CIPHER_NULL_CIPHER)
|
|
|
|
#if defined(POLARSSL_SHA1_C)
|
|
|
|
{ TLS_ECDH_ECDSA_WITH_NULL_SHA, "TLS-ECDH-ECDSA-WITH-NULL-SHA",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDH_ECDSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
|
|
|
#endif /* POLARSSL_SHA1_C */
|
|
|
|
#endif /* POLARSSL_CIPHER_NULL_CIPHER */
|
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */
|
|
|
|
|
2013-04-16 18:05:29 +02:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_PSK_ENABLED)
|
|
|
|
#if defined(POLARSSL_AES_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
#if defined(POLARSSL_GCM_C)
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
{ TLS_PSK_WITH_AES_128_GCM_SHA256, "TLS-PSK-WITH-AES-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA256_C */
|
2013-04-19 22:03:30 +02:00
|
|
|
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA512_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
{ TLS_PSK_WITH_AES_256_GCM_SHA384, "TLS-PSK-WITH-AES-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA512_C */
|
2013-04-19 22:03:30 +02:00
|
|
|
#endif /* POLARSSL_GCM_C */
|
|
|
|
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
{ TLS_PSK_WITH_AES_128_CBC_SHA256, "TLS-PSK-WITH-AES-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-04-19 22:03:30 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA256_C */
|
2013-04-19 22:03:30 +02:00
|
|
|
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA512_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
{ TLS_PSK_WITH_AES_256_CBC_SHA384, "TLS-PSK-WITH-AES-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-04-19 22:03:30 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA512_C */
|
2013-04-19 22:03:30 +02:00
|
|
|
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-04-16 18:05:29 +02:00
|
|
|
{ TLS_PSK_WITH_AES_128_CBC_SHA, "TLS-PSK-WITH-AES-128-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
|
|
|
|
{ TLS_PSK_WITH_AES_256_CBC_SHA, "TLS-PSK-WITH-AES-256-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2014-05-14 12:26:51 +02:00
|
|
|
#if defined(POLARSSL_CCM_C)
|
2014-06-24 15:48:01 +02:00
|
|
|
{ TLS_PSK_WITH_AES_256_CCM, "TLS-PSK-WITH-AES-256-CCM",
|
|
|
|
POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK,
|
2014-05-14 12:26:51 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2014-06-24 15:48:01 +02:00
|
|
|
{ TLS_PSK_WITH_AES_256_CCM_8, "TLS-PSK-WITH-AES-256-CCM-8",
|
|
|
|
POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK,
|
2014-05-14 12:26:51 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_SHORT_TAG },
|
2014-06-24 15:48:01 +02:00
|
|
|
{ TLS_PSK_WITH_AES_128_CCM, "TLS-PSK-WITH-AES-128-CCM",
|
|
|
|
POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK,
|
2014-05-14 12:26:51 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2014-06-24 15:48:01 +02:00
|
|
|
{ TLS_PSK_WITH_AES_128_CCM_8, "TLS-PSK-WITH-AES-128-CCM-8",
|
|
|
|
POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK,
|
2014-05-14 12:26:51 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_SHORT_TAG },
|
|
|
|
#endif /* POLARSSL_CCM_C */
|
2013-04-16 18:05:29 +02:00
|
|
|
#endif /* POLARSSL_AES_C */
|
|
|
|
|
2013-07-26 15:03:31 +02:00
|
|
|
#if defined(POLARSSL_CAMELLIA_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-07-26 15:03:31 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-PSK-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-07-26 15:03:31 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-PSK-WITH-CAMELLIA-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-07-26 15:03:31 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-10-24 19:49:07 +02:00
|
|
|
|
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-PSK-WITH-CAMELLIA-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-PSK-WITH-CAMELLIA-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
2013-07-26 15:03:31 +02:00
|
|
|
#endif /* POLARSSL_CAMELLIA_C */
|
|
|
|
|
2013-04-16 18:05:29 +02:00
|
|
|
#if defined(POLARSSL_DES_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-04-16 18:05:29 +02:00
|
|
|
{ TLS_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-PSK-WITH-3DES-EDE-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-04-16 18:05:29 +02:00
|
|
|
#endif /* POLARSSL_DES_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_ARC4_C)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-04-16 18:05:29 +02:00
|
|
|
{ TLS_PSK_WITH_RC4_128_SHA, "TLS-PSK-WITH-RC4-128-SHA",
|
|
|
|
POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-04-16 18:05:29 +02:00
|
|
|
#endif /* POLARSSL_ARC4_C */
|
2013-04-19 09:08:57 +02:00
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_PSK_ENABLED */
|
2013-04-16 18:05:29 +02:00
|
|
|
|
2013-04-19 09:08:57 +02:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED)
|
2013-04-16 18:05:29 +02:00
|
|
|
#if defined(POLARSSL_AES_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
#if defined(POLARSSL_GCM_C)
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
{ TLS_DHE_PSK_WITH_AES_128_GCM_SHA256, "TLS-DHE-PSK-WITH-AES-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA256_C */
|
2013-04-19 22:03:30 +02:00
|
|
|
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA512_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
{ TLS_DHE_PSK_WITH_AES_256_GCM_SHA384, "TLS-DHE-PSK-WITH-AES-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA512_C */
|
2013-04-19 22:03:30 +02:00
|
|
|
#endif /* POLARSSL_GCM_C */
|
|
|
|
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
{ TLS_DHE_PSK_WITH_AES_128_CBC_SHA256, "TLS-DHE-PSK-WITH-AES-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-04-19 22:03:30 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA256_C */
|
2013-04-19 22:03:30 +02:00
|
|
|
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA512_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
{ TLS_DHE_PSK_WITH_AES_256_CBC_SHA384, "TLS-DHE-PSK-WITH-AES-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-04-19 22:03:30 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA512_C */
|
2013-04-19 22:03:30 +02:00
|
|
|
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-04-16 18:05:29 +02:00
|
|
|
{ TLS_DHE_PSK_WITH_AES_128_CBC_SHA, "TLS-DHE-PSK-WITH-AES-128-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
|
|
|
|
{ TLS_DHE_PSK_WITH_AES_256_CBC_SHA, "TLS-DHE-PSK-WITH-AES-256-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2014-05-14 12:26:51 +02:00
|
|
|
#if defined(POLARSSL_CCM_C)
|
2014-06-24 15:48:01 +02:00
|
|
|
{ TLS_DHE_PSK_WITH_AES_256_CCM, "TLS-DHE-PSK-WITH-AES-256-CCM",
|
|
|
|
POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
2014-05-14 12:26:51 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2014-06-24 15:48:01 +02:00
|
|
|
{ TLS_DHE_PSK_WITH_AES_256_CCM_8, "TLS-DHE-PSK-WITH-AES-256-CCM-8",
|
|
|
|
POLARSSL_CIPHER_AES_256_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
2014-05-14 12:26:51 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_SHORT_TAG },
|
2014-06-24 15:48:01 +02:00
|
|
|
{ TLS_DHE_PSK_WITH_AES_128_CCM, "TLS-DHE-PSK-WITH-AES-128-CCM",
|
|
|
|
POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
2014-05-14 12:26:51 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2014-06-24 15:48:01 +02:00
|
|
|
{ TLS_DHE_PSK_WITH_AES_128_CCM_8, "TLS-DHE-PSK-WITH-AES-128-CCM-8",
|
|
|
|
POLARSSL_CIPHER_AES_128_CCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
2014-05-14 12:26:51 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_SHORT_TAG },
|
|
|
|
#endif /* POLARSSL_CCM_C */
|
2013-04-16 18:05:29 +02:00
|
|
|
#endif /* POLARSSL_AES_C */
|
|
|
|
|
2013-07-26 15:03:31 +02:00
|
|
|
#if defined(POLARSSL_CAMELLIA_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-07-26 15:03:31 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-DHE-PSK-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-07-26 15:03:31 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-DHE-PSK-WITH-CAMELLIA-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-07-26 15:03:31 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-10-24 19:49:07 +02:00
|
|
|
|
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-DHE-PSK-WITH-CAMELLIA-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-DHE-PSK-WITH-CAMELLIA-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
2013-07-26 15:03:31 +02:00
|
|
|
#endif /* POLARSSL_CAMELLIA_C */
|
|
|
|
|
2013-04-16 18:05:29 +02:00
|
|
|
#if defined(POLARSSL_DES_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-04-16 18:05:29 +02:00
|
|
|
{ TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-DHE-PSK-WITH-3DES-EDE-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-04-16 18:05:29 +02:00
|
|
|
#endif /* POLARSSL_DES_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_ARC4_C)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-04-16 18:05:29 +02:00
|
|
|
{ TLS_DHE_PSK_WITH_RC4_128_SHA, "TLS-DHE-PSK-WITH-RC4-128-SHA",
|
|
|
|
POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-04-16 18:05:29 +02:00
|
|
|
#endif /* POLARSSL_ARC4_C */
|
2013-04-19 09:08:57 +02:00
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED */
|
2013-04-16 18:05:29 +02:00
|
|
|
|
2013-10-11 19:07:56 +02:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
|
|
|
|
#if defined(POLARSSL_AES_C)
|
|
|
|
|
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_PSK,
|
2013-11-26 13:27:45 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-11 19:07:56 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_PSK,
|
2013-11-26 13:27:45 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-11 19:07:56 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
|
|
|
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-10-11 19:07:56 +02:00
|
|
|
{ TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA, "TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_PSK,
|
2013-11-26 14:31:44 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-11 19:07:56 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
|
|
|
|
{ TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA, "TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_PSK,
|
2013-11-26 14:31:44 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-11 19:07:56 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-10-11 19:07:56 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
|
|
|
#endif /* POLARSSL_AES_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_CAMELLIA_C)
|
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-ECDHE-PSK-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_PSK,
|
2013-11-26 13:27:45 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-11 19:07:56 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-ECDHE-PSK-WITH-CAMELLIA-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_PSK,
|
2013-11-26 13:27:45 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-11 19:07:56 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
|
|
|
#endif /* POLARSSL_CAMELLIA_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_DES_C)
|
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-10-11 19:07:56 +02:00
|
|
|
{ TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-ECDHE-PSK-WITH-3DES-EDE-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_PSK,
|
2013-11-26 14:31:44 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-11 19:07:56 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-10-11 19:07:56 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
|
|
|
#endif /* POLARSSL_DES_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_ARC4_C)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-10-11 19:07:56 +02:00
|
|
|
{ TLS_ECDHE_PSK_WITH_RC4_128_SHA, "TLS-ECDHE-PSK-WITH-RC4-128-SHA",
|
|
|
|
POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_PSK,
|
2013-11-26 14:31:44 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-11 19:07:56 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-10-11 19:07:56 +02:00
|
|
|
#endif /* POLARSSL_ARC4_C */
|
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
|
|
|
|
|
2013-04-19 09:08:57 +02:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED)
|
2013-04-16 18:05:29 +02:00
|
|
|
#if defined(POLARSSL_AES_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
#if defined(POLARSSL_GCM_C)
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
{ TLS_RSA_PSK_WITH_AES_128_GCM_SHA256, "TLS-RSA-PSK-WITH-AES-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA256_C */
|
2013-04-19 22:03:30 +02:00
|
|
|
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA512_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
{ TLS_RSA_PSK_WITH_AES_256_GCM_SHA384, "TLS-RSA-PSK-WITH-AES-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA512_C */
|
2013-04-19 22:03:30 +02:00
|
|
|
#endif /* POLARSSL_GCM_C */
|
|
|
|
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
{ TLS_RSA_PSK_WITH_AES_128_CBC_SHA256, "TLS-RSA-PSK-WITH-AES-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-04-19 22:03:30 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA256_C */
|
2013-04-19 22:03:30 +02:00
|
|
|
|
2013-06-30 14:34:05 +02:00
|
|
|
#if defined(POLARSSL_SHA512_C)
|
2013-04-19 22:03:30 +02:00
|
|
|
{ TLS_RSA_PSK_WITH_AES_256_CBC_SHA384, "TLS-RSA-PSK-WITH-AES-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-04-19 22:03:30 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-06-30 14:34:05 +02:00
|
|
|
#endif /* POLARSSL_SHA512_C */
|
2013-04-19 22:03:30 +02:00
|
|
|
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-04-16 18:05:29 +02:00
|
|
|
{ TLS_RSA_PSK_WITH_AES_128_CBC_SHA, "TLS-RSA-PSK-WITH-AES-128-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_128_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
2014-07-13 16:16:44 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-04-16 18:05:29 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
|
|
|
|
{ TLS_RSA_PSK_WITH_AES_256_CBC_SHA, "TLS-RSA-PSK-WITH-AES-256-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_AES_256_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
2014-07-13 16:16:44 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-04-16 18:05:29 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-04-16 18:05:29 +02:00
|
|
|
#endif /* POLARSSL_AES_C */
|
|
|
|
|
2013-07-26 15:03:31 +02:00
|
|
|
#if defined(POLARSSL_CAMELLIA_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-07-26 15:03:31 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-RSA-PSK-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_CBC, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-07-26 15:03:31 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-RSA-PSK-WITH-CAMELLIA-256-CBC-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_CBC, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-07-26 15:03:31 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-10-24 19:49:07 +02:00
|
|
|
|
|
|
|
#if defined(POLARSSL_GCM_C)
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-RSA-PSK-WITH-CAMELLIA-128-GCM-SHA256",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_128_GCM, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA256_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-RSA-PSK-WITH-CAMELLIA-256-GCM-SHA384",
|
|
|
|
POLARSSL_CIPHER_CAMELLIA_256_GCM, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
|
|
|
#endif /* POLARSSL_SHA512_C */
|
|
|
|
#endif /* POLARSSL_GCM_C */
|
2013-07-26 15:03:31 +02:00
|
|
|
#endif /* POLARSSL_CAMELLIA_C */
|
|
|
|
|
2013-04-16 18:05:29 +02:00
|
|
|
#if defined(POLARSSL_DES_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-04-16 18:05:29 +02:00
|
|
|
{ TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, "TLS-RSA-PSK-WITH-3DES-EDE-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_DES_EDE3_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
2014-07-13 16:16:44 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-04-16 18:05:29 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-04-16 18:05:29 +02:00
|
|
|
#endif /* POLARSSL_DES_C */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_ARC4_C)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-04-16 18:05:29 +02:00
|
|
|
{ TLS_RSA_PSK_WITH_RC4_128_SHA, "TLS-RSA-PSK-WITH-RC4-128-SHA",
|
|
|
|
POLARSSL_CIPHER_ARC4_128, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
2014-07-13 16:16:44 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-04-16 18:05:29 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
0 },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-04-16 18:05:29 +02:00
|
|
|
#endif /* POLARSSL_ARC4_C */
|
2013-04-19 09:08:57 +02:00
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED */
|
2013-04-16 18:05:29 +02:00
|
|
|
|
2013-01-07 18:20:04 +01:00
|
|
|
#if defined(POLARSSL_ENABLE_WEAK_CIPHERSUITES)
|
|
|
|
#if defined(POLARSSL_CIPHER_NULL_CIPHER)
|
2013-04-19 19:48:45 +02:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_MD5_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_RSA_WITH_NULL_MD5, "TLS-RSA-WITH-NULL-MD5",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_MD5, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif
|
2013-01-07 18:20:04 +01:00
|
|
|
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_RSA_WITH_NULL_SHA, "TLS-RSA-WITH-NULL-SHA",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif
|
2013-01-07 18:20:04 +01:00
|
|
|
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_RSA_WITH_NULL_SHA256, "TLS-RSA-WITH-NULL-SHA256",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-01-07 18:20:04 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif
|
2013-04-19 09:08:57 +02:00
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_RSA_ENABLED */
|
2013-01-07 18:20:04 +01:00
|
|
|
|
2013-04-19 19:48:45 +02:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_PSK_ENABLED)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-04-19 19:48:45 +02:00
|
|
|
{ TLS_PSK_WITH_NULL_SHA, "TLS-PSK-WITH-NULL-SHA",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-10-25 18:03:18 +02:00
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_PSK_WITH_NULL_SHA256, "TLS-PSK-WITH-NULL-SHA256",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-25 18:03:18 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_PSK_WITH_NULL_SHA384, "TLS-PSK-WITH-NULL-SHA384",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-25 18:03:18 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
|
|
|
#endif
|
2013-04-19 19:48:45 +02:00
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_PSK_ENABLED */
|
|
|
|
|
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-04-19 19:48:45 +02:00
|
|
|
{ TLS_DHE_PSK_WITH_NULL_SHA, "TLS-DHE-PSK-WITH-NULL-SHA",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-10-25 18:03:18 +02:00
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_DHE_PSK_WITH_NULL_SHA256, "TLS-DHE-PSK-WITH-NULL-SHA256",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-25 18:03:18 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_DHE_PSK_WITH_NULL_SHA384, "TLS-DHE-PSK-WITH-NULL-SHA384",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_DHE_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-25 18:03:18 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
|
|
|
#endif
|
2013-04-19 19:48:45 +02:00
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED */
|
|
|
|
|
2013-10-11 19:07:56 +02:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-10-11 19:07:56 +02:00
|
|
|
{ TLS_ECDHE_PSK_WITH_NULL_SHA, "TLS-ECDHE-PSK-WITH-NULL-SHA",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_ECDHE_PSK,
|
2013-11-26 14:31:44 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-11 19:07:56 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-10-11 19:07:56 +02:00
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
|
|
|
{ TLS_ECDHE_PSK_WITH_NULL_SHA256, "TLS-ECDHE-PSK-WITH-NULL-SHA256",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_ECDHE_PSK,
|
2013-11-26 13:27:45 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-11 19:07:56 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
|
|
|
{ TLS_ECDHE_PSK_WITH_NULL_SHA384, "TLS-ECDHE-PSK-WITH-NULL-SHA384",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_ECDHE_PSK,
|
2013-11-26 13:27:45 +01:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-11 19:07:56 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
|
|
|
#endif
|
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
|
|
|
|
|
2013-04-19 19:48:45 +02:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-04-19 19:48:45 +02:00
|
|
|
{ TLS_RSA_PSK_WITH_NULL_SHA, "TLS-RSA-PSK-WITH-NULL-SHA",
|
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
2014-07-13 16:16:44 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-04-19 19:48:45 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-10-14 19:29:19 +02:00
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA256_C)
|
2013-10-25 18:03:18 +02:00
|
|
|
{ TLS_RSA_PSK_WITH_NULL_SHA256, "TLS-RSA-PSK-WITH-NULL-SHA256",
|
2013-10-14 19:29:19 +02:00
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA256, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-14 19:29:19 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
2013-10-25 18:03:18 +02:00
|
|
|
#endif
|
2013-10-14 19:29:19 +02:00
|
|
|
|
|
|
|
#if defined(POLARSSL_SHA512_C)
|
2013-10-25 18:03:18 +02:00
|
|
|
{ TLS_RSA_PSK_WITH_NULL_SHA384, "TLS-RSA-PSK-WITH-NULL-SHA384",
|
2013-10-14 19:29:19 +02:00
|
|
|
POLARSSL_CIPHER_NULL, POLARSSL_MD_SHA384, POLARSSL_KEY_EXCHANGE_RSA_PSK,
|
2014-07-13 14:43:28 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_1,
|
2013-10-14 19:29:19 +02:00
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
2013-10-25 18:03:18 +02:00
|
|
|
#endif
|
2013-04-19 19:48:45 +02:00
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED */
|
|
|
|
#endif /* POLARSSL_CIPHER_NULL_CIPHER */
|
|
|
|
|
2013-01-07 18:20:04 +01:00
|
|
|
#if defined(POLARSSL_DES_C)
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_CIPHER_MODE_CBC)
|
2013-04-19 09:08:57 +02:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_DHE_RSA_WITH_DES_CBC_SHA, "TLS-DHE-RSA-WITH-DES-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_DES_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_DHE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-04-19 09:08:57 +02:00
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED */
|
2013-01-07 18:20:04 +01:00
|
|
|
|
2013-09-13 14:10:44 +02:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED)
|
2013-10-14 14:19:31 +02:00
|
|
|
#if defined(POLARSSL_SHA1_C)
|
2013-01-07 18:20:04 +01:00
|
|
|
{ TLS_RSA_WITH_DES_CBC_SHA, "TLS-RSA-WITH-DES-CBC-SHA",
|
|
|
|
POLARSSL_CIPHER_DES_CBC, POLARSSL_MD_SHA1, POLARSSL_KEY_EXCHANGE_RSA,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_0,
|
|
|
|
SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_3,
|
|
|
|
POLARSSL_CIPHERSUITE_WEAK },
|
2013-10-14 14:19:31 +02:00
|
|
|
#endif /* POLARSSL_SHA1_C */
|
2013-09-13 14:10:44 +02:00
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE_RSA_ENABLED */
|
|
|
|
#endif /* POLARSSL_CIPHER_MODE_CBC */
|
2013-01-07 18:20:04 +01:00
|
|
|
#endif /* POLARSSL_DES_C */
|
|
|
|
#endif /* POLARSSL_ENABLE_WEAK_CIPHERSUITES */
|
|
|
|
|
2015-02-10 17:32:14 +01:00
|
|
|
{ 0, "",
|
|
|
|
POLARSSL_CIPHER_NONE, POLARSSL_MD_NONE, POLARSSL_KEY_EXCHANGE_NONE,
|
|
|
|
0, 0, 0, 0, 0 }
|
2013-01-07 18:20:04 +01:00
|
|
|
};
|
|
|
|
|
2014-06-30 17:59:55 +02:00
|
|
|
#if defined(SSL_CIPHERSUITES)
|
|
|
|
const int *ssl_list_ciphersuites( void )
|
|
|
|
{
|
|
|
|
return( ciphersuite_preference );
|
|
|
|
}
|
|
|
|
#else
|
2014-06-30 17:38:22 +02:00
|
|
|
#define MAX_CIPHERSUITES sizeof( ciphersuite_definitions ) / \
|
|
|
|
sizeof( ciphersuite_definitions[0] )
|
|
|
|
static int supported_ciphersuites[MAX_CIPHERSUITES];
|
|
|
|
static int supported_init = 0;
|
|
|
|
|
2013-01-07 18:20:04 +01:00
|
|
|
const int *ssl_list_ciphersuites( void )
|
|
|
|
{
|
2013-03-20 14:39:14 +01:00
|
|
|
/*
|
|
|
|
* On initial call filter out all ciphersuites not supported by current
|
|
|
|
* build based on presence in the ciphersuite_definitions.
|
|
|
|
*/
|
|
|
|
if( supported_init == 0 )
|
|
|
|
{
|
2014-06-30 17:38:22 +02:00
|
|
|
const int *p;
|
|
|
|
int *q;
|
2013-03-20 14:39:14 +01:00
|
|
|
|
2014-06-30 17:38:22 +02:00
|
|
|
for( p = ciphersuite_preference, q = supported_ciphersuites;
|
|
|
|
*p != 0 && q < supported_ciphersuites + MAX_CIPHERSUITES - 1;
|
|
|
|
p++ )
|
2013-03-20 14:39:14 +01:00
|
|
|
{
|
2014-06-24 22:42:34 +02:00
|
|
|
#if defined(POLARSSL_REMOVE_ARC4_CIPHERSUITES)
|
|
|
|
const ssl_ciphersuite_t *cs_info;
|
2014-06-30 17:38:22 +02:00
|
|
|
if( ( cs_info = ssl_ciphersuite_from_id( *p ) ) != NULL &&
|
2014-06-24 22:42:34 +02:00
|
|
|
cs_info->cipher != POLARSSL_CIPHER_ARC4_128 )
|
|
|
|
#else
|
2014-06-30 17:38:22 +02:00
|
|
|
if( ssl_ciphersuite_from_id( *p ) != NULL )
|
2014-06-24 22:42:34 +02:00
|
|
|
#endif
|
2014-06-30 17:38:22 +02:00
|
|
|
*(q++) = *p;
|
2013-03-20 14:39:14 +01:00
|
|
|
}
|
2013-09-07 15:04:26 +02:00
|
|
|
*q = 0;
|
2013-08-17 17:39:04 +02:00
|
|
|
|
2013-03-20 14:39:14 +01:00
|
|
|
supported_init = 1;
|
|
|
|
}
|
|
|
|
|
2014-06-17 14:06:49 +02:00
|
|
|
return( supported_ciphersuites );
|
2013-01-07 18:20:04 +01:00
|
|
|
};
|
2014-06-30 17:59:55 +02:00
|
|
|
#endif /* SSL_CIPHERSUITES */
|
2013-01-07 18:20:04 +01:00
|
|
|
|
2014-05-01 14:18:25 +02:00
|
|
|
const ssl_ciphersuite_t *ssl_ciphersuite_from_string(
|
|
|
|
const char *ciphersuite_name )
|
2013-01-07 18:20:04 +01:00
|
|
|
{
|
|
|
|
const ssl_ciphersuite_t *cur = ciphersuite_definitions;
|
|
|
|
|
|
|
|
if( NULL == ciphersuite_name )
|
|
|
|
return( NULL );
|
|
|
|
|
|
|
|
while( cur->id != 0 )
|
|
|
|
{
|
|
|
|
if( 0 == strcasecmp( cur->name, ciphersuite_name ) )
|
|
|
|
return( cur );
|
|
|
|
|
|
|
|
cur++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return( NULL );
|
|
|
|
}
|
|
|
|
|
|
|
|
const ssl_ciphersuite_t *ssl_ciphersuite_from_id( int ciphersuite )
|
|
|
|
{
|
|
|
|
const ssl_ciphersuite_t *cur = ciphersuite_definitions;
|
|
|
|
|
|
|
|
while( cur->id != 0 )
|
|
|
|
{
|
|
|
|
if( cur->id == ciphersuite )
|
|
|
|
return( cur );
|
|
|
|
|
|
|
|
cur++;
|
|
|
|
}
|
|
|
|
|
|
|
|
return( NULL );
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *ssl_get_ciphersuite_name( const int ciphersuite_id )
|
|
|
|
{
|
|
|
|
const ssl_ciphersuite_t *cur;
|
|
|
|
|
|
|
|
cur = ssl_ciphersuite_from_id( ciphersuite_id );
|
|
|
|
|
|
|
|
if( cur == NULL )
|
|
|
|
return( "unknown" );
|
|
|
|
|
|
|
|
return( cur->name );
|
|
|
|
}
|
|
|
|
|
|
|
|
int ssl_get_ciphersuite_id( const char *ciphersuite_name )
|
|
|
|
{
|
|
|
|
const ssl_ciphersuite_t *cur;
|
|
|
|
|
|
|
|
cur = ssl_ciphersuite_from_string( ciphersuite_name );
|
|
|
|
|
|
|
|
if( cur == NULL )
|
|
|
|
return( 0 );
|
|
|
|
|
|
|
|
return( cur->id );
|
|
|
|
}
|
|
|
|
|
2013-09-20 12:29:15 +02:00
|
|
|
#if defined(POLARSSL_PK_C)
|
2013-08-19 13:50:33 +02:00
|
|
|
pk_type_t ssl_get_ciphersuite_sig_pk_alg( const ssl_ciphersuite_t *info )
|
|
|
|
{
|
|
|
|
switch( info->key_exchange )
|
|
|
|
{
|
2013-09-17 12:06:25 +02:00
|
|
|
case POLARSSL_KEY_EXCHANGE_RSA:
|
2013-08-19 13:50:33 +02:00
|
|
|
case POLARSSL_KEY_EXCHANGE_DHE_RSA:
|
|
|
|
case POLARSSL_KEY_EXCHANGE_ECDHE_RSA:
|
2013-09-17 12:06:25 +02:00
|
|
|
case POLARSSL_KEY_EXCHANGE_RSA_PSK:
|
2013-08-19 13:50:33 +02:00
|
|
|
return( POLARSSL_PK_RSA );
|
|
|
|
|
|
|
|
case POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA:
|
|
|
|
return( POLARSSL_PK_ECDSA );
|
|
|
|
|
2013-12-11 16:17:10 +01:00
|
|
|
case POLARSSL_KEY_EXCHANGE_ECDH_RSA:
|
|
|
|
case POLARSSL_KEY_EXCHANGE_ECDH_ECDSA:
|
|
|
|
return( POLARSSL_PK_ECKEY );
|
|
|
|
|
2013-08-19 13:50:33 +02:00
|
|
|
default:
|
|
|
|
return( POLARSSL_PK_NONE );
|
|
|
|
}
|
|
|
|
}
|
2014-05-01 13:03:14 +02:00
|
|
|
#endif /* POLARSSL_PK_C */
|
2013-08-19 13:50:33 +02:00
|
|
|
|
2014-01-18 18:28:58 +01:00
|
|
|
#if defined(POLARSSL_ECDH_C) || defined(POLARSSL_ECDSA_C)
|
2013-09-17 12:06:25 +02:00
|
|
|
int ssl_ciphersuite_uses_ec( const ssl_ciphersuite_t *info )
|
|
|
|
{
|
|
|
|
switch( info->key_exchange )
|
|
|
|
{
|
|
|
|
case POLARSSL_KEY_EXCHANGE_ECDHE_RSA:
|
|
|
|
case POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA:
|
2013-10-11 19:07:56 +02:00
|
|
|
case POLARSSL_KEY_EXCHANGE_ECDHE_PSK:
|
2013-12-11 16:17:10 +01:00
|
|
|
case POLARSSL_KEY_EXCHANGE_ECDH_RSA:
|
|
|
|
case POLARSSL_KEY_EXCHANGE_ECDH_ECDSA:
|
2013-09-17 12:06:25 +02:00
|
|
|
return( 1 );
|
|
|
|
|
|
|
|
default:
|
|
|
|
return( 0 );
|
|
|
|
}
|
|
|
|
}
|
2014-05-01 13:03:14 +02:00
|
|
|
#endif /* POLARSSL_ECDH_C || POLARSSL_ECDSA_C */
|
2013-09-17 12:06:25 +02:00
|
|
|
|
2014-01-18 18:28:58 +01:00
|
|
|
#if defined(POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED)
|
2013-10-27 14:47:25 +01:00
|
|
|
int ssl_ciphersuite_uses_psk( const ssl_ciphersuite_t *info )
|
|
|
|
{
|
|
|
|
switch( info->key_exchange )
|
|
|
|
{
|
|
|
|
case POLARSSL_KEY_EXCHANGE_PSK:
|
|
|
|
case POLARSSL_KEY_EXCHANGE_RSA_PSK:
|
|
|
|
case POLARSSL_KEY_EXCHANGE_DHE_PSK:
|
|
|
|
case POLARSSL_KEY_EXCHANGE_ECDHE_PSK:
|
|
|
|
return( 1 );
|
|
|
|
|
|
|
|
default:
|
|
|
|
return( 0 );
|
|
|
|
}
|
|
|
|
}
|
2014-05-01 13:03:14 +02:00
|
|
|
#endif /* POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED */
|
2013-10-27 14:47:25 +01:00
|
|
|
|
2014-05-01 13:03:14 +02:00
|
|
|
#endif /* POLARSSL_SSL_TLS_C */
|