Improve mbedtls_ct_memmove_left w.r.t. const-flow tests

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman
2023-07-28 16:13:52 +01:00
parent 8de3482507
commit fa5a4bbb02
2 changed files with 20 additions and 6 deletions

View File

@@ -329,11 +329,10 @@ void mbedtls_ct_memmove_left(int len, int offset)
buf_expected[i] = buf[i];
}
//Note: Marking o as secret causes false positives from Memsan
//TEST_CF_SECRET(&o, sizeof(o));
TEST_CF_SECRET(&o, sizeof(o));
TEST_CF_SECRET(buf, l);
mbedtls_ct_memmove_left(buf, l, o);
//TEST_CF_PUBLIC(&o, sizeof(o));
TEST_CF_PUBLIC(&o, sizeof(o));
TEST_CF_PUBLIC(buf, l);
if (l > 0) {