Commit Graph

16 Commits

Author SHA1 Message Date
Todd C. Miller
de4fd4a31d Use the OpenSSL RAND_bytes() function if getrandom() fails. 2021-10-20 09:51:17 -06:00
Todd C. Miller
e0c2635fb3 Apply Google inclusive language guidelines.
Also replace backwards with backward.
2020-10-30 10:15:30 -06:00
Todd C. Miller
88dcdcd11d Fix -Wshadow warnings. 2020-09-25 15:09:45 -06:00
Todd C. Miller
c4b9f6136d Add missing #ifdef HAVE_CLOCK_GETTIME in getentropy_fallback()
From Tim Rice
2020-09-04 15:55:11 -06:00
Todd C. Miller
ce97ca28db Use OpenBSD-compatible freezero() in place of explicit_bzero() + free() 2020-08-10 19:24:33 -06:00
Todd C. Miller
cef6e3687e Switch from memset_s() -> explicit_bzero().
memset_s() (and all of Annex K) is likely to be removed from the
a future version of the standard.
2020-08-10 19:24:32 -06:00
Todd C. Miller
9d69c4a022 Allow getentropy.c to compile when MAP_ANON is unavailable. 2020-01-28 06:59:16 -07:00
Todd C. Miller
aa7ea419f0 Backed out changeset 9dce3ebb2c37
MAP_SGI_ANYADDR cannot be used in place of MAP_ANON
2020-01-28 05:49:41 -07:00
Todd C. Miller
1fd82e1499 Fix compilation on IRIX; Bug #915
IRIX lacks MAP_ANON (and MAP_ANONYMOUS) but we can use the IRIX-specific
flag MAP_SGI_ANYADDR instead.  From Kazuo Kuroi
2020-01-27 16:14:57 -07:00
Todd C. Miller
1e1ef61902 Add SPDX-License-Identifier to files. 2019-04-29 07:21:51 -06:00
Todd C. Miller
6c3d20cb41 Convert PVS-Studio comment to ANSI C. 2018-10-26 08:39:09 -06:00
Todd C. Miller
64e5d34c57 Add comments in .c files so PVS-Studio will check them. 2018-10-21 08:46:05 -06:00
Todd C. Miller
fe965c3a31 Fix typo in last commit. 2018-08-22 19:15:26 -06:00
Todd C. Miller
d876602dbf Do not assume all Linux has linux/random.h.
Add missing sys/syscall.h include
2018-08-22 15:12:11 -06:00
Todd C. Miller
ad104a3e47 Fix setting of errno when gotdata() fails. 2018-08-22 10:36:00 -06:00
Todd C. Miller
ddd663a5f2 Import arc4random() from libressl. This takes an all-in-one approach
instead of the one-file-per-OS approach that libressl takes.
The fallback code does not have as many OS-specific bits as libressl.
2018-05-24 21:04:23 -06:00