summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_ameth.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/rsa/rsa_ameth.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/rsa/rsa_ameth.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_ameth.c60
1 files changed, 29 insertions, 31 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_ameth.c b/src/lib/libcrypto/rsa/rsa_ameth.c
index fdd11835ad..f0a346a70e 100644
--- a/src/lib/libcrypto/rsa/rsa_ameth.c
+++ b/src/lib/libcrypto/rsa/rsa_ameth.c
@@ -657,42 +657,40 @@ static int rsa_item_sign(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,
657 return 2; 657 return 2;
658 } 658 }
659 659
660const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[] = 660const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[] = {
661 { 661 {
662 { 662 .pkey_id = EVP_PKEY_RSA,
663 EVP_PKEY_RSA, 663 .pkey_base_id = EVP_PKEY_RSA,
664 EVP_PKEY_RSA, 664 .pkey_flags = ASN1_PKEY_SIGPARAM_NULL,
665 ASN1_PKEY_SIGPARAM_NULL,
666 665
667 "RSA", 666 .pem_str = "RSA",
668 "OpenSSL RSA method", 667 .info = "OpenSSL RSA method",
669 668
670 rsa_pub_decode, 669 .pub_decode = rsa_pub_decode,
671 rsa_pub_encode, 670 .pub_encode = rsa_pub_encode,
672 rsa_pub_cmp, 671 .pub_cmp = rsa_pub_cmp,
673 rsa_pub_print, 672 .pub_print = rsa_pub_print,
674 673
675 rsa_priv_decode, 674 .priv_decode = rsa_priv_decode,
676 rsa_priv_encode, 675 .priv_encode = rsa_priv_encode,
677 rsa_priv_print, 676 .priv_print = rsa_priv_print,
678 677
679 int_rsa_size, 678 .pkey_size = int_rsa_size,
680 rsa_bits, 679 .pkey_bits = rsa_bits,
681 680
682 0,0,0,0,0,0, 681 .sig_print = rsa_sig_print,
683 682
684 rsa_sig_print, 683 .pkey_free = int_rsa_free,
685 int_rsa_free, 684 .pkey_ctrl = rsa_pkey_ctrl,
686 rsa_pkey_ctrl, 685 .old_priv_decode = old_rsa_priv_decode,
687 old_rsa_priv_decode, 686 .old_priv_encode = old_rsa_priv_encode,
688 old_rsa_priv_encode, 687 .item_verify = rsa_item_verify,
689 rsa_item_verify, 688 .item_sign = rsa_item_sign
690 rsa_item_sign 689 },
691 },
692 690
693 { 691 {
694 EVP_PKEY_RSA2, 692 .pkey_id = EVP_PKEY_RSA2,
695 EVP_PKEY_RSA, 693 .pkey_base_id = EVP_PKEY_RSA,
696 ASN1_PKEY_ALIAS 694 .pkey_flags = ASN1_PKEY_ALIAS
697 } 695 }
698 }; 696};