summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2022-09-04 15:54:43 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2022-09-04 15:54:43 +0000
commit452475d45ebb338b05a5f9d2d78defd2d4986b86 (patch)
tree0a1ec80a9d617386ba7983ac2f4a89264cecf1b7 /lib
parent3afd1db0108eabb9cb7d29f39b1f1c8985b27f50 (diff)
Remove dead code.
No change in generated assembly.
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/evp/e_camellia.c41
1 files changed, 10 insertions, 31 deletions
diff --git a/lib/libcrypto/evp/e_camellia.c b/lib/libcrypto/evp/e_camellia.c
index 2d7ab736271..bd43180d019 100644
--- a/lib/libcrypto/evp/e_camellia.c
+++ b/lib/libcrypto/evp/e_camellia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: e_camellia.c,v 1.12 2022/09/04 13:17:18 jsing Exp $ */
+/* $OpenBSD: e_camellia.c,v 1.13 2022/09/04 15:54:42 jsing Exp $ */
/* ====================================================================
* Copyright (c) 2006 The OpenSSL Project. All rights reserved.
*
@@ -109,14 +109,11 @@ camellia_128_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsign
{
size_t chunk = EVP_MAXCHUNK;
- if (128 == 1)
- chunk >>= 3;
-
if (inl < chunk)
chunk = inl;
while (inl && inl >= chunk) {
- Camellia_cfb128_encrypt(in, out, (long)((128 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
+ Camellia_cfb128_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
inl -= chunk;
in += chunk;
out += chunk;
@@ -270,14 +267,11 @@ camellia_192_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsign
{
size_t chunk = EVP_MAXCHUNK;
- if (128 == 1)
- chunk >>= 3;
-
if (inl < chunk)
chunk = inl;
while (inl && inl >= chunk) {
- Camellia_cfb128_encrypt(in, out, (long)((128 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
+ Camellia_cfb128_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
inl -= chunk;
in += chunk;
out += chunk;
@@ -431,14 +425,11 @@ camellia_256_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsign
{
size_t chunk = EVP_MAXCHUNK;
- if (128 == 1)
- chunk >>= 3;
-
if (inl < chunk)
chunk = inl;
while (inl && inl >= chunk) {
- Camellia_cfb128_encrypt(in, out, (long)((128 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
+ Camellia_cfb128_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
inl -= chunk;
in += chunk;
out += chunk;
@@ -576,8 +567,7 @@ camellia_128_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned
{
size_t chunk = EVP_MAXCHUNK;
- if (1 == 1)
- chunk >>= 3;
+ chunk >>= 3;
if (inl < chunk)
chunk = inl;
@@ -621,8 +611,7 @@ camellia_192_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned
{
size_t chunk = EVP_MAXCHUNK;
- if (1 == 1)
- chunk >>= 3;
+ chunk >>= 3;
if (inl < chunk)
chunk = inl;
@@ -666,8 +655,7 @@ camellia_256_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned
{
size_t chunk = EVP_MAXCHUNK;
- if (1 == 1)
- chunk >>= 3;
+ chunk >>= 3;
if (inl < chunk)
chunk = inl;
@@ -712,14 +700,11 @@ camellia_128_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned
{
size_t chunk = EVP_MAXCHUNK;
- if (8 == 1)
- chunk >>= 3;
-
if (inl < chunk)
chunk = inl;
while (inl && inl >= chunk) {
- Camellia_cfb8_encrypt(in, out, (long)((8 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
+ Camellia_cfb8_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
inl -= chunk;
in += chunk;
out += chunk;
@@ -757,14 +742,11 @@ camellia_192_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned
{
size_t chunk = EVP_MAXCHUNK;
- if (8 == 1)
- chunk >>= 3;
-
if (inl < chunk)
chunk = inl;
while (inl && inl >= chunk) {
- Camellia_cfb8_encrypt(in, out, (long)((8 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
+ Camellia_cfb8_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
inl -= chunk;
in += chunk;
out += chunk;
@@ -802,14 +784,11 @@ camellia_256_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned
{
size_t chunk = EVP_MAXCHUNK;
- if (8 == 1)
- chunk >>= 3;
-
if (inl < chunk)
chunk = inl;
while (inl && inl >= chunk) {
- Camellia_cfb8_encrypt(in, out, (long)((8 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
+ Camellia_cfb8_encrypt(in, out, (long)inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
inl -= chunk;
in += chunk;
out += chunk;