aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-03-01 12:40:06 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-03-01 12:41:53 +0100
commitd19d45a1e6a4345a57d5983d466b16dadbec0da9 (patch)
treeaf6dcbf0bb26adeeabe4eb5c19a5c31108bab9f3 /src/init.cpp
parentcbdb4732f10cb00ec46a35e5c7adb2c4cdf1d64d (diff)
parent7e6dcd9995b99e894b8017f09016c405b066ca36 (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.cpp6
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;
}