Fix the constant time 64 test
authorMatt Caswell <matt@openssl.org>
Fri, 23 Jun 2017 09:10:51 +0000 (10:10 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 23 Jun 2017 16:22:38 +0000 (17:22 +0100)
We were adding more tests than we had data for due to use of
sizeof instead of OSSL_NELEM. I also changed the 8 bit tests
for consistency, although they were already working.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3755)

test/constant_time_test.c

index 422c04ca27a43192e0ae50f03df118c49a654add..fdd4075c775c4e21eb1c7a875bf61def58a90cbc 100644 (file)
@@ -332,6 +332,6 @@ void register_tests(void)
     ADD_TEST(test_sizeofs);
     ADD_ALL_TESTS(test_binops, OSSL_NELEM(test_values));
     ADD_ALL_TESTS(test_signed, OSSL_NELEM(signed_test_values));
-    ADD_ALL_TESTS(test_8values, sizeof(test_values_8));
-    ADD_ALL_TESTS(test_64values, sizeof(test_values_64));
+    ADD_ALL_TESTS(test_8values, OSSL_NELEM(test_values_8));
+    ADD_ALL_TESTS(test_64values, OSSL_NELEM(test_values_64));
 }