summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/dsa/dsa_pmeth.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-04-27 20:26:46 +0000
committermiod <miod@openbsd.org>2014-04-27 20:26:46 +0000
commite402ce74af92e11cf51406acbd53f28852df7c32 (patch)
tree060921ecfca28854f412a301d88d7bf299dd30ec /lib/libcrypto/dsa/dsa_pmeth.c
parentstatic const char * = "" -> static const char[] = "", to produce shorter code. (diff)
downloadwireguard-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/dsa/dsa_pmeth.c')
-rw-r--r--lib/libcrypto/dsa/dsa_pmeth.c42
1 files changed, 13 insertions, 29 deletions
diff --git a/lib/libcrypto/dsa/dsa_pmeth.c b/lib/libcrypto/dsa/dsa_pmeth.c
index 7076bf7b676..4e77c6f64bb 100644
--- a/lib/libcrypto/dsa/dsa_pmeth.c
+++ b/lib/libcrypto/dsa/dsa_pmeth.c
@@ -281,38 +281,22 @@ static int pkey_dsa_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
return DSA_generate_key(pkey->pkey.dsa);
}
-const EVP_PKEY_METHOD dsa_pkey_meth =
- {
- EVP_PKEY_DSA,
- EVP_PKEY_FLAG_AUTOARGLEN,
- pkey_dsa_init,
- pkey_dsa_copy,
- pkey_dsa_cleanup,
-
- 0,
- pkey_dsa_paramgen,
-
- 0,
- pkey_dsa_keygen,
-
- 0,
- pkey_dsa_sign,
-
- 0,
- pkey_dsa_verify,
-
- 0,0,
-
- 0,0,0,0,
+const EVP_PKEY_METHOD dsa_pkey_meth = {
+ .pkey_id = EVP_PKEY_DSA,
+ .flags = EVP_PKEY_FLAG_AUTOARGLEN,
- 0,0,
+ .init = pkey_dsa_init,
+ .copy = pkey_dsa_copy,
+ .cleanup = pkey_dsa_cleanup,
- 0,0,
+ .paramgen = pkey_dsa_paramgen,
- 0,0,
+ .keygen = pkey_dsa_keygen,
- pkey_dsa_ctrl,
- pkey_dsa_ctrl_str
+ .sign = pkey_dsa_sign,
+ .verify = pkey_dsa_verify,
- };
+ .ctrl = pkey_dsa_ctrl,
+ .ctrl_str = pkey_dsa_ctrl_str
+};