diff options
| author | miod <> | 2014-04-27 20:26:49 +0000 |
|---|---|---|
| committer | miod <> | 2014-04-27 20:26:49 +0000 |
| commit | 45bb7f0ae87ddf787dd06d515db9afb04a74bf6c (patch) | |
| tree | 319f4236c4f33e8d28d3d3a51c99e82d996e948f /src/lib/libcrypto/ec/ec_ameth.c | |
| parent | cbbb78bcf8e4dca14564fbea5fdfe0703e2951cc (diff) | |
| download | openbsd-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_ameth.c')
| -rw-r--r-- | src/lib/libcrypto/ec/ec_ameth.c | 64 |
1 files changed, 31 insertions, 33 deletions
diff --git a/src/lib/libcrypto/ec/ec_ameth.c b/src/lib/libcrypto/ec/ec_ameth.c index 79dd11083e..0e6381f543 100644 --- a/src/lib/libcrypto/ec/ec_ameth.c +++ b/src/lib/libcrypto/ec/ec_ameth.c | |||
| @@ -626,36 +626,34 @@ static int ec_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) | |||
| 626 | 626 | ||
| 627 | } | 627 | } |
| 628 | 628 | ||
| 629 | const EVP_PKEY_ASN1_METHOD eckey_asn1_meth = | 629 | const EVP_PKEY_ASN1_METHOD eckey_asn1_meth = { |
| 630 | { | 630 | .pkey_id = EVP_PKEY_EC, |
| 631 | EVP_PKEY_EC, | 631 | .pkey_base_id = EVP_PKEY_EC, |
| 632 | EVP_PKEY_EC, | 632 | |
| 633 | 0, | 633 | .pem_str = "EC", |
| 634 | "EC", | 634 | .info = "OpenSSL EC algorithm", |
| 635 | "OpenSSL EC algorithm", | 635 | |
| 636 | 636 | .pub_decode = eckey_pub_decode, | |
| 637 | eckey_pub_decode, | 637 | .pub_encode = eckey_pub_encode, |
| 638 | eckey_pub_encode, | 638 | .pub_cmp = eckey_pub_cmp, |
| 639 | eckey_pub_cmp, | 639 | .pub_print = eckey_pub_print, |
| 640 | eckey_pub_print, | 640 | |
| 641 | 641 | .priv_decode = eckey_priv_decode, | |
| 642 | eckey_priv_decode, | 642 | .priv_encode = eckey_priv_encode, |
| 643 | eckey_priv_encode, | 643 | .priv_print = eckey_priv_print, |
| 644 | eckey_priv_print, | 644 | |
| 645 | 645 | .pkey_size = int_ec_size, | |
| 646 | int_ec_size, | 646 | .pkey_bits = ec_bits, |
| 647 | ec_bits, | 647 | |
| 648 | 648 | .param_decode = eckey_param_decode, | |
| 649 | eckey_param_decode, | 649 | .param_encode = eckey_param_encode, |
| 650 | eckey_param_encode, | 650 | .param_missing = ec_missing_parameters, |
| 651 | ec_missing_parameters, | 651 | .param_copy = ec_copy_parameters, |
| 652 | ec_copy_parameters, | 652 | .param_cmp = ec_cmp_parameters, |
| 653 | ec_cmp_parameters, | 653 | .param_print = eckey_param_print, |
| 654 | eckey_param_print, | 654 | |
| 655 | 0, | 655 | .pkey_free = int_ec_free, |
| 656 | 656 | .pkey_ctrl = ec_pkey_ctrl, | |
| 657 | int_ec_free, | 657 | .old_priv_decode = old_ec_priv_decode, |
| 658 | ec_pkey_ctrl, | 658 | .old_priv_encode = old_ec_priv_encode |
| 659 | old_ec_priv_decode, | 659 | }; |
| 660 | old_ec_priv_encode | ||
| 661 | }; | ||
