From: Matt Caswell Date: Mon, 4 Jan 2021 17:29:35 +0000 (+0000) Subject: Only perform special TLS handling if TLS has been configured X-Git-Tag: openssl-3.0.0-alpha10~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e260bee;p=thirdparty%2Fopenssl.git Only perform special TLS handling if TLS has been configured Skip over special TLS steps for stream ciphers if we haven't been configured for TLS. Fixes #12528 Reviewed-by: Tomas Mraz Reviewed-by: Ben Kaduk (Merged from https://github.com/openssl/openssl/pull/13774) --- diff --git a/providers/implementations/ciphers/ciphercommon.c b/providers/implementations/ciphers/ciphercommon.c index 0941210f20a..0e3e367dfc3 100644 --- a/providers/implementations/ciphers/ciphercommon.c +++ b/providers/implementations/ciphers/ciphercommon.c @@ -429,7 +429,7 @@ int ossl_cipher_generic_stream_update(void *vctx, unsigned char *out, } *outl = inl; - if (!ctx->enc) { + if (!ctx->enc && ctx->tlsversion > 0) { /* * Remove any TLS padding. Only used by cipher_aes_cbc_hmac_sha1_hw.c and * cipher_aes_cbc_hmac_sha256_hw.c