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_null.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_null.c')
-rw-r--r-- | src/lib/libcrypto/evp/m_null.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/lib/libcrypto/evp/m_null.c b/src/lib/libcrypto/evp/m_null.c index ad658e7045..ecd0c2f2d6 100644 --- a/src/lib/libcrypto/evp/m_null.c +++ b/src/lib/libcrypto/evp/m_null.c | |||
@@ -81,18 +81,22 @@ final(EVP_MD_CTX *ctx, unsigned char *md) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | static const EVP_MD null_md = { | 83 | static const EVP_MD null_md = { |
84 | NID_undef, | 84 | .type = NID_undef, |
85 | NID_undef, | 85 | .pkey_type = NID_undef, |
86 | 0, | 86 | .md_size = 0, |
87 | 0, | 87 | .flags = 0, |
88 | init, | 88 | .init = init, |
89 | update, | 89 | .update = update, |
90 | final, | 90 | .final = final, |
91 | NULL, | 91 | .copy = NULL, |
92 | NULL, | 92 | .cleanup = NULL, |
93 | EVP_PKEY_NULL_method, | 93 | .sign = NULL, |
94 | 0, | 94 | .verify = NULL, |
95 | sizeof(EVP_MD *), | 95 | .required_pkey_type = { |
96 | 0, 0, 0, 0, | ||
97 | }, | ||
98 | .block_size = 0, | ||
99 | .ctx_size = sizeof(EVP_MD *), | ||
96 | }; | 100 | }; |
97 | 101 | ||
98 | const EVP_MD * | 102 | const EVP_MD * |