1 diff -ru openssl.orig/crypto/x509v3/v3_pci.c openssl/crypto/x509v3/v3_pci.c
2 --- a/openssl.orig/crypto/x509v3/v3_pci.c 2016-03-01 14:35:05.000000000 +0100
3 +++ b/openssl/crypto/x509v3/v3_pci.c 2016-03-03 20:27:42.195914432 +0100
5 * Contributed to the OpenSSL Project 2004 by Richard Levitte
6 * (richard@levitte.org)
8 -/* Copyright (c) 2004 Kungliga Tekniska Högskolan
9 +/* Copyright (c) 2004 Kungliga Tekniska Hoegskolan
10 * (Royal Institute of Technology, Stockholm, Sweden).
11 * All rights reserved.
13 diff -ru openssl.orig/crypto/x509v3/v3_pcia.c openssl/crypto/x509v3/v3_pcia.c
14 --- a/openssl.orig/crypto/x509v3/v3_pcia.c 2016-03-01 14:35:05.000000000 +0100
15 +++ b/openssl/crypto/x509v3/v3_pcia.c 2016-03-03 20:27:56.495913984 +0100
17 * Contributed to the OpenSSL Project 2004 by Richard Levitte
18 * (richard@levitte.org)
20 -/* Copyright (c) 2004 Kungliga Tekniska Högskolan
21 +/* Copyright (c) 2004 Kungliga Tekniska Hoegskolan
22 * (Royal Institute of Technology, Stockholm, Sweden).
23 * All rights reserved.
25 diff -ru openssl.orig/ms/do_ms.bat openssl/ms/do_ms.bat
26 --- a/openssl.orig/ms/do_ms.bat 2015-01-15 15:43:14.000000000 +0100
27 +++ b/openssl/ms/do_ms.bat 2016-03-03 20:31:09.355907935 +0100
30 -perl util\mkfiles.pl >MINFO
31 -perl util\mk1mf.pl no-asm VC-WIN32 >ms\nt.mak
32 -perl util\mk1mf.pl dll no-asm VC-WIN32 >ms\ntdll.mak
33 -if x%OSVERSION% == x goto skipce
34 -perl util\mk1mf.pl no-asm VC-CE >ms\ce.mak
35 -perl util\mk1mf.pl dll no-asm VC-CE >ms\cedll.mak
37 +%1 util\mkfiles.pl >MINFO
38 +if %2 == VC-WIN32 goto not64a
39 +perl ms\uplink.pl win64a > ms\uptable.asm
40 +ml64 -c -Foms\uptable.obj ms\uptable.asm
42 +%1 util\mk1mf.pl no-asm %2 >ms\nt.mak
43 +%1 util\mk1mf.pl dll no-asm %2 >ms\ntdll.mak
45 -perl util\mkdef.pl 32 libeay > ms\libeay32.def
46 -perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
47 +%1 util\mkdef.pl 32 libeay > ms\libeay32.def
48 +%1 util\mkdef.pl 32 ssleay > ms\ssleay32.def
49 diff -ru openssl.orig/util/mk1mf.pl openssl/util/mk1mf.pl
50 --- a/openssl.orig/util/mk1mf.pl 2016-03-03 20:22:21.043924505 +0100
51 +++ b/openssl/util/mk1mf.pl 2016-03-03 20:34:45.015901171 +0100
56 -$perl="perl" unless defined $perl;
57 +$perl="$ENV{PERL}" unless defined $perl;
58 $mkdir="-mkdir" unless defined $mkdir;
60 ($ssl,$crypto)=("ssl","crypto");
62 s/\s*$//; # was chop, didn't work in mixture of perls for Windows...
64 ($key,$val)=/^([^=]+)=(.*)/;
66 + # On some Windows machines, $val has linefeeds at the end, which confuses
67 + # subsequent code in this file. So we strip all whitespace at the end.
70 if ($key eq "RELATIVE_DIRECTORY")
74 # Set your compiler options
78 +CFLAG=$cflags \$(SOLARINC)
81 SHLIB_CFLAG=$shl_cflag
87 +RSC=$rsc \$(SOLARINC)
89 # The output directory for everything interesting
93 #ifdef $platform_cpp_symbol
94 /* auto-generated/updated by util/mk1mf.pl for crypto/cversion.c */
95 - #define CFLAGS "compiler: $cc $cflags"
96 + #define CFLAGS "compiler: $cflags"
97 #define PLATFORM "$platform"
99 printf OUT " #define DATE \"%s\"\n", scalar gmtime();
100 diff -ru openssl.orig/util/pl/VC-32.pl openssl/util/pl/VC-32.pl
101 --- a/openssl.orig/util/pl/VC-32.pl 2016-03-01 14:35:53.000000000 +0100
102 +++ b/openssl/util/pl/VC-32.pl 2016-03-03 21:15:14.083824986 +0100
109 if ($FLAVOR =~ /WIN64/)
111 # Note that we currently don't have /WX on Win64! There is a lot of
113 my $f = $shlib || $fips ?' /MD':' /MT';
114 $opt_cflags=$f.' /Ox';
115 $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
116 - $lflags="/nologo /subsystem:console /opt:ref";
117 + $lflags="/nologo /subsystem:console,5.02 /opt:ref";
119 *::perlasm_compile_target = sub {
120 my ($target,$source,$bname)=@_;
124 $cc=($ENV{CC} or "cl");
125 - $base_cflags=' /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT';
126 + $base_cflags=' -W3 -GF -Gy -nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT';
127 $base_cflags.=" $wcecdefs";
128 $base_cflags.=' -I$(WCECOMPAT)/include' if (defined($ENV{'WCECOMPAT'}));
129 $base_cflags.=' -I$(PORTSDK_LIBPATH)/../../include' if (defined($ENV{'PORTSDK_LIBPATH'}));
130 @@ -123,20 +123,21 @@
132 $base_cflags.=' /MC';
134 - $opt_cflags=' /O1i'; # optimize for space, but with intrinsics...
135 - $dbg_cflags=' /Od -DDEBUG -D_DEBUG';
136 + $opt_cflags=' -O1i'; # optimize for space, but with intrinsics...
137 + $dbg_cflags=' -Od -DDEBUG -D_DEBUG';
139 $lflags="/nologo /opt:ref $wcelflag";
143 $base_cflags= " $mf_cflag";
144 - my $f = $shlib || $fips ?' /MD':' /MT';
145 + my $f = $shlib || $fips ? (($ENV{MSVC_USE_DEBUG_RUNTIME} eq "TRUE") ? ' -MDd' : ' -MD' ):' -MT';
147 - $opt_cflags=$f.' /Ox /O2 /Ob2';
148 - $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
149 - $lflags="/nologo /subsystem:console /opt:ref";
150 + $lflags="/nologo /subsystem:console,5.01 /opt:ref";
151 + $opt_cflags=$f.' -Ox -O2 -Ob2';
152 + $dbg_cflags=$f.'d -Od -DDEBUG -D_DEBUG';
154 -$lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
155 +$lib_cflag='-Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
158 $out_def ="out32"; $out_def.="dll" if ($shlib);
168 diff -ru openssl.orig/ms/uplink.c openssl/ms/uplink.c
169 --- a/openssl.orig/ms/uplink.c 2015-03-19 15:02:02.000000000 +0100
170 +++ b/openssl/ms/uplink.c 2016-03-03 20:39:19.403892565 +0100
172 #if (defined(_WIN64) || defined(_WIN32_WCE)) && !defined(UNICODE)
174 +# define _CRT_NON_CONFORMING_SWPRINTFS
176 #if defined(UNICODE) && !defined(_UNICODE)