diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-02-15 20:54:34 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-02-15 20:54:34 -0800 |
commit | e0a879f72fbd5bb9050c3637bdd012c25ad5e300 (patch) | |
tree | b75a606f28146b74b496fb45216f55a864a09e11 /src | |
parent | b8dc2f03ff2af2139ef9d77552562b0dce18d6bd (diff) | |
download | cryptography-e0a879f72fbd5bb9050c3637bdd012c25ad5e300.tar.gz cryptography-e0a879f72fbd5bb9050c3637bdd012c25ad5e300.tar.bz2 cryptography-e0a879f72fbd5bb9050c3637bdd012c25ad5e300.zip |
Fixed new flake8 warnings from teh latest version
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/backend.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py index 75d7e32f..8441e891 100644 --- a/src/cryptography/hazmat/backends/openssl/backend.py +++ b/src/cryptography/hazmat/backends/openssl/backend.py @@ -225,8 +225,8 @@ class Backend(object): ) def create_symmetric_encryption_ctx(self, cipher, mode): - if (isinstance(mode, CTR) and isinstance(cipher, AES) - and not self._evp_cipher_supported(cipher, mode)): + if (isinstance(mode, CTR) and isinstance(cipher, AES) and + not self._evp_cipher_supported(cipher, mode)): # This is needed to provide support for AES CTR mode in OpenSSL # 0.9.8. It can be removed when we drop 0.9.8 support (RHEL 5 # extended life ends 2020). @@ -235,8 +235,8 @@ class Backend(object): return _CipherContext(self, cipher, mode, _CipherContext._ENCRYPT) def create_symmetric_decryption_ctx(self, cipher, mode): - if (isinstance(mode, CTR) and isinstance(cipher, AES) - and not self._evp_cipher_supported(cipher, mode)): + if (isinstance(mode, CTR) and isinstance(cipher, AES) and + not self._evp_cipher_supported(cipher, mode)): # This is needed to provide support for AES CTR mode in OpenSSL # 0.9.8. It can be removed when we drop 0.9.8 support (RHEL 5 # extended life ends 2020). @@ -671,9 +671,10 @@ class Backend(object): def cmac_algorithm_supported(self, algorithm): return ( - self._lib.Cryptography_HAS_CMAC == 1 - and self.cipher_supported(algorithm, CBC( - b"\x00" * algorithm.block_size)) + self._lib.Cryptography_HAS_CMAC == 1 and + self.cipher_supported( + algorithm, CBC(b"\x00" * algorithm.block_size) + ) ) def create_cmac_ctx(self, algorithm): |