Fix memory leak in OpenSSL.crypto.dump_privatekey#496
Merged
Conversation
Current coverage is 90.51%@@ master #496 diff @@
==========================================
Files 7 7
Lines 2067 2066 -1
Methods 0 0
Messages 0 0
Branches 343 342 -1
==========================================
+ Hits 1869 1870 +1
+ Misses 107 106 -1
+ Partials 91 90 -1
|
| rsa = _lib.EVP_PKEY_get1_RSA(pkey._pkey) | ||
| result_code = _lib.RSA_print(bio, rsa, 0) | ||
| # TODO RSA_free(rsa)? | ||
| _ffi.gc(rsa, _lib.RSA_free) |
Member
There was a problem hiding this comment.
This should be rsa = _ffi.gc(rsa, _lib.RSA_free) and it should be on the line right below rsa = _lib.EVP_PKEY...
jsonn
referenced
this pull request
in jsonn/pkgsrc
Jan 28, 2017
Add patch that makes tests on NetBSD progress further. But then there's a segfault. See pyca/pyopenssl#596 16.2.0 (2016-10-15) ------------------- Changes: ^^^^^^^^ - Fixed compatibility errors with OpenSSL 1.1.0. - Fixed an issue that caused failures with subinterpreters and embedded Pythons. `#552 <https://github.com/pyca/pyopenssl/pull/552>`_ 16.1.0 (2016-08-26) ------------------- Deprecations: ^^^^^^^^^^^^^ - Dropped support for OpenSSL 0.9.8. Changes: ^^^^^^^^ - Fix memory leak in ``OpenSSL.crypto.dump_privatekey()`` with ``FILETYPE_TEXT``. `#496 <https://github.com/pyca/pyopenssl/pull/496>`_ - Enable use of CRL (and more) in verify context. `#483 <https://github.com/pyca/pyopenssl/pull/483>`_ - ``OpenSSL.crypto.PKey`` can now be constructed from ``cryptography`` objects and also exported as such. `#439 <https://github.com/pyca/pyopenssl/pull/439>`_ - Support newer versions of ``cryptography`` which use opaque structs for OpenSSL 1.1.0 compatibility.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #494