summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/evp/m_null.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2014-06-10 14:14:07 +0000
committerjsing <jsing@openbsd.org>2014-06-10 14:14:07 +0000
commit2e8a773ba88317f9f0f6760b5c10665850cf95f8 (patch)
tree3d8490667e08501858fd2a8c56a07809cd2ad6bc /lib/libcrypto/evp/m_null.c
parentMore KNF. (diff)
downloadwireguard-openbsd-2e8a773ba88317f9f0f6760b5c10665850cf95f8.tar.xz
wireguard-openbsd-2e8a773ba88317f9f0f6760b5c10665850cf95f8.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 'lib/libcrypto/evp/m_null.c')
-rw-r--r--lib/libcrypto/evp/m_null.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/lib/libcrypto/evp/m_null.c b/lib/libcrypto/evp/m_null.c
index ad658e7045e..ecd0c2f2d6e 100644
--- a/lib/libcrypto/evp/m_null.c
+++ b/lib/libcrypto/evp/m_null.c
@@ -81,18 +81,22 @@ final(EVP_MD_CTX *ctx, unsigned char *md)
}
static const EVP_MD null_md = {
- NID_undef,
- NID_undef,
- 0,
- 0,
- init,
- update,
- final,
- NULL,
- NULL,
- EVP_PKEY_NULL_method,
- 0,
- sizeof(EVP_MD *),
+ .type = NID_undef,
+ .pkey_type = NID_undef,
+ .md_size = 0,
+ .flags = 0,
+ .init = init,
+ .update = update,
+ .final = final,
+ .copy = NULL,
+ .cleanup = NULL,
+ .sign = NULL,
+ .verify = NULL,
+ .required_pkey_type = {
+ 0, 0, 0, 0,
+ },
+ .block_size = 0,
+ .ctx_size = sizeof(EVP_MD *),
};
const EVP_MD *