include


Log

Author Commit Date CI Message
Brent Cook 0e46c1e8 2018-03-18T10:36:51 add pthread_self/pthread_equal for win32
Brent Cook 0e69421d 2018-03-14T13:01:24 re-add headers for distribution
Brent Cook 4799f0d9 2018-03-14T12:58:48 syntax updates
Brent Cook cfdaa118 2018-03-14T12:56:26 prefer including windows.h over the internal header
Brent Cook d5608b38 2018-03-14T07:30:55 add pthread_once(3) implementation for Windows
Brent Cook 3fb9e63b 2018-03-14T07:29:04 bump base requirement to Windows Vista, use builtin inet_ntop/pton
kinichiro 3681d022 2018-02-25T01:59:39 Add compat bits for libtls on Windows
kinichiro f2953bc2 2018-02-11T23:31:43 Add file permission define for Windows and MinGW build
kinichiro 1f4bfb9a 2018-01-06T00:28:49 Call va_end soon after using variable length variable - This fix MSVC compiler warning C4702 "unreachable code".
kinichiro 965a8910 2017-12-25T16:30:49 Add CLOCK_MONOTONIC and timersub for the OS that does not have them
Brent Cook 7b6953e9 2017-12-12T03:31:35 add timerspecsub
Aric Belsito cbe57bef 2017-09-08T13:43:38 Some CMake Fixes. pqueue.h was getting installed when it shouldn't. pkgconfig files were not getting installed or generated.
d3x0r a4d80ca5 2017-07-06T23:11:11 Merge branch 'master' of https://github.com/libressl-portable/portable into SkipInstall Fix merge conflicts from GNUInstallDirs merge to master.
d3x0r 2557dd74 2017-07-06T02:09:44 Add option LIBRESSL_SKIP_INSTALL Internally LIBRESSL_SKIP_INSTALL, if not set becomes ENABLE_LIBRESSL_INSTALL so this by default is enabled. defining LIBRESSL_SKIP_INSTALL before hand will disable all install() rules. This is useful if another project includes and links to this statically. I chose to add a prefix to avoid potential name collision because the options are cached globally. If the installation is skipped, maybe it should also disable building apps? I didn't do that.
d3x0r a2bd5eba 2017-07-06T01:49:43 use GNUInstallDirs from cmake to specify install paths. Primarily this is to select whether 'lib64' or 'lib' is used on linux type systems.
kinichiro 530fbba1 2017-05-07T02:23:55 Add definition of in_addr_t for Windows build
kinichiro 048625cf 2017-04-22T23:08:17 Add freezero support
kinichiro c61c9821 2017-03-15T21:02:22 Add support for getpagesize
kinichiro 8877e9bc 2017-03-09T22:49:04 Add recallocarray
kinichiro fb936f89 2017-01-28T02:30:16 Move S_IRGRP and S_IROTH from fcntl.h to sys/stat.h - S_IRGRP and S_IROTH should be defined in sys/stat.h rather than fcntl.h - Old MinGW64 on Ubuntu 14.04 appears not to have S_IRGRP and S_IROTH - MinGW64 has __WIN32 defined but does not have _MSC_VER defined
kinichiro f5026b1f 2017-01-27T02:37:52 Add S_IRGRP and S_IROTH to include/compat/fcntl.h for ocspcheck
kinichiro e57ab149 2017-01-26T15:00:06 Add STDOUT_FILENO to include/compat/unistd.h
kinichiro 7dd0650d 2017-01-26T13:58:27 Add inet_ntop and memmem for ocspcheck
kinichiro b249f68e 2017-01-19T09:58:21 Fix fcntl.h shim since HP-UX 11.31 (ia64) does not define O_CLOEXEC
Brent Cook 3b2560fe 2017-01-16T10:36:05 MSVSC fixes
Brent Cook f21bd20c 2017-01-16T09:56:20 add open(2) shim to handle O_BINARY and O_CLOEXEC
Brent Cook 51a53876 2017-01-15T22:28:36 add fcntl shim
Brent Cook 057e7a85 2017-01-15T10:15:51 add noreturn attribute to compat functions
Brent Cook dfb6b11e 2017-01-15T04:30:41 include pipe2/socketpair compat for macOS
Brent Cook cb63e633 2016-10-30T23:14:03 define PATH_MAX in more msvc versions
kinichiro 14905877 2016-10-18T17:13:56 Enable tests on Visual Studio - add patch for aeadtest.c to undef IN - add patch for ocsp_test.c to call BIO_sock_init() before getaddrinfo() - define STDERR_FILENO in unistd.h to build pkcs7test.c - add option ENABLE_VSTEST(default OFF) to enable test on Visual Studio - modify to pass test data file as an argument (aeadtest, evptest) - add Windows scripts (ocsptest, pq_test, ssltest, testdsa, testenc, testrsa) - do not build pidwraptest on MSVC - fix some indentations
Brent Cook b7ba692f 2016-09-14T23:40:10 ensure that __STRING works
Brent Cook 08837a82 2016-09-04T09:04:01 more cdefs.h removal
Brent Cook 6f24864a 2016-09-04T07:57:13 cdefs.h should not be required anywhere
Brent Cook 6040ff04 2016-09-04T07:38:16 wire up sys/types.h to pull in sys/cdefs.h
kinichiro 2510a5e6 2016-04-07T15:08:12 modify cmake to build nc - modify structure of CMakeLists.txt under apps/ * move apps/CMakeLists.txt to apps/openssl/ since this is for openssl build * create new apps/nc/CMakeLists.txt for nc build * modify apps/CMakeLists.txt just add_subdirectory() - add checking and compile of arc4random_uniform() - add installing man files, openssl.1 and nc.1
kinichiro 14aa5f73 2016-03-13T19:17:24 modify include/compat/netinet/ip.h - add including <netinet/in_systm.h> for n_long on HP-UX
Brent Cook 8c91563f 2016-01-18T09:50:23 add solaris include for getentropy(2)
Brent Cook 07e541cc 2016-01-03T19:05:05 replace err.h macros with inline functions Passing NULL for the format is just easier with a function.
Brent Cook 38c577d7 2016-01-03T18:56:24 include strings.h in string.h on AIX as well
Brent Cook 905e2a3b 2015-12-06T23:32:18 refresh nc(1) support
Brent Cook 75ef5bb1 2015-12-05T13:58:37 wrap gets on Windows, replacing '\r\n' with '\n'
Brent Cook 585b57b2 2015-12-02T08:23:51 no special workaround needed for MSVC2015
Brent Cook 0197a589 2015-10-18T09:28:10 Windows compatibility fixes 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
Brent Cook a45e38e9 2015-10-17T22:57:59 disable some tests with 32-bit time_t systems Also disable use of _mkgmtime, it does not produce correct results.
Brent Cook e8c92100 2015-10-15T19:33:26 unconditionally disable pledge for now suggested by deraadt@ since there is still more coming
Brent Cook 4298ac93 2015-10-14T23:53:52 include timegm fallback
Brent Cook 1dd79f5d 2015-10-14T17:19:00 add limits.h shim for defining PATH_MAX on HP-UX
Brent Cook ff52e6f4 2015-10-12T15:34:03 check for pledge(2)
Brent Cook 41cebd32 2015-10-07T10:59:22 resolve tame to 0
Brent Cook 442cc6f1 2015-10-07T08:55:05 add tame(2) check
Brent Cook a615d3c6 2015-10-07T06:23:38 rename _mkgmtime as timegm on win32
Brent Cook a7f031ba 2015-10-01T07:40:26 add b64_ntop checking and fallback for nc(1)
kinichiro 9606a6b5 2015-09-16T20:36:38 add include/compat/readpassphrase.h to Makefile.am fix for https://github.com/libressl-portable/portable/issues/138
Brent Cook 696ba18c 2015-09-13T18:57:29 fixup windows and older linux builds
Brent Cook 8c90be2a 2015-09-13T11:56:41 allow nc to build on linux and os x
Brent Cook 5dc63037 2015-09-09T06:01:52 remove support for old MSVC versions, KNF
Brent Cook 5f4e95e7 2015-09-08T15:00:09 updates for MSVC 2015's degenerate headers Note that 'perror' moves from stdio.h to stdlib.h, and 'rename' moves from stdio.h to io.h. Also, standard C includes move from the compiler to the Windows SDK, which changes the base path for the include files.
Brent Cook 5ccdd138 2015-09-07T00:31:59 distribute include and man CMakefiles
Jeff Davey 5461dea7 2015-08-18T13:20:19 Add install targets and shared libraries to CMake
Brent Cook a9b16c2d 2015-07-22T09:00:38 correct fallback err.h macro behavior
Brent Cook 9d5eb631 2015-07-21T12:52:29 move sleep shim to posix_win.c
Brent Cook cbdc8ca8 2015-07-21T12:04:07 tighten up compat include paths, fix glibc compatibility
Brent Cook 5d8a1cf7 2014-07-10T22:06:10 add initial CMake and Visual Studio build support 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.
Brent Cook a1a0f2c6 2015-07-17T16:54:23 implement compatibility shim for __warn_references This will allow us to warn about deprecated function references at link-time.
Brent Cook 8c6ed379 2015-07-02T17:49:03 add compatible version of arpa/nameser.h for Windows
Brent Cook 54545427 2015-06-29T22:51:40 add check for inet_pton, nudge minimum win32 compat to 0x0501
Brent Cook b4a6a615 2015-06-05T04:31:56 refactor win32 shims into posix_win.c this also adds a rename shim that allows overwrites
Brent Cook b239fc25 2015-06-05T03:31:28 all file IO should be binary, auto-append the flag
Brent Cook 3096ab0e 2015-04-14T07:55:23 remove issetuigid wrappers, now that all getenv calls are gone. 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.......
Brent Cook dd646a33 2015-03-18T19:12:42 enable libtls by default The API/ABI for the LibreSSL 2.1.x series is now fixed, so we can safely enable libtls it by default. This is useful for new OpenNTPD and OpenSMTPD releases as well. ok deraadt@ beck@ sthen@
Brent Cook ad7ac48d 2015-02-14T20:03:39 add strsep fallback for libtls
Brent Cook 9909bd7a 2015-01-31T21:52:20 include 'struct iovec' for Windows this is used for in-memory cert loading
Brent Cook b3270494 2014-12-04T22:37:22 add support for building libtls Use './configure --enable-libtls' to build the library and install the associated manpages. Note that the API and ABI of this library may change still, though feedback is welcome. ok deraadt@ jsing@ tedu@
Brent Cook cccdd689 2014-11-19T07:43:07 add minimal winsock->BSD networking header shims also add license header to existing shims
Brent Cook e83c30c1 2014-11-20T07:32:15 monkey patch more POSIX-like behavior out of winsock 2 Windows sockets functions look on the outside like they behave similarly to POSIX functions, but there are many subtle and glaring differences, including errors reported via WSAGetLastError, read, write, and close do not work on sockets, setsockopt takes a (char *) rather than (void *), etc. This header implements wrappers that coerce more POSIX-like behavior from these functions, making portable code easier to develop. BENEFITS: One does not necessarily need to sprinkle #ifdefs around code to handle the Windows and non-Windows behavior when porting code. CAVEATS: There may be performance implications with the 'mother-may-I' approach to determining if a descriptor is a socket or a file. The errno mappings are not 100% what one might expect compared to POSIX since there were not always good 1:1 equivalents from the WSA errors.
Brent Cook 1bbde19a 2014-11-20T00:24:20 add minimal poll(2) implementation for Windows This provides sufficient functionality to run openssl(1) from a Windows console. This is based on the original select-based version from from songdongsheng@live.cn. Changes: * use nfds_t directly for iterating the fds. * add WSAGetLastError -> errno mappings * handle POLLHUP and the OOB data cases for revents * handle sparse arrays of fds correctly * KNF style updates * teach poll how to handle file handles as well as sockets This handles the socket/non-socket issue by alternating a loop between WaitForMultipleObjects for non-sockets and and select for sockets. One would think this would be terrible for performance, but as of this writing, poll consumes about 6% of the time doing a bulk transfer between a Linux box and 'openssl.exe s_server'. I tried to implement this all in terms of WaitForMultipleObjects with a select 'poll' at the end to get extra specific socket status. However, the cost of setting up an event handle for each socket, setting the WSAEventSelect attributes, and cleaning them up reliably was pretty high. Since the event handle associated with a socket is also global, creating a new one cancels the previous one or can be disabled externally. In addition, the 'FD_WRITE' status of a socket event handle does not behave in an expected fashion, being triggered by an edge on a write event rather than being level triggered. Another fun horror story is how stdin in windows might be a console, it might be a pipe, it might be something else. If these all worked in the same way, it would be great. But, since a console-stdin can also signal on a mouse or window event, it means we can easily get stuck in a blocking read (you can't make stdin non-blocking) if the non-character events are not filtered out. So, poll does that too. See here for various additional horror stories: http://www.postgresql.org/message-id/4351.1336927207@sss.pgh.pa.us
宋冬生 648e9136 2014-11-05T20:52:00 Use _WIN32 instead of __WIN32. ok bcook@
Brent Cook a4cc9539 2014-10-29T15:44:36 Improve and simplify function and header detection logic. 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
kinichiro a91d1013 2014-10-22T15:47:31 update string.h for include strings.h for HPUX environment
inoguchi 6dccbae6 2014-08-12T17:21:48 update stdio.h for including stdarg.h 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;"
Brent Cook 00b51d5c 2014-08-02T21:43:56 conditionally build strnlen if needed. it is only used by strndup prodded by Sortie@
Brent Cook 105da446 2014-07-30T22:16:01 define MAP_ANON for systems with MAP_ANONYMOUS switch the sense of this check
Brent Cook 8d89fb07 2014-07-30T07:07:48 merge endian definitions between AIX/HP-UX/Solaris
inoguchi ff58a2e3 2014-07-30T13:22:00 update include/machine/endian.h for hpux portability. ok bcook@
Brent Cook af705b3f 2014-07-29T07:39:23 add sys/mman.h shim to define MAP_ANON if needed thanks to kinichiro for pointing this out ok deraadt@ beck@
Brent Cook 35e2d8d0 2014-07-28T19:26:15 add asprintf / vasprintf from OpenSSH portable ok deraadt@ beck@
pgmassey 02ad0041 2014-07-25T14:58:53 Update endian.h for AIX/IRIX Added AIX/IRIX compatibility for endian detection. ok bcook@ deraadt@ beck@
Brent Cook 981fc361 2014-07-28T12:09:38 Guard individual compatibility header prototypes. 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@
Brent Cook 0a74a4d4 2014-07-27T06:11:56 add strndup/strnlen compat functions from OpenBSD
Brent Cook fb67b92e 2014-07-27T06:10:23 include system headers for err.h compat macros
Brent Cook ea6e7116 2014-07-21T18:57:06 build openbsd memmem implementation for explicit_bzero test memmem is not always available, and not all memmem's work the same way ok beck@ guenther@
Brent Cook 0ec7cdcb 2014-07-21T07:34:01 include err.h shim Includes compatible replacements, or uses system err.h if available. ok beck@ guenther@
Brent Cook 136ddd7a 2014-07-20T13:59:03 update guard, add win32 support for endian.h Thanks to Jonas 'Sortie' Termansen for pointing the guard inconsistency out. ok beck@
Brent Cook 237250e0 2014-07-20T13:32:44 include <_bsd_types.h> on MinGW ok beck@
Brent Cook 8e6009c7 2014-07-10T20:58:58 axe unneeded solaris compatibility definitions
Brent Cook 388a1655 2014-07-10T16:02:49 better fix for __bounded removal
Charlie Root abe7bee3 2014-07-10T08:36:47 Make things build again - add some missing headers ok bcook@
Brent Cook 2b6dbc39 2014-07-10T06:21:51 initial top-level import of subdirectories