From 23370efdea9590ae9129e8cf011bf466e22c0e8a Mon Sep 17 00:00:00 2001 From: Ben Taylor Date: Mon, 12 Oct 2026 13:41:31 +0100 Subject: [PATCH] Add comment explaining the derivation of the number of keys Signed-off-by: Ben Taylor (cherry picked from commit e0766f1b4a2133ea043e10cef86cc1c76f69b49b) --- tests/suites/test_suite_ssl.function | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function index bdc4b8edf5..418a78bb58 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -49,6 +49,14 @@ static size_t ssl_test_tiny_key_slice_length(size_t slice_idx) default: return 1; } } + +/* In the below definition SSL_TEST_KEY_SLICE_1_LENGTH has 4 slots and + * SSL_TEST_KEY_SLICE_2_LENGTH has 10 all other slices have 1. + * psa_key_slot_volatile_slice_count() returns the total number of slices. + * However we have already countes slices 1 and 2, so we mustr subtract 2 from + * this number to avoid double counting. + */ + #define SSL_TEST_MAX_VOLATILE_KEYS \ (SSL_TEST_KEY_SLICE_1_LENGTH + \ SSL_TEST_KEY_SLICE_2_LENGTH + \