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}%
|
Loading…
Reference in new issue