diff options
author | tb <> | 2024-01-07 15:42:57 +0000 |
---|---|---|
committer | tb <> | 2024-01-07 15:42:57 +0000 |
commit | 8fa897fcd99c8c7e54dbf8fb8c21cb613997d5fb (patch) | |
tree | 968618b07754dd69ed33255d1984737459fd7ff1 /src/lib/libcrypto/evp/e_rc2.c | |
parent | 8cb170b1f4aa3af43ce874bfe6b6516969e9d657 (diff) | |
download | openbsd-8fa897fcd99c8c7e54dbf8fb8c21cb613997d5fb.tar.gz openbsd-8fa897fcd99c8c7e54dbf8fb8c21cb613997d5fb.tar.bz2 openbsd-8fa897fcd99c8c7e54dbf8fb8c21cb613997d5fb.zip |
Convert the remaining legacy ciphers to C99 initializers
No change in the generated aarch64 assembly apart from line number changes.
ok jsing
Diffstat (limited to 'src/lib/libcrypto/evp/e_rc2.c')
-rw-r--r-- | src/lib/libcrypto/evp/e_rc2.c | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/src/lib/libcrypto/evp/e_rc2.c b/src/lib/libcrypto/evp/e_rc2.c index 6f8c051cff..0a19551109 100644 --- a/src/lib/libcrypto/evp/e_rc2.c +++ b/src/lib/libcrypto/evp/e_rc2.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: e_rc2.c,v 1.26 2024/01/04 17:38:36 tb Exp $ */ | 1 | /* $OpenBSD: e_rc2.c,v 1.27 2024/01/07 15:42:57 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -248,29 +248,33 @@ EVP_rc2_ecb(void) | |||
248 | #define RC2_128_MAGIC 0x3a | 248 | #define RC2_128_MAGIC 0x3a |
249 | 249 | ||
250 | static const EVP_CIPHER r2_64_cbc_cipher = { | 250 | static const EVP_CIPHER r2_64_cbc_cipher = { |
251 | NID_rc2_64_cbc, | 251 | .nid = NID_rc2_64_cbc, |
252 | 8, 8 /* 64 bit */, 8, | 252 | .block_size = 8, |
253 | EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT, | 253 | .key_len = 8, |
254 | rc2_init_key, | 254 | .iv_len = 8, |
255 | rc2_cbc_cipher, | 255 | .flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT, |
256 | NULL, | 256 | .init = rc2_init_key, |
257 | sizeof(EVP_RC2_KEY), | 257 | .do_cipher = rc2_cbc_cipher, |
258 | rc2_set_asn1_type_and_iv, | 258 | .cleanup = NULL, |
259 | rc2_get_asn1_type_and_iv, | 259 | .ctx_size = sizeof(EVP_RC2_KEY), |
260 | rc2_ctrl, | 260 | .set_asn1_parameters = rc2_set_asn1_type_and_iv, |
261 | .get_asn1_parameters = rc2_get_asn1_type_and_iv, | ||
262 | .ctrl = rc2_ctrl, | ||
261 | }; | 263 | }; |
262 | 264 | ||
263 | static const EVP_CIPHER r2_40_cbc_cipher = { | 265 | static const EVP_CIPHER r2_40_cbc_cipher = { |
264 | NID_rc2_40_cbc, | 266 | .nid = NID_rc2_40_cbc, |
265 | 8, 5 /* 40 bit */, 8, | 267 | .block_size = 8, |
266 | EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT, | 268 | .key_len = 5, |
267 | rc2_init_key, | 269 | .iv_len = 8, |
268 | rc2_cbc_cipher, | 270 | .flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT, |
269 | NULL, | 271 | .init = rc2_init_key, |
270 | sizeof(EVP_RC2_KEY), | 272 | .do_cipher = rc2_cbc_cipher, |
271 | rc2_set_asn1_type_and_iv, | 273 | .cleanup = NULL, |
272 | rc2_get_asn1_type_and_iv, | 274 | .ctx_size = sizeof(EVP_RC2_KEY), |
273 | rc2_ctrl, | 275 | .set_asn1_parameters = rc2_set_asn1_type_and_iv, |
276 | .get_asn1_parameters = rc2_get_asn1_type_and_iv, | ||
277 | .ctrl = rc2_ctrl, | ||
274 | }; | 278 | }; |
275 | 279 | ||
276 | const EVP_CIPHER * | 280 | const EVP_CIPHER * |