summaryrefslogtreecommitdiff
path: root/crypto/compat (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add conditional compilation for windows and posix functions.Brent Cook2014-12-032-0/+421
| | | | | This adds a Windows-specific versions of several symbols from libcrypto and openssl(1).
* Use _WIN32 instead of __WIN32.宋冬生2014-11-181-1/+1
| | | | ok bcook@
* override native arc4random_buf on FreeBSDBrent Cook2014-11-031-1/+6
| | | | | | | | | | | | | | | | 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@
* wrap arc4random headerBrent Cook2014-10-301-0/+4
| | | | ok @doug
* Improve and simplify function and header detection logic.Brent Cook2014-10-301-3/+1
| | | | | | | | | 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
* harmonize asprintf with OpenSSHBrent Cook2014-07-302-110/+13
| | | | | | | | | * 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
* include comment on windows servicesBrent Cook2014-07-291-0/+5
|
* stub win32 issetugid implementationBrent Cook2014-07-291-0/+21
| | | | ok deraadt@ beck@
* produce a error if platform has no arc4random hookBrent Cook2014-07-291-7/+8
| | | | ok deraadt@ beck@
* add asprintf / vasprintf from OpenSSH portableBrent Cook2014-07-291-0/+94
| | | | ok deraadt@ beck@
* remove thread_private.h, no longer neededBrent Cook2014-07-271-0/+0
|
* remove thread_private.h defines, moved to arc4random_*.hBrent Cook2014-07-191-14/+0
|
* update to newly-refactored arc4random compatibility shimsBrent Cook2014-07-181-0/+16
| | | | | | the thread-private bits can move next ok beck@
* register the atfork handler from arc4randomBrent Cook2014-07-151-0/+8
| | | | | | | | | | | | | | | | | | From kettenis@ People have suggested using pthread_atfork(3) before, but discarded the idea because it involves linking with -lpthread, which has other undesirable consequences. However: * Most systems actually have pthread_atfork(3) in libc. I verified this on OS X and Solaris. I believe this is the case on Linux systems that use musl as well. * On Linux systems that use glibc, this isn't the case. However, those systems have __register_atfork(3), which is fully documented in the "Linux Standard Base Core Specification". ok kettenis@ deraadt@ beck@
* We're probably gonna need this for solaris 10Bob Beck2014-07-121-0/+101
|
* initial top-level import of subdirectoriesBrent Cook2014-07-102-0/+53