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/dh/dh_key.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 '')
-rw-r--r-- | src/lib/libcrypto/dh/dh_key.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/libcrypto/dh/dh_key.c b/src/lib/libcrypto/dh/dh_key.c index 9596270f7d..91352a9fbf 100644 --- a/src/lib/libcrypto/dh/dh_key.c +++ b/src/lib/libcrypto/dh/dh_key.c | |||
@@ -82,15 +82,12 @@ int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) | |||
82 | } | 82 | } |
83 | 83 | ||
84 | static DH_METHOD dh_ossl = { | 84 | static DH_METHOD dh_ossl = { |
85 | "OpenSSL DH Method", | 85 | .name = "OpenSSL DH Method", |
86 | generate_key, | 86 | .generate_key = generate_key, |
87 | compute_key, | 87 | .compute_key = compute_key, |
88 | dh_bn_mod_exp, | 88 | .bn_mod_exp = dh_bn_mod_exp, |
89 | dh_init, | 89 | .init = dh_init, |
90 | dh_finish, | 90 | .finish = dh_finish, |
91 | 0, | ||
92 | NULL, | ||
93 | NULL | ||
94 | }; | 91 | }; |
95 | 92 | ||
96 | const DH_METHOD *DH_OpenSSL(void) | 93 | const DH_METHOD *DH_OpenSSL(void) |