Add componet test and rsa signature options

Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
This commit is contained in:
XiaokangQian 2021-11-23 07:19:23 +00:00
parent a27b3526bf
commit f977e9af6d
2 changed files with 21 additions and 0 deletions

View File

@ -1534,6 +1534,10 @@ int main( int argc, char *argv[] )
{
sig_alg_list[i++] = MBEDTLS_TLS13_SIG_ECDSA_SECP521R1_SHA512;
}
else if( strcmp( q, "rsa_pkcs1_sha256" ) == 0 )
{
sig_alg_list[i++] = MBEDTLS_TLS13_SIG_RSA_PKCS1_SHA1;
}
else
{
mbedtls_printf( "unknown signature algorithm %s\n", q );
@ -1541,6 +1545,7 @@ 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 " );
mbedtls_printf( "\n" );
goto exit;
}

View File

@ -2610,6 +2610,22 @@ component_test_tls13_experimental_with_everest () {
if_build_succeeded tests/ssl-opt.sh
}
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
cmake CC=gcc CMAKE_BUILD_TYPE=ASanDbg .
make
msg "test: default config with MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL enabled, with rsa"
make test
msg "ssl-opt.sh (TLS 1.3 experimental)"
if_build_succeeded tests/ssl-opt.sh -f "TLS 1.3"
}
component_build_mingw () {
msg "build: Windows cross build - mingw64, make (Link Library)" # ~ 30s
make CC=i686-w64-mingw32-gcc AR=i686-w64-mingw32-ar LD=i686-w64-minggw32-ld CFLAGS='-Werror -Wall -Wextra' WINDOWS_BUILD=1 lib programs