diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-03-01 12:40:06 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-03-01 12:41:53 +0100 |
commit | d19d45a1e6a4345a57d5983d466b16dadbec0da9 (patch) | |
tree | af6dcbf0bb26adeeabe4eb5c19a5c31108bab9f3 /src/init.cpp | |
parent | cbdb4732f10cb00ec46a35e5c7adb2c4cdf1d64d (diff) | |
parent | 7e6dcd9995b99e894b8017f09016c405b066ca36 (diff) |
Merge #9821: util: Specific GetOSRandom for Linux/FreeBSD/OpenBSD
7e6dcd9 random: Add fallback if getrandom syscall not available (Wladimir J. van der Laan)
7cad849 sanity: Move OS random to sanity check function (Wladimir J. van der Laan)
aa09ccb squashme: comment that NUM_OS_RANDOM_BYTES should not be changed lightly (Wladimir J. van der Laan)
224e6eb util: Specific GetOSRandom for Linux/FreeBSD/OpenBSD (Wladimir J. van der Laan)
Tree-SHA512: 9fd408b1316c69de86674f342339b2f89192fd317c8c036b5df4320f828fa263c7966146bfc1904c51137ee4a26e4cb0f560b2cd05e18cde4d808b9b92ad15c4
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index 1c8c3bc620..da389fd23d 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -683,9 +683,15 @@ bool InitSanityCheck(void) InitError("Elliptic curve cryptography sanity check failure. Aborting."); return false; } + if (!glibc_sanity_test() || !glibcxx_sanity_test()) return false; + if (!Random_SanityCheck()) { + InitError("OS cryptographic RNG sanity check failure. Aborting."); + return false; + } + return true; } |