#6 Update to 17.3.0
Merged 6 years ago by jcline. Opened 6 years ago by jcline.
rpms/ jcline/pyOpenSSL master  into  master

@@ -1,49 +0,0 @@ 

- From 7b5cecf595cd1f4d0fb5b73e97f5fe2e00c4e255 Mon Sep 17 00:00:00 2001

- From: Jeremy Cline <jeremy@jcline.org>

- Date: Thu, 7 Sep 2017 20:11:08 -0400

- Subject: [PATCH] Provide a destructor for the CRL object (#690)

- 

- This frees the memory allocated for the CRL object. Prior to this

- commit, the following script would leak memory:

- 

- ```

- from OpenSSL.crypto import load_crl, FILETYPE_PEM

- 

- crl = """

- -----BEGIN X509 CRL-----

- MIIBfDCB5jANBgkqhkiG9w0BAQsFADCBoDELMAkGA1UEBhMCVVMxCzAJBgNVBAgT

- Ak5DMRAwDgYDVQQHEwdSYWxlaWdoMRcwFQYDVQQKEw5GZWRvcmEgUHJvamVjdDEP

- MA0GA1UECxMGZmVkbXNnMQ8wDQYDVQQDEwZmZWRtc2cxDzANBgNVBCkTBmZlZG1z

- ZzEmMCQGCSqGSIb3DQEJARYXYWRtaW5AZmVkb3JhcHJvamVjdC5vcmcXDTE3MDYx

- NTIxMDMwOFoXDTM3MDYxMDIxMDMwOFowFDASAgECFw0xMjA3MTUyMTE4NTJaMA0G

- CSqGSIb3DQEBCwUAA4GBAGOBuDxmRFNcYP71LBsCOfFzKij00qpxM01d5/G6+0kM

- WJT8oTajMQoY6oISvQDq6TkwEoKc1yl6Ld1/XTtCNOhbybzRBAVf/Lxi/nRPP1JO

- qOdZs5jMLLQq1mRJz+MgKHHTDlnvpbjHMuyTss1RblFDr4iZPHMcBNKPGIj3pmpA

- -----END X509 CRL-----

- """

- 

- for _ in range(0, 1000000):

-     load_crl(FILETYPE_PEM, crl)

- ```

- 

- Signed-off-by: Jeremy Cline <jeremy@jcline.org>

- ---

-  src/OpenSSL/crypto.py | 2 +-

-  1 file changed, 1 insertion(+), 1 deletion(-)

- 

- diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py

- index 52fcdaf..85c60b7 100644

- --- a/src/OpenSSL/crypto.py

- +++ b/src/OpenSSL/crypto.py

- @@ -2758,7 +2758,7 @@ def load_crl(type, buffer):

-          _raise_current_error()

-  

-      result = CRL.__new__(CRL)

- -    result._crl = crl

- +    result._crl = _ffi.gc(crl, _lib.X509_CRL_free)

-      return result

-  

-  

- -- 

- 2.13.5

- 

file modified
+5 -4
@@ -4,13 +4,10 @@ 

  

  Summary: Python wrapper module around the OpenSSL library

  Name: pyOpenSSL

- Version: 17.2.0

+ Version: 17.3.0

  Release: 1%{?dist}

  Source0: https://files.pythonhosted.org/packages/source/p/pyOpenSSL/pyOpenSSL-%{version}.tar.gz

  Source1: https://files.pythonhosted.org/packages/source/p/pyOpenSSL/pyOpenSSL-%{version}.tar.gz.asc

- # A backport of https://github.com/pyca/pyopenssl/pull/690 which will be included

- # in the next pyOpenSSL release (17.3.0 or later).

- Patch0: Provide-a-destructor-for-the-CRL-object.patch

  

  BuildArch: noarch

  License: ASL 2.0
@@ -109,6 +106,10 @@ 

  %doc CHANGELOG.rst examples doc/_build/html

  

  %changelog

+ * Mon Sep 18 2017 Jeremy Cline <jeremy@jcline.org> - 17.3.0-1

+ - New upstream release 17.2.0

+ - Drop memory leak patch as it's in the 17.3.0 upstream release

+ 

  * Fri Sep 08 2017 Jeremy Cline <jeremy@jcline.org> - 17.2.0-1

  - New upstream release 17.2.0

  - Backport a memory leak fix with CRLs (upstream PR #690).

If you're comfortable updating f27 to 17.3.0 could you merge this back as well? There's two backwards-incompatible changes for it:

  • Dropped support for Python 3.3. #677
  • Removed the deprecated OpenSSL.rand module. This is being done ahead of our normal deprecation schedule due to its lack of use and the fact that it was becoming a maintenance burden. os.urandom() should be used instead. #675

The first isn't a problem. The second could be a problem, but according to upstream it's not used much so maybe it isn't an issue.

I am afraid that the removed OpenSSL.rand module could be a problem. It really depends on whether something in Fedora uses it or not.

I'm all for backporting the patches and not breaking the API in f27.

So please update the f28 to 17.3.0. For 27 if you want to backport some fixes, please go ahead as you need/want to.

Pull-Request has been merged by jcline

6 years ago