aboutsummaryrefslogtreecommitdiff
path: root/crypto/compat (follow)
Commit message (Collapse)AuthorAgeFilesLines
* re-add getpagesize fallback, needed for AndroidBrent Cook2017-06-111-2/+8
|
* add back copyright notice from OpenBSD malloc.c from which this came.Brent Cook2017-04-281-0/+19
|
* Add freezero supportkinichiro2017-04-221-0/+13
|
* remove sysconf fallback for nowBrent Cook2017-03-161-8/+2
|
* Add support for getpagesizekinichiro2017-03-151-0/+18
|
* Fix SYSerr and BIOerr in b_win.ckinichiro2017-02-011-2/+2
|
* Copy libc compat files rather than adding into the repositorykinichiro2017-01-281-212/+0
| | | | | - remove the CP_LIBC files from repo - move tests/memmem.c to tests/compat/
* MSVSC fixesBrent Cook2017-01-161-1/+1
|
* add open(2) shim to handle O_BINARY and O_CLOEXECBrent Cook2017-01-161-0/+23
|
* handle EBADF, which is returned when a file is passedBrent Cook2017-01-151-3/+6
|
* Revert back to GetStdHandle, since it works fine with pipes.Brent Cook2015-12-111-6/+6
| | | | | Also include the formerly-missing NULL check, since this can fail in two ways.
* include stdint.h uint*_tBrent Cook2015-12-111-0/+1
|
* Replace STDIN_FILENO with _filenoAnthony Novatsis2015-12-111-3/+3
| | | | | Replace STDIN_FILENO with _fileno as STDIN_FILENO results in compile errors with Visual Studio 2015 (using CMake).
* only set the console mode if stdin is a console (not a pipe)Brent Cook2015-12-061-9/+21
| | | | This allows piping commands and running from a cygwin console.
* wrap gets on Windows, replacing '\r\n' with '\n'Brent Cook2015-12-051-0/+14
|
* check bounds before casting (long long) to time_tBrent Cook2015-10-211-0/+6
|
* Windows compatibility fixesBrent Cook2015-10-181-0/+12
| | | | | | | | | | | VS2013 has trouble with relative include paths for apps/openssl, so move certhash_win/apps_win.c back to apps/openssl. gmtime_r on mingw64 fails with negative time_t, override gmtime_s fails all of the time unit tests, override SHUT_RD/WR are defined in newer mingw64 headers, check before overriding
* make internal functions staticBrent Cook2015-10-151-4/+4
|
* use timegm from muslBrent Cook2015-10-151-60/+191
|
* include timegm fallbackBrent Cook2015-10-151-0/+71
|
* fix spelling of OPENSSL_cleanseBrent Cook2015-09-131-1/+1
|
* add win32-specific explicit_bzero implementationBrent Cook2015-08-031-0/+13
|
* move sleep shim to posix_win.cBrent Cook2015-07-211-0/+7
|
* add initial CMake and Visual Studio build supportBrent Cook2015-07-211-0/+24
| | | | | | | | This moves the compatibility include files from include to include/compat so we can use the awful MS C compiler <../include/> trick to emulate the GNU #include_next extension. This also removes a few old compat files we do not need anymore.
* win32 openssl CLI: preserve original echo stateBrent Cook2015-07-161-9/+9
| | | | | | | Mirror the patch to ui_openssl.c, also fix the broken conditional that made it not actually turn off echo in the first place. ok guenther@
* add check for inet_pton, nudge minimum win32 compat to 0x0501Brent Cook2015-07-021-0/+212
|
* add a missing header and fix typo in windows posix layerBrent Cook2015-06-131-1/+2
|
* refactor win32 shims into posix_win.cBrent Cook2015-06-051-0/+167
| | | | this also adds a rename shim that allows overwrites
* remove issetuigid wrappers, now that all getenv calls are gone.Brent Cook2015-04-145-213/+0
| | | | | | | | | | | From deraadt@ upstream: Remove all getenv() calls, especially those wrapped by issetugid(). getenv()'s wrapped by issetugid() are safe, but issetugid() is ... difficult to impliment on many operating systems. By accident, a grand experiment was run over the last year, where issetugid() returned 1 (the safe value) on a few operating systems. Noone noticed & complained that certain environment variables were not working.......
* Add experimental AIX support.Brent Cook2015-03-312-1/+111
| | | | | This includes a WIP failsafe issetugid for now, while research continues on the proper way to do this in a race-free fashion in AIX.
* disable system issetugid on OS X since it is not fork-safeBrent Cook2015-02-171-0/+16
| | | | | Noticed while testing similar code for AIX. ok beck@
* remove getuid/getgid fallbacks from hp-ux issetugid emulationBrent Cook2015-02-161-15/+6
| | | | | Fail closed if we cannot obtain the process flags. Noticed while looking at a similar function for AIX.
* add NetBSD shims for arc4randomBrent Cook2015-01-211-0/+3
| | | | | | The current NetBSD release, 6.1.5, fails to reseed arc4random fork. Work around it by providing arc4random/getentropy shims. Revisit when NetBSD 7 is available.
* Add support for HP-UXkinichiro2015-01-062-0/+29
| | | | | | | | | | tested on: HP-UX 11.31 ia64, gcc 4.7.1(HP AllianceOne version) gcc 4.2.3(http://hpux.connect.org.uk) HP C/aC++ HP-UX defaults to use LP32 and it treats long as 32 bit (= 4 bytes). This build forces LP64 for treating long as 64 bit.
* 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