summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/m_dss1.c
diff options
context:
space:
mode:
authorjsing <>2014-06-10 14:14:07 +0000
committerjsing <>2014-06-10 14:14:07 +0000
commiteab708047a937230584142a2714d5293b2c20176 (patch)
treee21d427847fe0052e8aaa1f761714867b6e0e12d /src/lib/libcrypto/evp/m_dss1.c
parent4067b1a94cae473804f9b1319a455ac636387cbd (diff)
downloadopenbsd-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_dss1.c')
-rw-r--r--src/lib/libcrypto/evp/m_dss1.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/lib/libcrypto/evp/m_dss1.c b/src/lib/libcrypto/evp/m_dss1.c
index ec79cd7c8c..1583769142 100644
--- a/src/lib/libcrypto/evp/m_dss1.c
+++ b/src/lib/libcrypto/evp/m_dss1.c
@@ -87,18 +87,24 @@ final(EVP_MD_CTX *ctx, unsigned char *md)
87} 87}
88 88
89static const EVP_MD dss1_md = { 89static const EVP_MD dss1_md = {
90 NID_dsa, 90 .type = NID_dsa,
91 NID_dsaWithSHA1, 91 .pkey_type = NID_dsaWithSHA1,
92 SHA_DIGEST_LENGTH, 92 .md_size = SHA_DIGEST_LENGTH,
93 EVP_MD_FLAG_PKEY_DIGEST, 93 .flags = EVP_MD_FLAG_PKEY_DIGEST,
94 init, 94 .init = init,
95 update, 95 .update = update,
96 final, 96 .final = final,
97 NULL, 97 .copy = NULL,
98 NULL, 98 .cleanup = NULL,
99 EVP_PKEY_DSA_method, 99#ifndef OPENSSL_NO_DSA
100 SHA_CBLOCK, 100 .sign = (evp_sign_method *)DSA_sign,
101 sizeof(EVP_MD *) + sizeof(SHA_CTX), 101 .verify = (evp_verify_method *)DSA_verify,
102 .required_pkey_type = {
103 EVP_PKEY_DSA, EVP_PKEY_DSA2, EVP_PKEY_DSA3, EVP_PKEY_DSA4, 0,
104 },
105#endif
106 .block_size = SHA_CBLOCK,
107 .ctx_size = sizeof(EVP_MD *) + sizeof(SHA_CTX),
102}; 108};
103 109
104const EVP_MD * 110const EVP_MD *