From 801f3b3f429a5198f2622ec33c0ab799fa8c2dfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Thu, 2 Apr 2026 09:39:00 +0200 Subject: [PATCH] ECDH: improve comment in test function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- tests/suites/test_suite_ecdh.function | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/suites/test_suite_ecdh.function b/tests/suites/test_suite_ecdh.function index 71fe10ce19..9f469a4ed3 100644 --- a/tests/suites/test_suite_ecdh.function +++ b/tests/suites/test_suite_ecdh.function @@ -422,6 +422,10 @@ void ecdh_exchange_calc_secret(int grp_id, shared_secret_length = 0; /* Try again with an output buffer that's larger. */ + /* Note: this doubles as a weak test for re-using a context. A proper test + * for static ECDH with context re-use should also import multiple peer keys + * in a row and compute the corresponding shared secrets, but the below is + * already better then nothing. */ TEST_CALLOC(buf, min_buf_size + 1); TEST_EQUAL(0, mbedtls_ecdh_calc_secret(