[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Richard Levitte levitte at openssl.org
Thu Jan 18 13:49:54 UTC 2018


The branch OpenSSL_1_1_0-stable has been updated
       via  2087582d0455111d6627a142668fdf0ebff1d89f (commit)
       via  c3126315f41e3e9ddfc10d7524f49641a42697ab (commit)
       via  ed54856765976841faa4fc41e8a09d14f0724dee (commit)
       via  df50dee414366bd609b1eadae8a0748e13a7226e (commit)
      from  3469f386316cb0e520fa513d45e2b1f73a692449 (commit)


- Log -----------------------------------------------------------------
commit 2087582d0455111d6627a142668fdf0ebff1d89f
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Jan 18 14:05:33 2018 +0100

    Only implement secure malloc if _POSIX_VERSION allows
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/5060)
    
    (cherry picked from commit e44c7d02ddac975ec6abff7901e77a0c37f9949d)

commit c3126315f41e3e9ddfc10d7524f49641a42697ab
Author: Richard Levitte <levitte at openssl.org>
Date:   Mon Jan 15 19:05:01 2018 +0100

    The Cygwin gcc doesn't define _WIN32, don't pretend it does
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/5060)
    
    (cherry picked from commit 4d3c278c1a4f940e098edac6de3d370b94d1bb8b)

commit ed54856765976841faa4fc41e8a09d14f0724dee
Author: Richard Levitte <levitte at openssl.org>
Date:   Mon Jan 15 19:04:17 2018 +0100

    Simplify Cygwin checks, part 1
    
    Because OPENSSL_SYS_CYGWIN will keep OPENSSL_SYS_UNIX defined, there's
    no point having checks of this form:
    
        #if (defined(OPENSSL_SYS_UNIX) || defined(OPENSSL_SYS_CYGWIN))
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/5060)
    
    (cherry picked from commit 6ce66ce073b19af46fd94f4eefdb7c4772d7dd6f)

commit df50dee414366bd609b1eadae8a0748e13a7226e
Author: Richard Levitte <levitte at openssl.org>
Date:   Thu Jan 11 22:01:44 2018 +0100

    Cygwin is POSIX, don't say it isn't
    
    More to the point, Cygwin is a POSIX API.  In our library, the use of
    a POSIX API is marked by defining the macro OPENSSL_SYS_UNIX.
    Therefore, that macro shouldn't be undefined when building for Cygwin.
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/5060)
    
    (cherry picked from commit 33cebb9c0dd6115bc357b5097f7db82b64b10919)

-----------------------------------------------------------------------

Summary of changes:
 crypto/async/arch/async_posix.h | 2 +-
 crypto/cryptlib.c               | 4 ++--
 crypto/mem_sec.c                | 4 +++-
 engines/e_dasync.c              | 2 +-
 include/openssl/e_os2.h         | 1 -
 5 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/crypto/async/arch/async_posix.h b/crypto/async/arch/async_posix.h
index 3c61f7f..a301a91 100644
--- a/crypto/async/arch/async_posix.h
+++ b/crypto/async/arch/async_posix.h
@@ -11,7 +11,7 @@
 #define OPENSSL_ASYNC_ARCH_ASYNC_POSIX_H
 #include <openssl/e_os2.h>
 
-#if (defined(OPENSSL_SYS_UNIX) || defined(OPENSSL_SYS_CYGWIN)) \
+#if defined(OPENSSL_SYS_UNIX) \
     && defined(OPENSSL_THREADS) && !defined(OPENSSL_NO_ASYNC) \
     && !defined(__ANDROID__) && !defined(__OpenBSD__)
 
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c
index f011b4b..ccfdbdc 100644
--- a/crypto/cryptlib.c
+++ b/crypto/cryptlib.c
@@ -99,7 +99,7 @@ void OPENSSL_cpuid_setup(void)
 }
 #endif
 
-#if defined(_WIN32) && !defined(__CYGWIN__)
+#if defined(_WIN32)
 # include <tchar.h>
 # include <signal.h>
 # ifdef __WATCOMC__
@@ -308,7 +308,7 @@ void OPENSSL_die(const char *message, const char *file, int line)
 {
     OPENSSL_showfatal("%s:%d: OpenSSL internal error: %s\n",
                       file, line, message);
-#if !defined(_WIN32) || defined(__CYGWIN__)
+#if !defined(_WIN32)
     abort();
 #else
     /*
diff --git a/crypto/mem_sec.c b/crypto/mem_sec.c
index 341347b..b26ba20 100644
--- a/crypto/mem_sec.c
+++ b/crypto/mem_sec.c
@@ -24,7 +24,9 @@
 
 #include <string.h>
 
-#if defined(OPENSSL_SYS_LINUX) || defined(OPENSSL_SYS_UNIX)
+/* e_os.h includes unistd.h, which defines _POSIX_VERSION */
+#if defined(OPENSSL_SYS_UNIX) \
+    && defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L
 # define IMPLEMENTED
 # include <stdlib.h>
 # include <assert.h>
diff --git a/engines/e_dasync.c b/engines/e_dasync.c
index 4e3e936..26b0714 100644
--- a/engines/e_dasync.c
+++ b/engines/e_dasync.c
@@ -25,7 +25,7 @@
 #include <openssl/ssl.h>
 #include <openssl/modes.h>
 
-#if (defined(OPENSSL_SYS_UNIX) || defined(OPENSSL_SYS_CYGWIN)) && defined(OPENSSL_THREADS)
+#if defined(OPENSSL_SYS_UNIX) && defined(OPENSSL_THREADS)
 # undef ASYNC_POSIX
 # define ASYNC_POSIX
 # include <unistd.h>
diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h
index 4aec51f..e73665e 100644
--- a/include/openssl/e_os2.h
+++ b/include/openssl/e_os2.h
@@ -49,7 +49,6 @@ extern "C" {
 #  define OPENSSL_SYS_WIN32_UWIN
 # else
 #  if defined(__CYGWIN__) || defined(OPENSSL_SYS_CYGWIN)
-#   undef OPENSSL_SYS_UNIX
 #   define OPENSSL_SYS_WIN32_CYGWIN
 #  else
 #   if defined(_WIN32) || defined(OPENSSL_SYS_WIN32)


More information about the openssl-commits mailing list