Upgrade to 0.14 with help of Matěj Cepl and Kevin Fenzi

epel9
Tomas Mraz 10 years ago
parent f7e9c8668e
commit 657c55e7f9

@ -1,77 +0,0 @@
diff -up pyOpenSSL-0.13/OpenSSL/crypto/crypto.c.error pyOpenSSL-0.13/OpenSSL/crypto/crypto.c
--- pyOpenSSL-0.13/OpenSSL/crypto/crypto.c.error 2011-09-02 17:46:13.000000000 +0200
+++ pyOpenSSL-0.13/OpenSSL/crypto/crypto.c 2013-04-04 14:25:17.405118204 +0200
@@ -45,12 +45,15 @@ global_passphrase_callback(char *buf, in
func = (PyObject *)cb_arg;
argv = Py_BuildValue("(i)", rwflag);
+ if (argv == NULL)
+ return 0;
ret = PyEval_CallObject(func, argv);
Py_DECREF(argv);
if (ret == NULL)
return 0;
if (!PyBytes_Check(ret))
{
+ Py_DECREF(ret);
PyErr_SetString(PyExc_ValueError, "String expected");
return 0;
}
@@ -58,6 +61,7 @@ global_passphrase_callback(char *buf, in
if (nchars > len)
nchars = len;
strncpy(buf, PyBytes_AsString(ret), nchars);
+ Py_DECREF(ret);
return nchars;
}
@@ -637,7 +641,10 @@ crypto_sign(PyObject *spam, PyObject *ar
return NULL;
}
- EVP_SignInit(&md_ctx, digest);
+ if (EVP_SignInit(&md_ctx, digest) <= 0) {
+ exception_from_error_queue(crypto_Error);
+ return NULL;
+ }
EVP_SignUpdate(&md_ctx, data, data_len);
sig_len = sizeof(sig_buf);
err = EVP_SignFinal(&md_ctx, sig_buf, &sig_len, pkey->pkey);
@@ -692,7 +699,11 @@ crypto_verify(PyObject *spam, PyObject *
return NULL;
}
- EVP_VerifyInit(&md_ctx, digest);
+ if (EVP_VerifyInit(&md_ctx, digest) <= 0) {
+ exception_from_error_queue(crypto_Error);
+ EVP_PKEY_free(pkey);
+ return NULL;
+ }
EVP_VerifyUpdate(&md_ctx, data, data_len);
err = EVP_VerifyFinal(&md_ctx, signature, sig_len, pkey);
EVP_PKEY_free(pkey);
diff -up pyOpenSSL-0.13/OpenSSL/crypto/x509.c.error pyOpenSSL-0.13/OpenSSL/crypto/x509.c
--- pyOpenSSL-0.13/OpenSSL/crypto/x509.c.error 2011-09-02 17:46:13.000000000 +0200
+++ pyOpenSSL-0.13/OpenSSL/crypto/x509.c 2013-04-04 14:02:34.932847551 +0200
@@ -656,6 +656,7 @@ crypto_X509_digest(crypto_X509Obj *self,
if (!X509_digest(self->x509,digest,fp,&len))
{
exception_from_error_queue(crypto_Error);
+ return NULL;
}
tmp = malloc(3*len+1);
memset(tmp, 0, 3*len+1);
diff -up pyOpenSSL-0.13/OpenSSL/ssl/context.c.error pyOpenSSL-0.13/OpenSSL/ssl/context.c
--- pyOpenSSL-0.13/OpenSSL/ssl/context.c.error 2011-09-02 17:46:13.000000000 +0200
+++ pyOpenSSL-0.13/OpenSSL/ssl/context.c 2013-04-04 14:02:34.932847551 +0200
@@ -1215,6 +1215,10 @@ ssl_Context_init(ssl_ContextObj *self, i
}
self->ctx = SSL_CTX_new(method);
+ if (self->ctx == NULL) {
+ exception_from_error_queue(ssl_Error);
+ return NULL;
+ }
Py_INCREF(Py_None);
self->passphrase_callback = Py_None;
Py_INCREF(Py_None);

@ -1,33 +0,0 @@
diff -Nur pyOpenSSL-0.5.1.orig/doc/tools/mkhowto pyOpenSSL-0.5.1/doc/tools/mkhowto
--- pyOpenSSL-0.5.1.orig/doc/tools/mkhowto 2001-07-30 13:31:48.000000000 +0200
+++ pyOpenSSL-0.5.1/doc/tools/mkhowto 2003-08-08 16:46:10.000000000 +0200
@@ -56,7 +56,7 @@
DVIPS_BINARY = "dvips"
LATEX_BINARY = "latex"
LATEX2HTML_BINARY = "latex2html"
-LYNX_BINARY = "lynx"
+LYNX_BINARY = "elinks"
MAKEINDEX_BINARY = "makeindex"
PDFLATEX_BINARY = "pdflatex"
PERL_BINARY = "perl"
@@ -397,7 +397,7 @@
if tempdir is None:
tempdir = self.doc
indexfile = os.path.join(tempdir, "index.html")
- self.run("%s -nolist -dump %s >%s.txt"
+ self.run("%s -dump %s >%s.txt"
% (LYNX_BINARY, indexfile, self.doc))
def require_temps(self, binary=None):
diff -Nur pyOpenSSL-0.5.1.orig/setup.cfg pyOpenSSL-0.5.1/setup.cfg
--- pyOpenSSL-0.5.1.orig/setup.cfg 2002-09-10 00:05:21.000000000 +0200
+++ pyOpenSSL-0.5.1/setup.cfg 2003-08-08 16:48:34.000000000 +0200
@@ -4,7 +4,7 @@
# bdist_rpm settings contributed by Mihai Ibanescu <misa@redhat.com>
[bdist_rpm]
release = 1
-build-requires = lynx openssl-devel python-devel perl tetex-dvips tetex-latex
+build-requires = elinks openssl-devel python-devel perl tetex-dvips tetex-latex
group = Development/Libraries
build_script = rpm/build_script
doc-files = doc/pyOpenSSL.txt doc/pyOpenSSL.ps doc/html

@ -1,46 +0,0 @@
--- pyOpenSSL-0.6/doc/tools/texinputs/howto.cls.nopdfout 2001-07-16 07:53:03.000000000 -0400
+++ pyOpenSSL-0.6/doc/tools/texinputs/howto.cls 2005-03-14 20:22:34.745230000 -0500
@@ -54,10 +54,16 @@
% changes \\ to ', ' (comma-space), making it pass muster for
% generating document info in the PDF file.
\def\\{, }
- \pdfinfo{
- /Author (\@author)
- /Title (\@title)
- }
+ \ifx\pdfoutput\relax
+ \else
+ \ifcase\pdfoutput
+ \else
+ \pdfinfo{
+ /Author (\@author)
+ /Title (\@title)
+ }
+ \fi
+ \fi
}}
\begin{flushright}
{\rm\Huge\py@HeaderFamily \@title} \par
--- pyOpenSSL-0.6/doc/tools/texinputs/manual.cls.nopdfout 2005-03-14 09:32:50.000000000 -0500
+++ pyOpenSSL-0.6/doc/tools/texinputs/manual.cls 2005-03-14 09:34:20.000000000 -0500
@@ -69,10 +69,16 @@
% changes \\ to ', ' (comma-space), making it pass muster for
% generating document info in the PDF file.
\def\\{, }
- \pdfinfo{
- /Author (\@author)
- /Title (\@title)
- }
+ \ifx\pdfoutput\relax
+ \else
+ \ifcase\pdfoutput
+ \else
+ \pdfinfo{%
+ /Author (\@author)
+ /Title (\@title)
+ }
+ \fi
+ \fi
}}
\begin{flushright}%
{\rm\Huge\py@HeaderFamily \@title \par}%

