Merge remote-tracking branch 'origin/pr/2678' into development

* origin/pr/2678:
  Update crypto submodule to 1.1.0d2
  all.sh: Perform targeted EtM tests for MAC-less configs
  ssl: Don't access non-existent encrypt_then_mac field
This commit is contained in:
Jaeden Amero 2019-06-10 11:00:14 +01:00
commit a3daa21d8c
4 changed files with 19 additions and 3 deletions

2
crypto

@ -1 +1 @@
Subproject commit 8907b019e756d2f02f21a1a32f072d20de13965e Subproject commit 47f2de132936905d97a93e2ddf7f5237ab232fbe

View File

@ -953,7 +953,8 @@ int mbedtls_ssl_derive_keys( mbedtls_ssl_context *ssl )
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> derive keys" ) ); MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> derive keys" ) );
#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) #if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) && \
defined(MBEDTLS_SSL_SOME_MODES_USE_MAC)
transform->encrypt_then_mac = session->encrypt_then_mac; transform->encrypt_then_mac = session->encrypt_then_mac;
#endif #endif
transform->minor_ver = ssl->minor_ver; transform->minor_ver = ssl->minor_ver;

View File

@ -953,6 +953,20 @@ component_test_no_max_fragment_length_small_ssl_out_content_len () {
if_build_succeeded tests/ssl-opt.sh -f "Max fragment length\|Large buffer" if_build_succeeded tests/ssl-opt.sh -f "Max fragment length\|Large buffer"
} }
component_test_when_no_ciphersuites_have_mac () {
msg "build: when no ciphersuites have MAC"
scripts/config.pl unset MBEDTLS_CIPHER_NULL_CIPHER
scripts/config.pl unset MBEDTLS_ARC4_C
scripts/config.pl unset MBEDTLS_CIPHER_MODE_CBC
make
msg "test: !MBEDTLS_SSL_SOME_MODES_USE_MAC"
make test
msg "test ssl-opt.sh: !MBEDTLS_SSL_SOME_MODES_USE_MAC"
if_build_succeeded tests/ssl-opt.sh -f 'Default\|EtM' -e 'without EtM'
}
component_test_null_entropy () { component_test_null_entropy () {
msg "build: default config with MBEDTLS_TEST_NULL_ENTROPY (ASan build)" msg "build: default config with MBEDTLS_TEST_NULL_ENTROPY (ASan build)"
scripts/config.pl set MBEDTLS_TEST_NULL_ENTROPY scripts/config.pl set MBEDTLS_TEST_NULL_ENTROPY

View File

@ -159,7 +159,8 @@ static int build_transforms( mbedtls_ssl_transform *t_in,
* Setup transforms * Setup transforms
*/ */
#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) #if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) && \
defined(MBEDTLS_SSL_SOME_MODES_USE_MAC)
t_out->encrypt_then_mac = etm; t_out->encrypt_then_mac = etm;
t_in->encrypt_then_mac = etm; t_in->encrypt_then_mac = etm;
#else #else