aboutsummaryrefslogtreecommitdiffstats
path: root/e_os.h
Commit message (Collapse)AuthorAgeFilesLines
* Move to REF_DEBUG, for consistency.Rich Salz2016-02-111-7/+18
| | | | | | | Add utility macros REF_ASSERT_NOT and REF_PRINT_COUNT This is also RT 4181 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Refactoring BIO: add wrappers around sockaddr et alRichard Levitte2016-02-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Because different platforms have different levels of support for IPv6, different kinds of sockaddr variants, and some have getaddrinfo et al while others don't, we could end up with a mess if ifdefs, duplicate code and other maintainance nightmares. Instead, we're introducing wrappers around the common form for socket communication: BIO_ADDR, closely related to struct sockaddr and some of its variants. BIO_ADDRINFO, closely related to struct addrinfo. With that comes support routines, both convenient creators and accessors, plus a few utility functions: BIO_parse_hostserv, takes a string of the form host:service and splits it into host and service. It checks for * in both parts, and converts any [ipv6-address] syntax to ust the IPv6 address. BIO_lookup, looks up information on a host. All routines handle IPv4 (AF_INET) and IPv6 (AF_INET6) addresses, and there is support for local sockets (AF_UNIX) as well. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Remove /* foo.c */ commentsRich Salz2016-01-261-1/+0
| | | | | | | | | | | | This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Add a no-egd option to disable EGD-related codeBenjamin Kaduk2016-01-141-1/+1
| | | | | | | | The entropy-gathering daemon is used only on a small number of machines. Provide a configure knob so that EGD support can be disabled by default but re-enabled on those systems that do need it. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Simplify the EXIT macrot for VMSRichard Levitte2016-01-131-9/+4
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Have the VMS exit code follow POSIX conventionsRichard Levitte2016-01-131-0/+8
| | | | | | | | | | | | | | | | | | | | It seems like the convention for VMS exit codes is to combine the VMS C facility code (0x35a000) with a recoded exit code as follows: 0 => 1 1-255 => 8*code + 2 We also add 0x10000000, which is the control bit that has DCL not report the error on the terminal. That's just as well, since it would be quite nonsensical, for example: %C-W-NOMSG, Message number 0035A018 We could do all this by using the normal exit() function after having defined the macro _POSIX_EXIT. Unfortunately, this feature only exists in VMS C V7.1 and up. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add ossl_inlineDr. Stephen Henson2015-12-221-17/+0
| | | | | | | Add macro ossl_inline for use in public headers where a portable inline is required. Change existing inline to use ossl_inline Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Configuratons: add -DFILIO_H to harmonized Solaris targets.Andy Polyakov2015-11-241-1/+1
| | | | | | Triggered by RT#4144. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* e_os.h: __sun done right.Andy Polyakov2015-11-231-24/+4
| | | | | | RT #4144 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Use defined(__sun) instead of defined(sun)Kurt Roeckx2015-11-221-2/+2
| | | | | | | | Strict ISO confirming C compilers only define __sun Reviewed-by: Viktor Dukhovni <openssl-users@dukhovni.org> RT #4144, MR #1353
* e_os.h: bump minimal _WIN32_WINNT.Andy Polyakov2015-11-181-11/+9
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Replace "SSLeay" in API with OpenSSLRich Salz2015-10-301-15/+11
| | | | | | | All instances of SSLeay (any combination of case) were replaced with the case-equivalent OpenSSL. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Explicitly cast INVALID_SOCKET to (int) to address warnings on Windows.Andy Polyakov2015-10-051-1/+3
| | | | | | | | | | | Even though SOCKET is effectively declared as (void *) on Windows, it's not actually a pointer, but an index within per-process table of kernel objects. The table size is actually limited and its upper limit is far below upper limit for signed 32-bit integer. This is what makes cast in question possible. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix no-stdio buildDavid Woodhouse2015-09-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Much related/similar work also done by Ivan Nestlerode <ivan.nestlerode@sonos.com> +Replace FILE BIO's with dummy ops that fail. +Include <stdio.h> for sscanf() even with no-stdio (since the declaration is there). We rely on sscanf() to parse the OPENSSL_ia32cap environment variable, since it can be larger than a 'long'. And we don't rely on the availability of strtoull(). +Remove OPENSSL_stderr(); not used. +Make OPENSSL_showfatal() do nothing (currently without stdio there's nothing we can do). +Remove file-based functionality from ssl/. The function prototypes were already gone, but not the functions themselves. +Remove unviable conf functionality via SYS_UEFI +Add fallback definition of BUFSIZ. +Remove functions taking FILE * from header files. +Add missing DECLARE_PEM_write_fp_const +Disable X509_LOOKUP_hash_dir(). X509_LOOKUP_file() was already compiled out, so remove its prototype. +Use OPENSSL_showfatal() in CRYPTO_destroy_dynlockid(). +Eliminate SRP_VBASE_init() and supporting functions. Users will need to build the verifier manually instead. +Eliminate compiler warning for unused do_pk8pkey_fp(). +Disable TEST_ENG_OPENSSL_PKEY. +Disable GOST engine as is uses [f]printf all over the place. +Eliminate compiler warning for unused send_fp_chars(). Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Tim Hudson <tjh@openssl.org>
* RT3969: Add OPENSSL_SYS_UEFIDavid Woodhouse2015-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This provides support for building in the EDK II reference implementation of UEFI. Most UEFI firmware in existence uses OpenSSL for implementing the core cryptographic functionality needed for Secure Boot. This has always previously been handled with external patches to OpenSSL but we are now making a concerted effort to eliminate those. In this mode, we don't actually use the OpenSSL makefiles; we process the MINFO file generated by 'make files' and incorporate it into the EDK2 build system. Since EDK II builds for various targets with varying word size and we need to have a single prepackaged configuration, we deliberately don't hard-code the setting of SIXTY_FOUR_BIT vs. THIRTY_TWO_BIT in opensslconf.h. We bypass that for OPENSSL_SYS_UEFI and allow EDK II itself to set those, depending on the architecture. For x86_64, EDK II sets SIXTY_FOUR_BIT and thus uses 'long long' for the 64-bit type, even when building with GCC where 'long' is also 64-bit. We do this because the Microsoft toolchain has 32-bit 'long'. Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Tim Hudson <tjh@openssl.org>
* Identify and move OpenSSL internal header filesRichard Levitte2015-05-141-2/+2
| | | | | | | | | | | | | | There are header files in crypto/ that are used by the rest of OpenSSL. Move those to include/internal and adapt the affected source code, Makefiles and scripts. The header files that got moved are: crypto/constant_time_locl.h crypto/o_dir.h crypto/o_str.h Reviewed-by: Matt Caswell <matt@openssl.org>
* Add OSSL_NELEM macro.Dr. Stephen Henson2015-05-031-0/+2
| | | | | | | Add OSSL_NELEM macro to e_os.h to determine the number of elements in an array. Reviewed-by: Tim Hudson <tjh@openssl.org>
* VMS adjustments:Richard Levitte2015-01-301-0/+1
| | | | | | | | Add new symbols that are longer than 31 chars to symhacks. VMS doesn't have <sys/un.h>, reflect that in e_os.h. MS_CALLBACK has been removed, ssl_task.c needs adjustment. Reviewed-by: Andy Polyakov <appro@openssl.org>
* ifdef cleanup part 3: OPENSSL_SYSNAMERich Salz2015-01-231-10/+0
| | | | | | | | Rename OPENSSL_SYSNAME_xxx to OPENSSL_SYS_xxx Remove MS_STATIC; it's a relic from platforms <32 bits. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-452/+466
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Cleanup OPENSSL_NO_xxx, part 1master-pre-reformatRich Salz2015-01-141-5/+0
| | | | | | | | | | OPENSSL_NO_RIPEMD160, OPENSSL_NO_RIPEMD merged into OPENSSL_NO_RMD160 OPENSSL_NO_FP_API merged into OPENSSL_NO_STDIO Two typo's on #endif comments fixed: OPENSSL_NO_ECB fixed to OPENSSL_NO_OCB OPENSSL_NO_HW_SureWare fixed to OPENSSL_NO_HW_SUREWARE Reviewed-by: Richard Levitte <levitte@openssl.org>
* Avoid deprecation problems in Visual Studio 13Matt Caswell2015-01-131-1/+3
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* RT3548: Remove unsupported platformsRich Salz2015-01-121-8/+0
| | | | | | | This last one for this ticket. Removes WIN16. So long, MS_CALLBACK and MS_FAR. We won't miss you. Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT3546: Remove #define IRIX_CC_BUGRich Salz2015-01-051-7/+0
| | | | | | | Leftovers from commit 448155e9bbda27cbba365ff549a7e2044a8a399f Remove now-unused #define's Reviewed-by: Matt Caswell <matt@openssl.org>
* mark all block comments that need format preserving so thatTim Hudson2014-12-301-1/+2
| | | | | | | indent will not alter them when reformatting comments Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* RT3548: Remove unsupported platformsRich Salz2014-12-281-2/+0
| | | | | | | | This commit removes DG-UX. It also flushes out some left-behinds in config. And regenerates TABLE from Configure (hadn't been done in awhile). Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT3548: Remove unsupported platforms.Rich Salz2014-12-221-5/+0
| | | | | | This commit removes MPE/iX Reviewed-by: Andy Polyakov <appro@openssl.org>
* RT3548: Remove outdated platformsRich Salz2014-12-191-10/+0
| | | | | | This commit removes all mention of NeXT and NextStep. Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT3548: Remove some obsolete platformsRich Salz2014-12-181-5/+1
| | | | | | This commit removes Sony NEWS4 Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT3548: Remove some obsolete platformsRich Salz2014-12-171-18/+1
| | | | | | This commit removes BEOS. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove OPENSSL_FIPSCANISTER code.Dr. Stephen Henson2014-12-081-2/+0
| | | | | | | OPENSSL_FIPSCANISTER is only set if the fips module is being built (as opposed to being used). Since the fips module wont be built in master this is redundant. Reviewed-by: Tim Hudson <tjh@openssl.org>
* e_os.h: refine inline override logic (to address warnings in debug build).Andy Polyakov2014-09-301-3/+10
| | | | Reviewed-by: Dr Stephen Henson <steve@openssl.org>
* Remove #ifdef's for IRIX_CC_BUGRich Salz2014-09-251-7/+0
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* e_os.h: allow inline functions to be compiled by legacy compilers.Andy Polyakov2014-09-251-9/+16
| | | | Reviewed-by: Matt Caswell <matt@openssl.org>
* RT3544: Remove MWERKS supportRich Salz2014-09-241-28/+0
| | | | | | | | | | | | The following #ifdef tests were all removed: __MWERKS__ MAC_OS_pre_X MAC_OS_GUSI_SOURCE MAC_OS_pre_X OPENSSL_SYS_MACINTOSH_CLASSIC OPENSSL_SYS_MACOSX_RHAPSODY Reviewed-by: Andy Polyakov <appro@openssl.org>
* RT3108: OPENSSL_NO_SOCK should imply OPENSSL_NO_DGRAMRich Salz2014-09-081-0/+4
| | | | Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* define inline for Visual StudioEmilia Kasper2014-08-211-2/+10
| | | | | | | | In Visual Studio, inline is available in C++ only, however __inline is available for C, see http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dr Stephen Henson <steve@openssl.org>
* Undo a90081576c94f9f54de1755188a00ccc1760549aRich Salz2014-08-091-2/+27
| | | | Undo unapproved commit that removed DJGPP and WATT32
* Remove DJGPP (and therefore WATT32) #ifdef's.Rich Salz2014-08-081-27/+2
| | | | | | DJGPP is no longer a supported platform. Remove all #ifdef, etc., cases that refer to it. DJGPP also #define'd WATT32, so that is now removed as well.
* e_os.h: limit _MSC_VER trickery to older compilers.Andy Polyakov2014-07-021-2/+2
| | | | PR: #3390
* Windows build fixes.Dr. Stephen Henson2014-07-011-0/+1
|
* s_client/s_server: support unix domain socketsGeoff Thorpe2014-05-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | The "-unix <path>" argument allows s_server and s_client to use a unix domain socket in the filesystem instead of IPv4 ("-connect", "-port", "-accept", etc). If s_server exits gracefully, such as when "-naccept" is used and the requested number of SSL/TLS connections have occurred, then the domain socket file is removed. On ctrl-C, it is likely that the stale socket file will be left over, such that s_server would normally fail to restart with the same arguments. For this reason, s_server also supports an "-unlink" option, which will clean up any stale socket file before starting. If you have any reason to want encrypted IPC within an O/S instance, this concept might come in handy. Otherwise it just demonstrates that there is nothing about SSL/TLS that limits it to TCP/IP in any way. (There might also be benchmarking and profiling use in this path, as unix domain sockets are much lower overhead than connecting over local IP addresses). Signed-off-by: Geoff Thorpe <geoff@openssl.org>
* Avoid Windows 8 Getversion deprecated errors.Dr. Stephen Henson2014-02-251-0/+7
| | | | | | | | | | | Windows 8 SDKs complain that GetVersion() is deprecated. We only use GetVersion like this: (GetVersion() < 0x80000000) which checks if the Windows version is NT based. Use a macro check_winnt() which uses GetVersion() on older SDK versions and true otherwise.
* misspellings fixes by https://github.com/vlajos/misspell_fixerVeres Lajos2013-09-051-1/+1
|
* Improve WINCE support.Andy Polyakov2013-01-191-1/+4
| | | | Submitted by: Pierre Delaage
* e_os.h: keep stdin redifinitions to "normal" Windows.Andy Polyakov2012-10-291-1/+1
|
* e_os.h: skip redundant headers in fipscanister build.Andy Polyakov2012-10-271-2/+4
|
* Add new type ossl_ssize_t instead of ssize_t and move definitions toDr. Stephen Henson2010-07-261-12/+0
| | | | | e_os2.h, this should fix WIN32 compilation issues and hopefully avoid conflicts with other headers which may workaround ssize_t in different ways.
* fix PR#2261 in a different wayDr. Stephen Henson2010-05-311-4/+0
|
* PR: 2261Dr. Stephen Henson2010-05-271-0/+3
| | | | | | | Submitted By: De Rudder, Stephen L." <s_derudder@tditx.com> Workaround for newer Windows headers which define EADDRINUSE but not to the same value as WSAEADDRINUSE.