diff options
Diffstat (limited to 'src/lib/libcrypto/evp/e_rc2.c')
-rw-r--r-- | src/lib/libcrypto/evp/e_rc2.c | 7 |
1 files changed, 2 insertions, 5 deletions
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; |