mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-07-30 16:26:33 +08:00
Merge e579a4d6d555a0869210f0ab20a1dc349dd15c32 into 3bb373867917b674265067cbd38b9d252c43d014
This commit is contained in:
commit
ae21eab095
@ -33,6 +33,7 @@ SRVMEM=0
|
||||
: ${M_SRV:=../programs/ssl/ssl_server2}
|
||||
: ${M_CLI:=../programs/ssl/ssl_client2}
|
||||
: ${OPENSSL:=openssl}
|
||||
: ${M_QUERY:=../programs/test/query_compile_time_config}
|
||||
: ${GNUTLS_CLI:=gnutls-cli}
|
||||
: ${GNUTLS_SERV:=gnutls-serv}
|
||||
|
||||
@ -993,6 +994,15 @@ else
|
||||
DOG_DELAY=10
|
||||
fi
|
||||
|
||||
# `$M_QUERY MBEDTLS_PLATFORM_STD_NV_SEED_FILE` will return `"seedfile"` and
|
||||
# `dd` will create file with double quotes. That's not expected, with `eval`
|
||||
# we can remove double quotes
|
||||
NV_SEED_FILE=$(eval "echo `$M_QUERY MBEDTLS_PLATFORM_STD_NV_SEED_FILE`")
|
||||
if [ -n "$NV_SEED_FILE" ] && [ ! -f $NV_SEED_FILE ]
|
||||
then
|
||||
dd if=/dev/urandom of=$NV_SEED_FILE bs=64 count=1 2>/dev/null
|
||||
fi
|
||||
|
||||
SKIP_NEXT="NO"
|
||||
|
||||
trap cleanup INT TERM HUP
|
||||
|
||||
@ -337,11 +337,10 @@ get_config_value_or_default() {
|
||||
# Note that if the configuration is not defined or is defined to nothing,
|
||||
# the output of this function will be an empty string.
|
||||
if [ "$LIST_TESTS" -eq 0 ];then
|
||||
${P_SRV} "query_config=${1}"
|
||||
${P_QUERY} "${1}"
|
||||
else
|
||||
echo "1"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
requires_config_value_at_least() {
|
||||
@ -2142,6 +2141,17 @@ CLI_OUT="cli_out.$$"
|
||||
PXY_OUT="pxy_out.$$"
|
||||
SESSION="session.$$"
|
||||
|
||||
|
||||
# `$P_QUERY MBEDTLS_PLATFORM_STD_NV_SEED_FILE` will return `"seedfile"` and
|
||||
# `dd` will create file with double quotes. That's not expected, with `eval`
|
||||
# we can remove double quotes
|
||||
NV_SEED_FILE=$(eval "echo `$P_QUERY MBEDTLS_PLATFORM_STD_NV_SEED_FILE`")
|
||||
if [ -n "$NV_SEED_FILE" ] && [ ! -f $NV_SEED_FILE ]
|
||||
then
|
||||
dd if=/dev/urandom of=$NV_SEED_FILE bs=64 count=1 2>/dev/null
|
||||
fi
|
||||
|
||||
|
||||
SKIP_NEXT="NO"
|
||||
|
||||
trap cleanup INT TERM HUP
|
||||
|
||||
@ -4248,6 +4248,8 @@ void raw_key_agreement_fail(int bad_server_ecdhe_key)
|
||||
&(server.socket),
|
||||
BUFFSIZE), 0);
|
||||
|
||||
USE_PSA_INIT();
|
||||
|
||||
TEST_EQUAL(mbedtls_test_move_handshake_to_state(
|
||||
&(client.ssl), &(server.ssl),
|
||||
MBEDTLS_SSL_CLIENT_KEY_EXCHANGE), 0);
|
||||
@ -4263,6 +4265,7 @@ void raw_key_agreement_fail(int bad_server_ecdhe_key)
|
||||
(client.ssl).handshake->xxdh_psa_peerkey[0] ^= 0x02;
|
||||
}
|
||||
|
||||
|
||||
TEST_EQUAL(mbedtls_test_move_handshake_to_state(
|
||||
&(client.ssl), &(server.ssl), MBEDTLS_SSL_HANDSHAKE_OVER),
|
||||
bad_server_ecdhe_key ? MBEDTLS_ERR_SSL_HW_ACCEL_FAILED : 0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user