From 6fce81637e3c0e0300d9eb9519161764f58be7b5 Mon Sep 17 00:00:00 2001 From: Ron Eldor Date: Mon, 28 Jan 2019 15:01:53 +0200 Subject: [PATCH] Add explanation for okm_string size Add explanation for why the size of `okm_string` buffer is twice as `okm` buffer. --- tests/suites/test_suite_hkdf.function | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/suites/test_suite_hkdf.function b/tests/suites/test_suite_hkdf.function index e41422a63..fc0e24217 100644 --- a/tests/suites/test_suite_hkdf.function +++ b/tests/suites/test_suite_hkdf.function @@ -19,6 +19,10 @@ void test_hkdf( int md_alg, char *hex_ikm_string, char *hex_salt_string, unsigned char info[128] = { '\0' }; unsigned char expected_okm[128] = { '\0' }; unsigned char okm[128] = { '\0' }; + /* + * okm_string is the string representation of okm, + * so its size is twice as the size of okm. + */ unsigned char okm_string[256] = { '\0' }; const mbedtls_md_info_t *md = mbedtls_md_info_from_type( md_alg );