diff options
author | 2014-04-27 20:26:46 +0000 | |
---|---|---|
committer | 2014-04-27 20:26:46 +0000 | |
commit | e402ce74af92e11cf51406acbd53f28852df7c32 (patch) | |
tree | 060921ecfca28854f412a301d88d7bf299dd30ec /lib/libcrypto/dh/dh_key.c | |
parent | static const char * = "" -> static const char[] = "", to produce shorter code. (diff) | |
download | wireguard-openbsd-e402ce74af92e11cf51406acbd53f28852df7c32.tar.xz wireguard-openbsd-e402ce74af92e11cf51406acbd53f28852df7c32.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 'lib/libcrypto/dh/dh_key.c')
-rw-r--r-- | lib/libcrypto/dh/dh_key.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/libcrypto/dh/dh_key.c b/lib/libcrypto/dh/dh_key.c index 9596270f7d4..91352a9fbf5 100644 --- a/lib/libcrypto/dh/dh_key.c +++ b/lib/libcrypto/dh/dh_key.c @@ -82,15 +82,12 @@ int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) } static DH_METHOD dh_ossl = { -"OpenSSL DH Method", -generate_key, -compute_key, -dh_bn_mod_exp, -dh_init, -dh_finish, -0, -NULL, -NULL + .name = "OpenSSL DH Method", + .generate_key = generate_key, + .compute_key = compute_key, + .bn_mod_exp = dh_bn_mod_exp, + .init = dh_init, + .finish = dh_finish, }; const DH_METHOD *DH_OpenSSL(void) |