|
Line 0
Link Here
|
|
|
1 |
https://github.com/python/cpython/pull/26 |
| 2 |
|
| 3 |
As of OpenSSL 1.1 EGD is disabled by default and OPENSSL_NO_EGD is defined. |
| 4 |
EGD default disabled https://github.com/openssl/openssl/blob/master/Configure#L363 |
| 5 |
EGD methods not available https://github.com/openssl/openssl/blob/master/include/openssl/rand.h#L61 |
| 6 |
|
| 7 |
As of LibreSSL 2.2.3 the headers define OPENSSL_NO_EGD in the same way that other missing features are documented there. |
| 8 |
|
| 9 |
In addition this fixes a build failure on FreeBSD where configure does not use the correct libraries to detect RAND_egd in libcrypto. |
| 10 |
--- Modules/_ssl.c.orig 2015-12-07 01:39:10 UTC |
| 11 |
+++ Modules/_ssl.c |
| 12 |
@@ -3916,7 +3916,7 @@ _ssl_RAND_status_impl(PyModuleDef *modul |
| 13 |
return PyLong_FromLong(RAND_status()); |
| 14 |
} |
| 15 |
|
| 16 |
-#ifdef HAVE_RAND_EGD |
| 17 |
+#ifndef OPENSSL_NO_EGD |
| 18 |
/*[clinic input] |
| 19 |
_ssl.RAND_egd |
| 20 |
path: object(converter="PyUnicode_FSConverter") |
| 21 |
@@ -3942,7 +3942,7 @@ _ssl_RAND_egd_impl(PyModuleDef *module, |
| 22 |
} |
| 23 |
return PyLong_FromLong(bytes); |
| 24 |
} |
| 25 |
-#endif /* HAVE_RAND_EGD */ |
| 26 |
+#endif /* OPENSSL_NO_EGD */ |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
--- Modules/clinic/_ssl.c.h.orig 2015-12-07 01:39:10 UTC |
| 31 |
+++ Modules/clinic/_ssl.c.h |
| 32 |
@@ -893,7 +893,7 @@ _ssl_RAND_status(PyModuleDef *module, Py |
| 33 |
return _ssl_RAND_status_impl(module); |
| 34 |
} |
| 35 |
|
| 36 |
-#if defined(HAVE_RAND_EGD) |
| 37 |
+#if !defined(OPENSSL_NO_EGD) |
| 38 |
|
| 39 |
PyDoc_STRVAR(_ssl_RAND_egd__doc__, |
| 40 |
"RAND_egd($module, path, /)\n" |
| 41 |
@@ -924,7 +924,7 @@ exit: |
| 42 |
return return_value; |
| 43 |
} |
| 44 |
|
| 45 |
-#endif /* defined(HAVE_RAND_EGD) */ |
| 46 |
+#endif /* defined(OPENSSL_NO_EGD) */ |
| 47 |
|
| 48 |
PyDoc_STRVAR(_ssl_get_default_verify_paths__doc__, |
| 49 |
"get_default_verify_paths($module, /)\n" |