The FreeBSD-native arc4random_buf implementation falls back to weak
sources of entropy if the sysctl fails. Remove these dangerous fallbacks
by overriding locally.
Unfortunately, pthread_atfork() is broken on FreeBSD (at least 9 and 10)
if a program does not link to -lthr. Callbacks registered with
pthread_atfork() simply fail silently. So, it is not always possible to
detect a PID wraparound. I wish we could do better.
This improves arc4random_buf's safety compared to the native FreeBSD
implementation. Tested on FreeBSD 9 and 10.
ok beck@ deraadt@
While the native OS X implementation is fork-safe, it does not seed
safely, as of the latest released OS X libc sources, version 997.90.3.
It only uses weak sources of entropy if accessing /dev/urandom fails.
ok beck@ deraadt@
This allows sofware expecting OpenSSL's config script, to a limited
extent, to continue building without changes.
Thanks to technion for pointing this out and providing the initial
patch.
Simplify autoconf checks by using AC_CHECK_FUNCS/HEADERS.
Clarify some ambiguous dependencies around strnlen/strndup.
Unconditionally enable pidwraptest for all arc4random implementations.
Remove HAVE_VASPRINTF conditional, since asprintf requires vasprintf.
ok @doug
openssl.1 contains all of the information from the other application
manpages, and is the only one packaged in OpenBSD. So, remove the other
obsolete .1 manpages (and avoid overlapping system pages like passwd.1)
it seems that including stdarg.h is needed for defining va_list
environment is hpux 11.31(ia64) with gcc 4.7.1.
without stdarg.h, I got compilation error like this.
"error: 'va_list' undeclared (first use in this function)"
I checked with gcc -E, then I noticed that __va_list is defined but va_list is not.
"typedef __gnuc_va_list __va_list;"
with including stdarg.h, va_list is defined.
"typedef __gnuc_va_list va_list;"
* use the original name for the file from OpenSSH (remove duplicate version)
* add va_copy/__va_copy checks to configure
* incorporate proposed fixes to openssh version:
+ include more system headers directly for various definitions
+ limit the scope of va_copy/va_end to their affected vsnprintf calls
+ simplify error handling, removing a dead assignment
This is to avoid redefining prototypes from the libc headers. Also,
simplify the autoconf function checks and remove some copy/paste
errors checking for 'write'.
ok wouter@
Note that gcc chose to disable this rather than cause link issues with
older copies of Solaris 10:
https://gcc.gnu.org/ml/gcc-patches/2012-01/msg00816.html
If we want to support Solaris <10.10 (I'd rather support up-to-date
versions), getentropy_solaris would need to change.