summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/e_idea.c
diff options
context:
space:
mode:
authortb <>2025-05-27 03:58:12 +0000
committertb <>2025-05-27 03:58:12 +0000
commit68a52297dea2d50284c7a8a12b92d8f2c15421f3 (patch)
tree2eb24b5e4c85e38c91f34fc3f821969bc557eadd /src/lib/libcrypto/evp/e_idea.c
parentd2463d70a3218b82a784e40274a5073b7e3a241b (diff)
downloadopenbsd-68a52297dea2d50284c7a8a12b92d8f2c15421f3.tar.gz
openbsd-68a52297dea2d50284c7a8a12b92d8f2c15421f3.tar.bz2
openbsd-68a52297dea2d50284c7a8a12b92d8f2c15421f3.zip
Make EVP_CIPHER_[gs]et_asn1_iv() local to evp_cipher
These formerly public functions have only ever been called from EVP_CIPHER_asn1_to_param() and EVP_CPIHER_param_to_asn1(), either directly if the EVP_CIPH_FLAG_DEFAULT_ASN1 flag is set, or indirectly when set as the .[gs]et_asn1_parameters() method of the EVP_CIPHER. This commit removes their use in .[gs]et_asn1_parameters() dating back to long before the EVP_CIPH_FLAG_DEFAULT_ASN1 was introduced in 2010. This way the only remaining consumer of .[gs]et_asn1_parameters() is RC2. ok jsing
Diffstat (limited to 'src/lib/libcrypto/evp/e_idea.c')
-rw-r--r--src/lib/libcrypto/evp/e_idea.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/libcrypto/evp/e_idea.c b/src/lib/libcrypto/evp/e_idea.c
index 86cf77602a..5d33a110fd 100644
--- a/src/lib/libcrypto/evp/e_idea.c
+++ b/src/lib/libcrypto/evp/e_idea.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: e_idea.c,v 1.22 2024/04/09 13:52:41 beck Exp $ */ 1/* $OpenBSD: e_idea.c,v 1.23 2025/05/27 03:58:12 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 *
@@ -181,13 +181,13 @@ static const EVP_CIPHER idea_cbc = {
181 .block_size = 8, 181 .block_size = 8,
182 .key_len = 16, 182 .key_len = 16,
183 .iv_len = 8, 183 .iv_len = 8,
184 .flags = 0 | EVP_CIPH_CBC_MODE, 184 .flags = EVP_CIPH_CBC_MODE | EVP_CIPH_FLAG_DEFAULT_ASN1,
185 .init = idea_init_key, 185 .init = idea_init_key,
186 .do_cipher = idea_cbc_cipher, 186 .do_cipher = idea_cbc_cipher,
187 .cleanup = NULL, 187 .cleanup = NULL,
188 .ctx_size = sizeof(IDEA_KEY_SCHEDULE), 188 .ctx_size = sizeof(IDEA_KEY_SCHEDULE),
189 .set_asn1_parameters = EVP_CIPHER_set_asn1_iv, 189 .set_asn1_parameters = NULL,
190 .get_asn1_parameters = EVP_CIPHER_get_asn1_iv, 190 .get_asn1_parameters = NULL,
191 .ctrl = NULL, 191 .ctrl = NULL,
192}; 192};
193 193
@@ -203,13 +203,13 @@ static const EVP_CIPHER idea_cfb64 = {
203 .block_size = 1, 203 .block_size = 1,
204 .key_len = 16, 204 .key_len = 16,
205 .iv_len = 8, 205 .iv_len = 8,
206 .flags = 0 | EVP_CIPH_CFB_MODE, 206 .flags = EVP_CIPH_CFB_MODE | EVP_CIPH_FLAG_DEFAULT_ASN1,
207 .init = idea_init_key, 207 .init = idea_init_key,
208 .do_cipher = idea_cfb64_cipher, 208 .do_cipher = idea_cfb64_cipher,
209 .cleanup = NULL, 209 .cleanup = NULL,
210 .ctx_size = sizeof(IDEA_KEY_SCHEDULE), 210 .ctx_size = sizeof(IDEA_KEY_SCHEDULE),
211 .set_asn1_parameters = EVP_CIPHER_set_asn1_iv, 211 .set_asn1_parameters = NULL,
212 .get_asn1_parameters = EVP_CIPHER_get_asn1_iv, 212 .get_asn1_parameters = NULL,
213 .ctrl = NULL, 213 .ctrl = NULL,
214}; 214};
215 215
@@ -225,13 +225,13 @@ static const EVP_CIPHER idea_ofb = {
225 .block_size = 1, 225 .block_size = 1,
226 .key_len = 16, 226 .key_len = 16,
227 .iv_len = 8, 227 .iv_len = 8,
228 .flags = 0 | EVP_CIPH_OFB_MODE, 228 .flags = EVP_CIPH_OFB_MODE | EVP_CIPH_FLAG_DEFAULT_ASN1,
229 .init = idea_init_key, 229 .init = idea_init_key,
230 .do_cipher = idea_ofb_cipher, 230 .do_cipher = idea_ofb_cipher,
231 .cleanup = NULL, 231 .cleanup = NULL,
232 .ctx_size = sizeof(IDEA_KEY_SCHEDULE), 232 .ctx_size = sizeof(IDEA_KEY_SCHEDULE),
233 .set_asn1_parameters = EVP_CIPHER_set_asn1_iv, 233 .set_asn1_parameters = NULL,
234 .get_asn1_parameters = EVP_CIPHER_get_asn1_iv, 234 .get_asn1_parameters = NULL,
235 .ctrl = NULL, 235 .ctrl = NULL,
236}; 236};
237 237
@@ -247,13 +247,13 @@ static const EVP_CIPHER idea_ecb = {
247 .block_size = 8, 247 .block_size = 8,
248 .key_len = 16, 248 .key_len = 16,
249 .iv_len = 0, 249 .iv_len = 0,
250 .flags = 0 | EVP_CIPH_ECB_MODE, 250 .flags = EVP_CIPH_ECB_MODE | EVP_CIPH_FLAG_DEFAULT_ASN1,
251 .init = idea_init_key, 251 .init = idea_init_key,
252 .do_cipher = idea_ecb_cipher, 252 .do_cipher = idea_ecb_cipher,
253 .cleanup = NULL, 253 .cleanup = NULL,
254 .ctx_size = sizeof(IDEA_KEY_SCHEDULE), 254 .ctx_size = sizeof(IDEA_KEY_SCHEDULE),
255 .set_asn1_parameters = EVP_CIPHER_set_asn1_iv, 255 .set_asn1_parameters = NULL,
256 .get_asn1_parameters = EVP_CIPHER_get_asn1_iv, 256 .get_asn1_parameters = NULL,
257 .ctrl = NULL, 257 .ctrl = NULL,
258}; 258};
259 259