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/rsa/rsa_eay.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/rsa/rsa_eay.c')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_eay.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c index dcf0c16a8f..845e28877e 100644 --- a/src/lib/libcrypto/rsa/rsa_eay.c +++ b/src/lib/libcrypto/rsa/rsa_eay.c | |||
@@ -128,22 +128,17 @@ static int RSA_eay_private_decrypt(int flen, const unsigned char *from, | |||
128 | static int RSA_eay_mod_exp(BIGNUM *r0, const BIGNUM *i, RSA *rsa, BN_CTX *ctx); | 128 | static int RSA_eay_mod_exp(BIGNUM *r0, const BIGNUM *i, RSA *rsa, BN_CTX *ctx); |
129 | static int RSA_eay_init(RSA *rsa); | 129 | static int RSA_eay_init(RSA *rsa); |
130 | static int RSA_eay_finish(RSA *rsa); | 130 | static int RSA_eay_finish(RSA *rsa); |
131 | static RSA_METHOD rsa_pkcs1_eay_meth={ | 131 | static RSA_METHOD rsa_pkcs1_eay_meth = { |
132 | "Eric Young's PKCS#1 RSA", | 132 | .name = "Eric Young's PKCS#1 RSA", |
133 | RSA_eay_public_encrypt, | 133 | .rsa_pub_enc = RSA_eay_public_encrypt, |
134 | RSA_eay_public_decrypt, /* signature verification */ | 134 | .rsa_pub_dec = RSA_eay_public_decrypt, /* signature verification */ |
135 | RSA_eay_private_encrypt, /* signing */ | 135 | .rsa_priv_enc = RSA_eay_private_encrypt, /* signing */ |
136 | RSA_eay_private_decrypt, | 136 | .rsa_priv_dec = RSA_eay_private_decrypt, |
137 | RSA_eay_mod_exp, | 137 | .rsa_mod_exp = RSA_eay_mod_exp, |
138 | BN_mod_exp_mont, /* XXX probably we should not use Montgomery if e == 3 */ | 138 | .bn_mod_exp = BN_mod_exp_mont, /* XXX probably we should not use Montgomery if e == 3 */ |
139 | RSA_eay_init, | 139 | .init = RSA_eay_init, |
140 | RSA_eay_finish, | 140 | .finish = RSA_eay_finish, |
141 | 0, /* flags */ | 141 | }; |
142 | NULL, | ||
143 | 0, /* rsa_sign */ | ||
144 | 0, /* rsa_verify */ | ||
145 | NULL /* rsa_keygen */ | ||
146 | }; | ||
147 | 142 | ||
148 | const RSA_METHOD *RSA_PKCS1_SSLeay(void) | 143 | const RSA_METHOD *RSA_PKCS1_SSLeay(void) |
149 | { | 144 | { |