lbry-fdroid/recipes/cryptography/force-urandom.patch

12 lines
691 B
Diff
Raw Normal View History

--- x/src/_cffi_src/openssl/src/osrandom_engine.h 2018-09-25 23:19:08.303397032 +0100
+++ y/src/_cffi_src/openssl/src/osrandom_engine.h 2018-09-25 23:21:45.945980819 +0100
@@ -42,7 +42,7 @@
#define CRYPTOGRAPHY_OSRANDOM_ENGINE CRYPTOGRAPHY_OSRANDOM_ENGINE_GETENTROPY
#elif defined(__linux__) && defined(SYS_getrandom)
/* Linux 3.4.17+ */
- #define CRYPTOGRAPHY_OSRANDOM_ENGINE CRYPTOGRAPHY_OSRANDOM_ENGINE_GETRANDOM
+ #define CRYPTOGRAPHY_OSRANDOM_ENGINE CRYPTOGRAPHY_OSRANDOM_ENGINE_DEV_URANDOM // force /dev/urandom
#else
/* Keep this as last entry, fall back to /dev/urandom */
#define CRYPTOGRAPHY_OSRANDOM_ENGINE CRYPTOGRAPHY_OSRANDOM_ENGINE_DEV_URANDOM