aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-11-21 11:19:45 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-11-29 17:19:45 -0600
commitcf6032648a93329e93f40a3654c68d8d57cf0d63 (patch)
tree40e002af3dce340e206520f4e13170bc14df6511
parent22e80cb96e034679750a38702aaa55e30da05f69 (diff)
downloadcryptography-cf6032648a93329e93f40a3654c68d8d57cf0d63.tar.gz
cryptography-cf6032648a93329e93f40a3654c68d8d57cf0d63.tar.bz2
cryptography-cf6032648a93329e93f40a3654c68d8d57cf0d63.zip
fix buffer size bug for gcm tag fetch
-rw-r--r--cryptography/hazmat/bindings/openssl/backend.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/cryptography/hazmat/bindings/openssl/backend.py b/cryptography/hazmat/bindings/openssl/backend.py
index 08afa4d6..fdb67628 100644
--- a/cryptography/hazmat/bindings/openssl/backend.py
+++ b/cryptography/hazmat/bindings/openssl/backend.py
@@ -329,8 +329,7 @@ class _CipherContext(object):
block_byte_size, tag_buf
)
assert res != 0
- size = self._cipher.block_size
- self._tag = self._backend.ffi.buffer(tag_buf)[:size]
+ self._tag = self._backend.ffi.buffer(tag_buf)[:]
res = self._backend.lib.EVP_CIPHER_CTX_cleanup(self._ctx)
assert res == 1