From 45bb7f0ae87ddf787dd06d515db9afb04a74bf6c Mon Sep 17 00:00:00 2001 From: miod <> Date: Sun, 27 Apr 2014 20:26:49 +0000 Subject: 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@ --- src/lib/libcrypto/ecdh/ech_ossl.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/lib/libcrypto/ecdh/ech_ossl.c') diff --git a/src/lib/libcrypto/ecdh/ech_ossl.c b/src/lib/libcrypto/ecdh/ech_ossl.c index a63eb4922d..129475f7bb 100644 --- a/src/lib/libcrypto/ecdh/ech_ossl.c +++ b/src/lib/libcrypto/ecdh/ech_ossl.c @@ -84,14 +84,8 @@ static int ecdh_compute_key(void *out, size_t len, const EC_POINT *pub_key, void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)); static ECDH_METHOD openssl_ecdh_meth = { - "OpenSSL ECDH method", - ecdh_compute_key, -#if 0 - NULL, /* init */ - NULL, /* finish */ -#endif - 0, /* flags */ - NULL /* app_data */ + .name = "OpenSSL ECDH method", + .compute_key = ecdh_compute_key }; const ECDH_METHOD *ECDH_OpenSSL(void) -- cgit v1.2.3-55-g6feb