From ff5f6c8bb0f13214a44f444f7760343f0d42bcaf Mon Sep 17 00:00:00 2001 From: XiaokangQian Date: Tue, 23 Nov 2021 08:49:51 +0000 Subject: [PATCH] Refine test code and test scripts Signed-off-by: XiaokangQian --- programs/ssl/ssl_client2.c | 10 +++++++--- tests/scripts/all.sh | 2 -- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index b94536446..401f078d9 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -1534,10 +1534,12 @@ int main( int argc, char *argv[] ) { sig_alg_list[i++] = MBEDTLS_TLS13_SIG_ECDSA_SECP521R1_SHA512; } - else if( strcmp( q, "rsa_pkcs1_sha256" ) == 0 ) +#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) + else if( strcmp( q, "rsa_pss_rsae_sha256" ) == 0 ) { - sig_alg_list[i++] = MBEDTLS_TLS13_SIG_RSA_PKCS1_SHA1; + sig_alg_list[i++] = MBEDTLS_TLS13_SIG_RSA_PSS_RSAE_SHA256; } +#endif /* MBEDTLS_X509_RSASSA_PSS_SUPPORT */ else { mbedtls_printf( "unknown signature algorithm %s\n", q ); @@ -1545,7 +1547,9 @@ int main( int argc, char *argv[] ) mbedtls_printf( "ecdsa_secp256r1_sha256 " ); mbedtls_printf( "ecdsa_secp384r1_sha384 " ); mbedtls_printf( "ecdsa_secp521r1_sha512 " ); - mbedtls_printf( "rsa_pkcs1_sha256 " ); +#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) + mbedtls_printf( "rsa_pss_rsae_sha256 " ); +#endif /* MBEDTLS_X509_RSASSA_PSS_SUPPORT */ mbedtls_printf( "\n" ); goto exit; } diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 00c7f8821..6318d4d08 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -2613,8 +2613,6 @@ component_test_tls13_experimental_with_everest () { component_test_tls13_experimental_with_rsa () { msg "default config with MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL enabled, with rsa" scripts/config.py set MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL - scripts/config.py unset MBEDTLS_SSL_USE_MPS - scripts/config.py unset MBEDTLS_SSL_SRV_C scripts/config.py set MBEDTLS_SSL_CLI_C scripts/config.py set MBEDTLS_RSA_C scripts/config.py set MBEDTLS_X509_RSASSA_PSS_SUPPORT