From 9b198104db8b53178212b5849919b6a61ca794ab Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 12 Jan 2019 12:47:05 -0500 Subject: Fixes #4683 -- fixed linux kernel version that has getrandom (#4684) --- docs/hazmat/backends/openssl.rst | 2 +- src/_cffi_src/openssl/src/osrandom_engine.c | 2 +- src/_cffi_src/openssl/src/osrandom_engine.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/hazmat/backends/openssl.rst b/docs/hazmat/backends/openssl.rst index 52aeeafb..07ae74a2 100644 --- a/docs/hazmat/backends/openssl.rst +++ b/docs/hazmat/backends/openssl.rst @@ -106,7 +106,7 @@ seeded from the same pool as ``/dev/random``. +------------------------------------------+------------------------------+ | Windows | ``CryptGenRandom()`` | +------------------------------------------+------------------------------+ -| Linux >= 3.4.17 with working | ``getrandom(GRND_NONBLOCK)`` | +| Linux >= 3.17 with working | ``getrandom(GRND_NONBLOCK)`` | | ``SYS_getrandom`` syscall | | +------------------------------------------+------------------------------+ | OpenBSD >= 5.6 | ``getentropy()`` | diff --git a/src/_cffi_src/openssl/src/osrandom_engine.c b/src/_cffi_src/openssl/src/osrandom_engine.c index 315d5f1f..697381c8 100644 --- a/src/_cffi_src/openssl/src/osrandom_engine.c +++ b/src/_cffi_src/openssl/src/osrandom_engine.c @@ -4,7 +4,7 @@ * macOS >= 10.12 getentropy() * OpenBSD 5.6+ getentropy() * other BSD getentropy() if SYS_getentropy is defined - * Linux 3.4.17+ getrandom() with fallback to /dev/urandom + * Linux 3.17+ getrandom() with fallback to /dev/urandom * other /dev/urandom with cached fd * * The /dev/urandom, getrandom and getentropy code is derived from Python's diff --git a/src/_cffi_src/openssl/src/osrandom_engine.h b/src/_cffi_src/openssl/src/osrandom_engine.h index e7a55c5e..53f957fa 100644 --- a/src/_cffi_src/openssl/src/osrandom_engine.h +++ b/src/_cffi_src/openssl/src/osrandom_engine.h @@ -41,7 +41,7 @@ * to urandom */ #define CRYPTOGRAPHY_OSRANDOM_ENGINE CRYPTOGRAPHY_OSRANDOM_ENGINE_GETENTROPY #elif defined(__linux__) && defined(SYS_getrandom) - /* Linux 3.4.17+ */ + /* Linux 3.17+ */ #define CRYPTOGRAPHY_OSRANDOM_ENGINE CRYPTOGRAPHY_OSRANDOM_ENGINE_GETRANDOM #else /* Keep this as last entry, fall back to /dev/urandom */ -- cgit v1.2.3