Use arc4random() instead of random() when generating the master key.
MFC after: 1 week
This commit is contained in:
parent
dc2368a438
commit
6cf217b22c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=111062
@ -239,12 +239,13 @@ randomize(master)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef KEYSERV_RANDOM
|
#ifdef KEYSERV_RANDOM
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
srandomdev();
|
master->key.low = arc4random();
|
||||||
|
master->key.high = arc4random();
|
||||||
#else
|
#else
|
||||||
srandom(seed);
|
srandom(seed);
|
||||||
#endif
|
|
||||||
master->key.low = random();
|
master->key.low = random();
|
||||||
master->key.high = random();
|
master->key.high = random();
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
/* use stupid dangerous bad rand() */
|
/* use stupid dangerous bad rand() */
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
|
Loading…
Reference in New Issue
Block a user