ssl: don't require MBEDTLS_ECP_DP with TLS1.3
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
parent
b2219f633d
commit
cf29c5d9d5
3 changed files with 8 additions and 13 deletions
|
@ -2314,18 +2314,15 @@ static inline int mbedtls_ssl_tls13_sig_alg_for_cert_verify_is_supported(
|
|||
{
|
||||
switch (sig_alg) {
|
||||
#if defined(MBEDTLS_PK_CAN_ECDSA_SOME)
|
||||
#if defined(PSA_WANT_ALG_SHA_256) && \
|
||||
(defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) || defined(PSA_WANT_ECC_SECP_R1_256))
|
||||
#if defined(PSA_WANT_ALG_SHA_256) && defined(PSA_WANT_ECC_SECP_R1_256)
|
||||
case MBEDTLS_TLS1_3_SIG_ECDSA_SECP256R1_SHA256:
|
||||
break;
|
||||
#endif /* PSA_WANT_ALG_SHA_256 && MBEDTLS_ECP_DP_SECP256R1_ENABLED */
|
||||
#if defined(PSA_WANT_ALG_SHA_384) && \
|
||||
(defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) || defined(PSA_WANT_ECC_SECP_R1_384))
|
||||
#if defined(PSA_WANT_ALG_SHA_384) && defined(PSA_WANT_ECC_SECP_R1_384)
|
||||
case MBEDTLS_TLS1_3_SIG_ECDSA_SECP384R1_SHA384:
|
||||
break;
|
||||
#endif /* PSA_WANT_ALG_SHA_384 && MBEDTLS_ECP_DP_SECP384R1_ENABLED */
|
||||
#if defined(PSA_WANT_ALG_SHA_512) && \
|
||||
(defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) || defined(PSA_WANT_ECC_SECP_R1_521))
|
||||
#if defined(PSA_WANT_ALG_SHA_512) && defined(PSA_WANT_ECC_SECP_R1_521)
|
||||
case MBEDTLS_TLS1_3_SIG_ECDSA_SECP521R1_SHA512:
|
||||
break;
|
||||
#endif /* PSA_WANT_ALG_SHA_512 && MBEDTLS_ECP_DP_SECP521R1_ENABLED */
|
||||
|
|
|
@ -4975,21 +4975,21 @@ static uint16_t ssl_preset_default_sig_algs[] = {
|
|||
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_ECDSA_CERT_REQ_ANY_ALLOWED_ENABLED) && \
|
||||
defined(MBEDTLS_MD_CAN_SHA256) && \
|
||||
defined(MBEDTLS_HAVE_SECP256R1)
|
||||
defined(PSA_WANT_ECC_SECP_R1_256)
|
||||
MBEDTLS_TLS1_3_SIG_ECDSA_SECP256R1_SHA256,
|
||||
// == MBEDTLS_SSL_TLS12_SIG_AND_HASH_ALG(MBEDTLS_SSL_SIG_ECDSA, MBEDTLS_SSL_HASH_SHA256)
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_ECDSA_CERT_REQ_ANY_ALLOWED_ENABLED) && \
|
||||
defined(MBEDTLS_MD_CAN_SHA384) && \
|
||||
defined(MBEDTLS_HAVE_SECP384R1)
|
||||
defined(PSA_WANT_ECC_SECP_R1_384)
|
||||
MBEDTLS_TLS1_3_SIG_ECDSA_SECP384R1_SHA384,
|
||||
// == MBEDTLS_SSL_TLS12_SIG_AND_HASH_ALG(MBEDTLS_SSL_SIG_ECDSA, MBEDTLS_SSL_HASH_SHA384)
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_ECDSA_CERT_REQ_ANY_ALLOWED_ENABLED) && \
|
||||
defined(MBEDTLS_MD_CAN_SHA512) && \
|
||||
defined(MBEDTLS_HAVE_SECP521R1)
|
||||
defined(PSA_WANT_ECC_SECP_R1_521)
|
||||
MBEDTLS_TLS1_3_SIG_ECDSA_SECP521R1_SHA512,
|
||||
// == MBEDTLS_SSL_TLS12_SIG_AND_HASH_ALG(MBEDTLS_SSL_SIG_ECDSA, MBEDTLS_SSL_HASH_SHA512)
|
||||
#endif
|
||||
|
|
|
@ -11308,10 +11308,8 @@ run_test "TLS 1.3: Test gnutls tls1_3 feature" \
|
|||
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3
|
||||
requires_config_enabled MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
|
||||
requires_ciphersuite_enabled TLS1-3-CHACHA20-POLY1305-SHA256
|
||||
requires_any_configs_enabled "MBEDTLS_ECP_DP_CURVE25519_ENABLED
|
||||
PSA_WANT_ECC_MONTGOMERY_255"
|
||||
requires_any_configs_enabled "MBEDTLS_ECP_DP_SECP256R1_ENABLED \
|
||||
PSA_WANT_ECC_SECP_R1_256"
|
||||
requires_any_configs_enabled "PSA_WANT_ECC_MONTGOMERY_255"
|
||||
requires_any_configs_enabled "PSA_WANT_ECC_SECP_R1_256"
|
||||
run_test "TLS 1.3: Default" \
|
||||
"$P_SRV allow_sha1=0 debug_level=3 crt_file=data_files/server5.crt key_file=data_files/server5.key force_version=tls13" \
|
||||
"$P_CLI allow_sha1=0" \
|
||||
|
|
Loading…
Reference in a new issue