summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_pmeth.c
diff options
context:
space:
mode:
authormiod <>2014-04-27 20:26:49 +0000
committermiod <>2014-04-27 20:26:49 +0000
commit45bb7f0ae87ddf787dd06d515db9afb04a74bf6c (patch)
tree319f4236c4f33e8d28d3d3a51c99e82d996e948f /src/lib/libcrypto/ec/ec_pmeth.c
parentcbbb78bcf8e4dca14564fbea5fdfe0703e2951cc (diff)
downloadopenbsd-45bb7f0ae87ddf787dd06d515db9afb04a74bf6c.tar.gz
openbsd-45bb7f0ae87ddf787dd06d515db9afb04a74bf6c.tar.bz2
openbsd-45bb7f0ae87ddf787dd06d515db9afb04a74bf6c.zip
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 'src/lib/libcrypto/ec/ec_pmeth.c')
-rw-r--r--src/lib/libcrypto/ec/ec_pmeth.c41
1 files changed, 13 insertions, 28 deletions
diff --git a/src/lib/libcrypto/ec/ec_pmeth.c b/src/lib/libcrypto/ec/ec_pmeth.c
index dfc8ace27b..c970d8c9ca 100644
--- a/src/lib/libcrypto/ec/ec_pmeth.c
+++ b/src/lib/libcrypto/ec/ec_pmeth.c
@@ -304,38 +304,23 @@ static int pkey_ec_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
304 return EC_KEY_generate_key(pkey->pkey.ec); 304 return EC_KEY_generate_key(pkey->pkey.ec);
305 } 305 }
306 306
307const EVP_PKEY_METHOD ec_pkey_meth = 307const EVP_PKEY_METHOD ec_pkey_meth = {
308 { 308 .pkey_id = EVP_PKEY_EC,
309 EVP_PKEY_EC,
310 0,
311 pkey_ec_init,
312 pkey_ec_copy,
313 pkey_ec_cleanup,
314
315 0,
316 pkey_ec_paramgen,
317
318 0,
319 pkey_ec_keygen,
320
321 0,
322 pkey_ec_sign,
323
324 0,
325 pkey_ec_verify,
326 309
327 0,0, 310 .init = pkey_ec_init,
311 .copy = pkey_ec_copy,
312 .cleanup = pkey_ec_cleanup,
328 313
329 0,0,0,0, 314 .paramgen = pkey_ec_paramgen,
330 315
331 0,0, 316 .keygen = pkey_ec_keygen,
332 317
333 0,0, 318 .sign = pkey_ec_sign,
334 319
335 0, 320 .verify = pkey_ec_verify,
336 pkey_ec_derive,
337 321
338 pkey_ec_ctrl, 322 .derive = pkey_ec_derive,
339 pkey_ec_ctrl_str
340 323
341 }; 324 .ctrl = pkey_ec_ctrl,
325 .ctrl_str = pkey_ec_ctrl_str
326};