diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-06-10 14:14:08 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-06-10 14:14:08 +0000 |
commit | cd5a0ffb7ba467378e0036ffb9f9a66bee17d759 (patch) | |
tree | a53e2d10a1748b4863fe2d4a1f606ee2cfba6ef0 /lib/libcrypto/evp/m_mdc2.c | |
parent | e216aa2f52f911ae503d69497fdb3426b5eaa235 (diff) |
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 'lib/libcrypto/evp/m_mdc2.c')
-rw-r--r-- | lib/libcrypto/evp/m_mdc2.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/lib/libcrypto/evp/m_mdc2.c b/lib/libcrypto/evp/m_mdc2.c index 7983ed6acbb..7bd6632f46a 100644 --- a/lib/libcrypto/evp/m_mdc2.c +++ b/lib/libcrypto/evp/m_mdc2.c @@ -90,18 +90,24 @@ final(EVP_MD_CTX *ctx, unsigned char *md) } static const EVP_MD mdc2_md = { - NID_mdc2, - NID_mdc2WithRSA, - MDC2_DIGEST_LENGTH, - 0, - init, - update, - final, - NULL, - NULL, - EVP_PKEY_RSA_ASN1_OCTET_STRING_method, - MDC2_BLOCK, - sizeof(EVP_MD *) + sizeof(MDC2_CTX), + .type = NID_mdc2, + .pkey_type = NID_mdc2WithRSA, + .md_size = MDC2_DIGEST_LENGTH, + .flags = 0, + .init = init, + .update = update, + .final = final, + .copy = NULL, + .cleanup = NULL, +#ifndef OPENSSL_NO_RSA + .sign = (evp_sign_method *)RSA_sign_ASN1_OCTET_STRING, + .verify = (evp_verify_method *)RSA_verify_ASN1_OCTET_STRING, + .required_pkey_type = { + EVP_PKEY_RSA, EVP_PKEY_RSA2, 0, 0, + }, +#endif + .block_size = MDC2_BLOCK, + .ctx_size = sizeof(EVP_MD *) + sizeof(MDC2_CTX), }; const EVP_MD * |