diff options
author | jsing <> | 2022-09-04 13:55:39 +0000 |
---|---|---|
committer | jsing <> | 2022-09-04 13:55:39 +0000 |
commit | 0ace47e359750ce9915e94dedcd1129b9d8017fe (patch) | |
tree | 881ae30f3e56c6ffeeb1fbce08034e88eaf45857 | |
parent | 3bfbb0618a4b8d094e6cb6604d01a69cf0f71c79 (diff) | |
download | openbsd-0ace47e359750ce9915e94dedcd1129b9d8017fe.tar.gz openbsd-0ace47e359750ce9915e94dedcd1129b9d8017fe.tar.bz2 openbsd-0ace47e359750ce9915e94dedcd1129b9d8017fe.zip |
Remove dead code.
Only change to generated assembly is due to line numbers.
-rw-r--r-- | src/lib/libcrypto/evp/e_bf.c | 7 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/e_cast.c | 7 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/e_gost2814789.c | 7 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/e_idea.c | 7 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/e_rc2.c | 7 |
5 files changed, 10 insertions, 25 deletions
diff --git a/src/lib/libcrypto/evp/e_bf.c b/src/lib/libcrypto/evp/e_bf.c index 745c4d3201..ab6dc4f7de 100644 --- a/src/lib/libcrypto/evp/e_bf.c +++ b/src/lib/libcrypto/evp/e_bf.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: e_bf.c,v 1.10 2022/09/04 13:17:18 jsing Exp $ */ | 1 | /* $OpenBSD: e_bf.c,v 1.11 2022/09/04 13:55:39 jsing 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 | * |
@@ -103,14 +103,11 @@ bf_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in | |||
103 | { | 103 | { |
104 | size_t chunk = EVP_MAXCHUNK; | 104 | size_t chunk = EVP_MAXCHUNK; |
105 | 105 | ||
106 | if (64 == 1) | ||
107 | chunk >>= 3; | ||
108 | |||
109 | if (inl < chunk) | 106 | if (inl < chunk) |
110 | chunk = inl; | 107 | chunk = inl; |
111 | 108 | ||
112 | while (inl && inl >= chunk) { | 109 | while (inl && inl >= chunk) { |
113 | BF_cfb64_encrypt(in, out, (long)((64 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt); | 110 | BF_cfb64_encrypt(in, out, (long)inl, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt); |
114 | inl -= chunk; | 111 | inl -= chunk; |
115 | in += chunk; | 112 | in += chunk; |
116 | out += chunk; | 113 | out += chunk; |
diff --git a/src/lib/libcrypto/evp/e_cast.c b/src/lib/libcrypto/evp/e_cast.c index 32f86d86af..d6f1b1d1a0 100644 --- a/src/lib/libcrypto/evp/e_cast.c +++ b/src/lib/libcrypto/evp/e_cast.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: e_cast.c,v 1.9 2022/09/04 13:17:18 jsing Exp $ */ | 1 | /* $OpenBSD: e_cast.c,v 1.10 2022/09/04 13:55:39 jsing 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 | * |
@@ -103,14 +103,11 @@ cast5_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char | |||
103 | { | 103 | { |
104 | size_t chunk = EVP_MAXCHUNK; | 104 | size_t chunk = EVP_MAXCHUNK; |
105 | 105 | ||
106 | if (64 == 1) | ||
107 | chunk >>= 3; | ||
108 | |||
109 | if (inl < chunk) | 106 | if (inl < chunk) |
110 | chunk = inl; | 107 | chunk = inl; |
111 | 108 | ||
112 | while (inl && inl >= chunk) { | 109 | while (inl && inl >= chunk) { |
113 | CAST_cfb64_encrypt(in, out, (long)((64 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt); | 110 | CAST_cfb64_encrypt(in, out, (long)inl, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt); |
114 | inl -= chunk; | 111 | inl -= chunk; |
115 | in += chunk; | 112 | in += chunk; |
116 | out += chunk; | 113 | out += chunk; |
diff --git a/src/lib/libcrypto/evp/e_gost2814789.c b/src/lib/libcrypto/evp/e_gost2814789.c index 959610f16d..b880c66954 100644 --- a/src/lib/libcrypto/evp/e_gost2814789.c +++ b/src/lib/libcrypto/evp/e_gost2814789.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: e_gost2814789.c,v 1.7 2022/09/04 13:17:18 jsing Exp $ */ | 1 | /* $OpenBSD: e_gost2814789.c,v 1.8 2022/09/04 13:55:39 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
@@ -209,14 +209,11 @@ gost2814789_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned | |||
209 | { | 209 | { |
210 | size_t chunk = EVP_MAXCHUNK; | 210 | size_t chunk = EVP_MAXCHUNK; |
211 | 211 | ||
212 | if (64 == 1) | ||
213 | chunk >>= 3; | ||
214 | |||
215 | if (inl < chunk) | 212 | if (inl < chunk) |
216 | chunk = inl; | 213 | chunk = inl; |
217 | 214 | ||
218 | while (inl && inl >= chunk) { | 215 | while (inl && inl >= chunk) { |
219 | Gost2814789_cfb64_encrypt(in, out, (long)((64 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_GOST2814789_CTX *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt); | 216 | Gost2814789_cfb64_encrypt(in, out, (long)inl, &((EVP_GOST2814789_CTX *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt); |
220 | inl -= chunk; | 217 | inl -= chunk; |
221 | in += chunk; | 218 | in += chunk; |
222 | out += chunk; | 219 | out += chunk; |
diff --git a/src/lib/libcrypto/evp/e_idea.c b/src/lib/libcrypto/evp/e_idea.c index 819f52ba23..c25f031871 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.13 2022/09/04 13:17:18 jsing Exp $ */ | 1 | /* $OpenBSD: e_idea.c,v 1.14 2022/09/04 13:55:39 jsing 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 | * |
@@ -155,14 +155,11 @@ idea_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char * | |||
155 | { | 155 | { |
156 | size_t chunk = EVP_MAXCHUNK; | 156 | size_t chunk = EVP_MAXCHUNK; |
157 | 157 | ||
158 | if (64 == 1) | ||
159 | chunk >>= 3; | ||
160 | |||
161 | if (inl < chunk) | 158 | if (inl < chunk) |
162 | chunk = inl; | 159 | chunk = inl; |
163 | 160 | ||
164 | while (inl && inl >= chunk) { | 161 | while (inl && inl >= chunk) { |
165 | idea_cfb64_encrypt(in, out, (long)((64 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt); | 162 | idea_cfb64_encrypt(in, out, (long)inl, &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt); |
166 | inl -= chunk; | 163 | inl -= chunk; |
167 | in += chunk; | 164 | in += chunk; |
168 | out += chunk; | 165 | out += chunk; |
diff --git a/src/lib/libcrypto/evp/e_rc2.c b/src/lib/libcrypto/evp/e_rc2.c index d91b86dd03..6567e75b0c 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.15 2022/09/03 19:59:32 jsing Exp $ */ | 1 | /* $OpenBSD: e_rc2.c,v 1.16 2022/09/04 13:55:39 jsing 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 | * |
@@ -105,14 +105,11 @@ rc2_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *i | |||
105 | { | 105 | { |
106 | size_t chunk = EVP_MAXCHUNK; | 106 | size_t chunk = EVP_MAXCHUNK; |
107 | 107 | ||
108 | if (64 == 1) | ||
109 | chunk >>= 3; | ||
110 | |||
111 | if (inl < chunk) | 108 | if (inl < chunk) |
112 | chunk = inl; | 109 | chunk = inl; |
113 | 110 | ||
114 | while (inl && inl >= chunk) { | 111 | while (inl && inl >= chunk) { |
115 | RC2_cfb64_encrypt(in, out, (long)((64 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_RC2_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt); | 112 | RC2_cfb64_encrypt(in, out, (long)inl, &((EVP_RC2_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt); |
116 | inl -= chunk; | 113 | inl -= chunk; |
117 | in += chunk; | 114 | in += chunk; |
118 | out += chunk; | 115 | out += chunk; |