summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2022-09-02 13:21:32 +0000
committertb <>2022-09-02 13:21:32 +0000
commit632f779685384b67b7394b90bd223655d193156f (patch)
treecd881cb6b5680bba506d6c049ad7a839d6523e19
parent6eaa9e57cbf77b24e9df2ed8e05bd884bb149428 (diff)
downloadopenbsd-632f779685384b67b7394b90bd223655d193156f.tar.gz
openbsd-632f779685384b67b7394b90bd223655d193156f.tar.bz2
openbsd-632f779685384b67b7394b90bd223655d193156f.zip
Make test tables static const and fix a style nit
-rw-r--r--src/regress/lib/libcrypto/sha/sha_test.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/regress/lib/libcrypto/sha/sha_test.c b/src/regress/lib/libcrypto/sha/sha_test.c
index 0d823a3db8..05806dbcc1 100644
--- a/src/regress/lib/libcrypto/sha/sha_test.c
+++ b/src/regress/lib/libcrypto/sha/sha_test.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sha_test.c,v 1.2 2022/09/02 11:13:34 tb Exp $ */ 1/* $OpenBSD: sha_test.c,v 1.3 2022/09/02 13:21:32 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2022 Joshua Sing <joshua@hypera.dev> 3 * Copyright (c) 2022 Joshua Sing <joshua@hypera.dev>
4 * 4 *
@@ -28,7 +28,7 @@ struct sha_test {
28 const uint8_t out[EVP_MAX_MD_SIZE]; 28 const uint8_t out[EVP_MAX_MD_SIZE];
29}; 29};
30 30
31struct sha_test sha_tests[] = { 31static const struct sha_test sha_tests[] = {
32 /* SHA-1 */ 32 /* SHA-1 */
33 { 33 {
34 .algorithm = NID_sha1, 34 .algorithm = NID_sha1,
@@ -305,15 +305,14 @@ struct sha_test sha_tests[] = {
305 }, 305 },
306}; 306};
307 307
308struct sha_repetition_test 308struct sha_repetition_test {
309{
310 const int algorithm; 309 const int algorithm;
311 const uint8_t in; 310 const uint8_t in;
312 const size_t in_repetitions; 311 const size_t in_repetitions;
313 const uint8_t out[EVP_MAX_MD_SIZE]; 312 const uint8_t out[EVP_MAX_MD_SIZE];
314}; 313};
315 314
316struct sha_repetition_test sha_repetition_tests[] = { 315static const struct sha_repetition_test sha_repetition_tests[] = {
317 /* SHA-1 */ 316 /* SHA-1 */
318 { 317 {
319 .algorithm = NID_sha1, 318 .algorithm = NID_sha1,