2018-02-08 19:04:43 +01:00
|
|
|
/**
|
|
|
|
* \file ssl_ciphersuites.c
|
|
|
|
*
|
2023-10-21 14:06:23 +02:00
|
|
|
* \brief SSL ciphersuites for Mbed TLS
|
2018-02-08 19:04:43 +01:00
|
|
|
*
|
2020-09-05 12:53:20 +02:00
|
|
|
* Copyright The Mbed TLS Contributors
|
2024-01-30 14:09:13 +01:00
|
|
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
2018-02-08 19:04:43 +01:00
|
|
|
*/
|
|
|
|
|
2021-12-21 12:54:05 +01:00
|
|
|
#include "common.h"
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_TLS_C)
|
|
|
|
|
|
|
|
#include "mbedtls/platform.h"
|
|
|
|
|
|
|
|
#include "mbedtls/ssl_ciphersuites.h"
|
|
|
|
#include "mbedtls/ssl.h"
|
2023-09-25 05:04:06 +02:00
|
|
|
#include "ssl_misc.h"
|
|
|
|
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
|
|
|
#include "mbedtls/psa_util.h"
|
|
|
|
#endif
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Ordered from most preferred to least preferred in terms of security.
|
|
|
|
*
|
2023-09-25 05:04:06 +02:00
|
|
|
* Current rule (except weak and null which come last):
|
2018-02-08 19:04:43 +01:00
|
|
|
* 1. By key exchange:
|
|
|
|
* Forward-secure non-PSK > forward-secure PSK > ECJPAKE > other non-PSK > other PSK
|
|
|
|
* 2. By key length and cipher:
|
2019-07-10 16:15:01 +02:00
|
|
|
* ChaCha > AES-256 > Camellia-256 > ARIA-256 > AES-128 > Camellia-128 > ARIA-128
|
2018-02-08 19:04:43 +01:00
|
|
|
* 3. By cipher mode when relevant GCM > CCM > CBC > CCM_8
|
|
|
|
* 4. By hash function used when relevant
|
|
|
|
* 5. By key exchange/auth again: EC > non-EC
|
|
|
|
*/
|
|
|
|
static const int ciphersuite_preference[] =
|
|
|
|
{
|
|
|
|
#if defined(MBEDTLS_SSL_CIPHERSUITES)
|
|
|
|
MBEDTLS_SSL_CIPHERSUITES,
|
|
|
|
#else
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
|
|
|
/* TLS 1.3 ciphersuites */
|
|
|
|
MBEDTLS_TLS1_3_CHACHA20_POLY1305_SHA256,
|
|
|
|
MBEDTLS_TLS1_3_AES_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS1_3_AES_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS1_3_AES_128_CCM_SHA256,
|
|
|
|
MBEDTLS_TLS1_3_AES_128_CCM_8_SHA256,
|
|
|
|
#endif /* MBEDTLS_SSL_PROTO_TLS1_3 */
|
|
|
|
|
2018-07-28 11:16:41 +02:00
|
|
|
/* Chacha-Poly ephemeral suites */
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
|
|
|
|
|
2018-02-08 19:04:43 +01:00
|
|
|
/* All AES-256 ephemeral suites */
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM,
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM_8,
|
|
|
|
|
|
|
|
/* All CAMELLIA-256 ephemeral suites */
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,
|
|
|
|
|
2018-06-07 16:25:01 +02:00
|
|
|
/* All ARIA-256 ephemeral suites */
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384,
|
|
|
|
|
2018-02-08 19:04:43 +01:00
|
|
|
/* All AES-128 ephemeral suites */
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM,
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM_8,
|
|
|
|
|
|
|
|
/* All CAMELLIA-128 ephemeral suites */
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,
|
|
|
|
|
2018-06-07 16:25:01 +02:00
|
|
|
/* All ARIA-128 ephemeral suites */
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256,
|
|
|
|
|
2018-02-08 19:04:43 +01:00
|
|
|
/* The PSK ephemeral suites */
|
2018-07-28 11:16:41 +02:00
|
|
|
MBEDTLS_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM,
|
|
|
|
MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM_8,
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384,
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM,
|
|
|
|
MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM_8,
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256,
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
/* The ECJPAKE suite */
|
|
|
|
MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8,
|
|
|
|
|
|
|
|
/* All AES-256 suites */
|
|
|
|
MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_AES_256_CCM,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_AES_256_CCM_8,
|
|
|
|
|
|
|
|
/* All CAMELLIA-256 suites */
|
|
|
|
MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
|
|
|
|
|
2018-06-07 16:25:01 +02:00
|
|
|
/* All ARIA-256 suites */
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_ARIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_ARIA_256_CBC_SHA384,
|
|
|
|
|
2018-02-08 19:04:43 +01:00
|
|
|
/* All AES-128 suites */
|
|
|
|
MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_AES_128_CCM,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_AES_128_CCM_8,
|
|
|
|
|
|
|
|
/* All CAMELLIA-128 suites */
|
|
|
|
MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
|
2018-06-07 16:25:01 +02:00
|
|
|
/* All ARIA-128 suites */
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_ARIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_ARIA_128_CBC_SHA256,
|
|
|
|
|
2018-02-08 19:04:43 +01:00
|
|
|
/* The RSA PSK suites */
|
2018-07-28 11:16:41 +02:00
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256,
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384,
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384,
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256,
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256,
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
/* The PSK suites */
|
2018-07-28 11:16:41 +02:00
|
|
|
MBEDTLS_TLS_PSK_WITH_CHACHA20_POLY1305_SHA256,
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_AES_256_CCM,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8,
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_TLS_PSK_WITH_ARIA_256_GCM_SHA384,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_ARIA_256_CBC_SHA384,
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_AES_128_CCM,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8,
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_TLS_PSK_WITH_ARIA_128_GCM_SHA256,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_ARIA_128_CBC_SHA256,
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
/* NULL suites */
|
|
|
|
MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA,
|
|
|
|
MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA,
|
|
|
|
MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384,
|
|
|
|
MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256,
|
|
|
|
MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256,
|
|
|
|
MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA,
|
|
|
|
|
|
|
|
MBEDTLS_TLS_RSA_WITH_NULL_SHA256,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_NULL_SHA,
|
|
|
|
MBEDTLS_TLS_RSA_WITH_NULL_MD5,
|
|
|
|
MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA,
|
|
|
|
MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA,
|
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384,
|
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256,
|
|
|
|
MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_NULL_SHA384,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_NULL_SHA256,
|
|
|
|
MBEDTLS_TLS_PSK_WITH_NULL_SHA,
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_SSL_CIPHERSUITES */
|
|
|
|
0
|
|
|
|
};
|
|
|
|
|
|
|
|
static const mbedtls_ssl_ciphersuite_t ciphersuite_definitions[] =
|
|
|
|
{
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_AES)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
|
|
|
{ MBEDTLS_TLS1_3_AES_256_GCM_SHA384, "TLS1-3-AES-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384,
|
|
|
|
MBEDTLS_KEY_EXCHANGE_NONE, /* Key exchange not part of ciphersuite in TLS 1.3 */
|
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_3, MBEDTLS_SSL_VERSION_TLS1_3 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
|
|
|
{ MBEDTLS_TLS1_3_AES_128_GCM_SHA256, "TLS1-3-AES-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256,
|
|
|
|
MBEDTLS_KEY_EXCHANGE_NONE, /* Key exchange not part of ciphersuite in TLS 1.3 */
|
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_3, MBEDTLS_SSL_VERSION_TLS1_3 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CCM) && defined(MBEDTLS_MD_CAN_SHA256)
|
|
|
|
{ MBEDTLS_TLS1_3_AES_128_CCM_SHA256, "TLS1-3-AES-128-CCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256,
|
|
|
|
MBEDTLS_KEY_EXCHANGE_NONE, /* Key exchange not part of ciphersuite in TLS 1.3 */
|
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_3, MBEDTLS_SSL_VERSION_TLS1_3 },
|
|
|
|
{ MBEDTLS_TLS1_3_AES_128_CCM_8_SHA256, "TLS1-3-AES-128-CCM-8-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256,
|
|
|
|
MBEDTLS_KEY_EXCHANGE_NONE, /* Key exchange not part of ciphersuite in TLS 1.3 */
|
|
|
|
MBEDTLS_CIPHERSUITE_SHORT_TAG,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_3, MBEDTLS_SSL_VERSION_TLS1_3 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 && MBEDTLS_SSL_HAVE_CCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_AES */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CHACHAPOLY) && defined(MBEDTLS_MD_CAN_SHA256)
|
|
|
|
{ MBEDTLS_TLS1_3_CHACHA20_POLY1305_SHA256,
|
|
|
|
"TLS1-3-CHACHA20-POLY1305-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
|
|
|
|
MBEDTLS_KEY_EXCHANGE_NONE, /* Key exchange not part of ciphersuite in TLS 1.3 */
|
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_3, MBEDTLS_SSL_VERSION_TLS1_3 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CHACHAPOLY && MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
#endif /* MBEDTLS_SSL_PROTO_TLS1_3 */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CHACHAPOLY) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA256) && \
|
2018-07-28 11:16:41 +02:00
|
|
|
defined(MBEDTLS_SSL_PROTO_TLS1_2)
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED)
|
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
|
|
|
|
"TLS-ECDHE-RSA-WITH-CHACHA20-POLY1305-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
|
|
|
|
MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-07-28 11:16:41 +02:00
|
|
|
#endif
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
|
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
|
|
|
|
"TLS-ECDHE-ECDSA-WITH-CHACHA20-POLY1305-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
|
|
|
|
MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-07-28 11:16:41 +02:00
|
|
|
#endif
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
|
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
|
|
|
|
"TLS-DHE-RSA-WITH-CHACHA20-POLY1305-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
|
|
|
|
MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-07-28 11:16:41 +02:00
|
|
|
#endif
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
|
|
|
|
{ MBEDTLS_TLS_PSK_WITH_CHACHA20_POLY1305_SHA256,
|
|
|
|
"TLS-PSK-WITH-CHACHA20-POLY1305-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
|
|
|
|
MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-07-28 11:16:41 +02:00
|
|
|
#endif
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
|
|
|
|
{ MBEDTLS_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
|
|
|
|
"TLS-ECDHE-PSK-WITH-CHACHA20-POLY1305-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
|
|
|
|
MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-07-28 11:16:41 +02:00
|
|
|
#endif
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
|
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256,
|
|
|
|
"TLS-DHE-PSK-WITH-CHACHA20-POLY1305-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
|
|
|
|
MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-07-28 11:16:41 +02:00
|
|
|
#endif
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
|
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256,
|
|
|
|
"TLS-RSA-PSK-WITH-CHACHA20-POLY1305-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CHACHA20_POLY1305, MBEDTLS_MD_SHA256,
|
|
|
|
MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-07-28 11:16:41 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CHACHAPOLY &&
|
|
|
|
MBEDTLS_MD_CAN_SHA256 &&
|
2018-07-28 11:16:41 +02:00
|
|
|
MBEDTLS_SSL_PROTO_TLS1_2 */
|
2018-02-08 19:04:43 +01:00
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_AES)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, "TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, "TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, "TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM, "TLS-ECDHE-ECDSA-WITH-AES-256-CCM",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8, "TLS-ECDHE-ECDSA-WITH-AES-256-CCM-8",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_SHORT_TAG,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM, "TLS-ECDHE-ECDSA-WITH-AES-128-CCM",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8, "TLS-ECDHE-ECDSA-WITH-AES-128-CCM-8",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_SHORT_TAG,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_AES */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CAMELLIA)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
"TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-CBC-SHA256",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
|
|
|
|
"TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-CBC-SHA384",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
"TLS-ECDHE-ECDSA-WITH-CAMELLIA-128-GCM-SHA256",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
"TLS-ECDHE-ECDSA-WITH-CAMELLIA-256-GCM-SHA384",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CAMELLIA */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
#if defined(MBEDTLS_CIPHER_NULL_CIPHER)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA, "TLS-ECDHE-ECDSA-WITH-NULL-SHA",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif /* MBEDTLS_CIPHER_NULL_CIPHER */
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_AES)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, "TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, "TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-RSA-WITH-AES-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, "TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, "TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_AES */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CAMELLIA)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
"TLS-ECDHE-RSA-WITH-CAMELLIA-128-CBC-SHA256",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,
|
|
|
|
"TLS-ECDHE-RSA-WITH-CAMELLIA-256-CBC-SHA384",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
"TLS-ECDHE-RSA-WITH-CAMELLIA-128-GCM-SHA256",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
"TLS-ECDHE-RSA-WITH-CAMELLIA-256-GCM-SHA384",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CAMELLIA */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
#if defined(MBEDTLS_CIPHER_NULL_CIPHER)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA, "TLS-ECDHE-RSA-WITH-NULL-SHA",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif /* MBEDTLS_CIPHER_NULL_CIPHER */
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_AES)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384) && \
|
|
|
|
defined(MBEDTLS_SSL_HAVE_GCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, "TLS-DHE-RSA-WITH-AES-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 && MBEDTLS_SSL_HAVE_GCM */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, "TLS-DHE-RSA-WITH-AES-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, "TLS-DHE-RSA-WITH-AES-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, "TLS-DHE-RSA-WITH-AES-256-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA, "TLS-DHE-RSA-WITH-AES-128-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA, "TLS-DHE-RSA-WITH-AES-256-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM, "TLS-DHE-RSA-WITH-AES-256-CCM",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CCM_8, "TLS-DHE-RSA-WITH-AES-256-CCM-8",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_SHORT_TAG,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM, "TLS-DHE-RSA-WITH-AES-128-CCM",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CCM_8, "TLS-DHE-RSA-WITH-AES-128-CCM-8",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_SHORT_TAG,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_AES */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CAMELLIA)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA, "TLS-DHE-RSA-WITH-CAMELLIA-128-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA, "TLS-DHE-RSA-WITH-CAMELLIA-256-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-DHE-RSA-WITH-CAMELLIA-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-DHE-RSA-WITH-CAMELLIA-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CAMELLIA */
|
|
|
|
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_AES)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384) && \
|
|
|
|
defined(MBEDTLS_SSL_HAVE_GCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384, "TLS-RSA-WITH-AES-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 && MBEDTLS_SSL_HAVE_GCM */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256, "TLS-RSA-WITH-AES-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256, "TLS-RSA-WITH-AES-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
{ MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256, "TLS-RSA-WITH-AES-256-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA, "TLS-RSA-WITH-AES-128-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
{ MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA, "TLS-RSA-WITH-AES-256-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_AES_256_CCM, "TLS-RSA-WITH-AES-256-CCM",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_AES_256_CCM_8, "TLS-RSA-WITH-AES-256-CCM-8",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_SHORT_TAG,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_AES_128_CCM, "TLS-RSA-WITH-AES-128-CCM",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_AES_128_CCM_8, "TLS-RSA-WITH-AES-128-CCM-8",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_SHORT_TAG,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_AES */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CAMELLIA)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, "TLS-RSA-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
{ MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256, "TLS-RSA-WITH-CAMELLIA-256-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA, "TLS-RSA-WITH-CAMELLIA-128-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
{ MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, "TLS-RSA-WITH-CAMELLIA-256-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256, "TLS-RSA-WITH-CAMELLIA-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384, "TLS-RSA-WITH-CAMELLIA-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CAMELLIA */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_AES)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, "TLS-ECDH-RSA-WITH-AES-128-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, "TLS-ECDH-RSA-WITH-AES-256-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, "TLS-ECDH-RSA-WITH-AES-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, "TLS-ECDH-RSA-WITH-AES-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, "TLS-ECDH-RSA-WITH-AES-256-CBC-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, "TLS-ECDH-RSA-WITH-AES-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_AES */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CAMELLIA)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
"TLS-ECDH-RSA-WITH-CAMELLIA-128-CBC-SHA256",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384,
|
|
|
|
"TLS-ECDH-RSA-WITH-CAMELLIA-256-CBC-SHA384",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
"TLS-ECDH-RSA-WITH-CAMELLIA-128-GCM-SHA256",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
"TLS-ECDH-RSA-WITH-CAMELLIA-256-GCM-SHA384",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CAMELLIA */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
#if defined(MBEDTLS_CIPHER_NULL_CIPHER)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA, "TLS-ECDH-RSA-WITH-NULL-SHA",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif /* MBEDTLS_CIPHER_NULL_CIPHER */
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_AES)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, "TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, "TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, "TLS-ECDH-ECDSA-WITH-AES-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, "TLS-ECDH-ECDSA-WITH-AES-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, "TLS-ECDH-ECDSA-WITH-AES-256-CBC-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, "TLS-ECDH-ECDSA-WITH-AES-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_AES */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CAMELLIA)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
"TLS-ECDH-ECDSA-WITH-CAMELLIA-128-CBC-SHA256",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
|
|
|
|
"TLS-ECDH-ECDSA-WITH-CAMELLIA-256-CBC-SHA384",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
|
|
|
|
"TLS-ECDH-ECDSA-WITH-CAMELLIA-128-GCM-SHA256",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
|
|
|
|
"TLS-ECDH-ECDSA-WITH-CAMELLIA-256-GCM-SHA384",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CAMELLIA */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
#if defined(MBEDTLS_CIPHER_NULL_CIPHER)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA, "TLS-ECDH-ECDSA-WITH-NULL-SHA",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif /* MBEDTLS_CIPHER_NULL_CIPHER */
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_AES)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256, "TLS-PSK-WITH-AES-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384, "TLS-PSK-WITH-AES-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256, "TLS-PSK-WITH-AES-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384, "TLS-PSK-WITH-AES-256-CBC-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA, "TLS-PSK-WITH-AES-128-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
{ MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA, "TLS-PSK-WITH-AES-256-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_AES_256_CCM, "TLS-PSK-WITH-AES-256-CCM",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_AES_256_CCM_8, "TLS-PSK-WITH-AES-256-CCM-8",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_SHORT_TAG,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_AES_128_CCM, "TLS-PSK-WITH-AES-128-CCM",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_AES_128_CCM_8, "TLS-PSK-WITH-AES-128-CCM-8",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_SHORT_TAG,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_AES */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CAMELLIA)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-PSK-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-PSK-WITH-CAMELLIA-256-CBC-SHA384",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-PSK-WITH-CAMELLIA-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-PSK-WITH-CAMELLIA-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CAMELLIA */
|
|
|
|
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_AES)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256, "TLS-DHE-PSK-WITH-AES-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384, "TLS-DHE-PSK-WITH-AES-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256, "TLS-DHE-PSK-WITH-AES-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384, "TLS-DHE-PSK-WITH-AES-256-CBC-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA, "TLS-DHE-PSK-WITH-AES-128-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA, "TLS-DHE-PSK-WITH-AES-256-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM, "TLS-DHE-PSK-WITH-AES-256-CCM",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CCM_8, "TLS-DHE-PSK-WITH-AES-256-CCM-8",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_SHORT_TAG,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM, "TLS-DHE-PSK-WITH-AES-128-CCM",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CCM_8, "TLS-DHE-PSK-WITH-AES-128-CCM-8",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_SHORT_TAG,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_AES */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CAMELLIA)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-DHE-PSK-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-DHE-PSK-WITH-CAMELLIA-256-CBC-SHA384",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-DHE-PSK-WITH-CAMELLIA-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-DHE-PSK-WITH-CAMELLIA-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CAMELLIA */
|
|
|
|
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_AES)
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256, "TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384, "TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA, "TLS-ECDHE-PSK-WITH-AES-128-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
{ MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA, "TLS-ECDHE-PSK-WITH-AES-256-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_AES */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CAMELLIA)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
|
|
|
|
"TLS-ECDHE-PSK-WITH-CAMELLIA-128-CBC-SHA256",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2023-04-18 10:38:24 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
|
|
|
|
"TLS-ECDHE-PSK-WITH-CAMELLIA-256-CBC-SHA384",
|
2018-02-08 19:04:43 +01:00
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CAMELLIA */
|
|
|
|
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_AES)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256, "TLS-RSA-PSK-WITH-AES-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384, "TLS-RSA-PSK-WITH-AES-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256, "TLS-RSA-PSK-WITH-AES-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384, "TLS-RSA-PSK-WITH-AES-256-CBC-SHA384",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA, "TLS-RSA-PSK-WITH-AES-128-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA, "TLS-RSA-PSK-WITH-AES-256-CBC-SHA",
|
|
|
|
MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_AES */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CAMELLIA)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CBC)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256, "TLS-RSA-PSK-WITH-CAMELLIA-128-CBC-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384, "TLS-RSA-PSK-WITH-CAMELLIA-256-CBC-SHA384",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CBC */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_GCM)
|
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256, "TLS-RSA-PSK-WITH-CAMELLIA-128-GCM-SHA256",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA256 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384, "TLS-RSA-PSK-WITH-CAMELLIA-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_CAMELLIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_GCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CAMELLIA */
|
|
|
|
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_AES)
|
|
|
|
#if defined(MBEDTLS_SSL_HAVE_CCM)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8, "TLS-ECJPAKE-WITH-AES-128-CCM-8",
|
|
|
|
MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECJPAKE,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_SHORT_TAG,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_CCM */
|
|
|
|
#endif /* MBEDTLS_SSL_HAVE_AES */
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_CIPHER_NULL_CIPHER)
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_MD5)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_NULL_MD5, "TLS-RSA-WITH-NULL-MD5",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_MD5, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_NULL_SHA, "TLS-RSA-WITH-NULL-SHA",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_NULL_SHA256, "TLS-RSA-WITH-NULL-SHA256",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_NULL_SHA, "TLS-PSK-WITH-NULL-SHA",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_NULL_SHA256, "TLS-PSK-WITH-NULL-SHA256",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_NULL_SHA384, "TLS-PSK-WITH-NULL-SHA384",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA, "TLS-DHE-PSK-WITH-NULL-SHA",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256, "TLS-DHE-PSK-WITH-NULL-SHA256",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384, "TLS-DHE-PSK-WITH-NULL-SHA384",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA, "TLS-ECDHE-PSK-WITH-NULL-SHA",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256, "TLS-ECDHE-PSK-WITH-NULL-SHA256",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384, "TLS-ECDHE-PSK-WITH-NULL-SHA384",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA1)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA, "TLS-RSA-PSK-WITH-NULL-SHA",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA1, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA1 */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA256)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256, "TLS-RSA-PSK-WITH-NULL-SHA256",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_MD_CAN_SHA384)
|
2018-02-08 19:04:43 +01:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384, "TLS-RSA-PSK-WITH-NULL-SHA384",
|
|
|
|
MBEDTLS_CIPHER_NULL, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
MBEDTLS_CIPHERSUITE_WEAK,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
|
|
|
#endif /* MBEDTLS_MD_CAN_SHA384 */
|
2018-02-08 19:04:43 +01:00
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */
|
|
|
|
#endif /* MBEDTLS_CIPHER_NULL_CIPHER */
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_SSL_HAVE_ARIA)
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
|
2018-06-07 16:25:01 +02:00
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_ARIA_256_GCM_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-RSA-WITH-ARIA-256-GCM-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_ARIA_256_CBC_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-RSA-WITH-ARIA-256-CBC-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_ARIA_128_GCM_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-RSA-WITH-ARIA-128-GCM-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_RSA_WITH_ARIA_128_CBC_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-RSA-WITH-ARIA-128-CBC-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-RSA-PSK-WITH-ARIA-256-GCM-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-RSA-PSK-WITH-ARIA-256-CBC-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-RSA-PSK-WITH-ARIA-128-GCM-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-RSA-PSK-WITH-ARIA-128-CBC-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_RSA_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_ARIA_256_GCM_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-PSK-WITH-ARIA-256-GCM-SHA384",
|
|
|
|
MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_ARIA_256_CBC_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-PSK-WITH-ARIA-256-CBC-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_ARIA_128_GCM_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-PSK-WITH-ARIA-128-GCM-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_PSK_WITH_ARIA_128_CBC_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-PSK-WITH-ARIA-128-CBC-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED)
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDH-RSA-WITH-ARIA-256-GCM-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDH-RSA-WITH-ARIA-256-CBC-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDH-RSA-WITH-ARIA-128-GCM-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDH-RSA-WITH-ARIA-128-CBC-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED)
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDHE-RSA-WITH-ARIA-256-GCM-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDHE-RSA-WITH-ARIA-256-CBC-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDHE-RSA-WITH-ARIA-128-GCM-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDHE-RSA-WITH-ARIA-128-CBC-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDHE-PSK-WITH-ARIA-256-CBC-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDHE-PSK-WITH-ARIA-128-CBC-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDHE-ECDSA-WITH-ARIA-256-GCM-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDHE-ECDSA-WITH-ARIA-256-CBC-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDHE-ECDSA-WITH-ARIA-128-GCM-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDHE-ECDSA-WITH-ARIA-128-CBC-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDH-ECDSA-WITH-ARIA-256-GCM-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDH-ECDSA-WITH-ARIA-256-CBC-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDH-ECDSA-WITH-ARIA-128-GCM-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-ECDH-ECDSA-WITH-ARIA-128-CBC-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-DHE-RSA-WITH-ARIA-256-GCM-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-DHE-RSA-WITH-ARIA-256-CBC-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-DHE-RSA-WITH-ARIA-128-GCM-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-DHE-RSA-WITH-ARIA-128-CBC-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_RSA,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-DHE-PSK-WITH-ARIA-256-GCM-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_GCM, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA384))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-DHE-PSK-WITH-ARIA-256-CBC-SHA384",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_256_CBC, MBEDTLS_MD_SHA384, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_GCM) && defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-DHE-PSK-WITH-ARIA-128-GCM-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_GCM, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
2023-09-25 05:04:06 +02:00
|
|
|
#if (defined(MBEDTLS_SSL_HAVE_CBC) && \
|
|
|
|
defined(MBEDTLS_MD_CAN_SHA256))
|
2018-06-07 16:25:01 +02:00
|
|
|
{ MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256,
|
2023-04-18 10:38:24 +02:00
|
|
|
"TLS-DHE-PSK-WITH-ARIA-128-CBC-SHA256",
|
2018-06-07 16:25:01 +02:00
|
|
|
MBEDTLS_CIPHER_ARIA_128_CBC, MBEDTLS_MD_SHA256, MBEDTLS_KEY_EXCHANGE_DHE_PSK,
|
2023-09-25 05:04:06 +02:00
|
|
|
0,
|
|
|
|
MBEDTLS_SSL_VERSION_TLS1_2, MBEDTLS_SSL_VERSION_TLS1_2 },
|
2018-06-07 16:25:01 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#endif /* MBEDTLS_SSL_HAVE_ARIA */
|
2018-06-07 16:25:01 +02:00
|
|
|
|
|
|
|
|
2018-02-08 19:04:43 +01:00
|
|
|
{ 0, "",
|
|
|
|
MBEDTLS_CIPHER_NONE, MBEDTLS_MD_NONE, MBEDTLS_KEY_EXCHANGE_NONE,
|
2023-09-25 05:04:06 +02:00
|
|
|
0, 0, 0 }
|
2018-02-08 19:04:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#if defined(MBEDTLS_SSL_CIPHERSUITES)
|
2023-04-18 10:38:24 +02:00
|
|
|
const int *mbedtls_ssl_list_ciphersuites(void)
|
2018-02-08 19:04:43 +01:00
|
|
|
{
|
2023-04-18 10:38:24 +02:00
|
|
|
return ciphersuite_preference;
|
2018-02-08 19:04:43 +01:00
|
|
|
}
|
|
|
|
#else
|
2023-04-18 10:38:24 +02:00
|
|
|
#define MAX_CIPHERSUITES sizeof(ciphersuite_definitions) / \
|
|
|
|
sizeof(ciphersuite_definitions[0])
|
2018-02-08 19:04:43 +01:00
|
|
|
static int supported_ciphersuites[MAX_CIPHERSUITES];
|
|
|
|
static int supported_init = 0;
|
|
|
|
|
2022-07-18 14:48:00 +02:00
|
|
|
MBEDTLS_CHECK_RETURN_CRITICAL
|
2023-04-18 10:38:24 +02:00
|
|
|
static int ciphersuite_is_removed(const mbedtls_ssl_ciphersuite_t *cs_info)
|
2019-07-10 16:15:01 +02:00
|
|
|
{
|
2023-04-18 10:38:24 +02:00
|
|
|
(void) cs_info;
|
2019-07-10 16:15:01 +02:00
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
return 0;
|
2019-07-10 16:15:01 +02:00
|
|
|
}
|
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
const int *mbedtls_ssl_list_ciphersuites(void)
|
2018-02-08 19:04:43 +01:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
* On initial call filter out all ciphersuites not supported by current
|
|
|
|
* build based on presence in the ciphersuite_definitions.
|
|
|
|
*/
|
2023-04-18 10:38:24 +02:00
|
|
|
if (supported_init == 0) {
|
2018-02-08 19:04:43 +01:00
|
|
|
const int *p;
|
|
|
|
int *q;
|
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
for (p = ciphersuite_preference, q = supported_ciphersuites;
|
2018-02-08 19:04:43 +01:00
|
|
|
*p != 0 && q < supported_ciphersuites + MAX_CIPHERSUITES - 1;
|
2023-04-18 10:38:24 +02:00
|
|
|
p++) {
|
2018-02-08 19:04:43 +01:00
|
|
|
const mbedtls_ssl_ciphersuite_t *cs_info;
|
2023-04-18 10:38:24 +02:00
|
|
|
if ((cs_info = mbedtls_ssl_ciphersuite_from_id(*p)) != NULL &&
|
|
|
|
!ciphersuite_is_removed(cs_info)) {
|
2018-02-08 19:04:43 +01:00
|
|
|
*(q++) = *p;
|
2019-07-10 16:15:01 +02:00
|
|
|
}
|
2018-02-08 19:04:43 +01:00
|
|
|
}
|
|
|
|
*q = 0;
|
|
|
|
|
|
|
|
supported_init = 1;
|
|
|
|
}
|
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
return supported_ciphersuites;
|
2018-02-08 19:04:43 +01:00
|
|
|
}
|
|
|
|
#endif /* MBEDTLS_SSL_CIPHERSUITES */
|
|
|
|
|
|
|
|
const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_string(
|
2023-04-18 10:38:24 +02:00
|
|
|
const char *ciphersuite_name)
|
2018-02-08 19:04:43 +01:00
|
|
|
{
|
|
|
|
const mbedtls_ssl_ciphersuite_t *cur = ciphersuite_definitions;
|
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
if (NULL == ciphersuite_name) {
|
|
|
|
return NULL;
|
|
|
|
}
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
while (cur->id != 0) {
|
|
|
|
if (0 == strcmp(cur->name, ciphersuite_name)) {
|
|
|
|
return cur;
|
|
|
|
}
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
cur++;
|
|
|
|
}
|
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
return NULL;
|
2018-02-08 19:04:43 +01:00
|
|
|
}
|
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
const mbedtls_ssl_ciphersuite_t *mbedtls_ssl_ciphersuite_from_id(int ciphersuite)
|
2018-02-08 19:04:43 +01:00
|
|
|
{
|
|
|
|
const mbedtls_ssl_ciphersuite_t *cur = ciphersuite_definitions;
|
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
while (cur->id != 0) {
|
|
|
|
if (cur->id == ciphersuite) {
|
|
|
|
return cur;
|
|
|
|
}
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
cur++;
|
|
|
|
}
|
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
return NULL;
|
2018-02-08 19:04:43 +01:00
|
|
|
}
|
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
const char *mbedtls_ssl_get_ciphersuite_name(const int ciphersuite_id)
|
2018-02-08 19:04:43 +01:00
|
|
|
{
|
|
|
|
const mbedtls_ssl_ciphersuite_t *cur;
|
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
cur = mbedtls_ssl_ciphersuite_from_id(ciphersuite_id);
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
if (cur == NULL) {
|
|
|
|
return "unknown";
|
|
|
|
}
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
return cur->name;
|
2018-02-08 19:04:43 +01:00
|
|
|
}
|
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
int mbedtls_ssl_get_ciphersuite_id(const char *ciphersuite_name)
|
2018-02-08 19:04:43 +01:00
|
|
|
{
|
|
|
|
const mbedtls_ssl_ciphersuite_t *cur;
|
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
cur = mbedtls_ssl_ciphersuite_from_string(ciphersuite_name);
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
if (cur == NULL) {
|
|
|
|
return 0;
|
|
|
|
}
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2023-04-18 10:38:24 +02:00
|
|
|
return cur->id;
|
2018-02-08 19:04:43 +01:00
|
|
|
}
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
size_t mbedtls_ssl_ciphersuite_get_cipher_key_bitlen(const mbedtls_ssl_ciphersuite_t *info)
|
|
|
|
{
|
|
|
|
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
|
|
|
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
|
|
|
psa_key_type_t key_type;
|
|
|
|
psa_algorithm_t alg;
|
|
|
|
size_t key_bits;
|
|
|
|
|
|
|
|
status = mbedtls_ssl_cipher_to_psa((mbedtls_cipher_type_t) info->cipher,
|
|
|
|
info->flags & MBEDTLS_CIPHERSUITE_SHORT_TAG ? 8 : 16,
|
|
|
|
&alg, &key_type, &key_bits);
|
|
|
|
|
|
|
|
if (status != PSA_SUCCESS) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return key_bits;
|
|
|
|
#else
|
|
|
|
const mbedtls_cipher_info_t * const cipher_info =
|
|
|
|
mbedtls_cipher_info_from_type((mbedtls_cipher_type_t) info->cipher);
|
|
|
|
|
|
|
|
return mbedtls_cipher_info_get_key_bitlen(cipher_info);
|
|
|
|
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
|
|
|
}
|
|
|
|
|
2018-02-08 19:04:43 +01:00
|
|
|
#if defined(MBEDTLS_PK_C)
|
2023-04-18 10:38:24 +02:00
|
|
|
mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_pk_alg(const mbedtls_ssl_ciphersuite_t *info)
|
2018-02-08 19:04:43 +01:00
|
|
|
{
|
2023-04-18 10:38:24 +02:00
|
|
|
switch (info->key_exchange) {
|
2018-02-08 19:04:43 +01:00
|
|
|
case MBEDTLS_KEY_EXCHANGE_RSA:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_DHE_RSA:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_RSA_PSK:
|
2023-04-18 10:38:24 +02:00
|
|
|
return MBEDTLS_PK_RSA;
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
|
2023-04-18 10:38:24 +02:00
|
|
|
return MBEDTLS_PK_ECDSA;
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDH_RSA:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA:
|
2023-04-18 10:38:24 +02:00
|
|
|
return MBEDTLS_PK_ECKEY;
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
default:
|
2023-04-18 10:38:24 +02:00
|
|
|
return MBEDTLS_PK_NONE;
|
2018-02-08 19:04:43 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
|
|
|
psa_algorithm_t mbedtls_ssl_get_ciphersuite_sig_pk_psa_alg(const mbedtls_ssl_ciphersuite_t *info)
|
2018-02-08 19:04:43 +01:00
|
|
|
{
|
2023-04-18 10:38:24 +02:00
|
|
|
switch (info->key_exchange) {
|
2018-02-08 19:04:43 +01:00
|
|
|
case MBEDTLS_KEY_EXCHANGE_RSA:
|
2023-09-25 05:04:06 +02:00
|
|
|
case MBEDTLS_KEY_EXCHANGE_RSA_PSK:
|
|
|
|
return PSA_ALG_RSA_PKCS1V15_CRYPT;
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_DHE_RSA:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
|
|
|
|
return PSA_ALG_RSA_PKCS1V15_SIGN(
|
|
|
|
mbedtls_md_psa_alg_from_type((mbedtls_md_type_t) info->mac));
|
|
|
|
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
|
|
|
|
return PSA_ALG_ECDSA(mbedtls_md_psa_alg_from_type((mbedtls_md_type_t) info->mac));
|
|
|
|
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDH_RSA:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA:
|
|
|
|
return PSA_ALG_ECDH;
|
|
|
|
|
|
|
|
default:
|
|
|
|
return PSA_ALG_NONE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
psa_key_usage_t mbedtls_ssl_get_ciphersuite_sig_pk_psa_usage(const mbedtls_ssl_ciphersuite_t *info)
|
|
|
|
{
|
|
|
|
switch (info->key_exchange) {
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_RSA:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_RSA_PSK:
|
|
|
|
return PSA_KEY_USAGE_DECRYPT;
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_DHE_RSA:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
|
|
|
|
return PSA_KEY_USAGE_SIGN_HASH;
|
|
|
|
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDH_RSA:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA:
|
|
|
|
return PSA_KEY_USAGE_DERIVE;
|
|
|
|
|
|
|
|
default:
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
|
|
|
|
|
|
|
mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_alg(const mbedtls_ssl_ciphersuite_t *info)
|
|
|
|
{
|
|
|
|
switch (info->key_exchange) {
|
2018-02-08 19:04:43 +01:00
|
|
|
case MBEDTLS_KEY_EXCHANGE_DHE_RSA:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
|
2023-04-18 10:38:24 +02:00
|
|
|
return MBEDTLS_PK_RSA;
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
|
2023-04-18 10:38:24 +02:00
|
|
|
return MBEDTLS_PK_ECDSA;
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
default:
|
2023-04-18 10:38:24 +02:00
|
|
|
return MBEDTLS_PK_NONE;
|
2018-02-08 19:04:43 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* MBEDTLS_PK_C */
|
|
|
|
|
2023-09-25 05:04:06 +02:00
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_1_2_ENABLED) || \
|
|
|
|
defined(MBEDTLS_KEY_EXCHANGE_ECDSA_CERT_REQ_ALLOWED_ENABLED) || \
|
2019-02-16 17:19:46 +01:00
|
|
|
defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
|
2023-04-18 10:38:24 +02:00
|
|
|
int mbedtls_ssl_ciphersuite_uses_ec(const mbedtls_ssl_ciphersuite_t *info)
|
2018-02-08 19:04:43 +01:00
|
|
|
{
|
2023-04-18 10:38:24 +02:00
|
|
|
switch (info->key_exchange) {
|
2018-02-08 19:04:43 +01:00
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDH_RSA:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA:
|
2019-02-16 17:19:46 +01:00
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECJPAKE:
|
2023-04-18 10:38:24 +02:00
|
|
|
return 1;
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
default:
|
2023-04-18 10:38:24 +02:00
|
|
|
return 0;
|
2018-02-08 19:04:43 +01:00
|
|
|
}
|
|
|
|
}
|
2023-09-25 05:04:06 +02:00
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_SOME_ECDH_OR_ECDHE_1_2_ENABLED ||
|
|
|
|
* MBEDTLS_KEY_EXCHANGE_ECDSA_CERT_REQ_ALLOWED_ENABLED ||
|
|
|
|
* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED*/
|
2018-02-08 19:04:43 +01:00
|
|
|
|
2021-12-21 12:54:05 +01:00
|
|
|
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED)
|
2023-04-18 10:38:24 +02:00
|
|
|
int mbedtls_ssl_ciphersuite_uses_psk(const mbedtls_ssl_ciphersuite_t *info)
|
2018-02-08 19:04:43 +01:00
|
|
|
{
|
2023-04-18 10:38:24 +02:00
|
|
|
switch (info->key_exchange) {
|
2018-02-08 19:04:43 +01:00
|
|
|
case MBEDTLS_KEY_EXCHANGE_PSK:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_RSA_PSK:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_DHE_PSK:
|
|
|
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK:
|
2023-04-18 10:38:24 +02:00
|
|
|
return 1;
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
default:
|
2023-04-18 10:38:24 +02:00
|
|
|
return 0;
|
2018-02-08 19:04:43 +01:00
|
|
|
}
|
|
|
|
}
|
2021-12-21 12:54:05 +01:00
|
|
|
#endif /* MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED */
|
2018-02-08 19:04:43 +01:00
|
|
|
|
|
|
|
#endif /* MBEDTLS_SSL_TLS_C */
|