summaryrefslogtreecommitdiff
path: root/src/sysdeps/trygetrandom.c
AgeCommit message (Collapse)Author
2019-10-26 Switch getrandom sysdep back to choose clLaurent Bercot
2019-09-20 sysdeps redesign: first part: minimize clr testsLaurent Bercot
Remaining clr: emptyregex: can be safely guessed to no nullispointer: can't be safely guessed, but do we need the test? devurandom: can't be safely guessed malloc0: can more or less be safely guessed to no
2017-04-26 Fix getrandom() detection: need to run the test, not only link!Laurent Bercot
2016-12-05 Fix trygetrandom.c to correctly detect getrandom() on muslLaurent Bercot
2016-10-14 Clean up and modernize librandom.Laurent Bercot
Correct random number generation has historically been suprisingly painful to achieve. There was no standard, every system behaved in a subtly different way, and there were a few userland initiatives to get decent randomness, all incompatible of course. The situation is a bit better now, we're heading towards some standardization. The arc4random() series of functions is a good API, and available on a lot of systems - unfortunately not Linux, but on Linux the new getrandom() makes using /dev/random obsolete. So I removed the old crap in librandom, dropped EGD support, dropped dynamic backend selection, made a single API series (random_* instead of goodrandom_* and badrandom_*), added an arc4random backend and a getrandom backend, and defaulted to /dev/urandom backed up by SURF in the worst case. This should be much smaller and logical. However, it's a major API break, so the skarnet.org stack will be changed to adapt.