Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / external / openssl / opensslwnt.patch
blob2d00736f1317f5fffdc109caaeb2014f6a4a86a9
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
4 @@ -3,7 +3,7 @@
5 * Contributed to the OpenSSL Project 2004 by Richard Levitte
6 * (richard@levitte.org)
7 */
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
16 @@ -3,7 +3,7 @@
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
28 @@ -1,11 +1,11 @@
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
36 -:skipce
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
41 +:not64a
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
52 @@ -163,7 +163,7 @@
53 $inc_def="outinc";
54 $tmp_def="tmp";
56 -$perl="perl" unless defined $perl;
57 +$perl="$ENV{PERL}" unless defined $perl;
58 $mkdir="-mkdir" unless defined $mkdir;
60 ($ssl,$crypto)=("ssl","crypto");
61 @@ -347,6 +347,11 @@
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.
68 + $val =~ s/\s+$//;
70 if ($key eq "RELATIVE_DIRECTORY")
72 if ($lib ne "")
73 @@ -473,7 +478,7 @@
74 # Set your compiler options
75 PLATFORM=$platform
76 CC=$bin_dir${cc}
77 -CFLAG=$cflags
78 +CFLAG=$cflags \$(SOLARINC)
79 APP_CFLAG=$app_cflag
80 LIB_CFLAG=$lib_cflag
81 SHLIB_CFLAG=$shl_cflag
82 @@ -488,7 +493,7 @@
84 LINK_CMD=$link
85 LFLAGS=$lflags
86 -RSC=$rsc
87 +RSC=$rsc \$(SOLARINC)
89 # The output directory for everything interesting
90 OUT_D=$out_dir
91 @@ -669,7 +674,7 @@
92 printf OUT <<EOF;
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"
98 EOF
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
103 @@ -30,7 +30,7 @@
104 my $ff = "";
106 # C compiler stuff
107 -$cc='cl';
108 +$cc=$ENV{'CC'};
109 if ($FLAVOR =~ /WIN64/)
111 # Note that we currently don't have /WX on Win64! There is a lot of
112 @@ -48,7 +48,7 @@
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)=@_;
121 @@ -114,7 +114,7 @@
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 @@
131 } else {
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";
141 else # Win32
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';
146 $ff = "/fixed";
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
156 $mlflags='';
158 $out_def ="out32"; $out_def.="dll" if ($shlib);
159 @@ -161,7 +162,7 @@
161 $obj='.obj';
162 $asm_suffix='.asm';
163 -$ofile="/Fo";
164 +$ofile="-Fo.\\";
166 # EXE linking stuff
167 $link="link";
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
171 @@ -1,5 +1,6 @@
172 #if (defined(_WIN64) || defined(_WIN32_WCE)) && !defined(UNICODE)
173 # define UNICODE
174 +# define _CRT_NON_CONFORMING_SWPRINTFS
175 #endif
176 #if defined(UNICODE) && !defined(_UNICODE)
177 # define _UNICODE