Merge pull request #10138 from XavierChapron/xch/constify-mbedtls_cipher_base_lookup_table-3.6
Constify cipher_wrap:mbedtls_cipher_base_lookup_table
diff --git a/framework b/framework
index a39ba59..4a84121 160000
--- a/framework
+++ b/framework
@@ -1 +1 @@
-Subproject commit a39ba59344fd4f1d0ee267ca414b9420d5dca9f5
+Subproject commit 4a841219ff9440f6a723e9e9612a33c44ad1e2f9
diff --git a/programs/psa/key_ladder_demo.sh b/programs/psa/key_ladder_demo.sh
index 9559877..e3afb66 100755
--- a/programs/psa/key_ladder_demo.sh
+++ b/programs/psa/key_ladder_demo.sh
@@ -3,7 +3,6 @@
# Copyright The Mbed TLS Contributors
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
-. "${0%/*}/../../framework/scripts/project_detection.sh"
. "${0%/*}/../../framework/scripts/demo_common.sh"
msg <<'EOF'
diff --git a/programs/psa/psa_hash_demo.sh b/programs/psa/psa_hash_demo.sh
index e10c3db..c2cc87a 100755
--- a/programs/psa/psa_hash_demo.sh
+++ b/programs/psa/psa_hash_demo.sh
@@ -3,7 +3,6 @@
# Copyright The Mbed TLS Contributors
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
-. "${0%/*}/../../framework/scripts/project_detection.sh"
. "${0%/*}/../../framework/scripts/demo_common.sh"
msg <<'EOF'
diff --git a/tests/src/test_helpers/ssl_helpers.c b/tests/src/test_helpers/ssl_helpers.c
index cf051d1..7fb23ab 100644
--- a/tests/src/test_helpers/ssl_helpers.c
+++ b/tests/src/test_helpers/ssl_helpers.c
@@ -611,6 +611,7 @@
{
int i = 0;
int ret = -1;
+ int ok = 0;
mbedtls_test_ssl_endpoint_certificate *cert = NULL;
#if defined(MBEDTLS_USE_PSA_CRYPTO)
mbedtls_svc_key_id_t key_slot = MBEDTLS_SVC_KEY_ID_INIT;
@@ -737,7 +738,13 @@
cert->pkey);
TEST_ASSERT(ret == 0);
+ ok = 1;
+
exit:
+ if (ret == 0 && !ok) {
+ /* Exiting due to a test assertion that isn't ret == 0 */
+ ret = -1;
+ }
if (ret != 0) {
test_ssl_endpoint_certificate_free(ep);
}
@@ -870,6 +877,7 @@
if (MBEDTLS_SSL_IS_CLIENT == endpoint_type) {
ret = mbedtls_ssl_set_hostname(&(ep->ssl), "localhost");
+ TEST_EQUAL(ret, 0);
}
#if defined(MBEDTLS_SSL_PROTO_DTLS) && defined(MBEDTLS_SSL_SRV_C)
@@ -906,7 +914,13 @@
TEST_EQUAL(mbedtls_ssl_get_user_data_n(&ep->ssl), user_data_n);
mbedtls_ssl_set_user_data_p(&ep->ssl, ep);
+ return 0;
+
exit:
+ if (ret == 0) {
+ /* Exiting due to a test assertion that isn't ret == 0 */
+ ret = -1;
+ }
return ret;
}
@@ -2603,6 +2617,7 @@
mbedtls_ssl_session *session)
{
int ret = -1;
+ int ok = 0;
unsigned char buf[64];
mbedtls_test_ssl_endpoint client_ep, server_ep;
@@ -2642,10 +2657,16 @@
ret = mbedtls_ssl_get_session(&(client_ep.ssl), session);
TEST_EQUAL(ret, 0);
+ ok = 1;
+
exit:
mbedtls_test_ssl_endpoint_free(&client_ep, NULL);
mbedtls_test_ssl_endpoint_free(&server_ep, NULL);
+ if (ret == 0 && !ok) {
+ /* Exiting due to a test assertion that isn't ret == 0 */
+ ret = -1;
+ }
return ret;
}
#endif /* MBEDTLS_SSL_CLI_C && MBEDTLS_SSL_SRV_C &&