From e0766f1b4a2133ea043e10cef86cc1c76f69b49b 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 --- 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 3c7d45152f..7a9a03adcd 100644 --- a/tests/suites/test_suite_ssl.function +++ b/tests/suites/test_suite_ssl.function @@ -50,6 +50,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 + \