mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-30 16:51:41 +00:00
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
|
||||
#ifdef KEYSERV_RANDOM
|
||||
#ifdef __FreeBSD__
|
||||
srandomdev();
|
||||
master->key.low = arc4random();
|
||||
master->key.high = arc4random();
|
||||
#else
|
||||
srandom(seed);
|
||||
#endif
|
||||
master->key.low = random();
|
||||
master->key.high = random();
|
||||
#endif
|
||||
#else
|
||||
/* use stupid dangerous bad rand() */
|
||||
#ifdef __FreeBSD__
|
||||
|
Loading…
Reference in New Issue
Block a user