summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-09-06 23:33:52 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-09-06 23:33:52 (GMT)
commite66987e626cfce8292c39d5b1394665e8aa6840b (patch)
treeec94354a9ccb2f09e77e3a2381b52142544d0ee2 /Include
parente256accd46af74d2695117e62361fe7ae9dfdfe3 (diff)
downloadcpython-e66987e626cfce8292c39d5b1394665e8aa6840b.zip
cpython-e66987e626cfce8292c39d5b1394665e8aa6840b.tar.gz
cpython-e66987e626cfce8292c39d5b1394665e8aa6840b.tar.bz2
os.urandom() now blocks on Linux
Issue #27776: The os.urandom() function does now block on Linux 3.17 and newer until the system urandom entropy pool is initialized to increase the security. This change is part of the PEP 524.
Diffstat (limited to 'Include')
-rw-r--r--Include/pylifecycle.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
index e96eb70..cf149b2 100644
--- a/Include/pylifecycle.h
+++ b/Include/pylifecycle.h
@@ -117,7 +117,8 @@ PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int);
PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t);
/* Random */
-PyAPI_FUNC(int) _PyOS_URandom (void *buffer, Py_ssize_t size);
+PyAPI_FUNC(int) _PyOS_URandom(void *buffer, Py_ssize_t size);
+PyAPI_FUNC(int) _PyOS_URandomNonblock(void *buffer, Py_ssize_t size);
#ifdef __cplusplus
}