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_null.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_null.c')
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_null.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_null.c b/src/lib/libcrypto/rsa/rsa_null.c index 2f2202f142..5b9317cb6c 100644 --- a/src/lib/libcrypto/rsa/rsa_null.c +++ b/src/lib/libcrypto/rsa/rsa_null.c | |||
| @@ -82,22 +82,15 @@ static int RSA_null_mod_exp(const BIGNUM *r0, const BIGNUM *i, RSA *rsa); | |||
| 82 | #endif | 82 | #endif |
| 83 | static int RSA_null_init(RSA *rsa); | 83 | static int RSA_null_init(RSA *rsa); |
| 84 | static int RSA_null_finish(RSA *rsa); | 84 | static int RSA_null_finish(RSA *rsa); |
| 85 | static RSA_METHOD rsa_null_meth={ | 85 | static RSA_METHOD rsa_null_meth = { |
| 86 | "Null RSA", | 86 | .name = "Null RSA", |
| 87 | RSA_null_public_encrypt, | 87 | .rsa_pub_enc = RSA_null_public_encrypt, |
| 88 | RSA_null_public_decrypt, | 88 | .rsa_pub_dec = RSA_null_public_decrypt, |
| 89 | RSA_null_private_encrypt, | 89 | .rsa_priv_enc = RSA_null_private_encrypt, |
| 90 | RSA_null_private_decrypt, | 90 | .rsa_priv_dec = RSA_null_private_decrypt, |
| 91 | NULL, | 91 | .init = RSA_null_init, |
| 92 | NULL, | 92 | .finish = RSA_null_finish, |
| 93 | RSA_null_init, | 93 | }; |
| 94 | RSA_null_finish, | ||
| 95 | 0, | ||
| 96 | NULL, | ||
| 97 | NULL, | ||
| 98 | NULL, | ||
| 99 | NULL | ||
| 100 | }; | ||
| 101 | 94 | ||
| 102 | const RSA_METHOD *RSA_null_method(void) | 95 | const RSA_METHOD *RSA_null_method(void) |
| 103 | { | 96 | { |
