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_md5.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_md5.c')
-rw-r--r-- | src/lib/libcrypto/evp/m_md5.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/lib/libcrypto/evp/m_md5.c b/src/lib/libcrypto/evp/m_md5.c index 03c78df9e8..d1c4bc1742 100644 --- a/src/lib/libcrypto/evp/m_md5.c +++ b/src/lib/libcrypto/evp/m_md5.c | |||
@@ -89,18 +89,24 @@ final(EVP_MD_CTX *ctx, unsigned char *md) | |||
89 | } | 89 | } |
90 | 90 | ||
91 | static const EVP_MD md5_md = { | 91 | static const EVP_MD md5_md = { |
92 | NID_md5, | 92 | .type = NID_md5, |
93 | NID_md5WithRSAEncryption, | 93 | .pkey_type = NID_md5WithRSAEncryption, |
94 | MD5_DIGEST_LENGTH, | 94 | .md_size = MD5_DIGEST_LENGTH, |
95 | 0, | 95 | .flags = 0, |
96 | init, | 96 | .init = init, |
97 | update, | 97 | .update = update, |
98 | final, | 98 | .final = final, |
99 | NULL, | 99 | .copy = NULL, |
100 | NULL, | 100 | .cleanup = NULL, |
101 | EVP_PKEY_RSA_method, | 101 | #ifndef OPENSSL_NO_RSA |
102 | MD5_CBLOCK, | 102 | .sign = (evp_sign_method *)RSA_sign, |
103 | sizeof(EVP_MD *) + sizeof(MD5_CTX), | 103 | .verify = (evp_verify_method *)RSA_verify, |
104 | .required_pkey_type = { | ||
105 | EVP_PKEY_RSA, EVP_PKEY_RSA2, 0, 0, | ||
106 | }, | ||
107 | #endif | ||
108 | .block_size = MD5_CBLOCK, | ||
109 | .ctx_size = sizeof(EVP_MD *) + sizeof(MD5_CTX), | ||
104 | }; | 110 | }; |
105 | 111 | ||
106 | const EVP_MD * | 112 | const EVP_MD * |