aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/hazmat/backends/openssl/ciphers.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2016-12-13 21:05:35 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2016-12-13 20:05:35 -0600
commit0e8cdf1023f6e2045de444b1c7e09f40cccf019e (patch)
treeeb6241baa5c66447c988a5c45fed7f0cb77b8022 /src/cryptography/hazmat/backends/openssl/ciphers.py
parent874445aea9e2d07a94444855ccfeaa3082de26a9 (diff)
downloadcryptography-0e8cdf1023f6e2045de444b1c7e09f40cccf019e.tar.gz
cryptography-0e8cdf1023f6e2045de444b1c7e09f40cccf019e.tar.bz2
cryptography-0e8cdf1023f6e2045de444b1c7e09f40cccf019e.zip
Drop 1.0.0 (#3312)
* delete the 1.0.0 support * drop the version check * drop the AES-CTR stuff * Update the example * openssl truncates for us now * delete unused test * unused imports * Remove a bunch of conditional bindings for NPN * no more 1.0.0 builders * libressl fix * update the docs * remove dead branches * oops * this is a word, damnit * spelling * try removing this * this test is not needed * unused import
Diffstat (limited to 'src/cryptography/hazmat/backends/openssl/ciphers.py')
-rw-r--r--src/cryptography/hazmat/backends/openssl/ciphers.py35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/ciphers.py b/src/cryptography/hazmat/backends/openssl/ciphers.py
index bd5dfb31..898b3497 100644
--- a/src/cryptography/hazmat/backends/openssl/ciphers.py
+++ b/src/cryptography/hazmat/backends/openssl/ciphers.py
@@ -167,38 +167,3 @@ class _CipherContext(object):
self._backend.openssl_assert(res != 0)
tag = utils.read_only_property("_tag")
-
-
-@utils.register_interface(ciphers.CipherContext)
-class _AESCTRCipherContext(object):
- """
- This is needed to provide support for AES CTR mode in OpenSSL 1.0.0. It can
- be removed when we drop 1.0.0 support (RHEL 6.4 is the only thing that
- ships it).
- """
- def __init__(self, backend, cipher, mode):
- self._backend = backend
-
- self._key = self._backend._ffi.new("AES_KEY *")
- res = self._backend._lib.AES_set_encrypt_key(
- cipher.key, len(cipher.key) * 8, self._key
- )
- self._backend.openssl_assert(res == 0)
- self._ecount = self._backend._ffi.new("unsigned char[]", 16)
- self._nonce = self._backend._ffi.new("unsigned char[16]", mode.nonce)
- self._num = self._backend._ffi.new("unsigned int *", 0)
-
- def update(self, data):
- buf = self._backend._ffi.new("unsigned char[]", len(data))
- self._backend._lib.AES_ctr128_encrypt(
- data, buf, len(data), self._key, self._nonce,
- self._ecount, self._num
- )
- return self._backend._ffi.buffer(buf)[:]
-
- def finalize(self):
- self._key = None
- self._ecount = None
- self._nonce = None
- self._num = None
- return b""