summaryrefslogtreecommitdiff
path: root/lib/libcrypto/ec/ec_pmeth.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-04-27 20:26:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-04-27 20:26:50 +0000
commite5cffcd34247f85edfdeb62a15a64dfbfbd449e0 (patch)
treeda4996e6e0a1e6f377715dfbc7b3352529477cba /lib/libcrypto/ec/ec_pmeth.c
parenta87db0183f55bcd74e22af7a30de8ff482d0495b (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/ec/ec_pmeth.c')
-rw-r--r--lib/libcrypto/ec/ec_pmeth.c41
1 files changed, 13 insertions, 28 deletions
diff --git a/lib/libcrypto/ec/ec_pmeth.c b/lib/libcrypto/ec/ec_pmeth.c
index dfc8ace27b2..c970d8c9ca2 100644
--- a/lib/libcrypto/ec/ec_pmeth.c
+++ b/lib/libcrypto/ec/ec_pmeth.c
@@ -304,38 +304,23 @@ static int pkey_ec_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
return EC_KEY_generate_key(pkey->pkey.ec);
}
-const EVP_PKEY_METHOD ec_pkey_meth =
- {
- EVP_PKEY_EC,
- 0,
- pkey_ec_init,
- pkey_ec_copy,
- pkey_ec_cleanup,
-
- 0,
- pkey_ec_paramgen,
-
- 0,
- pkey_ec_keygen,
-
- 0,
- pkey_ec_sign,
-
- 0,
- pkey_ec_verify,
+const EVP_PKEY_METHOD ec_pkey_meth = {
+ .pkey_id = EVP_PKEY_EC,
- 0,0,
+ .init = pkey_ec_init,
+ .copy = pkey_ec_copy,
+ .cleanup = pkey_ec_cleanup,
- 0,0,0,0,
+ .paramgen = pkey_ec_paramgen,
- 0,0,
+ .keygen = pkey_ec_keygen,
- 0,0,
+ .sign = pkey_ec_sign,
- 0,
- pkey_ec_derive,
+ .verify = pkey_ec_verify,
- pkey_ec_ctrl,
- pkey_ec_ctrl_str
+ .derive = pkey_ec_derive,
- };
+ .ctrl = pkey_ec_ctrl,
+ .ctrl_str = pkey_ec_ctrl_str
+};