[openssl] OpenSSL_1_1_1-stable update
Richard Levitte
levitte at openssl.org
Wed Jul 15 21:09:45 UTC 2020
The branch OpenSSL_1_1_1-stable has been updated
via e21519280b3c3e0b264632fd72ce503a9d9ced73 (commit)
via be4c4237ce26d1f484add07e6e34e2650c7b7102 (commit)
via 88bc70366b0cfd77616083c550a40fb0f84c5379 (commit)
via 4da1981faacf2e141aab2b4965fccfd676765648 (commit)
from a5b8c19cdab4e330af0377e2fa0fdd1de2f67d59 (commit)
- Log -----------------------------------------------------------------
commit e21519280b3c3e0b264632fd72ce503a9d9ced73
Author: aSoujyuTanaka <soujyu.tanaka at access-company.com>
Date: Sun Apr 12 04:10:57 2020 +0900
Enable WinCE build without deceiving _MSC_VER.
Reviewed-by: Mark J. Cox <mark at awe.com>
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11526)
(cherry picked from commit c35b8535768e22cd3b7743f4887a72e53a621a5f)
commit be4c4237ce26d1f484add07e6e34e2650c7b7102
Author: aSoujyuTanaka <soujyu.tanaka at access-company.com>
Date: Sun Apr 12 04:00:17 2020 +0900
To generate makefile with correct parameters for WinCE.
Reviewed-by: Mark J. Cox <mark at awe.com>
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11526)
(cherry picked from commit a1736f37aee855fecf463b9f15519e12c333ecfc)
commit 88bc70366b0cfd77616083c550a40fb0f84c5379
Author: aSoujyuTanaka <soujyu.tanaka at access-company.com>
Date: Sun Apr 12 03:58:44 2020 +0900
Disable optimiization of BN_num_bits_word() for VS2005 ARM compiler due to
its miscompilation of the function.
https://mta.openssl.org/pipermail/openssl-users/2018-August/008465.html
Reviewed-by: Mark J. Cox <mark at awe.com>
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11526)
(cherry picked from commit 7a09fab2b3d201062a2cc07c1a40d09d61ea31bd)
commit 4da1981faacf2e141aab2b4965fccfd676765648
Author: aSoujyuTanaka <soujyu.tanaka at access-company.com>
Date: Sun Apr 12 03:58:02 2020 +0900
Changed uintptr_t to size_t. WinCE6 doesn't seem it have the definition.
Reviewed-by: Mark J. Cox <mark at awe.com>
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11526)
(cherry picked from commit 6c2a56beec847da18e5ac60a30219f0dea39baf9)
-----------------------------------------------------------------------
Summary of changes:
Configurations/10-main.conf | 6 +++---
Configurations/windows-makefile.tmpl | 4 ++--
crypto/bn/bn_lib.c | 12 ++++++++++++
crypto/dso/dso_win32.c | 4 ++--
crypto/o_str.c | 2 +-
crypto/o_time.c | 2 +-
crypto/rand/randfile.c | 2 +-
e_os.h | 2 +-
include/openssl/e_os2.h | 2 +-
9 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index 3b07731db8..eb92c24f48 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -1365,9 +1365,9 @@ my %targets = (
}
push @ex_libs, '$(PORTSDK_LIBPATH)/portlib.lib'
if (defined(env('PORTSDK_LIBPATH')));
- push @ex_libs, ' /nodefaultlib coredll.lib corelibc.lib'
- if (env('TARGETCPU') eq "X86");
- return @ex_libs;
+ push @ex_libs, '/nodefaultlib coredll.lib corelibc.lib'
+ if (env('TARGETCPU') =~ /^X86|^ARMV4[IT]/);
+ return join(" ", @ex_libs);
}),
},
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index 8ef70b8699..9351149fe8 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -211,8 +211,8 @@ CNF_CPPFLAGS={- our $cppfags2 =
join(' ', $target{cppflags} || (),
(map { '-D'.quotify1($_) } @{$target{defines}},
@{$config{defines}}),
- (map { '-I'.quotify1($_) } @{$target{includes}},
- @{$config{includes}}),
+ (map { '-I'.'"'.$_.'"' } @{$target{includes}},
+ @{$config{includes}}),
@{$config{cppflags}}) -}
CNF_CFLAGS={- join(' ', $target{cflags} || (),
@{$config{cflags}}) -}
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c
index 759d4c70ed..438743e48d 100644
--- a/crypto/bn/bn_lib.c
+++ b/crypto/bn/bn_lib.c
@@ -87,6 +87,15 @@ const BIGNUM *BN_value_one(void)
return &const_one;
}
+/*
+ * Old Visual Studio ARM compiler miscompiles BN_num_bits_word()
+ * https://mta.openssl.org/pipermail/openssl-users/2018-August/008465.html
+ */
+#if defined(_MSC_VER) && defined(_ARM_) && defined(_WIN32_WCE) \
+ && _MSC_VER>=1400 && _MSC_VER<1501
+# define MS_BROKEN_BN_num_bits_word
+# pragma optimize("", off)
+#endif
int BN_num_bits_word(BN_ULONG l)
{
BN_ULONG x, mask;
@@ -131,6 +140,9 @@ int BN_num_bits_word(BN_ULONG l)
return bits;
}
+#ifdef MS_BROKEN_BN_num_bits_word
+# pragma optimize("", on)
+#endif
/*
* This function still leaks `a->dmax`: it's caller's responsibility to
diff --git a/crypto/dso/dso_win32.c b/crypto/dso/dso_win32.c
index 37892170c0..5066331c86 100644
--- a/crypto/dso/dso_win32.c
+++ b/crypto/dso/dso_win32.c
@@ -565,8 +565,8 @@ static int win32_pathbyaddr(void *addr, char *path, int sz)
/* Enumerate the modules to find one which includes me. */
do {
- if ((uintptr_t) addr >= (uintptr_t) me32.modBaseAddr &&
- (uintptr_t) addr < (uintptr_t) (me32.modBaseAddr + me32.modBaseSize)) {
+ if ((size_t) addr >= (size_t) me32.modBaseAddr &&
+ (size_t) addr < (size_t) (me32.modBaseAddr + me32.modBaseSize)) {
(*close_snap) (hModuleSnap);
FreeLibrary(dll);
# ifdef _WIN32_WCE
diff --git a/crypto/o_str.c b/crypto/o_str.c
index 9ad7a89dca..2d321045bd 100644
--- a/crypto/o_str.c
+++ b/crypto/o_str.c
@@ -220,7 +220,7 @@ char *OPENSSL_buf2hexstr(const unsigned char *buffer, long len)
int openssl_strerror_r(int errnum, char *buf, size_t buflen)
{
-#if defined(_MSC_VER) && _MSC_VER>=1400
+#if defined(_MSC_VER) && _MSC_VER>=1400 && !defined(_WIN32_WCE)
return !strerror_s(buf, buflen, errnum);
#elif defined(_GNU_SOURCE)
char *err;
diff --git a/crypto/o_time.c b/crypto/o_time.c
index 6d764f55e2..d990556d1e 100644
--- a/crypto/o_time.c
+++ b/crypto/o_time.c
@@ -41,7 +41,7 @@ struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result)
if (gmtime_r(timer, result) == NULL)
return NULL;
ts = result;
-#elif defined (OPENSSL_SYS_WINDOWS) && defined(_MSC_VER) && _MSC_VER >= 1400
+#elif defined (OPENSSL_SYS_WINDOWS) && defined(_MSC_VER) && _MSC_VER >= 1400 && !defined(_WIN32_WCE)
if (gmtime_s(result, timer))
return NULL;
ts = result;
diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c
index ba121eefbf..af6cd385c7 100644
--- a/crypto/rand/randfile.c
+++ b/crypto/rand/randfile.c
@@ -26,7 +26,7 @@
#ifndef OPENSSL_NO_POSIX_IO
# include <sys/stat.h>
# include <fcntl.h>
-# ifdef _WIN32
+# if defined(_WIN32) && !defined(_WIN32_WCE)
# include <windows.h>
# include <io.h>
# define stat _stat
diff --git a/e_os.h b/e_os.h
index 34223a0bcd..9af7f3758d 100644
--- a/e_os.h
+++ b/e_os.h
@@ -308,7 +308,7 @@ extern FILE *_imp___iob;
# if defined(OPENSSL_SYS_WINDOWS)
# define strcasecmp _stricmp
# define strncasecmp _strnicmp
-# if (_MSC_VER >= 1310)
+# if (_MSC_VER >= 1310) && !defined(_WIN32_WCE)
# define open _open
# define fdopen _fdopen
# define close _close
diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h
index 97a776cdac..c7e637c4a4 100644
--- a/include/openssl/e_os2.h
+++ b/include/openssl/e_os2.h
@@ -241,7 +241,7 @@ typedef UINT64 uint64_t;
defined(__osf__) || defined(__sgi) || defined(__hpux) || \
defined(OPENSSL_SYS_VMS) || defined (__OpenBSD__)
# include <inttypes.h>
-# elif defined(_MSC_VER) && _MSC_VER<=1500
+# elif defined(_MSC_VER) && _MSC_VER<1600
/*
* minimally required typdefs for systems not supporting inttypes.h or
* stdint.h: currently just older VC++
More information about the openssl-commits
mailing list