@ -8,26 +8,19 @@ Version: 0.14
Release: 1%{?dist} Release: 1%{?dist}
Source0: http://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-%{version}.tar.gz Source0: http://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-%{version}.tar.gz
# Fedora specific patches BuildArch: noarch
Patch2: pyOpenSSL-elinks.patch
Patch3: pyOpenSSL-nopdfout.patch
Patch10: pyOpenSSL-0.13-check-error.patch
License: ASL 2.0 License: ASL 2.0
Group: Development/Libraries Group: Development/Libraries
Url: http://pyopenssl.sourceforge.net/ Url: http://pyopenssl.sourceforge.net/
BuildRequires: elinks BuildRequires: python-setuptools
BuildRequires: openssl-devel BuildRequires: python-sphinx
BuildRequires: tetex-dvips
BuildRequires: tetex-latex
BuildRequires: latex2html
BuildRequires: python2-devel BuildRequires: python2-devel
BuildRequires: python-cryptography
%if 0%{?with_python3} %if 0%{?with_python3}
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-cryptography
%endif %endif
%description %description
@ -56,24 +49,8 @@ BuildArch: noarch
%description doc %description doc
Documentation for pyOpenSSL Documentation for pyOpenSSL
# we don't want to provide private python extension libs
%{?filter_setup:
%filter_provides_in %{python_sitearch}/.*\.so$
%if 0%{?with_python3}
%filter_provides_in %{python3_sitearch}/.*\.so$
%endif
%filter_requires_in %{_datadir}/doc/
%filter_setup
}
%prep %prep
%setup -q -n pyOpenSSL-%{version} %setup -q -n pyOpenSSL-%{version}
%patch2 -p1 -b .elinks
%patch3 -p1 -b .nopdfout
%patch10 -p1 -b .error
# Fix permissions for debuginfo package
%{__chmod} -x OpenSSL/ssl/connection.c
%build %build
%if 0%{?with_python3} %if 0%{?with_python3}
@ -92,8 +69,7 @@ CFLAGS="%{optflags} -fno-strict-aliasing" %{__python3} setup.py build
popd popd
%endif %endif
%{__make} -C doc ps %{__make} -C doc html
%{__make} -C doc text html
%install %install
%{__python} setup.py install --skip-build --root %{buildroot} %{__python} setup.py install --skip-build --root %{buildroot}
@ -105,21 +81,21 @@ popd
%endif %endif
%files %files
%{python_sitearch}/OpenSSL/ %{python_sitelib}/OpenSSL/
%{python_sitearch}/pyOpenSSL-*.egg-info %{python_sitelib}/pyOpenSSL-*.egg-info
%if 0%{?with_python3} %if 0%{?with_python3}
%files -n python3-pyOpenSSL %files -n python3-pyOpenSSL
%{python3_sitearch}/OpenSSL/ %{python3_sitelib}/OpenSSL/
%{python3_sitearch}/pyOpenSSL-*.egg-info %{python3_sitelib}/pyOpenSSL-*.egg-info
%endif %endif
%files doc %files doc
%doc README doc/pyOpenSSL.* doc/html %doc examples doc/_build/html
%changelog %changelog
* Thu Sep 25 2014 Matej Cepl <mcepl@redhat.com> - 0.14-1 * Wed Jan 7 2015 Tomáš Mráz <tmraz@redhat.com> - 0.14-1
- Upgrade to 0.14.0 - Upgrade to 0.14 with help of Matěj Cepl and Kevin Fenzi
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13.1-4 * Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.13.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

Loading…
Cancel
Save