From ad70b5f1bd77809bd8e27e6eeaa6df985f93ab21 Mon Sep 17 00:00:00 2001 From: jsing Date: Sun, 4 Sep 2022 15:56:51 +0000 Subject: [PATCH] Remove dead code. No change in generated assembly. --- lib/libcrypto/evp/e_sm4.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/libcrypto/evp/e_sm4.c b/lib/libcrypto/evp/e_sm4.c index fd9a9d04f72..c4bbe567c51 100644 --- a/lib/libcrypto/evp/e_sm4.c +++ b/lib/libcrypto/evp/e_sm4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: e_sm4.c,v 1.3 2022/09/04 13:17:18 jsing Exp $ */ +/* $OpenBSD: e_sm4.c,v 1.4 2022/09/04 15:56:51 jsing Exp $ */ /* * Copyright (c) 2017, 2019 Ribose Inc * @@ -95,14 +95,11 @@ sm4_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char * { size_t chunk = EVP_MAXCHUNK; - if (128 == 1) - chunk >>= 3; - if (inl < chunk) chunk = inl; while (inl && inl >= chunk) { - sm4_cfb128_encrypt(in, out, (long)((128 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? inl * 8 : inl), &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt); + sm4_cfb128_encrypt(in, out, (long)inl, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt); inl -= chunk; in += chunk; out += chunk; -- 2.20.1