|
@@ -2875,8 +2875,17 @@ crypto_strongest_rand_syscall(uint8_t *out, size_t out_len)
|
|
|
tor_assert(errno != EAGAIN);
|
|
|
tor_assert(errno != EINTR);
|
|
|
|
|
|
-
|
|
|
- log_warn(LD_CRYPTO, "Can't get entropy from getrandom().");
|
|
|
+
|
|
|
+ if (errno == ENOSYS) {
|
|
|
+ log_warn(LD_CRYPTO, "This warning is caused by ENOSYS error."
|
|
|
+ " You are running a version of Tor built to support"
|
|
|
+ " getrandom(), but the kernel is too old and doesn't"
|
|
|
+ " implement this function.");
|
|
|
+ } else {
|
|
|
+ log_warn(LD_CRYPTO, "Can't get entropy from getrandom(). %s error.",
|
|
|
+ strerror(errno));
|
|
|
+ }
|
|
|
+
|
|
|
getrandom_works = 0;
|
|
|
return -1;
|
|
|
|