void-packages/srcpkgs/python/patches/patch-Modules__ssl_c

45 lines
1.6 KiB
Text

$OpenBSD: patch-Modules__ssl_c,v 1.2 2014/07/11 06:59:43 rpointel Exp $
--- Modules/_ssl.c.orig Mon Jun 30 04:05:42 2014
+++ Modules/_ssl.c Wed Jul 9 11:41:16 2014
@@ -1601,32 +1601,6 @@ Returns 1 if the OpenSSL PRNG has been seeded with eno
It is necessary to seed the PRNG with RAND_add() on some platforms before\n\
using the ssl() function.");
-static PyObject *
-PySSL_RAND_egd(PyObject *self, PyObject *arg)
-{
- int bytes;
-
- if (!PyString_Check(arg))
- return PyErr_Format(PyExc_TypeError,
- "RAND_egd() expected string, found %s",
- Py_TYPE(arg)->tp_name);
- bytes = RAND_egd(PyString_AS_STRING(arg));
- if (bytes == -1) {
- PyErr_SetString(PySSLErrorObject,
- "EGD connection failed or EGD did not return "
- "enough data to seed the PRNG");
- return NULL;
- }
- return PyInt_FromLong(bytes);
-}
-
-PyDoc_STRVAR(PySSL_RAND_egd_doc,
-"RAND_egd(path) -> bytes\n\
-\n\
-Queries the entropy gather daemon (EGD) on the socket named by 'path'.\n\
-Returns number of bytes read. Raises SSLError if connection to EGD\n\
-fails or if it does not provide enough data to seed PRNG.");
-
#endif /* HAVE_OPENSSL_RAND */
@@ -1640,8 +1614,6 @@ static PyMethodDef PySSL_methods[] = {
#ifdef HAVE_OPENSSL_RAND
{"RAND_add", PySSL_RAND_add, METH_VARARGS,
PySSL_RAND_add_doc},
- {"RAND_egd", PySSL_RAND_egd, METH_O,
- PySSL_RAND_egd_doc},
{"RAND_status", (PyCFunction)PySSL_RAND_status, METH_NOARGS,
PySSL_RAND_status_doc},
#endif