aboutsummaryrefslogtreecommitdiff
path: root/README.windows
diff options
context:
space:
mode:
authorPaul Graham <development@winomega.com>2017-02-15 23:04:04 +0100
committerPaul Graham <development@winomega.com>2017-02-15 23:04:04 +0100
commitb2b47a7d113c2ac0e574ea4c3528780c30ef1aab (patch)
treed4b2c836de7a47a49fe539e2cd99966a0a6bd58b /README.windows
parent9d75e5ea975fc6d1b8b6eb333416d76144f7d2ee (diff)
downloadportable-b2b47a7d113c2ac0e574ea4c3528780c30ef1aab.tar.gz
portable-b2b47a7d113c2ac0e574ea4c3528780c30ef1aab.tar.bz2
portable-b2b47a7d113c2ac0e574ea4c3528780c30ef1aab.zip
Document 32-bit time_t problem on minw-w64 toolchain and how to avoid it
Diffstat (limited to 'README.windows')
-rw-r--r--README.windows22
1 files changed, 21 insertions, 1 deletions
diff --git a/README.windows b/README.windows
index 27c2182..a88ddc9 100644
--- a/README.windows
+++ b/README.windows
@@ -12,7 +12,8 @@ cross compilers on Windows.
12To configure and build LibreSSL for a 32-bit system, use the following 12To configure and build LibreSSL for a 32-bit system, use the following
13build steps: 13build steps:
14 14
15 CC=i686-w64-mingw32-gcc ./configure --host=i686-w64-mingw32 15 CC=i686-w64-mingw32-gcc CPPFLAGS=-D__MINGW_USE_VC2005_COMPAT \
16 ./configure --host=i686-w64-mingw32
16 make 17 make
17 make check 18 make check
18 19
@@ -22,6 +23,25 @@ For 64-bit builds, use these instead:
22 make 23 make
23 make check 24 make check
24 25
26# Why the -D__MINGW_USE_VC2005_COMPAT flag on 32-bit systems?
27
28An ABI change introduced with Microsoft Visual C++ 2005 (also known as
29Visual C++ 8.0) switched time_t from 32-bit to 64-bit. It is important to
30build LibreSSL with 64-bit time_t whenever possible, because 32-bit time_t
31is unable to represent times past 2038 (this is commonly known as the
32Y2K38 problem).
33
34If LibreSSL is built with 32-bit time_t, when verifying a certificate whose
35expiry date is set past 19 January 2038, it will be unable to tell if the
36certificate has expired or not, and thus take the safe stance and reject it.
37
38In order to avoid this, you need to build LibreSSL (and everything that links
39with it) with the -D__MINGW_USE_VC2005_COMPAT flag. This tells mingw-w64 to
40use the new ABI.
41
4264-bit systems always have a 64-bit time_t and are not affected by this
43problem.
44
25# Using Libressl with Visual Studio 45# Using Libressl with Visual Studio
26 46
27A script for generating ready-to-use .DLL and static .LIB files is included in 47A script for generating ready-to-use .DLL and static .LIB files is included in