summaryrefslogtreecommitdiff
path: root/lib/libcrypto/rsa/rsa_null.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-04-27 20:26:50 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-04-27 20:26:50 +0000
commite5cffcd34247f85edfdeb62a15a64dfbfbd449e0 (patch)
treeda4996e6e0a1e6f377715dfbc7b3352529477cba /lib/libcrypto/rsa/rsa_null.c
parenta87db0183f55bcd74e22af7a30de8ff482d0495b (diff)
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 'lib/libcrypto/rsa/rsa_null.c')
-rw-r--r--lib/libcrypto/rsa/rsa_null.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/lib/libcrypto/rsa/rsa_null.c b/lib/libcrypto/rsa/rsa_null.c
index 2f2202f142f..5b9317cb6cc 100644
--- a/lib/libcrypto/rsa/rsa_null.c
+++ b/lib/libcrypto/rsa/rsa_null.c
@@ -82,22 +82,15 @@ static int RSA_null_mod_exp(const BIGNUM *r0, const BIGNUM *i, RSA *rsa);
#endif
static int RSA_null_init(RSA *rsa);
static int RSA_null_finish(RSA *rsa);
-static RSA_METHOD rsa_null_meth={
- "Null RSA",
- RSA_null_public_encrypt,
- RSA_null_public_decrypt,
- RSA_null_private_encrypt,
- RSA_null_private_decrypt,
- NULL,
- NULL,
- RSA_null_init,
- RSA_null_finish,
- 0,
- NULL,
- NULL,
- NULL,
- NULL
- };
+static RSA_METHOD rsa_null_meth = {
+ .name = "Null RSA",
+ .rsa_pub_enc = RSA_null_public_encrypt,
+ .rsa_pub_dec = RSA_null_public_decrypt,
+ .rsa_priv_enc = RSA_null_private_encrypt,
+ .rsa_priv_dec = RSA_null_private_decrypt,
+ .init = RSA_null_init,
+ .finish = RSA_null_finish,
+};
const RSA_METHOD *RSA_null_method(void)
{