diff options
author | Jaeden Amero <jaeden.amero@arm.com> | 2019-02-22 12:55:30 +0000 |
---|---|---|
committer | Jaeden Amero <jaeden.amero@arm.com> | 2019-02-22 12:55:30 +0000 |
commit | 86016a03a1c28b5d4ddd4d27aa950794e3b51143 (patch) | |
tree | af13d78dbe636b47ffb1be72066acd74144ec074 /tests | |
parent | e895342522a2b934e3c28da2ebb01dc427c13d66 (diff) | |
parent | 85fd913950de673a7804e384a233cd85c050036f (diff) | |
download | mbedtls-86016a03a1c28b5d4ddd4d27aa950794e3b51143.zip mbedtls-86016a03a1c28b5d4ddd4d27aa950794e3b51143.tar.gz mbedtls-86016a03a1c28b5d4ddd4d27aa950794e3b51143.tar.bz2 |
Merge remote-tracking branch 'origin/pr/2338' into development
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/scripts/all.sh | 1 | ||||
-rwxr-xr-x | tests/ssl-opt.sh | 47 |
2 files changed, 48 insertions, 0 deletions
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 9b061d3..2688159 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -852,6 +852,7 @@ component_test_use_psa_crypto_full_cmake_asan() { msg "build: cmake, full config + MBEDTLS_USE_PSA_CRYPTO, ASan" scripts/config.pl full scripts/config.pl unset MBEDTLS_MEMORY_BACKTRACE # too slow for tests + scripts/config.pl unset MBEDTLS_ECP_RESTARTABLE # restartable ECC not supported through PSA scripts/config.pl set MBEDTLS_PSA_CRYPTO_C scripts/config.pl set MBEDTLS_USE_PSA_CRYPTO CC=gcc cmake -D USE_CRYPTO_SUBMODULE=1 -D CMAKE_BUILD_TYPE:String=Asan . diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 1d852ba..ff05f64 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -781,6 +781,30 @@ run_test_psa() { -C "Failed to setup PSA-based cipher context"\ -S "Failed to setup PSA-based cipher context"\ -s "Protocol is TLSv1.2" \ + -c "Perform PSA-based ECDH computation."\ + -c "Perform PSA-based computation of digest of ServerKeyExchange" \ + -S "error" \ + -C "error" +} + +run_test_psa_force_curve() { + requires_config_enabled MBEDTLS_USE_PSA_CRYPTO + run_test "PSA - ECDH with $1" \ + "$P_SRV debug_level=4 force_version=tls1_2" \ + "$P_CLI debug_level=4 force_version=tls1_2 force_ciphersuite=TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 curves=$1" \ + 0 \ + -c "Successfully setup PSA-based decryption cipher context" \ + -c "Successfully setup PSA-based encryption cipher context" \ + -c "PSA calc verify" \ + -c "calc PSA finished" \ + -s "Successfully setup PSA-based decryption cipher context" \ + -s "Successfully setup PSA-based encryption cipher context" \ + -s "PSA calc verify" \ + -s "calc PSA finished" \ + -C "Failed to setup PSA-based cipher context"\ + -S "Failed to setup PSA-based cipher context"\ + -s "Protocol is TLSv1.2" \ + -c "Perform PSA-based ECDH computation."\ -c "Perform PSA-based computation of digest of ServerKeyExchange" \ -S "error" \ -C "error" @@ -944,6 +968,29 @@ run_test_psa TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA run_test_psa TLS-ECDHE-ECDSA-WITH-AES-128-CBC-SHA256 run_test_psa TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA384 +requires_config_enabled MBEDTLS_ECP_DP_SECP521R1_ENABLED +run_test_psa_force_curve "secp521r1" +requires_config_enabled MBEDTLS_ECP_DP_BP512R1_ENABLED +run_test_psa_force_curve "brainpoolP512r1" +requires_config_enabled MBEDTLS_ECP_DP_SECP384R1_ENABLED +run_test_psa_force_curve "secp384r1" +requires_config_enabled MBEDTLS_ECP_DP_BP384R1_ENABLED +run_test_psa_force_curve "brainpoolP384r1" +requires_config_enabled MBEDTLS_ECP_DP_SECP256R1_ENABLED +run_test_psa_force_curve "secp256r1" +requires_config_enabled MBEDTLS_ECP_DP_SECP256K1_ENABLED +run_test_psa_force_curve "secp256k1" +requires_config_enabled MBEDTLS_ECP_DP_BP256R1_ENABLED +run_test_psa_force_curve "brainpoolP256r1" +requires_config_enabled MBEDTLS_ECP_DP_SECP224R1_ENABLED +run_test_psa_force_curve "secp224r1" +requires_config_enabled MBEDTLS_ECP_DP_SECP224K1_ENABLED +run_test_psa_force_curve "secp224k1" +requires_config_enabled MBEDTLS_ECP_DP_SECP192R1_ENABLED +run_test_psa_force_curve "secp192r1" +requires_config_enabled MBEDTLS_ECP_DP_SECP192K1_ENABLED +run_test_psa_force_curve "secp192k1" + # Test current time in ServerHello requires_config_enabled MBEDTLS_HAVE_TIME run_test "ServerHello contains gmt_unix_time" \ |