diff options
author | Donald Stufft <donald@stufft.io> | 2015-06-06 11:57:15 -0400 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2015-06-06 11:57:15 -0400 |
commit | d1596063a47cafa0ffe9bfe696d95035a13f084b (patch) | |
tree | 0d1eecfa6d8238a9342c54aaad85b5f945a7b65d /src | |
parent | 672b843df865af5498797a647c18273b6666c5eb (diff) | |
parent | c1587fcf1e9ed87b16e285339e5deb3336665eb0 (diff) | |
download | cryptography-d1596063a47cafa0ffe9bfe696d95035a13f084b.tar.gz cryptography-d1596063a47cafa0ffe9bfe696d95035a13f084b.tar.bz2 cryptography-d1596063a47cafa0ffe9bfe696d95035a13f084b.zip |
Merge pull request #2010 from reaperhulk/gc-fix
don't double free DSA cdata when verifying things
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/dsa.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/dsa.py b/src/cryptography/hazmat/backends/openssl/dsa.py index 5d7ca38c..254d29ed 100644 --- a/src/cryptography/hazmat/backends/openssl/dsa.py +++ b/src/cryptography/hazmat/backends/openssl/dsa.py @@ -40,13 +40,10 @@ class _DSAVerificationContext(object): self._hash_ctx.update(data) def verify(self): - self._dsa_cdata = self._backend._ffi.gc(self._public_key._dsa_cdata, - self._backend._lib.DSA_free) - data_to_verify = self._hash_ctx.finalize() data_to_verify = _truncate_digest_for_dsa( - self._dsa_cdata, data_to_verify, self._backend + self._public_key._dsa_cdata, data_to_verify, self._backend ) # The first parameter passed to DSA_verify is unused by OpenSSL but |