summaryrefslogtreecommitdiffstats
path: root/meta/packages/openssl/openssl-0.9.8g/debian.patch
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2008-05-13 09:20:50 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2008-05-13 09:20:50 +0000
commit6f726d64d748ae35b6abf625d8d620e928e73e20 (patch)
tree1c91d83244ae158e7fb2564ad0ba8852483782e0 /meta/packages/openssl/openssl-0.9.8g/debian.patch
parente14d7dcbeea45e2000b9ec3174d24aa90f786adc (diff)
downloadpoky-6f726d64d748ae35b6abf625d8d620e928e73e20.tar.gz
openssl: update to 0.9.8g (from OE)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4464 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/openssl/openssl-0.9.8g/debian.patch')
-rw-r--r--meta/packages/openssl/openssl-0.9.8g/debian.patch1281
1 files changed, 1281 insertions, 0 deletions
diff --git a/meta/packages/openssl/openssl-0.9.8g/debian.patch b/meta/packages/openssl/openssl-0.9.8g/debian.patch
new file mode 100644
index 0000000000..bf2e50b6ce
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8g/debian.patch
@@ -0,0 +1,1281 @@
1--- openssl-0.9.8g.orig/Makefile
2+++ openssl-0.9.8g/Makefile
3@@ -11,11 +11,11 @@
4 SHLIB_VERSION_HISTORY=
5 SHLIB_MAJOR=0
6 SHLIB_MINOR=9.8
7-SHLIB_EXT=
8-PLATFORM=dist
9-OPTIONS= no-camellia no-gmp no-krb5 no-mdc2 no-rc5 no-rfc3779 no-seed no-shared no-tlsext no-zlib no-zlib-dynamic
10-CONFIGURE_ARGS=dist
11-SHLIB_TARGET=
12+SHLIB_EXT=.so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
13+PLATFORM=debian-amd64
14+OPTIONS=--prefix=/usr --openssldir=/usr/lib/ssl enable-zlib enable-tlsext no-camellia no-gmp no-idea no-krb5 no-mdc2 no-rc5 no-rfc3779 no-seed no-shared no-zlib-dynamic
15+CONFIGURE_ARGS=--prefix=/usr --openssldir=/usr/lib/ssl no-idea no-mdc2 no-rc5 zlib enable-tlsext debian-amd64
16+SHLIB_TARGET=linux-shared
17
18 # HERE indicates where this Makefile lives. This can be used to indicate
19 # where sub-Makefiles are expected to be. Currently has very limited usage,
20@@ -26,10 +26,10 @@
21 # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
22 # Normally it is left empty.
23 INSTALL_PREFIX=
24-INSTALLTOP=/usr/local/ssl
25+INSTALLTOP=/usr
26
27 # Do not edit this manually. Use Configure --openssldir=DIR do change this!
28-OPENSSLDIR=/usr/local/ssl
29+OPENSSLDIR=/usr/lib/ssl
30
31 # NO_IDEA - Define to build without the IDEA algorithm
32 # NO_RC4 - Define to build without the RC4 algorithm
33@@ -59,11 +59,11 @@
34 # equal 4.
35 # PKCS1_CHECK - pkcs1 tests.
36
37-CC= cc
38-CFLAG= -O
39-DEPFLAG= -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_GMP -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_TLSEXT
40+CC= gcc
41+CFLAG= -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DMD32_REG_T=int -DMD5_ASM
42+DEPFLAG= -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_GMP -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED
43 PEX_LIBS=
44-EX_LIBS=
45+EX_LIBS= -ldl -lz
46 EXE_EXT=
47 ARFLAGS=
48 AR=ar $(ARFLAGS) r
49@@ -71,7 +71,7 @@
50 PERL= /usr/bin/perl
51 TAR= tar
52 TARFLAGS= --no-recursion
53-MAKEDEPPROG=makedepend
54+MAKEDEPPROG= gcc
55
56 # We let the C compiler driver to take care of .s files. This is done in
57 # order to be excused from maintaining a separate set of architecture
58@@ -86,15 +86,15 @@
59 PROCESSOR=
60
61 # CPUID module collects small commonly used assembler snippets
62-CPUID_OBJ=
63-BN_ASM= bn_asm.o
64+CPUID_OBJ= x86_64cpuid.o
65+BN_ASM= x86_64-gcc.o
66 DES_ENC= des_enc.o fcrypt_b.o
67 AES_ASM_OBJ= aes_core.o aes_cbc.o
68 BF_ENC= bf_enc.o
69 CAST_ENC= c_enc.o
70 RC4_ENC= rc4_enc.o
71 RC5_ENC= rc5_enc.o
72-MD5_ASM_OBJ=
73+MD5_ASM_OBJ= md5-x86_64.o
74 SHA1_ASM_OBJ=
75 RMD160_ASM_OBJ=
76
77@@ -106,14 +106,14 @@
78 ZLIB_INCLUDE=
79 LIBZLIB=
80
81-DIRS= crypto ssl engines apps test tools
82+DIRS= crypto ssl engines apps tools
83 SHLIBDIRS= crypto ssl
84
85 # dirs in crypto to build
86 SDIRS= \
87 objects \
88 md2 md4 md5 sha hmac ripemd \
89- des aes rc2 rc4 idea bf cast \
90+ des aes rc2 rc4 bf cast \
91 bn ec rsa dsa ecdsa dh ecdh dso engine \
92 buffer bio stack lhash rand err \
93 evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
94@@ -127,10 +127,11 @@
95
96 MAKEFILE= Makefile
97
98-MANDIR=$(OPENSSLDIR)/man
99+MANDIR=/usr/share/man
100 MAN1=1
101 MAN3=3
102-MANSUFFIX=
103+MANSUFFIX=ssl
104+MANSECTION=SSL
105 SHELL=/bin/sh
106
107 TOP= .
108@@ -141,8 +142,8 @@
109 SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
110 SHARED_SSL=libssl$(SHLIB_EXT)
111 SHARED_LIBS=
112-SHARED_LIBS_LINK_EXTS=
113-SHARED_LDFLAGS=
114+SHARED_LIBS_LINK_EXTS=.so
115+SHARED_LDFLAGS=-m64 -Wl,--version-script=openssl.ld
116
117 GENERAL= Makefile
118 BASENAME= openssl
119@@ -310,7 +311,8 @@
120 echo 'Description: OpenSSL cryptography library'; \
121 echo 'Version: '$(VERSION); \
122 echo 'Requires: '; \
123- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
124+ echo 'Libs: -L$${libdir} -lcrypto'; \
125+ echo 'Libs.private: $(EX_LIBS)'; \
126 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
127
128 libssl.pc: Makefile
129@@ -323,7 +325,8 @@
130 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
131 echo 'Version: '$(VERSION); \
132 echo 'Requires: '; \
133- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
134+ echo 'Libs: -L$${libdir} -lssl'; \
135+ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \
136 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
137
138 openssl.pc: Makefile
139@@ -336,7 +339,8 @@
140 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
141 echo 'Version: '$(VERSION); \
142 echo 'Requires: '; \
143- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
144+ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
145+ echo 'Libs.private: $(EX_LIBS)'; \
146 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
147
148 Makefile: Makefile.org Configure config
149@@ -480,7 +484,7 @@
150 install_sw:
151 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
152 $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
153- $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines \
154+ $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines \
155 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
156 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
157 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
158@@ -558,7 +562,7 @@
159 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
160 (cd `$(PERL) util/dirname.pl $$i`; \
161 sh -c "$$pod2man \
162- --section=$$sec --center=OpenSSL \
163+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
164 --release=$(VERSION) `basename $$i`") \
165 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
166 $(PERL) util/extract-names.pl < $$i | \
167@@ -575,7 +579,7 @@
168 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
169 (cd `$(PERL) util/dirname.pl $$i`; \
170 sh -c "$$pod2man \
171- --section=$$sec --center=OpenSSL \
172+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
173 --release=$(VERSION) `basename $$i`") \
174 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
175 $(PERL) util/extract-names.pl < $$i | \
176--- openssl-0.9.8g.orig/VMS/VMSify-conf.pl
177+++ openssl-0.9.8g/VMS/VMSify-conf.pl
178@@ -1,4 +1,4 @@
179-#! /usr/bin/perl
180+#!/usr/local/bin/perl
181
182 use strict;
183 use warnings;
184--- openssl-0.9.8g.orig/Netware/do_tests.pl
185+++ openssl-0.9.8g/Netware/do_tests.pl
186@@ -1,4 +1,4 @@
187-# perl script to run OpenSSL tests
188+#!/usr/local/bin/perl
189
190
191 my $base_path = "\\openssl";
192--- openssl-0.9.8g.orig/apps/CA.sh
193+++ openssl-0.9.8g/apps/CA.sh
194@@ -91,6 +91,7 @@
195 -out ${CATOP}/$CAREQ
196 $CA -out ${CATOP}/$CACERT $CADAYS -batch \
197 -keyfile ${CATOP}/private/$CAKEY -selfsign \
198+ -extensions v3_ca \
199 -infiles ${CATOP}/$CAREQ
200 RET=$?
201 fi
202--- openssl-0.9.8g.orig/apps/CA.pl.in
203+++ openssl-0.9.8g/apps/CA.pl.in
204@@ -65,6 +65,7 @@
205 foreach (@ARGV) {
206 if ( /^(-\?|-h|-help)$/ ) {
207 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
208+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
209 exit 0;
210 } elsif (/^-newcert$/) {
211 # create a certificate
212@@ -165,6 +166,7 @@
213 } else {
214 print STDERR "Unknown arg $_\n";
215 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
216+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
217 exit 1;
218 }
219 }
220--- openssl-0.9.8g.orig/apps/speed.c
221+++ openssl-0.9.8g/apps/speed.c
222@@ -577,7 +577,7 @@
223 #define MAX_BLOCK_SIZE 64
224 #endif
225 unsigned char DES_iv[8];
226- unsigned char iv[MAX_BLOCK_SIZE/8];
227+ unsigned char iv[2*MAX_BLOCK_SIZE/8];
228 #ifndef OPENSSL_NO_DES
229 DES_cblock *buf_as_des_cblock = NULL;
230 static DES_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0};
231--- openssl-0.9.8g.orig/apps/CA.pl
232+++ openssl-0.9.8g/apps/CA.pl
233@@ -1,4 +1,4 @@
234-#!/usr/bin/perl
235+#!/usr/local/bin/perl
236 #
237 # CA - wrapper around ca to make it easier to use ... basically ca requires
238 # some setup stuff to be done before you can use it and this makes
239@@ -65,6 +65,7 @@
240 foreach (@ARGV) {
241 if ( /^(-\?|-h|-help)$/ ) {
242 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
243+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
244 exit 0;
245 } elsif (/^-newcert$/) {
246 # create a certificate
247@@ -165,6 +166,7 @@
248 } else {
249 print STDERR "Unknown arg $_\n";
250 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
251+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
252 exit 1;
253 }
254 }
255--- openssl-0.9.8g.orig/os2/backwardify.pl
256+++ openssl-0.9.8g/os2/backwardify.pl
257@@ -1,4 +1,4 @@
258-#!/usr/bin/perl -w
259+#!/usr/local/bin/perl
260 use strict;
261
262 # Use as $0
263--- openssl-0.9.8g.orig/Configure
264+++ openssl-0.9.8g/Configure
265@@ -1,4 +1,4 @@
266-:
267+#!/usr/local/bin/perl
268 eval 'exec perl -S $0 ${1+"$@"}'
269 if $running_under_some_shell;
270 ##
271@@ -118,7 +118,8 @@
272 my $x86_coff_asm="x86cpuid-cof.o:bn86-cof.o co86-cof.o:dx86-cof.o yx86-cof.o:ax86-cof.o:bx86-cof.o:mx86-cof.o:sx86-cof.o s512sse2-cof.o:cx86-cof.o:rx86-cof.o:rm86-cof.o:r586-cof.o";
273 my $x86_out_asm="x86cpuid-out.o:bn86-out.o co86-out.o:dx86-out.o yx86-out.o:ax86-out.o:bx86-out.o:mx86-out.o:sx86-out.o s512sse2-out.o:cx86-out.o:rx86-out.o:rm86-out.o:r586-out.o";
274
275-my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o::::md5-x86_64.o:::rc4-x86_64.o::";
276+#my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o::::md5-x86_64.o:::rc4-x86_64.o::";
277+my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o::::md5-x86_64.o:::::";
278 my $ia64_asm=":bn-ia64.o::aes_core.o aes_cbc.o aes-ia64.o:::sha1-ia64.o sha256-ia64.o sha512-ia64.o::rc4-ia64.o::";
279
280 my $no_asm="::::::::::";
281@@ -308,6 +309,47 @@
282 "osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared:::.so",
283 "tru64-alpha-cc", "cc:-std1 -tune host -fast -readonly_strings::-pthread:::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared::-msym:.so",
284
285+# Debian GNU/* (various architectures)
286+"debian-alpha","gcc:-DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
287+"debian-alpha-ev4","gcc:-DTERMIO -O3 -Wa,--noexecstack -mcpu=ev4 -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
288+"debian-alpha-ev5","gcc:-DTERMIO -O3 -Wa,--noexecstack -mcpu=ev5 -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_UNROLL:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
289+"debian-arm","gcc:-DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
290+"debian-armeb","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
291+"debian-armel","gcc:-DL_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
292+#"debian-amd64","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
293+"debian-amd64", "gcc:-m64 -DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
294+"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
295+#"debian-freebsd-alpha","gcc:-DTERMIOS -O -Wa,--noexecstack -fomit-frame-pointer::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC2::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
296+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
297+"debian-hppa","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
298+"debian-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
299+"debian-ia64","gcc:-DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK RC4_CHAR:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
300+#"debian-i386","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -fomit-frame-pointer -m486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::dlfcn:linux-shared:-fPIC",
301+"debian-i386","gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
302+"debian-i386-i486","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i486 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
303+"debian-i386-i586","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i586 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
304+"debian-i386-i686/cmov","gcc:-DL_ENDIAN -DTERMIO -O3 -march=i686 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
305+"debian-m68k","gcc:-DB_ENDIAN -DTERMIO -O2 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG MD2_CHAR RC4_INDEX::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
306+"debian-mips", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
307+"debian-mipsel", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL DES_RISC2::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
308+"debian-netbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
309+"debian-netbsd-m68k", "gcc:-DB_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -Wall::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
310+"debian-netbsd-sparc", "gcc:-DB_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mv8 -Wall::(unknown):::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
311+"debian-openbsd-alpha","gcc:-DTERMIOS -O3 -Wa,--noexecstack -g::(unknown):::SIXTY_FOUR_BIT_LONG DES_INT DES_PTR DES_RISC2::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
312+"debian-openbsd-i386", "gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -m486::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
313+"debian-openbsd-mips","gcc:-O2 -Wa,--noexecstack -g -DL_ENDIAN::(unknown)::BN_LLONG MD2_CHAR RC4_INDEX RC4_CHAR DES_UNROLL DES_RISC2 DES_PTR BF_PTR:::::::::::::dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
314+"debian-powerpc","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_UNROLL DES_RISC2 DES_PTR MD2_CHAR RC4_INDEX::linux_ppc32.o::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
315+"debian-ppc64","gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_RISC1 DES_UNROLL::linux_ppc64.o::::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
316+"debian-s390","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
317+"debian-sh3", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
318+"debian-sh4", "gcc:-DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
319+"debian-sh3eb", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
320+"debian-sh4eb", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
321+"debian-m32r","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
322+"debian-sparc","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
323+"debian-sparc-v8","gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -mcpu=v8 -g -Wall -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
324+"debian-sparc-v9","gcc:-DB_ENDIAN -DTERMIO -O3 -mcpu=v9 -Wa,--noexecstack -Wa,-Av8plus -g -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR::sparcv8plus.o:des_enc-sparc.o fcrypt_b.o:::md5-sparcv8plus.o::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
325+
326 ####
327 #### Variety of LINUX:-)
328 ####
329@@ -476,7 +518,7 @@
330 # Cygwin
331 "Cygwin-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
332 "Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_coff_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
333-"debug-Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:::CYGWIN32:::${no_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
334+-"debug-Cygwin", "gcc:-DTERMIOS -DL_ENDIAN -march=i486 -Wall -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -g -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror:::CYGWIN32:::${no_asm}:dlfcn:cygwin-shared:-D_WINDLL:-shared:.dll.a",
335
336 # NetWare from David Ward (dsward@novell.com) - requires MetroWerks NLM development tools
337 # netware-clib => legacy CLib c-runtime support
338@@ -1300,6 +1342,8 @@
339 $shlib_minor=$2;
340 }
341
342+$shared_ldflag .= " -Wl,--version-script=openssl.ld";
343+
344 open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
345 unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
346 open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
347@@ -1371,7 +1415,8 @@
348 elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
349 {
350 my $sotmp = $1;
351- s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
352+# s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
353+ s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/;
354 }
355 elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
356 {
357@@ -1490,7 +1535,7 @@
358 if (/^#define\s+OPENSSLDIR/)
359 { print OUT "#define OPENSSLDIR \"$openssldir\"\n"; }
360 elsif (/^#define\s+ENGINESDIR/)
361- { print OUT "#define ENGINESDIR \"$prefix/lib/engines\"\n"; }
362+ { print OUT "#define ENGINESDIR \"$prefix/lib/ssl/engines\"\n"; }
363 elsif (/^#((define)|(undef))\s+OPENSSL_EXPORT_VAR_AS_FUNCTION/)
364 { printf OUT "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION\n"
365 if $export_var_as_fn;
366--- openssl-0.9.8g.orig/engines/Makefile
367+++ openssl-0.9.8g/engines/Makefile
368@@ -97,13 +97,13 @@
369 *DSO_DL*) sfx="sl";; \
370 *) sfx="bad";; \
371 esac; \
372- cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
373+ cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines/lib$$l.$$sfx.new; \
374 else \
375 sfx="so"; \
376 cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
377 fi; \
378- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
379- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx ); \
380+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines/lib$$l.$$sfx.new; \
381+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines/lib$$l.$$sfx ); \
382 done; \
383 fi
384
385--- openssl-0.9.8g.orig/engines/openssl.ld
386+++ openssl-0.9.8g/engines/openssl.ld
387@@ -0,0 +1,5 @@
388+OPENSSL_0.9.8 {
389+ global:
390+ *;
391+};
392+
393--- openssl-0.9.8g.orig/tools/c_rehash
394+++ openssl-0.9.8g/tools/c_rehash
395@@ -6,7 +6,7 @@
396
397 my $openssl;
398
399-my $dir = "/usr/local/ssl";
400+my $dir = "/usr/lib/ssl";
401
402 if(defined $ENV{OPENSSL}) {
403 $openssl = $ENV{OPENSSL};
404@@ -59,12 +59,15 @@
405 }
406 }
407 closedir DIR;
408- FILE: foreach $fname (grep {/\.pem$/} @flist) {
409+ FILE: foreach $fname (grep {/\.pem$|\.crt$/} @flist) {
410 # Check to see if certificates and/or CRLs present.
411 my ($cert, $crl) = check_file($fname);
412 if(!$cert && !$crl) {
413- print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
414- next;
415+ ($cert, $crl) = check_file("$openssl x509 -in \"$fname\" -inform der -outform pem | ");
416+ if(!$cert && !$crl) {
417+ print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
418+ next;
419+ }
420 }
421 link_hash_cert($fname) if($cert);
422 link_hash_crl($fname) if($crl);
423@@ -102,6 +105,9 @@
424 my $fname = $_[0];
425 $fname =~ s/'/'\\''/g;
426 my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname'`;
427+ if(!$hash || !fprint) {
428+ ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname' -inform der`;
429+ }
430 chomp $hash;
431 chomp $fprint;
432 $fprint =~ s/^.*=//;
433--- openssl-0.9.8g.orig/tools/c_rehash.in
434+++ openssl-0.9.8g/tools/c_rehash.in
435@@ -59,12 +59,15 @@
436 }
437 }
438 closedir DIR;
439- FILE: foreach $fname (grep {/\.pem$/} @flist) {
440+ FILE: foreach $fname (grep {/\.pem$|\.crt$/} @flist) {
441 # Check to see if certificates and/or CRLs present.
442 my ($cert, $crl) = check_file($fname);
443 if(!$cert && !$crl) {
444- print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
445- next;
446+ ($cert, $crl) = check_file("$openssl x509 -in \"$fname\" -inform der -outform pem | ");
447+ if(!$cert && !$crl) {
448+ print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
449+ next;
450+ }
451 }
452 link_hash_cert($fname) if($cert);
453 link_hash_crl($fname) if($crl);
454@@ -102,6 +105,9 @@
455 my $fname = $_[0];
456 $fname =~ s/'/'\\''/g;
457 my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname'`;
458+ if(!$hash || !fprint) {
459+ ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname' -inform der`;
460+ }
461 chomp $hash;
462 chomp $fprint;
463 $fprint =~ s/^.*=//;
464--- openssl-0.9.8g.orig/Makefile.shared
465+++ openssl-0.9.8g/Makefile.shared
466@@ -151,9 +151,9 @@
467 SHLIB_SUFFIX=; \
468 ALLSYMSFLAGS='-Wl,--whole-archive'; \
469 NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
470- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
471+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
472
473-DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
474+DO_GNU_APP=LDFLAGS="$(CFLAGS)"
475
476 #This is rather special. It's a special target with which one can link
477 #applications without bothering with any features that have anything to
478--- openssl-0.9.8g.orig/ssl/t1_lib.c
479+++ openssl-0.9.8g/ssl/t1_lib.c
480@@ -132,6 +132,10 @@
481 int extdatalen=0;
482 unsigned char *ret = p;
483
484+ /* don't add extensions for SSLv3 */
485+ if (s->client_version == SSL3_VERSION)
486+ return p;
487+
488 ret+=2;
489
490 if (ret>=limit) return NULL; /* this really never occurs, but ... */
491@@ -202,6 +206,10 @@
492 int extdatalen=0;
493 unsigned char *ret = p;
494
495+ /* don't add extensions for SSLv3 */
496+ if (s->version == SSL3_VERSION)
497+ return p;
498+
499 ret+=2;
500 if (ret>=limit) return NULL; /* this really never occurs, but ... */
501
502--- openssl-0.9.8g.orig/ms/uplink.pl
503+++ openssl-0.9.8g/ms/uplink.pl
504@@ -1,4 +1,4 @@
505-#!/usr/bin/env perl
506+#!/usr/local/bin/perl
507 #
508 # For Microsoft CL this is implemented as inline assembler. So that
509 # even though this script can generate even Win32 code, we'll be
510--- openssl-0.9.8g.orig/config
511+++ openssl-0.9.8g/config
512@@ -162,8 +162,8 @@
513 echo "${MACHINE}-whatever-linux1"; exit 0
514 ;;
515
516- GNU*)
517- echo "hurd-x86"; exit 0;
518+ GNU:*|GNU/*:*)
519+ echo "${MACHINE}-gnuish"; exit 0;
520 ;;
521
522 LynxOS:*)
523--- openssl-0.9.8g.orig/demos/tunala/configure.in
524+++ openssl-0.9.8g/demos/tunala/configure.in
525@@ -1,4 +1,4 @@
526-dnl Process this file with autoconf to produce a configure script.
527+#!/usr/local/bin/perl
528 AC_INIT(tunala.c)
529 AM_CONFIG_HEADER(config.h)
530 AM_INIT_AUTOMAKE(tunala, 0.0.1-dev)
531--- openssl-0.9.8g.orig/doc/Makefile
532+++ openssl-0.9.8g/doc/Makefile
533@@ -0,0 +1,40 @@
534+VERSION =
535+
536+#PODS = $(wildcard *.pod)
537+#MANS = $(addsuffix .man, $(basename $(PODS)))
538+
539+MANS = openssl.1 ssl.3 crypto.3
540+
541+P2M = pod2man --center='OpenSSL Documentation' --release="OpenSSL $(VERSION)"
542+
543+all: manpages
544+
545+.PHONY: manpages
546+
547+manpages: openssl.1 crypto.3 ssl.3
548+
549+openssl.1:
550+ $(P2M) --section=1 openssl.pod > openssl.1
551+
552+crypto.3:
553+ $(P2M) --section=3 crypto.pod > crypto.3
554+
555+ssl.3:
556+ $(P2M) --section=3 ssl.pod > ssl.3
557+
558+.PHONY: install
559+install:
560+ mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man1
561+ mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
562+ install -m 644 -p openssl.1 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man1
563+ install -m 644 -p crypto.3 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
564+ install -m 644 -p ssl.3 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
565+ rm -f $(MANS)
566+
567+.PHONY: clean
568+clean:
569+ rm -f $(MANS)
570+
571+.PHONY: realclean
572+realclean:
573+ -$(MAKE) clean
574--- openssl-0.9.8g.orig/doc/apps/c_rehash.pod
575+++ openssl-0.9.8g/doc/apps/c_rehash.pod
576@@ -0,0 +1,55 @@
577+
578+=pod
579+
580+=head1 NAME
581+
582+c_rehash - Create symbolic links to files named by the hash values
583+
584+=head1 SYNOPSIS
585+
586+B<c_rehash>
587+[directory] ...
588+
589+=head1 DESCRIPTION
590+
591+c_rehash scans directories and takes a hash value of each .pem and .crt file in the directory. It then creates symbolic links for each of the files named by the hash value. This is useful as many programs require directories to be set up like this in order to find the certificates they require.
592+
593+If any directories are named on the command line then these directories are processed in turn. If not then and the environment variable SSL_CERT_DIR is defined then that is consulted. This variable should be a colon (:) separated list of directories, all of which will be processed. If neither of these conditions are true then /usr/lib/ssl/certs is processed.
594+
595+For each directory that is to be processed he user must have write permissions on the directory, if they do not then nothing will be printed for that directory.
596+
597+Note that this program deletes all the symbolic links that look like ones that it creates before processing a directory. Beware that if you run the program on a directory that contains symbolic links for other purposes that are named in the same format as those created by this program they will be lost.
598+
599+The hashes for certificate files are of the form <hash>.<n> where n is an integer. If the hash value already exists then n will be incremented, unless the file is a duplicate. Duplicates are detected using the fingerprint of the certificate. A warning will be printed if a duplicate is detected. The hashes for CRL files are of the form <hash>.r<n> and have the same behavior.
600+
601+The program will also warn if there are files with extension .pem which are not certificate or CRL files.
602+
603+The program uses the openssl program to compute the hashes and fingerprints. It expects the executable to be named openssl and be on the PATH, or in the /usr/lib/ssl/bin directory. If the OPENSSL environment variable is defined then this is used instead as the executable that provides the hashes and fingerprints. When called as $OPENSSL x509 -hash -fingerprint -noout -in $file it must output the hash of $file on the first line followed by the fingerprint on the second line, optionally prefixed with some text and an equals sign (=).
604+
605+=head1 OPTIONS
606+
607+None
608+
609+=head1 ENVIRONMENT
610+
611+=over 4
612+
613+=item B<OPENSSL>
614+
615+The name (and path) of an executable to use to generate hashes and fingerprints (see above).
616+
617+=item B<SSL_CERT_DIR>
618+
619+Colon separated list of directories to operate on. Ignored if directories are listed on the command line.
620+
621+=head1 SEE ALSO
622+
623+L<openssl(1)|openssl(1)>, L<x509(1)|x509(1)>
624+
625+=back
626+
627+=head1 BUGS
628+
629+No known bugs
630+
631+=cut
632--- openssl-0.9.8g.orig/Makefile.org
633+++ openssl-0.9.8g/Makefile.org
634@@ -104,7 +104,7 @@
635 ZLIB_INCLUDE=
636 LIBZLIB=
637
638-DIRS= crypto ssl engines apps test tools
639+DIRS= crypto ssl engines apps tools
640 SHLIBDIRS= crypto ssl
641
642 # dirs in crypto to build
643@@ -125,10 +125,11 @@
644
645 MAKEFILE= Makefile
646
647-MANDIR=$(OPENSSLDIR)/man
648+MANDIR=/usr/share/man
649 MAN1=1
650 MAN3=3
651-MANSUFFIX=
652+MANSUFFIX=ssl
653+MANSECTION=SSL
654 SHELL=/bin/sh
655
656 TOP= .
657@@ -308,7 +309,8 @@
658 echo 'Description: OpenSSL cryptography library'; \
659 echo 'Version: '$(VERSION); \
660 echo 'Requires: '; \
661- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
662+ echo 'Libs: -L$${libdir} -lcrypto'; \
663+ echo 'Libs.private: $(EX_LIBS)'; \
664 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
665
666 libssl.pc: Makefile
667@@ -321,7 +323,8 @@
668 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
669 echo 'Version: '$(VERSION); \
670 echo 'Requires: '; \
671- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
672+ echo 'Libs: -L$${libdir} -lssl'; \
673+ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \
674 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
675
676 openssl.pc: Makefile
677@@ -334,7 +337,8 @@
678 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
679 echo 'Version: '$(VERSION); \
680 echo 'Requires: '; \
681- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
682+ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
683+ echo 'Libs.private: $(EX_LIBS)'; \
684 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
685
686 Makefile: Makefile.org Configure config
687@@ -478,7 +482,7 @@
688 install_sw:
689 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
690 $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
691- $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines \
692+ $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines \
693 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
694 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
695 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
696@@ -556,7 +560,7 @@
697 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
698 (cd `$(PERL) util/dirname.pl $$i`; \
699 sh -c "$$pod2man \
700- --section=$$sec --center=OpenSSL \
701+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
702 --release=$(VERSION) `basename $$i`") \
703 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
704 $(PERL) util/extract-names.pl < $$i | \
705@@ -573,7 +577,7 @@
706 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
707 (cd `$(PERL) util/dirname.pl $$i`; \
708 sh -c "$$pod2man \
709- --section=$$sec --center=OpenSSL \
710+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
711 --release=$(VERSION) `basename $$i`") \
712 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
713 $(PERL) util/extract-names.pl < $$i | \
714--- openssl-0.9.8g.orig/openssl.ld
715+++ openssl-0.9.8g/openssl.ld
716@@ -0,0 +1,5 @@
717+OPENSSL_0.9.8 {
718+ global:
719+ *;
720+};
721+
722--- openssl-0.9.8g.orig/crypto/md5/asm/md5-x86_64.pl
723+++ openssl-0.9.8g/crypto/md5/asm/md5-x86_64.pl
724@@ -1,4 +1,4 @@
725-#!/usr/bin/perl -w
726+#!/usr/local/bin/perl
727 #
728 # MD5 optimized for AMD64.
729 #
730--- openssl-0.9.8g.orig/crypto/md5/asm/md5-sparcv9.S
731+++ openssl-0.9.8g/crypto/md5/asm/md5-sparcv9.S
732@@ -74,14 +74,14 @@
733 #define Dval R8
734
735 #if defined(MD5_BLOCK_DATA_ORDER)
736-# if defined(OPENSSL_SYSNAME_ULTRASPARC)
737+/*# if defined(OPENSSL_SYSNAME_ULTRASPARC)*/
738 # define LOAD lda
739 # define X(i) [%i1+i*4]%asi
740 # define md5_block md5_block_asm_data_order_aligned
741 # define ASI_PRIMARY_LITTLE 0x88
742-# else
743+/*# else
744 # error "MD5_BLOCK_DATA_ORDER is supported only on UltraSPARC!"
745-# endif
746+# endif*/
747 #else
748 # define LOAD ld
749 # define X(i) [%i1+i*4]
750--- openssl-0.9.8g.orig/crypto/Makefile
751+++ openssl-0.9.8g/crypto/Makefile
752@@ -57,7 +57,7 @@
753 echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
754 echo '#endif' ) >buildinf.h
755
756-x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl
757+x86cpuid-elf.S: x86cpuid.pl perlasm/x86asm.pl
758 $(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
759 x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
760 $(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@
761@@ -70,7 +70,7 @@
762 uplink-cof.s: ../ms/uplink.pl
763 $(PERL) ../ms/uplink.pl coff > $@
764
765-x86_64cpuid.s: x86_64cpuid.pl
766+x86_64cpuid.S: x86_64cpuid.pl
767 $(PERL) x86_64cpuid.pl $@
768 ia64cpuid.s: ia64cpuid.S
769 $(CC) $(CFLAGS) -E ia64cpuid.S > $@
770--- openssl-0.9.8g.orig/crypto/sha/asm/sha1-ia64.pl
771+++ openssl-0.9.8g/crypto/sha/asm/sha1-ia64.pl
772@@ -1,4 +1,4 @@
773-#!/usr/bin/env perl
774+#!/usr/local/bin/perl
775 #
776 # ====================================================================
777 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
778--- openssl-0.9.8g.orig/crypto/sha/asm/sha512-sse2.pl
779+++ openssl-0.9.8g/crypto/sha/asm/sha512-sse2.pl
780@@ -1,4 +1,4 @@
781-#!/usr/bin/env perl
782+#!/usr/local/bin/perl
783 #
784 # ====================================================================
785 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
786--- openssl-0.9.8g.orig/crypto/sha/asm/sha512-ia64.pl
787+++ openssl-0.9.8g/crypto/sha/asm/sha512-ia64.pl
788@@ -1,4 +1,4 @@
789-#!/usr/bin/env perl
790+#!/usr/local/bin/perl
791 #
792 # ====================================================================
793 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
794--- openssl-0.9.8g.orig/crypto/sha/sha.h
795+++ openssl-0.9.8g/crypto/sha/sha.h
796@@ -59,6 +59,7 @@
797 #ifndef HEADER_SHA_H
798 #define HEADER_SHA_H
799
800+#include <stddef.h>
801 #include <openssl/e_os2.h>
802 #include <stddef.h>
803
804--- openssl-0.9.8g.orig/crypto/rand/md_rand.c
805+++ openssl-0.9.8g/crypto/rand/md_rand.c
806@@ -271,7 +271,10 @@
807 else
808 MD_Update(&m,&(state[st_idx]),j);
809
810+/*
811+ * Don't add uninitialised data.
812 MD_Update(&m,buf,j);
813+*/
814 MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c));
815 MD_Final(&m,local_md);
816 md_c[1]++;
817@@ -465,8 +468,10 @@
818 MD_Update(&m,local_md,MD_DIGEST_LENGTH);
819 MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c));
820 #ifndef PURIFY
821+#if 0 /* Don't add uninitialised data. */
822 MD_Update(&m,buf,j); /* purify complains */
823 #endif
824+#endif
825 k=(st_idx+MD_DIGEST_LENGTH/2)-st_num;
826 if (k > 0)
827 {
828--- openssl-0.9.8g.orig/crypto/des/asm/desboth.pl
829+++ openssl-0.9.8g/crypto/des/asm/desboth.pl
830@@ -16,6 +16,11 @@
831
832 &push("edi");
833
834+ &call (&label("pic_point0"));
835+ &set_label("pic_point0");
836+ &blindpop("ebp");
837+ &add ("ebp", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
838+
839 &comment("");
840 &comment("Load the data words");
841 &mov($L,&DWP(0,"ebx","",0));
842@@ -47,15 +52,21 @@
843 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
844 &mov(&swtmp(1), "eax");
845 &mov(&swtmp(0), "ebx");
846- &call("DES_encrypt2");
847+ &exch("ebx", "ebp");
848+ &call("DES_encrypt2\@PLT");
849+ &exch("ebx", "ebp");
850 &mov(&swtmp(2), (DWC(($enc)?"0":"1")));
851 &mov(&swtmp(1), "edi");
852 &mov(&swtmp(0), "ebx");
853- &call("DES_encrypt2");
854+ &exch("ebx", "ebp");
855+ &call("DES_encrypt2\@PLT");
856+ &exch("ebx", "ebp");
857 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
858 &mov(&swtmp(1), "esi");
859 &mov(&swtmp(0), "ebx");
860- &call("DES_encrypt2");
861+ &exch("ebx", "ebp");
862+ &call("DES_encrypt2\@PLT");
863+ &exch("ebx", "ebp");
864
865 &stack_pop(3);
866 &mov($L,&DWP(0,"ebx","",0));
867--- openssl-0.9.8g.orig/crypto/x86cpuid.pl
868+++ openssl-0.9.8g/crypto/x86cpuid.pl
869@@ -1,4 +1,4 @@
870-#!/usr/bin/env perl
871+#!/usr/local/bin/perl
872
873 push(@INC,"perlasm");
874 require "x86asm.pl";
875--- openssl-0.9.8g.orig/crypto/rc4/asm/rc4-x86_64.pl
876+++ openssl-0.9.8g/crypto/rc4/asm/rc4-x86_64.pl
877@@ -1,4 +1,4 @@
878-#!/usr/bin/env perl
879+#!/usr/local/bin/perl
880 #
881 # ====================================================================
882 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
883--- openssl-0.9.8g.orig/crypto/perlasm/x86unix.pl
884+++ openssl-0.9.8g/crypto/perlasm/x86unix.pl
885@@ -399,6 +399,29 @@
886 $stack=4;
887 }
888
889+sub main'function_begin_B_static
890+ {
891+ local($func,$extra)=@_;
892+
893+ &main'external_label($func);
894+ $func=$under.$func;
895+
896+ local($tmp)=<<"EOF";
897+.text
898+EOF
899+ push(@out,$tmp);
900+ if ($main'cpp)
901+ { push(@out,"TYPE($func,\@function)\n"); }
902+ elsif ($main'coff)
903+ { $tmp=push(@out,".def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); }
904+ elsif ($main'aout and !$main'pic)
905+ { }
906+ else { push(@out,".type $func,\@function\n"); }
907+ push(@out,".align\t$align\n");
908+ push(@out,"$func:\n");
909+ $stack=4;
910+ }
911+
912 sub main'function_end
913 {
914 local($func)=@_;
915@@ -730,7 +753,17 @@
916 {
917 $tmp=<<___;
918 .section .init
919+#ifdef OPENSSL_PIC
920+ pushl %ebx
921+ call .pic_point0
922+.pic_point0:
923+ popl %ebx
924+ addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx
925+ call $under$f\@PLT
926+ popl %ebx
927+#else
928 call $under$f
929+#endif
930 jmp .Linitalign
931 .align $align
932 .Linitalign:
933--- openssl-0.9.8g.orig/crypto/perlasm/cbc.pl
934+++ openssl-0.9.8g/crypto/perlasm/cbc.pl
935@@ -122,7 +122,11 @@
936 &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
937 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
938
939- &call($enc_func);
940+ &call (&label("pic_point0"));
941+ &set_label("pic_point0");
942+ &blindpop("ebx");
943+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
944+ &call("$enc_func\@PLT");
945
946 &mov("eax", &DWP($data_off,"esp","",0));
947 &mov("ebx", &DWP($data_off+4,"esp","",0));
948@@ -187,7 +191,11 @@
949 &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
950 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
951
952- &call($enc_func);
953+ &call (&label("pic_point1"));
954+ &set_label("pic_point1");
955+ &blindpop("ebx");
956+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point1") . "]");
957+ &call("$enc_func\@PLT");
958
959 &mov("eax", &DWP($data_off,"esp","",0));
960 &mov("ebx", &DWP($data_off+4,"esp","",0));
961@@ -220,7 +228,11 @@
962 &mov(&DWP($data_off,"esp","",0), "eax"); # put back
963 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
964
965- &call($dec_func);
966+ &call (&label("pic_point2"));
967+ &set_label("pic_point2");
968+ &blindpop("ebx");
969+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point2") . "]");
970+ &call("$dec_func\@PLT");
971
972 &mov("eax", &DWP($data_off,"esp","",0)); # get return
973 &mov("ebx", &DWP($data_off+4,"esp","",0)); #
974@@ -263,7 +275,11 @@
975 &mov(&DWP($data_off,"esp","",0), "eax"); # put back
976 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
977
978- &call($dec_func);
979+ &call (&label("pic_point3"));
980+ &set_label("pic_point3");
981+ &blindpop("ebx");
982+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point3") . "]");
983+ &call("$dec_func\@PLT");
984
985 &mov("eax", &DWP($data_off,"esp","",0)); # get return
986 &mov("ebx", &DWP($data_off+4,"esp","",0)); #
987--- openssl-0.9.8g.orig/crypto/perlasm/x86_64-xlate.pl
988+++ openssl-0.9.8g/crypto/perlasm/x86_64-xlate.pl
989@@ -1,4 +1,4 @@
990-#!/usr/bin/env perl
991+#!/usr/local/bin/perl
992
993 # Ascetic x86_64 AT&T to MASM assembler translator by <appro>.
994 #
995--- openssl-0.9.8g.orig/crypto/opensslconf.h
996+++ openssl-0.9.8g/crypto/opensslconf.h
997@@ -10,6 +10,9 @@
998 #ifndef OPENSSL_NO_GMP
999 # define OPENSSL_NO_GMP
1000 #endif
1001+#ifndef OPENSSL_NO_IDEA
1002+# define OPENSSL_NO_IDEA
1003+#endif
1004 #ifndef OPENSSL_NO_KRB5
1005 # define OPENSSL_NO_KRB5
1006 #endif
1007@@ -25,11 +28,11 @@
1008 #ifndef OPENSSL_NO_SEED
1009 # define OPENSSL_NO_SEED
1010 #endif
1011-#ifndef OPENSSL_NO_TLSEXT
1012-# define OPENSSL_NO_TLSEXT
1013-#endif
1014
1015 #endif /* OPENSSL_DOING_MAKEDEPEND */
1016+#ifndef OPENSSL_THREADS
1017+# define OPENSSL_THREADS
1018+#endif
1019 #ifndef OPENSSL_NO_DYNAMIC_ENGINE
1020 # define OPENSSL_NO_DYNAMIC_ENGINE
1021 #endif
1022@@ -45,6 +48,9 @@
1023 # if defined(OPENSSL_NO_GMP) && !defined(NO_GMP)
1024 # define NO_GMP
1025 # endif
1026+# if defined(OPENSSL_NO_IDEA) && !defined(NO_IDEA)
1027+# define NO_IDEA
1028+# endif
1029 # if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
1030 # define NO_KRB5
1031 # endif
1032@@ -60,11 +66,10 @@
1033 # if defined(OPENSSL_NO_SEED) && !defined(NO_SEED)
1034 # define NO_SEED
1035 # endif
1036-# if defined(OPENSSL_NO_TLSEXT) && !defined(NO_TLSEXT)
1037-# define NO_TLSEXT
1038-# endif
1039 #endif
1040
1041+#define OPENSSL_CPUID_OBJ
1042+
1043 /* crypto/opensslconf.h.in */
1044
1045 /* Generate 80386 code? */
1046@@ -72,8 +77,8 @@
1047
1048 #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
1049 #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
1050-#define ENGINESDIR "/usr/local/ssl/lib/engines"
1051-#define OPENSSLDIR "/usr/local/ssl"
1052+#define ENGINESDIR "/usr/lib/ssl/engines"
1053+#define OPENSSLDIR "/usr/lib/ssl"
1054 #endif
1055 #endif
1056
1057@@ -104,14 +109,14 @@
1058 * - Intel P6 because partial register stalls are very expensive;
1059 * - elder Alpha because it lacks byte load/store instructions;
1060 */
1061-#define RC4_INT unsigned int
1062+#define RC4_INT unsigned char
1063 #endif
1064 #if !defined(RC4_CHUNK)
1065 /*
1066 * This enables code handling data aligned at natural CPU word
1067 * boundary. See crypto/rc4/rc4_enc.c for further details.
1068 */
1069-#undef RC4_CHUNK
1070+#define RC4_CHUNK unsigned long
1071 #endif
1072 #endif
1073
1074@@ -119,7 +124,7 @@
1075 /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
1076 * %20 speed up (longs are 8 bytes, int's are 4). */
1077 #ifndef DES_LONG
1078-#define DES_LONG unsigned long
1079+#define DES_LONG unsigned int
1080 #endif
1081 #endif
1082
1083@@ -133,9 +138,9 @@
1084 /* The prime number generation stuff may not work when
1085 * EIGHT_BIT but I don't care since I've only used this mode
1086 * for debuging the bignum libraries */
1087-#undef SIXTY_FOUR_BIT_LONG
1088+#define SIXTY_FOUR_BIT_LONG
1089 #undef SIXTY_FOUR_BIT
1090-#define THIRTY_TWO_BIT
1091+#undef THIRTY_TWO_BIT
1092 #undef SIXTEEN_BIT
1093 #undef EIGHT_BIT
1094 #endif
1095@@ -149,7 +154,7 @@
1096
1097 #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
1098 #define CONFIG_HEADER_BF_LOCL_H
1099-#undef BF_PTR
1100+#define BF_PTR2
1101 #endif /* HEADER_BF_LOCL_H */
1102
1103 #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
1104@@ -179,7 +184,7 @@
1105 /* Unroll the inner loop, this sometimes helps, sometimes hinders.
1106 * Very mucy CPU dependant */
1107 #ifndef DES_UNROLL
1108-#undef DES_UNROLL
1109+#define DES_UNROLL
1110 #endif
1111
1112 /* These default values were supplied by
1113--- openssl-0.9.8g.orig/crypto/pkcs7/pk7_mime.c
1114+++ openssl-0.9.8g/crypto/pkcs7/pk7_mime.c
1115@@ -335,9 +335,9 @@
1116
1117 if(strcmp(hdr->value, "application/x-pkcs7-signature") &&
1118 strcmp(hdr->value, "application/pkcs7-signature")) {
1119- sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
1120 PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_SIG_INVALID_MIME_TYPE);
1121 ERR_add_error_data(2, "type: ", hdr->value);
1122+ sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
1123 sk_BIO_pop_free(parts, BIO_vfree);
1124 return NULL;
1125 }
1126--- openssl-0.9.8g.orig/crypto/bn/asm/ppc.pl
1127+++ openssl-0.9.8g/crypto/bn/asm/ppc.pl
1128@@ -1,4 +1,4 @@
1129-#!/usr/bin/env perl
1130+#!/usr/local/bin/perl
1131 #
1132 # Implemented as a Perl wrapper as we want to support several different
1133 # architectures with single file. We pick up the target based on the
1134--- openssl-0.9.8g.orig/crypto/x86_64cpuid.pl
1135+++ openssl-0.9.8g/crypto/x86_64cpuid.pl
1136@@ -1,4 +1,4 @@
1137-#!/usr/bin/env perl
1138+#!/usr/local/bin/perl
1139
1140 $output=shift;
1141 $win64a=1 if ($output =~ /win64a\.[s|asm]/);
1142@@ -134,5 +134,9 @@
1143 .size OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid
1144
1145 .section .init
1146+#ifdef OPENSSL_PIC
1147+ call OPENSSL_cpuid_setup\@PLT
1148+#else
1149 call OPENSSL_cpuid_setup
1150+#endif
1151 ___
1152--- openssl-0.9.8g.orig/crypto/aes/asm/aes-586.pl
1153+++ openssl-0.9.8g/crypto/aes/asm/aes-586.pl
1154@@ -1,4 +1,4 @@
1155-#!/usr/bin/env perl
1156+#!/usr/local/bin/perl
1157 #
1158 # ====================================================================
1159 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
1160@@ -250,7 +250,7 @@
1161 sub _data_word() { my $i; while(defined($i=shift)) { &data_word($i,$i); } }
1162
1163 &public_label("AES_Te");
1164-&function_begin_B("_x86_AES_encrypt");
1165+&function_begin_B_static("_x86_AES_encrypt");
1166 if ($vertical_spin) {
1167 # I need high parts of volatile registers to be accessible...
1168 &exch ($s1="edi",$key="ebx");
1169@@ -539,7 +539,7 @@
1170 }
1171
1172 &public_label("AES_Td");
1173-&function_begin_B("_x86_AES_decrypt");
1174+&function_begin_B_static("_x86_AES_decrypt");
1175 # note that caller is expected to allocate stack frame for me!
1176 &mov (&DWP(12,"esp"),$key); # save key
1177
1178@@ -1460,15 +1460,22 @@
1179 &public_label("AES_Td");
1180 &public_label("AES_Te");
1181 &function_begin_B("AES_set_decrypt_key");
1182+ &push ("ebx");
1183 &mov ("eax",&wparam(0));
1184 &mov ("ecx",&wparam(1));
1185 &mov ("edx",&wparam(2));
1186 &sub ("esp",12);
1187+
1188+ &call (&label("pic_point0"));
1189+ &set_label("pic_point0");
1190+ &blindpop("ebx");
1191+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
1192 &mov (&DWP(0,"esp"),"eax");
1193 &mov (&DWP(4,"esp"),"ecx");
1194 &mov (&DWP(8,"esp"),"edx");
1195- &call ("AES_set_encrypt_key");
1196+ &call ("AES_set_encrypt_key\@PLT");
1197 &add ("esp",12);
1198+ &pop ("ebx");
1199 &cmp ("eax",0);
1200 &je (&label("proceed"));
1201 &ret ();
1202--- openssl-0.9.8g.orig/crypto/asn1/charmap.pl
1203+++ openssl-0.9.8g/crypto/asn1/charmap.pl
1204@@ -1,4 +1,4 @@
1205-#!/usr/local/bin/perl -w
1206+#!/usr/local/bin/perl
1207
1208 use strict;
1209
1210--- openssl-0.9.8g.orig/util/mkerr.pl
1211+++ openssl-0.9.8g/util/mkerr.pl
1212@@ -1,4 +1,4 @@
1213-#!/usr/local/bin/perl -w
1214+#!/usr/local/bin/perl
1215
1216 my $config = "crypto/err/openssl.ec";
1217 my $debug = 0;
1218--- openssl-0.9.8g.orig/util/clean-depend.pl
1219+++ openssl-0.9.8g/util/clean-depend.pl
1220@@ -1,4 +1,4 @@
1221-#!/usr/local/bin/perl -w
1222+#!/usr/local/bin/perl
1223 # Clean the dependency list in a makefile of standard includes...
1224 # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
1225
1226--- openssl-0.9.8g.orig/util/extract-names.pl
1227+++ openssl-0.9.8g/util/extract-names.pl
1228@@ -1,4 +1,4 @@
1229-#!/usr/bin/perl
1230+#!/usr/local/bin/perl
1231
1232 $/ = ""; # Eat a paragraph at once.
1233 while(<STDIN>) {
1234--- openssl-0.9.8g.orig/util/pod2man.pl
1235+++ openssl-0.9.8g/util/pod2man.pl
1236@@ -1,4 +1,4 @@
1237-: #!/usr/bin/perl-5.005
1238+#!/usr/local/bin/perl
1239 eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
1240 if $running_under_some_shell;
1241
1242--- openssl-0.9.8g.orig/util/mkstack.pl
1243+++ openssl-0.9.8g/util/mkstack.pl
1244@@ -1,4 +1,4 @@
1245-#!/usr/local/bin/perl -w
1246+#!/usr/local/bin/perl
1247
1248 # This is a utility that searches out "DECLARE_STACK_OF()"
1249 # declarations in .h and .c files, and updates/creates/replaces
1250--- openssl-0.9.8g.orig/util/selftest.pl
1251+++ openssl-0.9.8g/util/selftest.pl
1252@@ -1,4 +1,4 @@
1253-#!/usr/local/bin/perl -w
1254+#!/usr/local/bin/perl
1255 #
1256 # Run the test suite and generate a report
1257 #
1258--- openssl-0.9.8g.orig/util/extract-section.pl
1259+++ openssl-0.9.8g/util/extract-section.pl
1260@@ -1,4 +1,4 @@
1261-#!/usr/bin/perl
1262+#!/usr/local/bin/perl
1263
1264 while(<STDIN>) {
1265 if (/=for\s+comment\s+openssl_manual_section:(\S+)/)
1266--- openssl-0.9.8g.orig/util/pl/netware.pl
1267+++ openssl-0.9.8g/util/pl/netware.pl
1268@@ -1,4 +1,4 @@
1269-# Metrowerks Codewarrior for NetWare
1270+#!/usr/local/bin/perl
1271 #
1272
1273 # The import files and other misc imports needed to link
1274--- openssl-0.9.8g.orig/util/mkdef.pl
1275+++ openssl-0.9.8g/util/mkdef.pl
1276@@ -1,4 +1,4 @@
1277-#!/usr/local/bin/perl -w
1278+#!/usr/local/bin/perl
1279 #
1280 # generate a .def file
1281 #