From 962eac3925c7184fb5dc174357823223beba0d85 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sun, 7 Feb 2021 11:04:43 -0600 Subject: [PATCH] port changelog and fix back to master for CVE-2020-36242 diff --git a/src/cryptography/hazmat/backends/openssl/ciphers.py b/src/cryptography/hazmat/backends/openssl/ciphers.py index 2b10681b31..0f96795fdc 100644 --- a/src/cryptography/hazmat/backends/openssl/ciphers.py +++ b/src/cryptography/hazmat/backends/openssl/ciphers.py @@ -16,7 +16,7 @@ class _CipherContext(object): _ENCRYPT = 1 _DECRYPT = 0 - _MAX_CHUNK_SIZE = 2 ** 31 - 1 + _MAX_CHUNK_SIZE = 2 ** 30 - 1 def __init__(self, backend, cipher, mode, operation): self._backend = backend