summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/m_dss.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_dss.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_dss.c')
-rw-r--r--src/lib/libcrypto/evp/m_dss.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/lib/libcrypto/evp/m_dss.c b/src/lib/libcrypto/evp/m_dss.c
index 9066b7b88f..29ac76c401 100644
--- a/src/lib/libcrypto/evp/m_dss.c
+++ b/src/lib/libcrypto/evp/m_dss.c
@@ -86,18 +86,24 @@ final(EVP_MD_CTX *ctx, unsigned char *md)
86} 86}
87 87
88static const EVP_MD dsa_md = { 88static const EVP_MD dsa_md = {
89 NID_dsaWithSHA, 89 .type = NID_dsaWithSHA,
90 NID_dsaWithSHA, 90 .pkey_type = NID_dsaWithSHA,
91 SHA_DIGEST_LENGTH, 91 .md_size = SHA_DIGEST_LENGTH,
92 EVP_MD_FLAG_PKEY_DIGEST, 92 .flags = EVP_MD_FLAG_PKEY_DIGEST,
93 init, 93 .init = init,
94 update, 94 .update = update,
95 final, 95 .final = final,
96 NULL, 96 .copy = NULL,
97 NULL, 97 .cleanup = NULL,
98 EVP_PKEY_DSA_method, 98#ifndef OPENSSL_NO_DSA
99 SHA_CBLOCK, 99 .sign = (evp_sign_method *)DSA_sign,
100 sizeof(EVP_MD *) + sizeof(SHA_CTX), 100 .verify = (evp_verify_method *)DSA_verify,
101 .required_pkey_type = {
102 EVP_PKEY_DSA, EVP_PKEY_DSA2, EVP_PKEY_DSA3, EVP_PKEY_DSA4, 0,
103 },
104#endif
105 .block_size = SHA_CBLOCK,
106 .ctx_size = sizeof(EVP_MD *) + sizeof(SHA_CTX),
101}; 107};
102 108
103const EVP_MD * 109const EVP_MD *