aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorAyrx <terrycwk1994@gmail.com>2014-04-21 11:40:47 +0800
committerAyrx <terrycwk1994@gmail.com>2014-04-22 12:12:41 +0800
commit458cfd5df6902f4ee427fa0ca0eb67a8031b204c (patch)
tree519cb24cf21d96ddec48337a40889e4584b82e02 /cryptography
parent4b8628aa626413d41ebc976c1a097ca3f4e13959 (diff)
downloadcryptography-458cfd5df6902f4ee427fa0ca0eb67a8031b204c.tar.gz
cryptography-458cfd5df6902f4ee427fa0ca0eb67a8031b204c.tar.bz2
cryptography-458cfd5df6902f4ee427fa0ca0eb67a8031b204c.zip
Changed stub keys and ivs to use null bytes
Diffstat (limited to 'cryptography')
-rw-r--r--cryptography/hazmat/backends/openssl/backend.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py
index 7cfdd284..11731133 100644
--- a/cryptography/hazmat/backends/openssl/backend.py
+++ b/cryptography/hazmat/backends/openssl/backend.py
@@ -556,8 +556,11 @@ class Backend(object):
return self._ffi.buffer(buf)[:res]
def cmac_algorithm_supported(self, algorithm):
- return (backend._lib.Cryptography_HAS_CMAC == 1
- and backend.cipher_supported(algorithm, CBC(0)))
+ return (
+ backend._lib.Cryptography_HAS_CMAC == 1
+ and backend.cipher_supported(algorithm, CBC(
+ b"\x00" * algorithm.block_size))
+ )
def create_cmac_ctx(self, algorithm):
return _CMACContext(self, algorithm)