summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/hmac/hm_ameth.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/hmac/hm_ameth.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 'src/lib/libcrypto/hmac/hm_ameth.c')
-rw-r--r--src/lib/libcrypto/hmac/hm_ameth.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/lib/libcrypto/hmac/hm_ameth.c b/src/lib/libcrypto/hmac/hm_ameth.c
index fbada40d9c..0625b06651 100644
--- a/src/lib/libcrypto/hmac/hm_ameth.c
+++ b/src/lib/libcrypto/hmac/hm_ameth.c
@@ -138,30 +138,20 @@ static int old_hmac_encode(const EVP_PKEY *pkey, unsigned char **pder)
138 138
139#endif 139#endif
140 140
141const EVP_PKEY_ASN1_METHOD hmac_asn1_meth = 141const EVP_PKEY_ASN1_METHOD hmac_asn1_meth = {
142 { 142 .pkey_id = EVP_PKEY_HMAC,
143 EVP_PKEY_HMAC, 143 .pkey_base_id = EVP_PKEY_HMAC,
144 EVP_PKEY_HMAC,
145 0,
146
147 "HMAC",
148 "OpenSSL HMAC method",
149
150 0,0,0,0,
151 144
152 0,0,0, 145 .pem_str = "HMAC",
146 .info = "OpenSSL HMAC method",
153 147
154 hmac_size, 148 .pkey_size = hmac_size,
155 0,
156 0,0,0,0,0,0,0,
157 149
158 hmac_key_free, 150 .pkey_free = hmac_key_free,
159 hmac_pkey_ctrl, 151 .pkey_ctrl = hmac_pkey_ctrl,
160#ifdef HMAC_TEST_PRIVATE_KEY_FORMAT 152#ifdef HMAC_TEST_PRIVATE_KEY_FORMAT
161 old_hmac_decode, 153 .old_priv_decode = old_hmac_decode,
162 old_hmac_encode 154 .old_priv_encode = old_hmac_encode
163#else
164 0,0
165#endif 155#endif
166 }; 156 };
167 157