Merge #922: Add mingw32-w64/wine CI build
ed5a199bedtests: fopen /dev/urandom in binary mode (Tim Ruffing)4dc37bf81bAdd mingw32-w64/wine CI build (Pieter Wuille) Pull request description: ACKs for top commit: real-or-random: ACKed5a199bedjonasnick: utACKed5a199bedTree-SHA512: 45afc394e3a200f7c020426a66f78df8d12827b9dc91bb04dc1708c3ad5cdc4e7d20554d6d5c046d288552f4e722d4fe8a0f3234b662e7351a4d27aaaeb0d5c0
This commit is contained in:
@@ -127,7 +127,7 @@ static void secp256k1_testrand_init(const char* hexseed) {
|
||||
pos++;
|
||||
}
|
||||
} else {
|
||||
FILE *frand = fopen("/dev/urandom", "r");
|
||||
FILE *frand = fopen("/dev/urandom", "rb");
|
||||
if ((frand == NULL) || fread(&seed16, 1, sizeof(seed16), frand) != sizeof(seed16)) {
|
||||
uint64_t t = time(NULL) * (uint64_t)1337;
|
||||
fprintf(stderr, "WARNING: could not read 16 bytes from /dev/urandom; falling back to insecure PRNG\n");
|
||||
|
||||
Reference in New Issue
Block a user