Browse Source
Merge pull request #1783 from wongsyrone/info
update entropy info based on libsodium documentation
pull/1785/merge
Max Lv
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
src/crypto.c
|
|
@ -115,10 +115,10 @@ entropy_check(void) |
|
|
|
|
|
|
|
if ((fd = open("/dev/random", O_RDONLY)) != -1) { |
|
|
|
if (ioctl(fd, RNDGETENTCNT, &c) == 0 && c < 160) { |
|
|
|
LOGI("This system doesn't provide enough entropy to quickly generate high-quality random numbers\n" |
|
|
|
"Installing the rng-utils/rng-tools or haveged packages may help.\n" |
|
|
|
LOGI("This system doesn't provide enough entropy to quickly generate high-quality random numbers.\n" |
|
|
|
"Installing the rng-utils/rng-tools, jitterentropy or haveged packages may help.\n" |
|
|
|
"On virtualized Linux environments, also consider using virtio-rng.\n" |
|
|
|
"The service will not start until enough entropy has been collected."); |
|
|
|
"The service will not start until enough entropy has been collected.\n"); |
|
|
|
} |
|
|
|
close(fd); |
|
|
|
} |
|
|
|