From ca700b23711025dd65d396f81eeecd910c56c4ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 20 Oct 2015 14:47:00 +0200 Subject: [PATCH] Add config-thread.h to test-ref-configs.pl --- configs/config-thread.h | 4 ++++ tests/scripts/test-ref-configs.pl | 15 +++++++++++++++ tests/ssl-opt.sh | 7 +++++++ 3 files changed, 26 insertions(+) diff --git a/configs/config-thread.h b/configs/config-thread.h index 9ba8b84dd..3feef1379 100644 --- a/configs/config-thread.h +++ b/configs/config-thread.h @@ -71,6 +71,10 @@ #define MBEDTLS_SSL_SRV_C #define MBEDTLS_SSL_TLS_C +/* For tests using ssl-opt.sh */ +#define MBEDTLS_NET_C +#define MBEDTLS_TIMING_C + /* Save RAM by adjusting to our exact needs */ #define MBEDTLS_ECP_MAX_BITS 256 #define MBEDTLS_ENTROPY_MAX_SOURCES 2 diff --git a/tests/scripts/test-ref-configs.pl b/tests/scripts/test-ref-configs.pl index ebc032b11..b27d64c4b 100755 --- a/tests/scripts/test-ref-configs.pl +++ b/tests/scripts/test-ref-configs.pl @@ -22,6 +22,9 @@ my %configs = ( 'config-ccm-psk-tls1_2.h' => { 'compat' => '-m tls1_2 -f \'^TLS-PSK-WITH-AES-...-CCM-8\'', }, + 'config-thread.h' => { + 'opt' => '-f ECJPAKE.*nolog', + }, ); # If no config-name is provided, use all known configs. @@ -74,6 +77,18 @@ while( my ($conf, $data) = each %configs ) { { print "\nskipping compat.sh\n"; } + + my $opt = $data->{'opt'}; + if( $opt ) + { + print "\nrunning ssl-opt.sh $opt\n"; + system( "tests/ssl-opt.sh $opt" ) + and abort "Failed ssl-opt.sh: $conf\n"; + } + else + { + print "\nskipping ssl-opt.sh\n"; + } } system( "mv $config_h.bak $config_h" ) and warn "$config_h not restored\n"; diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 198288d13..ff2ca366f 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -2576,6 +2576,13 @@ run_test "ECJPAKE: password mismatch, DTLS" \ -c "re-using cached ecjpake parameters" \ -s "SSL - Verification of the message MAC failed" +# for tests with configs/config-thread.h +run_test "ECJPAKE: working, DTLS, nolog" \ + "$P_SRV dtls=1 ecjpake_pw=bla" \ + "$P_CLI dtls=1 ecjpake_pw=bla \ + force_ciphersuite=TLS-ECJPAKE-WITH-AES-128-CCM-8" \ + 0 + # Tests for ciphersuites per version run_test "Per-version suites: SSL3" \