diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2014-04-27 20:26:50 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2014-04-27 20:26:50 +0000 |
commit | e5cffcd34247f85edfdeb62a15a64dfbfbd449e0 (patch) | |
tree | da4996e6e0a1e6f377715dfbc7b3352529477cba /lib/libcrypto/cmac/cm_pmeth.c | |
parent | a87db0183f55bcd74e22af7a30de8ff482d0495b (diff) |
Use C99 initializers for the various FOO_METHOD structs. More readable, and
avoid unreadable/unmaintainable constructs like that:
const EVP_PKEY_ASN1_METHOD cmac_asn1_meth =
{
EVP_PKEY_CMAC,
EVP_PKEY_CMAC,
0,
"CMAC",
"OpenSSL CMAC method",
0,0,0,0,
0,0,0,
cmac_size,
0,
0,0,0,0,0,0,0,
cmac_key_free,
0,
0,0
};
ok matthew@ deraadt@
Diffstat (limited to 'lib/libcrypto/cmac/cm_pmeth.c')
-rw-r--r-- | lib/libcrypto/cmac/cm_pmeth.c | 42 |
1 files changed, 12 insertions, 30 deletions
diff --git a/lib/libcrypto/cmac/cm_pmeth.c b/lib/libcrypto/cmac/cm_pmeth.c index 00aa4d64d2b..e1a00e90bb9 100644 --- a/lib/libcrypto/cmac/cm_pmeth.c +++ b/lib/libcrypto/cmac/cm_pmeth.c @@ -188,37 +188,19 @@ static int pkey_cmac_ctrl_str(EVP_PKEY_CTX *ctx, return -2; } -const EVP_PKEY_METHOD cmac_pkey_meth = - { - EVP_PKEY_CMAC, - EVP_PKEY_FLAG_SIGCTX_CUSTOM, - pkey_cmac_init, - pkey_cmac_copy, - pkey_cmac_cleanup, - - 0, 0, - - 0, - pkey_cmac_keygen, - - 0, 0, - - 0, 0, - - 0,0, - - cmac_signctx_init, - cmac_signctx, - - 0,0, - - 0,0, +const EVP_PKEY_METHOD cmac_pkey_meth = { + .pkey_id = EVP_PKEY_CMAC, + .flags = EVP_PKEY_FLAG_SIGCTX_CUSTOM, - 0,0, + .init = pkey_cmac_init, + .copy = pkey_cmac_copy, + .cleanup = pkey_cmac_cleanup, - 0,0, + .keygen = pkey_cmac_keygen, - pkey_cmac_ctrl, - pkey_cmac_ctrl_str + .signctx_init = cmac_signctx_init, + .signctx = cmac_signctx, - }; + .ctrl = pkey_cmac_ctrl, + .ctrl_str = pkey_cmac_ctrl_str +}; |