summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dh/dh_key.c
diff options
context:
space:
mode:
authormiod <>2014-04-27 20:26:49 +0000
committermiod <>2014-04-27 20:26:49 +0000
commit45bb7f0ae87ddf787dd06d515db9afb04a74bf6c (patch)
tree319f4236c4f33e8d28d3d3a51c99e82d996e948f /src/lib/libcrypto/dh/dh_key.c
parentcbbb78bcf8e4dca14564fbea5fdfe0703e2951cc (diff)
downloadopenbsd-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.c15
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
84static DH_METHOD dh_ossl = { 84static DH_METHOD dh_ossl = {
85"OpenSSL DH Method", 85 .name = "OpenSSL DH Method",
86generate_key, 86 .generate_key = generate_key,
87compute_key, 87 .compute_key = compute_key,
88dh_bn_mod_exp, 88 .bn_mod_exp = dh_bn_mod_exp,
89dh_init, 89 .init = dh_init,
90dh_finish, 90 .finish = dh_finish,
910,
92NULL,
93NULL
94}; 91};
95 92
96const DH_METHOD *DH_OpenSSL(void) 93const DH_METHOD *DH_OpenSSL(void)