diff options
author | tb <> | 2022-09-02 13:21:32 +0000 |
---|---|---|
committer | tb <> | 2022-09-02 13:21:32 +0000 |
commit | 632f779685384b67b7394b90bd223655d193156f (patch) | |
tree | cd881cb6b5680bba506d6c049ad7a839d6523e19 | |
parent | 6eaa9e57cbf77b24e9df2ed8e05bd884bb149428 (diff) | |
download | openbsd-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.c | 9 |
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 | ||
31 | struct sha_test sha_tests[] = { | 31 | static 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 | ||
308 | struct sha_repetition_test | 308 | struct 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 | ||
316 | struct sha_repetition_test sha_repetition_tests[] = { | 315 | static const struct sha_repetition_test sha_repetition_tests[] = { |
317 | /* SHA-1 */ | 316 | /* SHA-1 */ |
318 | { | 317 | { |
319 | .algorithm = NID_sha1, | 318 | .algorithm = NID_sha1, |