]>
Commit | Line | Data |
---|---|---|
f7fe41d0 JB |
1 | https://github.com/pyca/cryptography/pull/6403 |
2 | ||
3 | From 076560a9507bbe26180f499adf750bc3851b97e8 Mon Sep 17 00:00:00 2001 | |
4 | From: Alex Gaynor <alex.gaynor@gmail.com> | |
5 | Date: Mon, 11 Oct 2021 09:43:28 -0400 | |
6 | Subject: [PATCH] Specify the out length when obtaining the tag for poly1305 | |
7 | ||
8 | --- | |
9 | src/cryptography/hazmat/backends/openssl/poly1305.py | 2 +- | |
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
11 | ||
12 | diff --git a/src/cryptography/hazmat/backends/openssl/poly1305.py b/src/cryptography/hazmat/backends/openssl/poly1305.py | |
13 | index 35f6819ce87..2ddae9847a4 100644 | |
14 | --- a/src/cryptography/hazmat/backends/openssl/poly1305.py | |
15 | +++ b/src/cryptography/hazmat/backends/openssl/poly1305.py | |
16 | @@ -51,7 +51,7 @@ def update(self, data): | |
17 | ||
18 | def finalize(self): | |
19 | buf = self._backend._ffi.new("unsigned char[]", _POLY1305_TAG_SIZE) | |
20 | - outlen = self._backend._ffi.new("size_t *") | |
21 | + outlen = self._backend._ffi.new("size_t *", _POLY1305_TAG_SIZE) | |
22 | res = self._backend._lib.EVP_DigestSignFinal(self._ctx, buf, outlen) | |
23 | self._backend.openssl_assert(res != 0) | |
24 | self._backend.openssl_assert(outlen[0] == _POLY1305_TAG_SIZE) |