diff options
author | jsing <> | 2014-06-10 14:14:07 +0000 |
---|---|---|
committer | jsing <> | 2014-06-10 14:14:07 +0000 |
commit | eab708047a937230584142a2714d5293b2c20176 (patch) | |
tree | e21d427847fe0052e8aaa1f761714867b6e0e12d /src/lib/libcrypto/evp/m_wp.c | |
parent | 4067b1a94cae473804f9b1319a455ac636387cbd (diff) | |
download | openbsd-eab708047a937230584142a2714d5293b2c20176.tar.gz openbsd-eab708047a937230584142a2714d5293b2c20176.tar.bz2 openbsd-eab708047a937230584142a2714d5293b2c20176.zip |
Use C99 initialisers for EVP_MD structs, for clarity, grepability and to
protect from future field reordering/removal.
No difference in generated assembly.
Diffstat (limited to 'src/lib/libcrypto/evp/m_wp.c')
-rw-r--r-- | src/lib/libcrypto/evp/m_wp.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/lib/libcrypto/evp/m_wp.c b/src/lib/libcrypto/evp/m_wp.c index ca53be6abb..27a0e8ab65 100644 --- a/src/lib/libcrypto/evp/m_wp.c +++ b/src/lib/libcrypto/evp/m_wp.c | |||
@@ -30,18 +30,22 @@ final(EVP_MD_CTX *ctx, unsigned char *md) | |||
30 | } | 30 | } |
31 | 31 | ||
32 | static const EVP_MD whirlpool_md = { | 32 | static const EVP_MD whirlpool_md = { |
33 | NID_whirlpool, | 33 | .type = NID_whirlpool, |
34 | 0, | 34 | .pkey_type = 0, |
35 | WHIRLPOOL_DIGEST_LENGTH, | 35 | .md_size = WHIRLPOOL_DIGEST_LENGTH, |
36 | 0, | 36 | .flags = 0, |
37 | init, | 37 | .init = init, |
38 | update, | 38 | .update = update, |
39 | final, | 39 | .final = final, |
40 | NULL, | 40 | .copy = NULL, |
41 | NULL, | 41 | .cleanup = NULL, |
42 | EVP_PKEY_NULL_method, | 42 | .sign = NULL, |
43 | WHIRLPOOL_BBLOCK/8, | 43 | .verify = NULL, |
44 | sizeof(EVP_MD *) + sizeof(WHIRLPOOL_CTX), | 44 | .required_pkey_type = { |
45 | 0, 0, 0, 0, | ||
46 | }, | ||
47 | .block_size = WHIRLPOOL_BBLOCK / 8, | ||
48 | .ctx_size = sizeof(EVP_MD *) + sizeof(WHIRLPOOL_CTX), | ||
45 | }; | 49 | }; |
46 | 50 | ||
47 | const EVP_MD * | 51 | const EVP_MD * |