aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2015-02-16 09:18:25 +0000
committerAlex Stapleton <alexs@prol.etari.at>2015-02-16 09:18:25 +0000
commitebc1717d73eaccffeddc32cee9eb0ad5936f7a4b (patch)
treeb75a606f28146b74b496fb45216f55a864a09e11 /src
parentb8dc2f03ff2af2139ef9d77552562b0dce18d6bd (diff)
parente0a879f72fbd5bb9050c3637bdd012c25ad5e300 (diff)
downloadcryptography-ebc1717d73eaccffeddc32cee9eb0ad5936f7a4b.tar.gz
cryptography-ebc1717d73eaccffeddc32cee9eb0ad5936f7a4b.tar.bz2
cryptography-ebc1717d73eaccffeddc32cee9eb0ad5936f7a4b.zip
Merge pull request #1664 from alex/flake8
Fixed new flake8 warnings from teh latest version
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/hazmat/backends/openssl/backend.py15
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):