summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/packages/openssl/openssl-0.9.8g/debian.patch1280
-rw-r--r--meta/packages/openssl/openssl-0.9.8g/fix-md5-x86_64.patch47
-rw-r--r--meta/packages/openssl/openssl-0.9.8g/shared-libs.patch45
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/configure-targets.patch (renamed from meta/packages/openssl/openssl-0.9.8g/configure-targets.patch)0
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/ca.patch20
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/config-hurd.patch15
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/debian-targets.patch54
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/engines-path.patch47
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch13
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/make-targets.patch13
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/man-dir.patch13
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/man-section.patch32
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/no-rpath.patch13
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/no-symbolic.patch13
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/perl-path.diff760
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/pic.patch301
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/pkg-config.patch34
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/rc4-amd64.patch14
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/rehash-crt.patch33
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/rehash_pod.patch60
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/series20
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch14
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/stddef.patch12
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/valgrind.patch15
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/debian/version-script.patch33
-rw-r--r--meta/packages/openssl/openssl-0.9.8o/shared-libs.patch48
-rw-r--r--meta/packages/openssl/openssl.inc9
-rw-r--r--meta/packages/openssl/openssl_0.9.8g.bb10
-rw-r--r--meta/packages/openssl/openssl_0.9.8o.bb28
29 files changed, 1613 insertions, 1383 deletions
diff --git a/meta/packages/openssl/openssl-0.9.8g/debian.patch b/meta/packages/openssl/openssl-0.9.8g/debian.patch
deleted file mode 100644
index b7d571a7fd..0000000000
--- a/meta/packages/openssl/openssl-0.9.8g/debian.patch
+++ /dev/null
@@ -1,1280 +0,0 @@
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/Configure
177+++ openssl-0.9.8g/Configure
178@@ -1,4 +1,4 @@
179-:
180+#!/usr/local/bin/perl
181 eval 'exec perl -S $0 ${1+"$@"}'
182 if $running_under_some_shell;
183 ##
184@@ -118,7 +118,8 @@
185 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";
186 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";
187
188-my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o::::md5-x86_64.o:::rc4-x86_64.o::";
189+#my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o::::md5-x86_64.o:::rc4-x86_64.o::";
190+my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o::::md5-x86_64.o:::::";
191 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::";
192
193 my $no_asm="::::::::::";
194@@ -308,6 +309,47 @@
195 "osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared:::.so",
196 "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",
197
198+# Debian GNU/* (various architectures)
199+"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)",
200+"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)",
201+"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)",
202+"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)",
203+"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)",
204+"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)",
205+#"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)",
206+"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)",
207+"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)",
208+#"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)",
209+"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)",
210+"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)",
211+"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)",
212+"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)",
213+#"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",
214+"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)",
215+"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)",
216+"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)",
217+"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)",
218+"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)",
219+"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)",
220+"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)",
221+"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)",
222+"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)",
223+"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)",
224+"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)",
225+"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)",
226+"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)",
227+"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)",
228+"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)",
229+"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)",
230+"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)",
231+"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)",
232+"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)",
233+"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)",
234+"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)",
235+"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)",
236+"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)",
237+"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)",
238+
239 ####
240 #### Variety of LINUX:-)
241 ####
242@@ -476,7 +518,7 @@
243 # Cygwin
244 "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",
245 "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",
246-"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",
247+-"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",
248
249 # NetWare from David Ward (dsward@novell.com) - requires MetroWerks NLM development tools
250 # netware-clib => legacy CLib c-runtime support
251@@ -1300,6 +1342,8 @@
252 $shlib_minor=$2;
253 }
254
255+$shared_ldflag .= " -Wl,--version-script=openssl.ld";
256+
257 open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
258 unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
259 open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
260@@ -1371,7 +1415,8 @@
261 elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
262 {
263 my $sotmp = $1;
264- s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
265+# s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
266+ s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/;
267 }
268 elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
269 {
270@@ -1490,7 +1535,7 @@
271 if (/^#define\s+OPENSSLDIR/)
272 { print OUT "#define OPENSSLDIR \"$openssldir\"\n"; }
273 elsif (/^#define\s+ENGINESDIR/)
274- { print OUT "#define ENGINESDIR \"$prefix/lib/engines\"\n"; }
275+ { print OUT "#define ENGINESDIR \"$prefix/lib/ssl/engines\"\n"; }
276 elsif (/^#((define)|(undef))\s+OPENSSL_EXPORT_VAR_AS_FUNCTION/)
277 { printf OUT "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION\n"
278 if $export_var_as_fn;
279--- openssl-0.9.8g.orig/Makefile.shared
280+++ openssl-0.9.8g/Makefile.shared
281@@ -151,9 +151,9 @@
282 SHLIB_SUFFIX=; \
283 ALLSYMSFLAGS='-Wl,--whole-archive'; \
284 NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
285- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
286+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
287
288-DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
289+DO_GNU_APP=LDFLAGS="$(CFLAGS)"
290
291 #This is rather special. It's a special target with which one can link
292 #applications without bothering with any features that have anything to
293--- openssl-0.9.8g.orig/config
294+++ openssl-0.9.8g/config
295@@ -162,8 +162,8 @@
296 echo "${MACHINE}-whatever-linux1"; exit 0
297 ;;
298
299- GNU*)
300- echo "hurd-x86"; exit 0;
301+ GNU:*|GNU/*:*)
302+ echo "${MACHINE}-gnuish"; exit 0;
303 ;;
304
305 LynxOS:*)
306--- openssl-0.9.8g.orig/Makefile.org
307+++ openssl-0.9.8g/Makefile.org
308@@ -104,7 +104,7 @@
309 ZLIB_INCLUDE=
310 LIBZLIB=
311
312-DIRS= crypto ssl engines apps test tools
313+DIRS= crypto ssl engines apps tools
314 SHLIBDIRS= crypto ssl
315
316 # dirs in crypto to build
317@@ -125,10 +125,11 @@
318
319 MAKEFILE= Makefile
320
321-MANDIR=$(OPENSSLDIR)/man
322+MANDIR=/usr/share/man
323 MAN1=1
324 MAN3=3
325-MANSUFFIX=
326+MANSUFFIX=ssl
327+MANSECTION=SSL
328 SHELL=/bin/sh
329
330 TOP= .
331@@ -308,7 +309,8 @@
332 echo 'Description: OpenSSL cryptography library'; \
333 echo 'Version: '$(VERSION); \
334 echo 'Requires: '; \
335- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
336+ echo 'Libs: -L$${libdir} -lcrypto'; \
337+ echo 'Libs.private: $(EX_LIBS)'; \
338 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
339
340 libssl.pc: Makefile
341@@ -321,7 +323,8 @@
342 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
343 echo 'Version: '$(VERSION); \
344 echo 'Requires: '; \
345- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
346+ echo 'Libs: -L$${libdir} -lssl'; \
347+ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \
348 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
349
350 openssl.pc: Makefile
351@@ -334,7 +337,8 @@
352 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
353 echo 'Version: '$(VERSION); \
354 echo 'Requires: '; \
355- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
356+ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
357+ echo 'Libs.private: $(EX_LIBS)'; \
358 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
359
360 Makefile: Makefile.org Configure config
361@@ -478,7 +482,7 @@
362 install_sw:
363 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
364 $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
365- $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines \
366+ $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines \
367 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
368 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
369 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
370@@ -556,7 +560,7 @@
371 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
372 (cd `$(PERL) util/dirname.pl $$i`; \
373 sh -c "$$pod2man \
374- --section=$$sec --center=OpenSSL \
375+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
376 --release=$(VERSION) `basename $$i`") \
377 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
378 $(PERL) util/extract-names.pl < $$i | \
379@@ -573,7 +577,7 @@
380 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
381 (cd `$(PERL) util/dirname.pl $$i`; \
382 sh -c "$$pod2man \
383- --section=$$sec --center=OpenSSL \
384+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
385 --release=$(VERSION) `basename $$i`") \
386 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
387 $(PERL) util/extract-names.pl < $$i | \
388--- openssl-0.9.8g.orig/openssl.ld
389+++ openssl-0.9.8g/openssl.ld
390@@ -0,0 +1,5 @@
391+OPENSSL_0.9.8 {
392+ global:
393+ *;
394+};
395+
396--- openssl-0.9.8g.orig/VMS/VMSify-conf.pl
397+++ openssl-0.9.8g/VMS/VMSify-conf.pl
398@@ -1,4 +1,4 @@
399-#! /usr/bin/perl
400+#!/usr/local/bin/perl
401
402 use strict;
403 use warnings;
404--- openssl-0.9.8g.orig/Netware/do_tests.pl
405+++ openssl-0.9.8g/Netware/do_tests.pl
406@@ -1,4 +1,4 @@
407-# perl script to run OpenSSL tests
408+#!/usr/local/bin/perl
409
410
411 my $base_path = "\\openssl";
412--- openssl-0.9.8g.orig/apps/s_time.c
413+++ openssl-0.9.8g/apps/s_time.c
414@@ -117,6 +117,7 @@
415
416 /* The following if from times(3) man page. It may need to be changed
417 */
418+#undef HZ
419 #ifndef HZ
420 # ifdef _SC_CLK_TCK
421 # define HZ ((double)sysconf(_SC_CLK_TCK))
422--- openssl-0.9.8g.orig/apps/CA.sh
423+++ openssl-0.9.8g/apps/CA.sh
424@@ -91,6 +91,7 @@
425 -out ${CATOP}/$CAREQ
426 $CA -out ${CATOP}/$CACERT $CADAYS -batch \
427 -keyfile ${CATOP}/private/$CAKEY -selfsign \
428+ -extensions v3_ca \
429 -infiles ${CATOP}/$CAREQ
430 RET=$?
431 fi
432--- openssl-0.9.8g.orig/apps/CA.pl.in
433+++ openssl-0.9.8g/apps/CA.pl.in
434@@ -65,6 +65,7 @@
435 foreach (@ARGV) {
436 if ( /^(-\?|-h|-help)$/ ) {
437 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
438+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
439 exit 0;
440 } elsif (/^-newcert$/) {
441 # create a certificate
442@@ -165,6 +166,7 @@
443 } else {
444 print STDERR "Unknown arg $_\n";
445 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
446+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
447 exit 1;
448 }
449 }
450--- openssl-0.9.8g.orig/apps/speed.c
451+++ openssl-0.9.8g/apps/speed.c
452@@ -577,7 +577,7 @@
453 #define MAX_BLOCK_SIZE 64
454 #endif
455 unsigned char DES_iv[8];
456- unsigned char iv[MAX_BLOCK_SIZE/8];
457+ unsigned char iv[2*MAX_BLOCK_SIZE/8];
458 #ifndef OPENSSL_NO_DES
459 DES_cblock *buf_as_des_cblock = NULL;
460 static DES_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0};
461--- openssl-0.9.8g.orig/apps/CA.pl
462+++ openssl-0.9.8g/apps/CA.pl
463@@ -1,4 +1,4 @@
464-#!/usr/bin/perl
465+#!/usr/local/bin/perl
466 #
467 # CA - wrapper around ca to make it easier to use ... basically ca requires
468 # some setup stuff to be done before you can use it and this makes
469@@ -65,6 +65,7 @@
470 foreach (@ARGV) {
471 if ( /^(-\?|-h|-help)$/ ) {
472 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
473+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
474 exit 0;
475 } elsif (/^-newcert$/) {
476 # create a certificate
477@@ -165,6 +166,7 @@
478 } else {
479 print STDERR "Unknown arg $_\n";
480 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
481+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
482 exit 1;
483 }
484 }
485--- openssl-0.9.8g.orig/os2/backwardify.pl
486+++ openssl-0.9.8g/os2/backwardify.pl
487@@ -1,4 +1,4 @@
488-#!/usr/bin/perl -w
489+#!/usr/local/bin/perl
490 use strict;
491
492 # Use as $0
493--- openssl-0.9.8g.orig/engines/Makefile
494+++ openssl-0.9.8g/engines/Makefile
495@@ -97,13 +97,13 @@
496 *DSO_DL*) sfx="sl";; \
497 *) sfx="bad";; \
498 esac; \
499- cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
500+ cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines/lib$$l.$$sfx.new; \
501 else \
502 sfx="so"; \
503 cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
504 fi; \
505- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
506- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx ); \
507+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines/lib$$l.$$sfx.new; \
508+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines/lib$$l.$$sfx ); \
509 done; \
510 fi
511
512--- openssl-0.9.8g.orig/engines/openssl.ld
513+++ openssl-0.9.8g/engines/openssl.ld
514@@ -0,0 +1,5 @@
515+OPENSSL_0.9.8 {
516+ global:
517+ *;
518+};
519+
520--- openssl-0.9.8g.orig/tools/c_rehash
521+++ openssl-0.9.8g/tools/c_rehash
522@@ -6,7 +6,7 @@
523
524 my $openssl;
525
526-my $dir = "/usr/local/ssl";
527+my $dir = "/usr/lib/ssl";
528
529 if(defined $ENV{OPENSSL}) {
530 $openssl = $ENV{OPENSSL};
531@@ -59,12 +59,15 @@
532 }
533 }
534 closedir DIR;
535- FILE: foreach $fname (grep {/\.pem$/} @flist) {
536+ FILE: foreach $fname (grep {/\.pem$|\.crt$/} @flist) {
537 # Check to see if certificates and/or CRLs present.
538 my ($cert, $crl) = check_file($fname);
539 if(!$cert && !$crl) {
540- print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
541- next;
542+ ($cert, $crl) = check_file("$openssl x509 -in \"$fname\" -inform der -outform pem | ");
543+ if(!$cert && !$crl) {
544+ print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
545+ next;
546+ }
547 }
548 link_hash_cert($fname) if($cert);
549 link_hash_crl($fname) if($crl);
550@@ -102,6 +105,9 @@
551 my $fname = $_[0];
552 $fname =~ s/'/'\\''/g;
553 my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname'`;
554+ if(!$hash || !fprint) {
555+ ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname' -inform der`;
556+ }
557 chomp $hash;
558 chomp $fprint;
559 $fprint =~ s/^.*=//;
560--- openssl-0.9.8g.orig/tools/c_rehash.in
561+++ openssl-0.9.8g/tools/c_rehash.in
562@@ -59,12 +59,15 @@
563 }
564 }
565 closedir DIR;
566- FILE: foreach $fname (grep {/\.pem$/} @flist) {
567+ FILE: foreach $fname (grep {/\.pem$|\.crt$/} @flist) {
568 # Check to see if certificates and/or CRLs present.
569 my ($cert, $crl) = check_file($fname);
570 if(!$cert && !$crl) {
571- print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
572- next;
573+ ($cert, $crl) = check_file("$openssl x509 -in \"$fname\" -inform der -outform pem | ");
574+ if(!$cert && !$crl) {
575+ print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
576+ next;
577+ }
578 }
579 link_hash_cert($fname) if($cert);
580 link_hash_crl($fname) if($crl);
581@@ -102,6 +105,9 @@
582 my $fname = $_[0];
583 $fname =~ s/'/'\\''/g;
584 my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname'`;
585+ if(!$hash || !fprint) {
586+ ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname' -inform der`;
587+ }
588 chomp $hash;
589 chomp $fprint;
590 $fprint =~ s/^.*=//;
591--- openssl-0.9.8g.orig/ssl/t1_lib.c
592+++ openssl-0.9.8g/ssl/t1_lib.c
593@@ -132,6 +132,10 @@
594 int extdatalen=0;
595 unsigned char *ret = p;
596
597+ /* don't add extensions for SSLv3 */
598+ if (s->client_version == SSL3_VERSION)
599+ return p;
600+
601 ret+=2;
602
603 if (ret>=limit) return NULL; /* this really never occurs, but ... */
604@@ -202,6 +206,10 @@
605 int extdatalen=0;
606 unsigned char *ret = p;
607
608+ /* don't add extensions for SSLv3 */
609+ if (s->version == SSL3_VERSION)
610+ return p;
611+
612 ret+=2;
613 if (ret>=limit) return NULL; /* this really never occurs, but ... */
614
615--- openssl-0.9.8g.orig/ms/uplink.pl
616+++ openssl-0.9.8g/ms/uplink.pl
617@@ -1,4 +1,4 @@
618-#!/usr/bin/env perl
619+#!/usr/local/bin/perl
620 #
621 # For Microsoft CL this is implemented as inline assembler. So that
622 # even though this script can generate even Win32 code, we'll be
623--- openssl-0.9.8g.orig/demos/tunala/configure.in
624+++ openssl-0.9.8g/demos/tunala/configure.in
625@@ -1,4 +1,4 @@
626-dnl Process this file with autoconf to produce a configure script.
627+#!/usr/local/bin/perl
628 AC_INIT(tunala.c)
629 AM_CONFIG_HEADER(config.h)
630 AM_INIT_AUTOMAKE(tunala, 0.0.1-dev)
631--- openssl-0.9.8g.orig/doc/Makefile
632+++ openssl-0.9.8g/doc/Makefile
633@@ -0,0 +1,40 @@
634+VERSION =
635+
636+#PODS = $(wildcard *.pod)
637+#MANS = $(addsuffix .man, $(basename $(PODS)))
638+
639+MANS = openssl.1 ssl.3 crypto.3
640+
641+P2M = pod2man --center='OpenSSL Documentation' --release="OpenSSL $(VERSION)"
642+
643+all: manpages
644+
645+.PHONY: manpages
646+
647+manpages: openssl.1 crypto.3 ssl.3
648+
649+openssl.1:
650+ $(P2M) --section=1 openssl.pod > openssl.1
651+
652+crypto.3:
653+ $(P2M) --section=3 crypto.pod > crypto.3
654+
655+ssl.3:
656+ $(P2M) --section=3 ssl.pod > ssl.3
657+
658+.PHONY: install
659+install:
660+ mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man1
661+ mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
662+ install -m 644 -p openssl.1 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man1
663+ install -m 644 -p crypto.3 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
664+ install -m 644 -p ssl.3 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
665+ rm -f $(MANS)
666+
667+.PHONY: clean
668+clean:
669+ rm -f $(MANS)
670+
671+.PHONY: realclean
672+realclean:
673+ -$(MAKE) clean
674--- openssl-0.9.8g.orig/doc/apps/c_rehash.pod
675+++ openssl-0.9.8g/doc/apps/c_rehash.pod
676@@ -0,0 +1,55 @@
677+
678+=pod
679+
680+=head1 NAME
681+
682+c_rehash - Create symbolic links to files named by the hash values
683+
684+=head1 SYNOPSIS
685+
686+B<c_rehash>
687+[directory] ...
688+
689+=head1 DESCRIPTION
690+
691+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.
692+
693+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.
694+
695+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.
696+
697+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.
698+
699+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.
700+
701+The program will also warn if there are files with extension .pem which are not certificate or CRL files.
702+
703+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 (=).
704+
705+=head1 OPTIONS
706+
707+None
708+
709+=head1 ENVIRONMENT
710+
711+=over 4
712+
713+=item B<OPENSSL>
714+
715+The name (and path) of an executable to use to generate hashes and fingerprints (see above).
716+
717+=item B<SSL_CERT_DIR>
718+
719+Colon separated list of directories to operate on. Ignored if directories are listed on the command line.
720+
721+=head1 SEE ALSO
722+
723+L<openssl(1)|openssl(1)>, L<x509(1)|x509(1)>
724+
725+=back
726+
727+=head1 BUGS
728+
729+No known bugs
730+
731+=cut
732--- openssl-0.9.8g.orig/crypto/Makefile
733+++ openssl-0.9.8g/crypto/Makefile
734@@ -57,7 +57,7 @@
735 echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
736 echo '#endif' ) >buildinf.h
737
738-x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl
739+x86cpuid-elf.S: x86cpuid.pl perlasm/x86asm.pl
740 $(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
741 x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
742 $(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@
743@@ -70,7 +70,7 @@
744 uplink-cof.s: ../ms/uplink.pl
745 $(PERL) ../ms/uplink.pl coff > $@
746
747-x86_64cpuid.s: x86_64cpuid.pl
748+x86_64cpuid.S: x86_64cpuid.pl
749 $(PERL) x86_64cpuid.pl $@
750 ia64cpuid.s: ia64cpuid.S
751 $(CC) $(CFLAGS) -E ia64cpuid.S > $@
752--- openssl-0.9.8g.orig/crypto/x86cpuid.pl
753+++ openssl-0.9.8g/crypto/x86cpuid.pl
754@@ -1,4 +1,4 @@
755-#!/usr/bin/env perl
756+#!/usr/local/bin/perl
757
758 push(@INC,"perlasm");
759 require "x86asm.pl";
760--- openssl-0.9.8g.orig/crypto/opensslconf.h
761+++ openssl-0.9.8g/crypto/opensslconf.h
762@@ -10,6 +10,9 @@
763 #ifndef OPENSSL_NO_GMP
764 # define OPENSSL_NO_GMP
765 #endif
766+#ifndef OPENSSL_NO_IDEA
767+# define OPENSSL_NO_IDEA
768+#endif
769 #ifndef OPENSSL_NO_KRB5
770 # define OPENSSL_NO_KRB5
771 #endif
772@@ -25,11 +28,11 @@
773 #ifndef OPENSSL_NO_SEED
774 # define OPENSSL_NO_SEED
775 #endif
776-#ifndef OPENSSL_NO_TLSEXT
777-# define OPENSSL_NO_TLSEXT
778-#endif
779
780 #endif /* OPENSSL_DOING_MAKEDEPEND */
781+#ifndef OPENSSL_THREADS
782+# define OPENSSL_THREADS
783+#endif
784 #ifndef OPENSSL_NO_DYNAMIC_ENGINE
785 # define OPENSSL_NO_DYNAMIC_ENGINE
786 #endif
787@@ -45,6 +48,9 @@
788 # if defined(OPENSSL_NO_GMP) && !defined(NO_GMP)
789 # define NO_GMP
790 # endif
791+# if defined(OPENSSL_NO_IDEA) && !defined(NO_IDEA)
792+# define NO_IDEA
793+# endif
794 # if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
795 # define NO_KRB5
796 # endif
797@@ -60,11 +66,10 @@
798 # if defined(OPENSSL_NO_SEED) && !defined(NO_SEED)
799 # define NO_SEED
800 # endif
801-# if defined(OPENSSL_NO_TLSEXT) && !defined(NO_TLSEXT)
802-# define NO_TLSEXT
803-# endif
804 #endif
805
806+#define OPENSSL_CPUID_OBJ
807+
808 /* crypto/opensslconf.h.in */
809
810 /* Generate 80386 code? */
811@@ -72,8 +77,8 @@
812
813 #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
814 #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
815-#define ENGINESDIR "/usr/local/ssl/lib/engines"
816-#define OPENSSLDIR "/usr/local/ssl"
817+#define ENGINESDIR "/usr/lib/ssl/engines"
818+#define OPENSSLDIR "/usr/lib/ssl"
819 #endif
820 #endif
821
822@@ -104,14 +109,14 @@
823 * - Intel P6 because partial register stalls are very expensive;
824 * - elder Alpha because it lacks byte load/store instructions;
825 */
826-#define RC4_INT unsigned int
827+#define RC4_INT unsigned char
828 #endif
829 #if !defined(RC4_CHUNK)
830 /*
831 * This enables code handling data aligned at natural CPU word
832 * boundary. See crypto/rc4/rc4_enc.c for further details.
833 */
834-#undef RC4_CHUNK
835+#define RC4_CHUNK unsigned long
836 #endif
837 #endif
838
839@@ -119,7 +124,7 @@
840 /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
841 * %20 speed up (longs are 8 bytes, int's are 4). */
842 #ifndef DES_LONG
843-#define DES_LONG unsigned long
844+#define DES_LONG unsigned int
845 #endif
846 #endif
847
848@@ -133,9 +138,9 @@
849 /* The prime number generation stuff may not work when
850 * EIGHT_BIT but I don't care since I've only used this mode
851 * for debuging the bignum libraries */
852-#undef SIXTY_FOUR_BIT_LONG
853+#define SIXTY_FOUR_BIT_LONG
854 #undef SIXTY_FOUR_BIT
855-#define THIRTY_TWO_BIT
856+#undef THIRTY_TWO_BIT
857 #undef SIXTEEN_BIT
858 #undef EIGHT_BIT
859 #endif
860@@ -149,7 +154,7 @@
861
862 #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
863 #define CONFIG_HEADER_BF_LOCL_H
864-#undef BF_PTR
865+#define BF_PTR2
866 #endif /* HEADER_BF_LOCL_H */
867
868 #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
869@@ -179,7 +184,7 @@
870 /* Unroll the inner loop, this sometimes helps, sometimes hinders.
871 * Very mucy CPU dependant */
872 #ifndef DES_UNROLL
873-#undef DES_UNROLL
874+#define DES_UNROLL
875 #endif
876
877 /* These default values were supplied by
878--- openssl-0.9.8g.orig/crypto/x86_64cpuid.pl
879+++ openssl-0.9.8g/crypto/x86_64cpuid.pl
880@@ -1,4 +1,4 @@
881-#!/usr/bin/env perl
882+#!/usr/local/bin/perl
883
884 $output=shift;
885 $win64a=1 if ($output =~ /win64a\.[s|asm]/);
886@@ -134,5 +134,9 @@
887 .size OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid
888
889 .section .init
890+#ifdef OPENSSL_PIC
891+ call OPENSSL_cpuid_setup\@PLT
892+#else
893 call OPENSSL_cpuid_setup
894+#endif
895 ___
896--- openssl-0.9.8g.orig/crypto/md5/asm/md5-x86_64.pl
897+++ openssl-0.9.8g/crypto/md5/asm/md5-x86_64.pl
898@@ -1,4 +1,4 @@
899-#!/usr/bin/perl -w
900+#!/usr/local/bin/perl
901 #
902 # MD5 optimized for AMD64.
903 #
904--- openssl-0.9.8g.orig/crypto/md5/asm/md5-sparcv9.S
905+++ openssl-0.9.8g/crypto/md5/asm/md5-sparcv9.S
906@@ -74,14 +74,14 @@
907 #define Dval R8
908
909 #if defined(MD5_BLOCK_DATA_ORDER)
910-# if defined(OPENSSL_SYSNAME_ULTRASPARC)
911+/*# if defined(OPENSSL_SYSNAME_ULTRASPARC)*/
912 # define LOAD lda
913 # define X(i) [%i1+i*4]%asi
914 # define md5_block md5_block_asm_data_order_aligned
915 # define ASI_PRIMARY_LITTLE 0x88
916-# else
917+/*# else
918 # error "MD5_BLOCK_DATA_ORDER is supported only on UltraSPARC!"
919-# endif
920+# endif*/
921 #else
922 # define LOAD ld
923 # define X(i) [%i1+i*4]
924--- openssl-0.9.8g.orig/crypto/sha/sha.h
925+++ openssl-0.9.8g/crypto/sha/sha.h
926@@ -59,6 +59,7 @@
927 #ifndef HEADER_SHA_H
928 #define HEADER_SHA_H
929
930+#include <stddef.h>
931 #include <openssl/e_os2.h>
932 #include <stddef.h>
933
934--- openssl-0.9.8g.orig/crypto/sha/asm/sha1-ia64.pl
935+++ openssl-0.9.8g/crypto/sha/asm/sha1-ia64.pl
936@@ -1,4 +1,4 @@
937-#!/usr/bin/env perl
938+#!/usr/local/bin/perl
939 #
940 # ====================================================================
941 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
942--- openssl-0.9.8g.orig/crypto/sha/asm/sha512-sse2.pl
943+++ openssl-0.9.8g/crypto/sha/asm/sha512-sse2.pl
944@@ -1,4 +1,4 @@
945-#!/usr/bin/env perl
946+#!/usr/local/bin/perl
947 #
948 # ====================================================================
949 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
950--- openssl-0.9.8g.orig/crypto/sha/asm/sha512-ia64.pl
951+++ openssl-0.9.8g/crypto/sha/asm/sha512-ia64.pl
952@@ -1,4 +1,4 @@
953-#!/usr/bin/env perl
954+#!/usr/local/bin/perl
955 #
956 # ====================================================================
957 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
958--- openssl-0.9.8g.orig/crypto/rand/md_rand.c
959+++ openssl-0.9.8g/crypto/rand/md_rand.c
960@@ -465,8 +465,10 @@
961 MD_Update(&m,local_md,MD_DIGEST_LENGTH);
962 MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c));
963 #ifndef PURIFY
964+#if 0 /* Don't add uninitialised data. */
965 MD_Update(&m,buf,j); /* purify complains */
966 #endif
967+#endif
968 k=(st_idx+MD_DIGEST_LENGTH/2)-st_num;
969 if (k > 0)
970 {
971--- openssl-0.9.8g.orig/crypto/des/asm/desboth.pl
972+++ openssl-0.9.8g/crypto/des/asm/desboth.pl
973@@ -16,6 +16,11 @@
974
975 &push("edi");
976
977+ &call (&label("pic_point0"));
978+ &set_label("pic_point0");
979+ &blindpop("ebp");
980+ &add ("ebp", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
981+
982 &comment("");
983 &comment("Load the data words");
984 &mov($L,&DWP(0,"ebx","",0));
985@@ -47,15 +52,21 @@
986 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
987 &mov(&swtmp(1), "eax");
988 &mov(&swtmp(0), "ebx");
989- &call("DES_encrypt2");
990+ &exch("ebx", "ebp");
991+ &call("DES_encrypt2\@PLT");
992+ &exch("ebx", "ebp");
993 &mov(&swtmp(2), (DWC(($enc)?"0":"1")));
994 &mov(&swtmp(1), "edi");
995 &mov(&swtmp(0), "ebx");
996- &call("DES_encrypt2");
997+ &exch("ebx", "ebp");
998+ &call("DES_encrypt2\@PLT");
999+ &exch("ebx", "ebp");
1000 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
1001 &mov(&swtmp(1), "esi");
1002 &mov(&swtmp(0), "ebx");
1003- &call("DES_encrypt2");
1004+ &exch("ebx", "ebp");
1005+ &call("DES_encrypt2\@PLT");
1006+ &exch("ebx", "ebp");
1007
1008 &stack_pop(3);
1009 &mov($L,&DWP(0,"ebx","",0));
1010--- openssl-0.9.8g.orig/crypto/rc4/asm/rc4-x86_64.pl
1011+++ openssl-0.9.8g/crypto/rc4/asm/rc4-x86_64.pl
1012@@ -1,4 +1,4 @@
1013-#!/usr/bin/env perl
1014+#!/usr/local/bin/perl
1015 #
1016 # ====================================================================
1017 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
1018--- openssl-0.9.8g.orig/crypto/perlasm/x86unix.pl
1019+++ openssl-0.9.8g/crypto/perlasm/x86unix.pl
1020@@ -399,6 +399,29 @@
1021 $stack=4;
1022 }
1023
1024+sub main'function_begin_B_static
1025+ {
1026+ local($func,$extra)=@_;
1027+
1028+ &main'external_label($func);
1029+ $func=$under.$func;
1030+
1031+ local($tmp)=<<"EOF";
1032+.text
1033+EOF
1034+ push(@out,$tmp);
1035+ if ($main'cpp)
1036+ { push(@out,"TYPE($func,\@function)\n"); }
1037+ elsif ($main'coff)
1038+ { $tmp=push(@out,".def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); }
1039+ elsif ($main'aout and !$main'pic)
1040+ { }
1041+ else { push(@out,".type $func,\@function\n"); }
1042+ push(@out,".align\t$align\n");
1043+ push(@out,"$func:\n");
1044+ $stack=4;
1045+ }
1046+
1047 sub main'function_end
1048 {
1049 local($func)=@_;
1050@@ -730,7 +753,17 @@
1051 {
1052 $tmp=<<___;
1053 .section .init
1054+#ifdef OPENSSL_PIC
1055+ pushl %ebx
1056+ call .pic_point0
1057+.pic_point0:
1058+ popl %ebx
1059+ addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx
1060+ call $under$f\@PLT
1061+ popl %ebx
1062+#else
1063 call $under$f
1064+#endif
1065 jmp .Linitalign
1066 .align $align
1067 .Linitalign:
1068--- openssl-0.9.8g.orig/crypto/perlasm/cbc.pl
1069+++ openssl-0.9.8g/crypto/perlasm/cbc.pl
1070@@ -122,7 +122,11 @@
1071 &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
1072 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
1073
1074- &call($enc_func);
1075+ &call (&label("pic_point0"));
1076+ &set_label("pic_point0");
1077+ &blindpop("ebx");
1078+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
1079+ &call("$enc_func\@PLT");
1080
1081 &mov("eax", &DWP($data_off,"esp","",0));
1082 &mov("ebx", &DWP($data_off+4,"esp","",0));
1083@@ -187,7 +191,11 @@
1084 &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
1085 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
1086
1087- &call($enc_func);
1088+ &call (&label("pic_point1"));
1089+ &set_label("pic_point1");
1090+ &blindpop("ebx");
1091+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point1") . "]");
1092+ &call("$enc_func\@PLT");
1093
1094 &mov("eax", &DWP($data_off,"esp","",0));
1095 &mov("ebx", &DWP($data_off+4,"esp","",0));
1096@@ -220,7 +228,11 @@
1097 &mov(&DWP($data_off,"esp","",0), "eax"); # put back
1098 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
1099
1100- &call($dec_func);
1101+ &call (&label("pic_point2"));
1102+ &set_label("pic_point2");
1103+ &blindpop("ebx");
1104+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point2") . "]");
1105+ &call("$dec_func\@PLT");
1106
1107 &mov("eax", &DWP($data_off,"esp","",0)); # get return
1108 &mov("ebx", &DWP($data_off+4,"esp","",0)); #
1109@@ -263,7 +275,11 @@
1110 &mov(&DWP($data_off,"esp","",0), "eax"); # put back
1111 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
1112
1113- &call($dec_func);
1114+ &call (&label("pic_point3"));
1115+ &set_label("pic_point3");
1116+ &blindpop("ebx");
1117+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point3") . "]");
1118+ &call("$dec_func\@PLT");
1119
1120 &mov("eax", &DWP($data_off,"esp","",0)); # get return
1121 &mov("ebx", &DWP($data_off+4,"esp","",0)); #
1122--- openssl-0.9.8g.orig/crypto/perlasm/x86_64-xlate.pl
1123+++ openssl-0.9.8g/crypto/perlasm/x86_64-xlate.pl
1124@@ -1,4 +1,4 @@
1125-#!/usr/bin/env perl
1126+#!/usr/local/bin/perl
1127
1128 # Ascetic x86_64 AT&T to MASM assembler translator by <appro>.
1129 #
1130--- openssl-0.9.8g.orig/crypto/pkcs7/pk7_mime.c
1131+++ openssl-0.9.8g/crypto/pkcs7/pk7_mime.c
1132@@ -335,9 +335,9 @@
1133
1134 if(strcmp(hdr->value, "application/x-pkcs7-signature") &&
1135 strcmp(hdr->value, "application/pkcs7-signature")) {
1136- sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
1137 PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_SIG_INVALID_MIME_TYPE);
1138 ERR_add_error_data(2, "type: ", hdr->value);
1139+ sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
1140 sk_BIO_pop_free(parts, BIO_vfree);
1141 return NULL;
1142 }
1143--- openssl-0.9.8g.orig/crypto/bn/asm/ppc.pl
1144+++ openssl-0.9.8g/crypto/bn/asm/ppc.pl
1145@@ -1,4 +1,4 @@
1146-#!/usr/bin/env perl
1147+#!/usr/local/bin/perl
1148 #
1149 # Implemented as a Perl wrapper as we want to support several different
1150 # architectures with single file. We pick up the target based on the
1151--- openssl-0.9.8g.orig/crypto/aes/asm/aes-586.pl
1152+++ openssl-0.9.8g/crypto/aes/asm/aes-586.pl
1153@@ -1,4 +1,4 @@
1154-#!/usr/bin/env perl
1155+#!/usr/local/bin/perl
1156 #
1157 # ====================================================================
1158 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
1159@@ -250,7 +250,7 @@
1160 sub _data_word() { my $i; while(defined($i=shift)) { &data_word($i,$i); } }
1161
1162 &public_label("AES_Te");
1163-&function_begin_B("_x86_AES_encrypt");
1164+&function_begin_B_static("_x86_AES_encrypt");
1165 if ($vertical_spin) {
1166 # I need high parts of volatile registers to be accessible...
1167 &exch ($s1="edi",$key="ebx");
1168@@ -539,7 +539,7 @@
1169 }
1170
1171 &public_label("AES_Td");
1172-&function_begin_B("_x86_AES_decrypt");
1173+&function_begin_B_static("_x86_AES_decrypt");
1174 # note that caller is expected to allocate stack frame for me!
1175 &mov (&DWP(12,"esp"),$key); # save key
1176
1177@@ -1460,15 +1460,22 @@
1178 &public_label("AES_Td");
1179 &public_label("AES_Te");
1180 &function_begin_B("AES_set_decrypt_key");
1181+ &push ("ebx");
1182 &mov ("eax",&wparam(0));
1183 &mov ("ecx",&wparam(1));
1184 &mov ("edx",&wparam(2));
1185 &sub ("esp",12);
1186+
1187+ &call (&label("pic_point0"));
1188+ &set_label("pic_point0");
1189+ &blindpop("ebx");
1190+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
1191 &mov (&DWP(0,"esp"),"eax");
1192 &mov (&DWP(4,"esp"),"ecx");
1193 &mov (&DWP(8,"esp"),"edx");
1194- &call ("AES_set_encrypt_key");
1195+ &call ("AES_set_encrypt_key\@PLT");
1196 &add ("esp",12);
1197+ &pop ("ebx");
1198 &cmp ("eax",0);
1199 &je (&label("proceed"));
1200 &ret ();
1201--- openssl-0.9.8g.orig/crypto/asn1/charmap.pl
1202+++ openssl-0.9.8g/crypto/asn1/charmap.pl
1203@@ -1,4 +1,4 @@
1204-#!/usr/local/bin/perl -w
1205+#!/usr/local/bin/perl
1206
1207 use strict;
1208
1209--- openssl-0.9.8g.orig/util/mkerr.pl
1210+++ openssl-0.9.8g/util/mkerr.pl
1211@@ -1,4 +1,4 @@
1212-#!/usr/local/bin/perl -w
1213+#!/usr/local/bin/perl
1214
1215 my $config = "crypto/err/openssl.ec";
1216 my $debug = 0;
1217--- openssl-0.9.8g.orig/util/clean-depend.pl
1218+++ openssl-0.9.8g/util/clean-depend.pl
1219@@ -1,4 +1,4 @@
1220-#!/usr/local/bin/perl -w
1221+#!/usr/local/bin/perl
1222 # Clean the dependency list in a makefile of standard includes...
1223 # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
1224
1225--- openssl-0.9.8g.orig/util/extract-names.pl
1226+++ openssl-0.9.8g/util/extract-names.pl
1227@@ -1,4 +1,4 @@
1228-#!/usr/bin/perl
1229+#!/usr/local/bin/perl
1230
1231 $/ = ""; # Eat a paragraph at once.
1232 while(<STDIN>) {
1233--- openssl-0.9.8g.orig/util/pod2man.pl
1234+++ openssl-0.9.8g/util/pod2man.pl
1235@@ -1,4 +1,4 @@
1236-: #!/usr/bin/perl-5.005
1237+#!/usr/local/bin/perl
1238 eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
1239 if $running_under_some_shell;
1240
1241--- openssl-0.9.8g.orig/util/mkstack.pl
1242+++ openssl-0.9.8g/util/mkstack.pl
1243@@ -1,4 +1,4 @@
1244-#!/usr/local/bin/perl -w
1245+#!/usr/local/bin/perl
1246
1247 # This is a utility that searches out "DECLARE_STACK_OF()"
1248 # declarations in .h and .c files, and updates/creates/replaces
1249--- openssl-0.9.8g.orig/util/selftest.pl
1250+++ openssl-0.9.8g/util/selftest.pl
1251@@ -1,4 +1,4 @@
1252-#!/usr/local/bin/perl -w
1253+#!/usr/local/bin/perl
1254 #
1255 # Run the test suite and generate a report
1256 #
1257--- openssl-0.9.8g.orig/util/extract-section.pl
1258+++ openssl-0.9.8g/util/extract-section.pl
1259@@ -1,4 +1,4 @@
1260-#!/usr/bin/perl
1261+#!/usr/local/bin/perl
1262
1263 while(<STDIN>) {
1264 if (/=for\s+comment\s+openssl_manual_section:(\S+)/)
1265--- openssl-0.9.8g.orig/util/mkdef.pl
1266+++ openssl-0.9.8g/util/mkdef.pl
1267@@ -1,4 +1,4 @@
1268-#!/usr/local/bin/perl -w
1269+#!/usr/local/bin/perl
1270 #
1271 # generate a .def file
1272 #
1273--- openssl-0.9.8g.orig/util/pl/netware.pl
1274+++ openssl-0.9.8g/util/pl/netware.pl
1275@@ -1,4 +1,4 @@
1276-# Metrowerks Codewarrior for NetWare
1277+#!/usr/local/bin/perl
1278 #
1279
1280 # The import files and other misc imports needed to link
diff --git a/meta/packages/openssl/openssl-0.9.8g/fix-md5-x86_64.patch b/meta/packages/openssl/openssl-0.9.8g/fix-md5-x86_64.patch
deleted file mode 100644
index 05b48ab110..0000000000
--- a/meta/packages/openssl/openssl-0.9.8g/fix-md5-x86_64.patch
+++ /dev/null
@@ -1,47 +0,0 @@
1Fix for building md5-x86_64.pl with recent gcc and binutils (as first discovered
2on my Fedora 13 machine).
3
4Patch taken from upstream bug tracker:
5http://rt.openssl.org/Ticket/Display.html?id=2094&user=guest&pass=guest
6
7This issue is marked as resolved upstream (on 13/11/2009) so we should be able
8to remove this patch when we update openssl.
9
10JL - 07/05/2010
11
12Index: openssl-0.9.8g/crypto/md5/asm/md5-x86_64.pl
13===================================================================
14--- openssl-0.9.8g.orig/crypto/md5/asm/md5-x86_64.pl 2010-05-07 00:24:16.000000000 +0100
15+++ openssl-0.9.8g/crypto/md5/asm/md5-x86_64.pl 2010-05-07 00:26:25.639809341 +0100
16@@ -19,6 +19,7 @@
17 sub round1_step
18 {
19 my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
20+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
21 $code .= " mov 0*4(%rsi), %r10d /* (NEXT STEP) X[0] */\n" if ($pos == -1);
22 $code .= " mov %edx, %r11d /* (NEXT STEP) z' = %edx */\n" if ($pos == -1);
23 $code .= <<EOF;
24@@ -42,6 +43,7 @@
25 sub round2_step
26 {
27 my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
28+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
29 $code .= " mov 1*4(%rsi), %r10d /* (NEXT STEP) X[1] */\n" if ($pos == -1);
30 $code .= " mov %ecx, %r11d /* (NEXT STEP) y' = %ecx */\n" if ($pos == -1);
31 $code .= <<EOF;
32@@ -65,6 +67,7 @@
33 sub round3_step
34 {
35 my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
36+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
37 $code .= " mov 5*4(%rsi), %r10d /* (NEXT STEP) X[5] */\n" if ($pos == -1);
38 $code .= " mov %ecx, %r11d /* (NEXT STEP) y' = %ecx */\n" if ($pos == -1);
39 $code .= <<EOF;
40@@ -87,6 +90,7 @@
41 sub round4_step
42 {
43 my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
44+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
45 $code .= " mov 0*4(%rsi), %r10d /* (NEXT STEP) X[0] */\n" if ($pos == -1);
46 $code .= " mov \$0xffffffff, %r11d\n" if ($pos == -1);
47 $code .= " xor %edx, %r11d /* (NEXT STEP) not z' = not %edx*/\n"
diff --git a/meta/packages/openssl/openssl-0.9.8g/shared-libs.patch b/meta/packages/openssl/openssl-0.9.8g/shared-libs.patch
deleted file mode 100644
index db98582443..0000000000
--- a/meta/packages/openssl/openssl-0.9.8g/shared-libs.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1diff -urN openssl-0.9.8g.orig/crypto/Makefile openssl-0.9.8g/crypto/Makefile
2--- openssl-0.9.8g.orig/crypto/Makefile 2006-02-04 02:48:41.000000000 +0100
3+++ openssl-0.9.8g/crypto/Makefile 2008-05-12 15:17:03.000000000 +0200
4@@ -103,7 +103,7 @@
5
6 shared: buildinf.h lib subdirs
7 if [ -n "$(SHARED_LIBS)" ]; then \
8- (cd ..; $(MAKE) $(SHARED_LIB)); \
9+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
10 fi
11
12 libs:
13diff -urN openssl-0.9.8g.orig/Makefile.org openssl-0.9.8g/Makefile.org
14--- openssl-0.9.8g.orig/Makefile.org 2007-04-24 01:49:54.000000000 +0200
15+++ openssl-0.9.8g/Makefile.org 2008-05-12 15:16:34.000000000 +0200
16@@ -246,7 +246,7 @@
17
18 libcrypto$(SHLIB_EXT): libcrypto.a
19 @if [ "$(SHLIB_TARGET)" != "" ]; then \
20- $(MAKE) SHLIBDIRS=crypto build-shared; \
21+ $(MAKE) -e SHLIBDIRS=crypto build-shared; \
22 else \
23 echo "There's no support for shared libraries on this platform" >&2; \
24 exit 1; \
25@@ -254,7 +254,7 @@
26
27 libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
28 @if [ "$(SHLIB_TARGET)" != "" ]; then \
29- $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
30+ $(MAKE) -e SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
31 else \
32 echo "There's no support for shared libraries on this platform" >&2; \
33 exit 1; \
34diff -urN openssl-0.9.8g.orig/ssl/Makefile openssl-0.9.8g/ssl/Makefile
35--- openssl-0.9.8g.orig/ssl/Makefile 2007-10-11 16:36:59.000000000 +0200
36+++ openssl-0.9.8g/ssl/Makefile 2008-05-12 15:17:26.000000000 +0200
37@@ -62,7 +62,7 @@
38
39 shared: lib
40 if [ -n "$(SHARED_LIBS)" ]; then \
41- (cd ..; $(MAKE) $(SHARED_LIB)); \
42+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
43 fi
44
45 files:
diff --git a/meta/packages/openssl/openssl-0.9.8g/configure-targets.patch b/meta/packages/openssl/openssl-0.9.8o/configure-targets.patch
index b68123a233..b68123a233 100644
--- a/meta/packages/openssl/openssl-0.9.8g/configure-targets.patch
+++ b/meta/packages/openssl/openssl-0.9.8o/configure-targets.patch
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/ca.patch b/meta/packages/openssl/openssl-0.9.8o/debian/ca.patch
new file mode 100644
index 0000000000..761eebe510
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/ca.patch
@@ -0,0 +1,20 @@
1Index: openssl-0.9.8m/apps/CA.pl.in
2===================================================================
3--- openssl-0.9.8m.orig/apps/CA.pl.in 2006-04-28 00:28:51.000000000 +0000
4+++ openssl-0.9.8m/apps/CA.pl.in 2010-02-27 00:36:51.000000000 +0000
5@@ -65,6 +65,7 @@
6 foreach (@ARGV) {
7 if ( /^(-\?|-h|-help)$/ ) {
8 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
9+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
10 exit 0;
11 } elsif (/^-newcert$/) {
12 # create a certificate
13@@ -165,6 +166,7 @@
14 } else {
15 print STDERR "Unknown arg $_\n";
16 print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
17+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
18 exit 1;
19 }
20 }
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/config-hurd.patch b/meta/packages/openssl/openssl-0.9.8o/debian/config-hurd.patch
new file mode 100644
index 0000000000..21b7935dde
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/config-hurd.patch
@@ -0,0 +1,15 @@
1Index: openssl-0.9.8k/config
2===================================================================
3--- openssl-0.9.8k.orig/config 2009-02-16 09:43:41.000000000 +0100
4+++ openssl-0.9.8k/config 2009-07-19 11:32:41.000000000 +0200
5@@ -162,8 +162,8 @@
6 echo "${MACHINE}-whatever-linux1"; exit 0
7 ;;
8
9- GNU*)
10- echo "hurd-x86"; exit 0;
11+ GNU:*|GNU/*:*)
12+ echo "${MACHINE}-gnuish"; exit 0;
13 ;;
14
15 LynxOS:*)
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/debian-targets.patch b/meta/packages/openssl/openssl-0.9.8o/debian/debian-targets.patch
new file mode 100644
index 0000000000..fed47341ea
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/debian-targets.patch
@@ -0,0 +1,54 @@
1Index: openssl-0.9.8k/Configure
2===================================================================
3--- openssl-0.9.8k.orig/Configure 2009-12-09 16:09:41.000000000 +0000
4+++ openssl-0.9.8k/Configure 2009-12-09 16:09:55.000000000 +0000
5@@ -320,6 +320,49 @@
6 "osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared:::.so",
7 "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",
8
9+# Debian GNU/* (various architectures)
10+"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)",
11+"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)",
12+"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)",
13+"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)",
14+"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)",
15+"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)",
16+#"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)",
17+"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_linux}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
18+"debian-avr32", "gcc:-DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG_BF_PTR::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
19+"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)",
20+#"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)",
21+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
22+"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)",
23+"debian-hurd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -mtune=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
24+"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)",
25+#"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",
26+"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)",
27+"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)",
28+"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)",
29+"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)",
30+"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)",
31+"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)",
32+"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)",
33+"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)",
34+"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)",
35+"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)",
36+"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)",
37+"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)",
38+"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)",
39+"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)",
40+"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)",
41+"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)",
42+"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)",
43+"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)",
44+"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)",
45+"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)",
46+"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)",
47+"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)",
48+"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)",
49+"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:::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
50+"debian-sparc64","gcc:-m64 -DB_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DULTRASPARC -DBN_DIV2W::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL BF_PTR:::des_enc-sparc.o fcrypt_b.o:::::::::dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
51+
52 ####
53 #### Variety of LINUX:-)
54 ####
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/engines-path.patch b/meta/packages/openssl/openssl-0.9.8o/debian/engines-path.patch
new file mode 100644
index 0000000000..49400ff6e1
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/engines-path.patch
@@ -0,0 +1,47 @@
1Index: openssl-0.9.8m/Makefile.org
2===================================================================
3--- openssl-0.9.8m.orig/Makefile.org 2010-01-27 16:06:36.000000000 +0000
4+++ openssl-0.9.8m/Makefile.org 2010-02-27 00:43:04.000000000 +0000
5@@ -620,7 +620,7 @@
6 install_sw:
7 @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
8 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
9- $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
10+ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines \
11 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
12 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
13 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
14Index: openssl-0.9.8m/engines/Makefile
15===================================================================
16--- openssl-0.9.8m.orig/engines/Makefile 2009-11-10 01:53:02.000000000 +0000
17+++ openssl-0.9.8m/engines/Makefile 2010-02-27 00:45:03.000000000 +0000
18@@ -101,13 +101,13 @@
19 *DSO_DL*) sfx="sl";; \
20 *) sfx="bad";; \
21 esac; \
22- cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
23+ cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new; \
24 else \
25 sfx="so"; \
26 cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
27 fi; \
28- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
29- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx ); \
30+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new; \
31+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx ); \
32 done; \
33 fi
34
35Index: openssl-0.9.8m/Configure
36===================================================================
37--- openssl-0.9.8m.orig/Configure 2010-02-27 00:40:42.000000000 +0000
38+++ openssl-0.9.8m/Configure 2010-02-27 00:46:47.000000000 +0000
39@@ -1738,7 +1738,7 @@
40 # $foo is to become "$prefix/lib$multilib/engines";
41 # as Makefile.org and engines/Makefile are adapted for
42 # $multilib suffix.
43- my $foo = "$prefix/lib/engines";
44+ my $foo = "$prefix/lib/ssl/engines";
45 $foo =~ s/\\/\\\\/g;
46 print OUT "#define ENGINESDIR \"$foo\"\n";
47 }
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch b/meta/packages/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch
new file mode 100644
index 0000000000..da97186886
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/kfreebsd-pipe.patch
@@ -0,0 +1,13 @@
1Index: openssl-0.9.8k/crypto/perlasm/x86_64-xlate.pl
2===================================================================
3--- openssl-0.9.8k.orig/crypto/perlasm/x86_64-xlate.pl 2008-02-13 21:01:48.000000000 +0100
4+++ openssl-0.9.8k/crypto/perlasm/x86_64-xlate.pl 2009-07-19 11:37:23.000000000 +0200
5@@ -62,7 +62,7 @@
6 my ($outdev,$outino,@junk)=stat($output);
7
8 open STDOUT,">$output" || die "can't open $output: $!"
9- if ($stddev!=$outdev || $stdino!=$outino);
10+# if ($stddev!=$outdev || $stdino!=$outino);
11 }
12
13 my $masmref=8 + 50727*2**-32; # 8.00.50727 shipped with VS2005
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/make-targets.patch b/meta/packages/openssl/openssl-0.9.8o/debian/make-targets.patch
new file mode 100644
index 0000000000..b1239728e7
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/make-targets.patch
@@ -0,0 +1,13 @@
1Index: openssl-0.9.8k/Makefile.org
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:32:41.000000000 +0200
4+++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:31.000000000 +0200
5@@ -131,7 +131,7 @@
6
7 BASEADDR=
8
9-DIRS= crypto fips ssl engines apps test tools
10+DIRS= crypto fips ssl engines apps tools
11 SHLIBDIRS= crypto ssl fips
12
13 # dirs in crypto to build
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/man-dir.patch b/meta/packages/openssl/openssl-0.9.8o/debian/man-dir.patch
new file mode 100644
index 0000000000..29563ecf59
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/man-dir.patch
@@ -0,0 +1,13 @@
1Index: openssl-0.9.8k/Makefile.org
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:32:41.000000000 +0200
4+++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:29.000000000 +0200
5@@ -152,7 +152,7 @@
6
7 MAKEFILE= Makefile
8
9-MANDIR=$(OPENSSLDIR)/man
10+MANDIR=/usr/share/man
11 MAN1=1
12 MAN3=3
13 MANSUFFIX=
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/man-section.patch b/meta/packages/openssl/openssl-0.9.8o/debian/man-section.patch
new file mode 100644
index 0000000000..fe20ab0444
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/man-section.patch
@@ -0,0 +1,32 @@
1Index: openssl-0.9.8k/Makefile.org
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:34:06.000000000 +0200
4+++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:21.000000000 +0200
5@@ -155,7 +155,8 @@
6 MANDIR=/usr/share/man
7 MAN1=1
8 MAN3=3
9-MANSUFFIX=
10+MANSUFFIX=ssl
11+MANSECTION=SSL
12 SHELL=/bin/sh
13
14 TOP= .
15@@ -694,7 +695,7 @@
16 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
17 (cd `$(PERL) util/dirname.pl $$i`; \
18 sh -c "$$pod2man \
19- --section=$$sec --center=OpenSSL \
20+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
21 --release=$(VERSION) `basename $$i`") \
22 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
23 $(PERL) util/extract-names.pl < $$i | \
24@@ -711,7 +712,7 @@
25 echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
26 (cd `$(PERL) util/dirname.pl $$i`; \
27 sh -c "$$pod2man \
28- --section=$$sec --center=OpenSSL \
29+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
30 --release=$(VERSION) `basename $$i`") \
31 > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
32 $(PERL) util/extract-names.pl < $$i | \
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/no-rpath.patch b/meta/packages/openssl/openssl-0.9.8o/debian/no-rpath.patch
new file mode 100644
index 0000000000..3ebc9accca
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/no-rpath.patch
@@ -0,0 +1,13 @@
1Index: openssl-0.9.8k/Makefile.shared
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.shared 2008-09-17 17:56:40.000000000 +0200
4+++ openssl-0.9.8k/Makefile.shared 2009-07-19 11:37:25.000000000 +0200
5@@ -151,7 +151,7 @@
6 NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
7 SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
8
9-DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
10+DO_GNU_APP=LDFLAGS="$(CFLAGS)"
11
12 #This is rather special. It's a special target with which one can link
13 #applications without bothering with any features that have anything to
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/no-symbolic.patch b/meta/packages/openssl/openssl-0.9.8o/debian/no-symbolic.patch
new file mode 100644
index 0000000000..2504fa791e
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/no-symbolic.patch
@@ -0,0 +1,13 @@
1Index: openssl-0.9.8k/Makefile.shared
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.shared 2009-07-19 11:35:02.000000000 +0200
4+++ openssl-0.9.8k/Makefile.shared 2009-07-19 11:35:48.000000000 +0200
5@@ -149,7 +149,7 @@
6 SHLIB_SUFFIX=; \
7 ALLSYMSFLAGS='-Wl,--whole-archive'; \
8 NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
9- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
10+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
11
12 DO_GNU_APP=LDFLAGS="$(CFLAGS)"
13
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/perl-path.diff b/meta/packages/openssl/openssl-0.9.8o/debian/perl-path.diff
new file mode 100644
index 0000000000..a72f938d82
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/perl-path.diff
@@ -0,0 +1,760 @@
1From: Kurt Roeckx <kurt@roeckx.be>
2Subject: Change the perl path's to /usr/bin/perl
3
4This is the result of running:
5perl util/perlpath.pl /usr/bin
6
7The upstream sources have this set to various different paths.
8
9--- openssl-0.9.8m.orig/Configure
10+++ openssl-0.9.8m/Configure
11@@ -1,4 +1,4 @@
12-:
13+#!/usr/bin/perl
14 eval 'exec perl -S $0 ${1+"$@"}'
15 if $running_under_some_shell;
16 ##
17--- openssl-0.9.8m.orig/VMS/VMSify-conf.pl
18+++ openssl-0.9.8m/VMS/VMSify-conf.pl
19@@ -1,4 +1,4 @@
20-#! /usr/bin/perl
21+#!/usr/bin/perl
22
23 use strict;
24 use warnings;
25--- openssl-0.9.8m.orig/Netware/do_tests.pl
26+++ openssl-0.9.8m/Netware/do_tests.pl
27@@ -1,4 +1,4 @@
28-# perl script to run OpenSSL tests
29+#!/usr/bin/perl
30
31
32 my $base_path = "\\openssl";
33--- openssl-0.9.8m.orig/apps/progs.pl
34+++ openssl-0.9.8m/apps/progs.pl
35@@ -1,4 +1,4 @@
36-#!/usr/local/bin/perl
37+#!/usr/bin/perl
38
39 print "/* apps/progs.h */\n";
40 print "/* automatically generated by progs.pl for openssl.c */\n\n";
41--- openssl-0.9.8m.orig/os2/backwardify.pl
42+++ openssl-0.9.8m/os2/backwardify.pl
43@@ -1,4 +1,4 @@
44-#!/usr/bin/perl -w
45+#!/usr/bin/perl
46 use strict;
47
48 # Use as $0
49--- openssl-0.9.8m.orig/times/091/mips-rel.pl
50+++ openssl-0.9.8m/times/091/mips-rel.pl
51@@ -1,4 +1,4 @@
52-#!/usr/local/bin/perl
53+#!/usr/bin/perl
54
55 &doit(100,"Pentium 100 32",0.0195,0.1000,0.6406,4.6100); # pentium-100
56 &doit(200,"PPro 200 32",0.0070,0.0340,0.2087,1.4700); # pentium-100
57--- openssl-0.9.8m.orig/fips/mkfipsscr.pl
58+++ openssl-0.9.8m/fips/mkfipsscr.pl
59@@ -1,4 +1,4 @@
60-#!/usr/local/bin/perl -w
61+#!/usr/bin/perl
62 # Quick & dirty utility to generate a script for executing the
63 # FIPS 140-2 CMVP algorithm tests based on the pathnames of
64 # input algorithm test files actually present (the unqualified
65--- openssl-0.9.8m.orig/fips/fipsalgtest.pl
66+++ openssl-0.9.8m/fips/fipsalgtest.pl
67@@ -1,4 +1,4 @@
68-#!/usr/bin/perl -w
69+#!/usr/bin/perl
70 # Perl utility to run or verify FIPS 140-2 CMVP algorithm tests based on the
71 # pathnames of input algorithm test files actually present (the unqualified
72 # file names are consistent but the pathnames are not).
73--- openssl-0.9.8m.orig/ms/uplink.pl
74+++ openssl-0.9.8m/ms/uplink.pl
75@@ -1,4 +1,4 @@
76-#!/usr/bin/env perl
77+#!/usr/bin/perl
78 #
79 # For Microsoft CL this is implemented as inline assembler. So that
80 # even though this script can generate even Win32 code, we'll be
81--- openssl-0.9.8m.orig/ms/segrenam.pl
82+++ openssl-0.9.8m/ms/segrenam.pl
83@@ -1,4 +1,4 @@
84-#!/usr/bin/env perl
85+#!/usr/bin/perl
86
87 my $quiet = 1;
88
89--- openssl-0.9.8m.orig/ms/cmp.pl
90+++ openssl-0.9.8m/ms/cmp.pl
91@@ -1,4 +1,4 @@
92-#!/usr/local/bin/perl
93+#!/usr/bin/perl
94
95 ($#ARGV == 1) || die "usage: cmp.pl <file1> <file2>\n";
96
97--- openssl-0.9.8m.orig/test/cms-test.pl
98+++ openssl-0.9.8m/test/cms-test.pl
99@@ -1,4 +1,4 @@
100-# test/cms-test.pl
101+#!/usr/bin/perl
102 # Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
103 # project.
104 #
105--- openssl-0.9.8m.orig/test/cms-examples.pl
106+++ openssl-0.9.8m/test/cms-examples.pl
107@@ -1,4 +1,4 @@
108-# test/cms-examples.pl
109+#!/usr/bin/perl
110 # Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
111 # project.
112 #
113--- openssl-0.9.8m.orig/demos/b64.pl
114+++ openssl-0.9.8m/demos/b64.pl
115@@ -1,4 +1,4 @@
116-#!/usr/local/bin/perl
117+#!/usr/bin/perl
118
119 #
120 # Make PEM encoded data have lines of 64 bytes of data
121--- openssl-0.9.8m.orig/demos/tunala/configure.in
122+++ openssl-0.9.8m/demos/tunala/configure.in
123@@ -1,4 +1,4 @@
124-dnl Process this file with autoconf to produce a configure script.
125+#!/usr/bin/perl
126 AC_INIT(tunala.c)
127 AM_CONFIG_HEADER(config.h)
128 AM_INIT_AUTOMAKE(tunala, 0.0.1-dev)
129--- openssl-0.9.8m.orig/crypto/x86cpuid.pl
130+++ openssl-0.9.8m/crypto/x86cpuid.pl
131@@ -1,4 +1,4 @@
132-#!/usr/bin/env perl
133+#!/usr/bin/perl
134
135 push(@INC,"perlasm");
136 require "x86asm.pl";
137--- openssl-0.9.8m.orig/crypto/x86_64cpuid.pl
138+++ openssl-0.9.8m/crypto/x86_64cpuid.pl
139@@ -1,4 +1,4 @@
140-#!/usr/bin/env perl
141+#!/usr/bin/perl
142
143 $output=shift;
144 $masm=1 if ($output =~ /\.asm/);
145--- openssl-0.9.8m.orig/crypto/md5/asm/md5-586.pl
146+++ openssl-0.9.8m/crypto/md5/asm/md5-586.pl
147@@ -1,4 +1,4 @@
148-#!/usr/local/bin/perl
149+#!/usr/bin/perl
150
151 # Normal is the
152 # md5_block_x86(MD5_CTX *c, ULONG *X);
153--- openssl-0.9.8m.orig/crypto/md5/asm/md5-x86_64.pl
154+++ openssl-0.9.8m/crypto/md5/asm/md5-x86_64.pl
155@@ -1,4 +1,4 @@
156-#!/usr/bin/perl -w
157+#!/usr/bin/perl
158 #
159 # MD5 optimized for AMD64.
160 #
161--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-ia64.pl
162+++ openssl-0.9.8m/crypto/sha/asm/sha1-ia64.pl
163@@ -1,4 +1,4 @@
164-#!/usr/bin/env perl
165+#!/usr/bin/perl
166 #
167 # ====================================================================
168 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
169--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-x86_64.pl
170+++ openssl-0.9.8m/crypto/sha/asm/sha1-x86_64.pl
171@@ -1,4 +1,4 @@
172-#!/usr/bin/env perl
173+#!/usr/bin/perl
174 #
175 # ====================================================================
176 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
177--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-sse2.pl
178+++ openssl-0.9.8m/crypto/sha/asm/sha512-sse2.pl
179@@ -1,4 +1,4 @@
180-#!/usr/bin/env perl
181+#!/usr/bin/perl
182 #
183 # ====================================================================
184 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
185--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-ia64.pl
186+++ openssl-0.9.8m/crypto/sha/asm/sha512-ia64.pl
187@@ -1,4 +1,4 @@
188-#!/usr/bin/env perl
189+#!/usr/bin/perl
190 #
191 # ====================================================================
192 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
193--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-x86_64.pl
194+++ openssl-0.9.8m/crypto/sha/asm/sha512-x86_64.pl
195@@ -1,4 +1,4 @@
196-#!/usr/bin/env perl
197+#!/usr/bin/perl
198 #
199 # ====================================================================
200 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
201--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-586.pl
202+++ openssl-0.9.8m/crypto/sha/asm/sha1-586.pl
203@@ -1,4 +1,4 @@
204-#!/usr/bin/env perl
205+#!/usr/bin/perl
206
207 # ====================================================================
208 # [Re]written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
209--- openssl-0.9.8m.orig/crypto/des/asm/des-586.pl
210+++ openssl-0.9.8m/crypto/des/asm/des-586.pl
211@@ -1,4 +1,4 @@
212-#!/usr/local/bin/perl
213+#!/usr/bin/perl
214 #
215 # The inner loop instruction sequence and the IP/FP modifications are from
216 # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
217--- openssl-0.9.8m.orig/crypto/des/asm/desboth.pl
218+++ openssl-0.9.8m/crypto/des/asm/desboth.pl
219@@ -1,4 +1,4 @@
220-#!/usr/local/bin/perl
221+#!/usr/bin/perl
222
223 $L="edi";
224 $R="esi";
225--- openssl-0.9.8m.orig/crypto/des/asm/des686.pl
226+++ openssl-0.9.8m/crypto/des/asm/des686.pl
227@@ -1,4 +1,4 @@
228-#!/usr/local/bin/perl
229+#!/usr/bin/perl
230
231 $prog="des686.pl";
232
233--- openssl-0.9.8m.orig/crypto/des/asm/crypt586.pl
234+++ openssl-0.9.8m/crypto/des/asm/crypt586.pl
235@@ -1,4 +1,4 @@
236-#!/usr/local/bin/perl
237+#!/usr/bin/perl
238 #
239 # The inner loop instruction sequence and the IP/FP modifications are from
240 # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
241--- openssl-0.9.8m.orig/crypto/lhash/num.pl
242+++ openssl-0.9.8m/crypto/lhash/num.pl
243@@ -1,4 +1,4 @@
244-#!/usr/local/bin/perl
245+#!/usr/bin/perl
246
247 #node 10 -> 4
248
249--- openssl-0.9.8m.orig/crypto/ripemd/asm/rmd-586.pl
250+++ openssl-0.9.8m/crypto/ripemd/asm/rmd-586.pl
251@@ -1,4 +1,4 @@
252-#!/usr/local/bin/perl
253+#!/usr/bin/perl
254
255 # Normal is the
256 # ripemd160_block_asm_data_order(RIPEMD160_CTX *c, ULONG *X,int blocks);
257--- openssl-0.9.8m.orig/crypto/rc4/asm/rc4-586.pl
258+++ openssl-0.9.8m/crypto/rc4/asm/rc4-586.pl
259@@ -1,4 +1,4 @@
260-#!/usr/local/bin/perl
261+#!/usr/bin/perl
262
263 # At some point it became apparent that the original SSLeay RC4
264 # assembler implementation performs suboptimaly on latest IA-32
265--- openssl-0.9.8m.orig/crypto/rc4/asm/rc4-x86_64.pl
266+++ openssl-0.9.8m/crypto/rc4/asm/rc4-x86_64.pl
267@@ -1,4 +1,4 @@
268-#!/usr/bin/env perl
269+#!/usr/bin/perl
270 #
271 # ====================================================================
272 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
273--- openssl-0.9.8m.orig/crypto/cast/asm/cast-586.pl
274+++ openssl-0.9.8m/crypto/cast/asm/cast-586.pl
275@@ -1,4 +1,4 @@
276-#!/usr/local/bin/perl
277+#!/usr/bin/perl
278
279 # define for pentium pro friendly version
280 $ppro=1;
281--- openssl-0.9.8m.orig/crypto/rc5/asm/rc5-586.pl
282+++ openssl-0.9.8m/crypto/rc5/asm/rc5-586.pl
283@@ -1,4 +1,4 @@
284-#!/usr/local/bin/perl
285+#!/usr/bin/perl
286
287 push(@INC,"perlasm","../../perlasm");
288 require "x86asm.pl";
289--- openssl-0.9.8m.orig/crypto/perlasm/x86ms.pl
290+++ openssl-0.9.8m/crypto/perlasm/x86ms.pl
291@@ -1,4 +1,4 @@
292-#!/usr/local/bin/perl
293+#!/usr/bin/perl
294
295 package x86ms;
296
297--- openssl-0.9.8m.orig/crypto/perlasm/x86asm.pl
298+++ openssl-0.9.8m/crypto/perlasm/x86asm.pl
299@@ -1,4 +1,4 @@
300-#!/usr/local/bin/perl
301+#!/usr/bin/perl
302
303 # require 'x86asm.pl';
304 # &asm_init("cpp","des-586.pl");
305--- openssl-0.9.8m.orig/crypto/perlasm/x86nasm.pl
306+++ openssl-0.9.8m/crypto/perlasm/x86nasm.pl
307@@ -1,4 +1,4 @@
308-#!/usr/local/bin/perl
309+#!/usr/bin/perl
310
311 package x86nasm;
312
313--- openssl-0.9.8m.orig/crypto/perlasm/x86unix.pl
314+++ openssl-0.9.8m/crypto/perlasm/x86unix.pl
315@@ -1,4 +1,4 @@
316-#!/usr/local/bin/perl
317+#!/usr/bin/perl
318
319 package x86unix; # GAS actually...
320
321--- openssl-0.9.8m.orig/crypto/perlasm/cbc.pl
322+++ openssl-0.9.8m/crypto/perlasm/cbc.pl
323@@ -1,4 +1,4 @@
324-#!/usr/local/bin/perl
325+#!/usr/bin/perl
326
327 # void des_ncbc_encrypt(input, output, length, schedule, ivec, enc)
328 # des_cblock (*input);
329--- openssl-0.9.8m.orig/crypto/perlasm/x86_64-xlate.pl
330+++ openssl-0.9.8m/crypto/perlasm/x86_64-xlate.pl
331@@ -1,4 +1,4 @@
332-#!/usr/bin/env perl
333+#!/usr/bin/perl
334
335 # Ascetic x86_64 AT&T to MASM assembler translator by <appro>.
336 #
337--- openssl-0.9.8m.orig/crypto/bf/asm/bf-686.pl
338+++ openssl-0.9.8m/crypto/bf/asm/bf-686.pl
339@@ -1,4 +1,4 @@
340-#!/usr/local/bin/perl
341+#!/usr/bin/perl
342
343 push(@INC,"perlasm","../../perlasm");
344 require "x86asm.pl";
345--- openssl-0.9.8m.orig/crypto/bf/asm/bf-586.pl
346+++ openssl-0.9.8m/crypto/bf/asm/bf-586.pl
347@@ -1,4 +1,4 @@
348-#!/usr/local/bin/perl
349+#!/usr/bin/perl
350
351 push(@INC,"perlasm","../../perlasm");
352 require "x86asm.pl";
353--- openssl-0.9.8m.orig/crypto/objects/objects.pl
354+++ openssl-0.9.8m/crypto/objects/objects.pl
355@@ -1,4 +1,4 @@
356-#!/usr/local/bin/perl
357+#!/usr/bin/perl
358
359 open (NUMIN,"$ARGV[1]") || die "Can't open number file $ARGV[1]";
360 $max_nid=0;
361--- openssl-0.9.8m.orig/crypto/objects/obj_dat.pl
362+++ openssl-0.9.8m/crypto/objects/obj_dat.pl
363@@ -1,4 +1,4 @@
364-#!/usr/local/bin/perl
365+#!/usr/bin/perl
366
367 # fixes bug in floating point emulation on sparc64 when
368 # this script produces off-by-one output on sparc64
369--- openssl-0.9.8m.orig/crypto/conf/keysets.pl
370+++ openssl-0.9.8m/crypto/conf/keysets.pl
371@@ -1,4 +1,4 @@
372-#!/usr/local/bin/perl
373+#!/usr/bin/perl
374
375 $NUMBER=0x01;
376 $UPPER=0x02;
377--- openssl-0.9.8m.orig/crypto/bn/bn_prime.pl
378+++ openssl-0.9.8m/crypto/bn/bn_prime.pl
379@@ -1,4 +1,4 @@
380-#!/usr/local/bin/perl
381+#!/usr/bin/perl
382 # bn_prime.pl
383
384 $num=2048;
385--- openssl-0.9.8m.orig/crypto/bn/asm/x86.pl
386+++ openssl-0.9.8m/crypto/bn/asm/x86.pl
387@@ -1,4 +1,4 @@
388-#!/usr/local/bin/perl
389+#!/usr/bin/perl
390
391 push(@INC,"perlasm","../../perlasm");
392 require "x86asm.pl";
393--- openssl-0.9.8m.orig/crypto/bn/asm/ppc.pl
394+++ openssl-0.9.8m/crypto/bn/asm/ppc.pl
395@@ -1,4 +1,4 @@
396-#!/usr/bin/env perl
397+#!/usr/bin/perl
398 #
399 # Implemented as a Perl wrapper as we want to support several different
400 # architectures with single file. We pick up the target based on the
401--- openssl-0.9.8m.orig/crypto/bn/asm/co-586.pl
402+++ openssl-0.9.8m/crypto/bn/asm/co-586.pl
403@@ -1,4 +1,4 @@
404-#!/usr/local/bin/perl
405+#!/usr/bin/perl
406
407 push(@INC,"perlasm","../../perlasm");
408 require "x86asm.pl";
409--- openssl-0.9.8m.orig/crypto/bn/asm/bn-586.pl
410+++ openssl-0.9.8m/crypto/bn/asm/bn-586.pl
411@@ -1,4 +1,4 @@
412-#!/usr/local/bin/perl
413+#!/usr/bin/perl
414
415 push(@INC,"perlasm","../../perlasm");
416 require "x86asm.pl";
417--- openssl-0.9.8m.orig/crypto/bn/asm/mo-586.pl
418+++ openssl-0.9.8m/crypto/bn/asm/mo-586.pl
419@@ -1,4 +1,4 @@
420-#!/usr/bin/env perl
421+#!/usr/bin/perl
422
423 # This is crypto/bn/asm/x86-mont.pl (with asciz from crypto/perlasm/x86asm.pl)
424 # from OpenSSL 0.9.9-dev
425--- openssl-0.9.8m.orig/crypto/bn/asm/x86_64-mont.pl
426+++ openssl-0.9.8m/crypto/bn/asm/x86_64-mont.pl
427@@ -1,4 +1,4 @@
428-#!/usr/bin/env perl
429+#!/usr/bin/perl
430
431 # ====================================================================
432 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
433--- openssl-0.9.8m.orig/crypto/bn/asm/x86/comba.pl
434+++ openssl-0.9.8m/crypto/bn/asm/x86/comba.pl
435@@ -1,4 +1,4 @@
436-#!/usr/local/bin/perl
437+#!/usr/bin/perl
438 # x86 assember
439
440 sub mul_add_c
441--- openssl-0.9.8m.orig/crypto/bn/asm/x86/add.pl
442+++ openssl-0.9.8m/crypto/bn/asm/x86/add.pl
443@@ -1,4 +1,4 @@
444-#!/usr/local/bin/perl
445+#!/usr/bin/perl
446 # x86 assember
447
448 sub bn_add_words
449--- openssl-0.9.8m.orig/crypto/bn/asm/x86/mul.pl
450+++ openssl-0.9.8m/crypto/bn/asm/x86/mul.pl
451@@ -1,4 +1,4 @@
452-#!/usr/local/bin/perl
453+#!/usr/bin/perl
454 # x86 assember
455
456 sub bn_mul_words
457--- openssl-0.9.8m.orig/crypto/bn/asm/x86/mul_add.pl
458+++ openssl-0.9.8m/crypto/bn/asm/x86/mul_add.pl
459@@ -1,4 +1,4 @@
460-#!/usr/local/bin/perl
461+#!/usr/bin/perl
462 # x86 assember
463
464 sub bn_mul_add_words
465--- openssl-0.9.8m.orig/crypto/bn/asm/x86/sqr.pl
466+++ openssl-0.9.8m/crypto/bn/asm/x86/sqr.pl
467@@ -1,4 +1,4 @@
468-#!/usr/local/bin/perl
469+#!/usr/bin/perl
470 # x86 assember
471
472 sub bn_sqr_words
473--- openssl-0.9.8m.orig/crypto/bn/asm/x86/sub.pl
474+++ openssl-0.9.8m/crypto/bn/asm/x86/sub.pl
475@@ -1,4 +1,4 @@
476-#!/usr/local/bin/perl
477+#!/usr/bin/perl
478 # x86 assember
479
480 sub bn_sub_words
481--- openssl-0.9.8m.orig/crypto/bn/asm/x86/div.pl
482+++ openssl-0.9.8m/crypto/bn/asm/x86/div.pl
483@@ -1,4 +1,4 @@
484-#!/usr/local/bin/perl
485+#!/usr/bin/perl
486 # x86 assember
487
488 sub bn_div_words
489--- openssl-0.9.8m.orig/crypto/aes/asm/aes-586.pl
490+++ openssl-0.9.8m/crypto/aes/asm/aes-586.pl
491@@ -1,4 +1,4 @@
492-#!/usr/bin/env perl
493+#!/usr/bin/perl
494 #
495 # ====================================================================
496 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
497--- openssl-0.9.8m.orig/crypto/aes/asm/aes-x86_64.pl
498+++ openssl-0.9.8m/crypto/aes/asm/aes-x86_64.pl
499@@ -1,4 +1,4 @@
500-#!/usr/bin/env perl
501+#!/usr/bin/perl
502 #
503 # ====================================================================
504 # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
505--- openssl-0.9.8m.orig/crypto/asn1/charmap.pl
506+++ openssl-0.9.8m/crypto/asn1/charmap.pl
507@@ -1,4 +1,4 @@
508-#!/usr/local/bin/perl -w
509+#!/usr/bin/perl
510
511 use strict;
512
513--- openssl-0.9.8m.orig/util/mksdef.pl
514+++ openssl-0.9.8m/util/mksdef.pl
515@@ -1,4 +1,4 @@
516-
517+#!/usr/bin/perl
518 # Perl script to split libeay32.def into two distinct DEF files for use in
519 # fipdso mode. It works out symbols in each case by running "link" command and
520 # parsing the output to find the list of missing symbols then splitting
521--- openssl-0.9.8m.orig/util/dirname.pl
522+++ openssl-0.9.8m/util/dirname.pl
523@@ -1,4 +1,4 @@
524-#!/usr/local/bin/perl
525+#!/usr/bin/perl
526
527 if ($#ARGV < 0) {
528 die "dirname.pl: too few arguments\n";
529--- openssl-0.9.8m.orig/util/tab_num.pl
530+++ openssl-0.9.8m/util/tab_num.pl
531@@ -1,4 +1,4 @@
532-#!/usr/local/bin/perl
533+#!/usr/bin/perl
534
535 $num=1;
536 $width=40;
537--- openssl-0.9.8m.orig/util/sp-diff.pl
538+++ openssl-0.9.8m/util/sp-diff.pl
539@@ -1,4 +1,4 @@
540-#!/usr/local/bin/perl
541+#!/usr/bin/perl
542 #
543 # This file takes as input, the files that have been output from
544 # ssleay speed.
545--- openssl-0.9.8m.orig/util/mkerr.pl
546+++ openssl-0.9.8m/util/mkerr.pl
547@@ -1,4 +1,4 @@
548-#!/usr/local/bin/perl -w
549+#!/usr/bin/perl
550
551 my $config = "crypto/err/openssl.ec";
552 my $debug = 0;
553--- openssl-0.9.8m.orig/util/clean-depend.pl
554+++ openssl-0.9.8m/util/clean-depend.pl
555@@ -1,4 +1,4 @@
556-#!/usr/local/bin/perl -w
557+#!/usr/bin/perl
558 # Clean the dependency list in a makefile of standard includes...
559 # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
560
561--- openssl-0.9.8m.orig/util/add_cr.pl
562+++ openssl-0.9.8m/util/add_cr.pl
563@@ -1,4 +1,4 @@
564-#!/usr/local/bin/perl
565+#!/usr/bin/perl
566 #
567 # This adds a copyright message to a souce code file.
568 # It also gets the file name correct.
569--- openssl-0.9.8m.orig/util/pod2man.pl
570+++ openssl-0.9.8m/util/pod2man.pl
571@@ -1,4 +1,4 @@
572-: #!/usr/bin/perl-5.005
573+#!/usr/bin/perl
574 eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
575 if $running_under_some_shell;
576
577--- openssl-0.9.8m.orig/util/mkstack.pl
578+++ openssl-0.9.8m/util/mkstack.pl
579@@ -1,4 +1,4 @@
580-#!/usr/local/bin/perl -w
581+#!/usr/bin/perl
582
583 # This is a utility that searches out "DECLARE_STACK_OF()"
584 # declarations in .h and .c files, and updates/creates/replaces
585--- openssl-0.9.8m.orig/util/selftest.pl
586+++ openssl-0.9.8m/util/selftest.pl
587@@ -1,4 +1,4 @@
588-#!/usr/local/bin/perl -w
589+#!/usr/bin/perl
590 #
591 # Run the test suite and generate a report
592 #
593--- openssl-0.9.8m.orig/util/ck_errf.pl
594+++ openssl-0.9.8m/util/ck_errf.pl
595@@ -1,4 +1,4 @@
596-#!/usr/local/bin/perl
597+#!/usr/bin/perl
598 #
599 # This is just a quick script to scan for cases where the 'error'
600 # function name in a XXXerr() macro is wrong.
601--- openssl-0.9.8m.orig/util/mklink.pl
602+++ openssl-0.9.8m/util/mklink.pl
603@@ -1,4 +1,4 @@
604-#!/usr/local/bin/perl
605+#!/usr/bin/perl
606
607 # mklink.pl
608
609--- openssl-0.9.8m.orig/util/src-dep.pl
610+++ openssl-0.9.8m/util/src-dep.pl
611@@ -1,4 +1,4 @@
612-#!/usr/local/bin/perl
613+#!/usr/bin/perl
614
615 # we make up an array of
616 # $file{function_name}=filename;
617--- openssl-0.9.8m.orig/util/deleof.pl
618+++ openssl-0.9.8m/util/deleof.pl
619@@ -1,4 +1,4 @@
620-#!/usr/local/bin/perl
621+#!/usr/bin/perl
622
623 while (<>)
624 {
625--- openssl-0.9.8m.orig/util/arx.pl
626+++ openssl-0.9.8m/util/arx.pl
627@@ -1,4 +1,4 @@
628-#!/bin/perl
629+#!/usr/bin/perl
630
631 # Simple perl script to wrap round "ar" program and exclude any
632 # object files in the environment variable EXCL_OBJ
633--- openssl-0.9.8m.orig/util/copy.pl
634+++ openssl-0.9.8m/util/copy.pl
635@@ -1,4 +1,4 @@
636-#!/usr/local/bin/perl
637+#!/usr/bin/perl
638
639 use Fcntl;
640
641--- openssl-0.9.8m.orig/util/mkdir-p.pl
642+++ openssl-0.9.8m/util/mkdir-p.pl
643@@ -1,4 +1,4 @@
644-#!/usr/local/bin/perl
645+#!/usr/bin/perl
646
647 # mkdir-p.pl
648
649--- openssl-0.9.8m.orig/util/mkdef.pl
650+++ openssl-0.9.8m/util/mkdef.pl
651@@ -1,4 +1,4 @@
652-#!/usr/local/bin/perl -w
653+#!/usr/bin/perl
654 #
655 # generate a .def file
656 #
657--- openssl-0.9.8m.orig/util/files.pl
658+++ openssl-0.9.8m/util/files.pl
659@@ -1,4 +1,4 @@
660-#!/usr/local/bin/perl
661+#!/usr/bin/perl
662 #
663 # used to generate the file MINFO for use by util/mk1mf.pl
664 # It is basically a list of all variables from the passed makefile
665--- openssl-0.9.8m.orig/util/mkfiles.pl
666+++ openssl-0.9.8m/util/mkfiles.pl
667@@ -1,4 +1,4 @@
668-#!/usr/local/bin/perl
669+#!/usr/bin/perl
670 #
671 # This is a hacked version of files.pl for systems that can't do a 'make files'.
672 # Do a perl util/mkminfo.pl >MINFO to build MINFO
673--- openssl-0.9.8m.orig/util/perlpath.pl
674+++ openssl-0.9.8m/util/perlpath.pl
675@@ -1,4 +1,4 @@
676-#!/usr/local/bin/perl
677+#!/usr/bin/perl
678 #
679 # modify the '#!/usr/local/bin/perl'
680 # line in all scripts that rely on perl.
681--- openssl-0.9.8m.orig/util/mk1mf.pl
682+++ openssl-0.9.8m/util/mk1mf.pl
683@@ -1,4 +1,4 @@
684-#!/usr/local/bin/perl
685+#!/usr/bin/perl
686 # A bit of an evil hack but it post processes the file ../MINFO which
687 # is generated by `make files` in the top directory.
688 # This script outputs one mega makefile that has no shell stuff or any
689--- openssl-0.9.8m.orig/util/err-ins.pl
690+++ openssl-0.9.8m/util/err-ins.pl
691@@ -1,4 +1,4 @@
692-#!/usr/local/bin/perl
693+#!/usr/bin/perl
694 #
695 # tack error codes onto the end of a file
696 #
697--- openssl-0.9.8m.orig/util/pl/Mingw32.pl
698+++ openssl-0.9.8m/util/pl/Mingw32.pl
699@@ -1,4 +1,4 @@
700-#!/usr/local/bin/perl
701+#!/usr/bin/perl
702 #
703 # Mingw32.pl -- Mingw
704 #
705--- openssl-0.9.8m.orig/util/pl/unix.pl
706+++ openssl-0.9.8m/util/pl/unix.pl
707@@ -1,4 +1,4 @@
708-#!/usr/local/bin/perl
709+#!/usr/bin/perl
710 #
711 # unix.pl - the standard unix makefile stuff.
712 #
713--- openssl-0.9.8m.orig/util/pl/netware.pl
714+++ openssl-0.9.8m/util/pl/netware.pl
715@@ -1,4 +1,4 @@
716-# Metrowerks Codewarrior or gcc / nlmconv for NetWare
717+#!/usr/bin/perl
718 #
719
720 $version_header = "crypto/opensslv.h";
721--- openssl-0.9.8m.orig/util/pl/VC-32.pl
722+++ openssl-0.9.8m/util/pl/VC-32.pl
723@@ -1,4 +1,4 @@
724-#!/usr/local/bin/perl
725+#!/usr/bin/perl
726 # VC-32.pl - unified script for Microsoft Visual C++, covering Win32,
727 # Win64 and WinCE [follow $FLAVOR variable to trace the differences].
728 #
729--- openssl-0.9.8m.orig/util/pl/OS2-EMX.pl
730+++ openssl-0.9.8m/util/pl/OS2-EMX.pl
731@@ -1,4 +1,4 @@
732-#!/usr/local/bin/perl
733+#!/usr/bin/perl
734 #
735 # OS2-EMX.pl - for EMX GCC on OS/2
736 #
737--- openssl-0.9.8m.orig/util/pl/ultrix.pl
738+++ openssl-0.9.8m/util/pl/ultrix.pl
739@@ -1,4 +1,4 @@
740-#!/usr/local/bin/perl
741+#!/usr/bin/perl
742 #
743 # linux.pl - the standard unix makefile stuff.
744 #
745--- openssl-0.9.8m.orig/util/pl/linux.pl
746+++ openssl-0.9.8m/util/pl/linux.pl
747@@ -1,4 +1,4 @@
748-#!/usr/local/bin/perl
749+#!/usr/bin/perl
750 #
751 # linux.pl - the standard unix makefile stuff.
752 #
753--- openssl-0.9.8m.orig/util/pl/BC-32.pl
754+++ openssl-0.9.8m/util/pl/BC-32.pl
755@@ -1,4 +1,4 @@
756-#!/usr/local/bin/perl
757+#!/usr/bin/perl
758 # Borland C++ builder 3 and 4 -- Janez Jere <jj@void.si>
759 #
760
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/pic.patch b/meta/packages/openssl/openssl-0.9.8o/debian/pic.patch
new file mode 100644
index 0000000000..b534afa66c
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/pic.patch
@@ -0,0 +1,301 @@
1Index: openssl-0.9.8o/crypto/Makefile
2===================================================================
3--- openssl-0.9.8o.orig/crypto/Makefile 2008-09-17 17:10:55.000000000 +0000
4+++ openssl-0.9.8o/crypto/Makefile 2010-06-06 13:09:28.000000000 +0000
5@@ -57,7 +57,7 @@
6 echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
7 echo '#endif' ) >buildinf.h
8
9-x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl
10+x86cpuid-elf.S: x86cpuid.pl perlasm/x86asm.pl
11 $(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
12 x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
13 $(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@
14@@ -70,7 +70,7 @@
15 uplink-cof.s: ../ms/uplink.pl
16 $(PERL) ../ms/uplink.pl coff > $@
17
18-x86_64cpuid.s: x86_64cpuid.pl
19+x86_64cpuid.S: x86_64cpuid.pl
20 $(PERL) x86_64cpuid.pl $@
21 ia64cpuid.s: ia64cpuid.S
22 $(CC) $(CFLAGS) -E ia64cpuid.S > $@
23Index: openssl-0.9.8o/crypto/x86_64cpuid.pl
24===================================================================
25--- openssl-0.9.8o.orig/crypto/x86_64cpuid.pl 2007-11-11 16:25:00.000000000 +0000
26+++ openssl-0.9.8o/crypto/x86_64cpuid.pl 2010-06-06 13:09:28.000000000 +0000
27@@ -95,7 +95,11 @@
28 .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu
29
30 .section .init
31+#ifdef OPENSSL_PIC
32+ call OPENSSL_cpuid_setup\@PLT
33+#else
34 call OPENSSL_cpuid_setup
35+#endif
36
37 ___
38
39Index: openssl-0.9.8o/crypto/md5/Makefile
40===================================================================
41--- openssl-0.9.8o.orig/crypto/md5/Makefile 2008-09-17 17:11:02.000000000 +0000
42+++ openssl-0.9.8o/crypto/md5/Makefile 2010-06-06 13:09:28.000000000 +0000
43@@ -52,7 +52,8 @@
44 mx86-out.s: asm/md5-586.pl ../perlasm/x86asm.pl
45 (cd asm; $(PERL) md5-586.pl a.out $(CFLAGS) > ../$@)
46
47-md5-x86_64.s: asm/md5-x86_64.pl; $(PERL) asm/md5-x86_64.pl $@
48+md5-x86_64.s: asm/md5-x86_64.pl
49+ $(PERL) asm/md5-x86_64.pl $@
50
51 files:
52 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
53Index: openssl-0.9.8o/crypto/des/asm/desboth.pl
54===================================================================
55--- openssl-0.9.8o.orig/crypto/des/asm/desboth.pl 2001-10-24 21:20:56.000000000 +0000
56+++ openssl-0.9.8o/crypto/des/asm/desboth.pl 2010-06-06 13:09:28.000000000 +0000
57@@ -16,6 +16,11 @@
58
59 &push("edi");
60
61+ &call (&label("pic_point0"));
62+ &set_label("pic_point0");
63+ &blindpop("ebp");
64+ &add ("ebp", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
65+
66 &comment("");
67 &comment("Load the data words");
68 &mov($L,&DWP(0,"ebx","",0));
69@@ -47,15 +52,21 @@
70 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
71 &mov(&swtmp(1), "eax");
72 &mov(&swtmp(0), "ebx");
73- &call("DES_encrypt2");
74+ &exch("ebx", "ebp");
75+ &call("DES_encrypt2\@PLT");
76+ &exch("ebx", "ebp");
77 &mov(&swtmp(2), (DWC(($enc)?"0":"1")));
78 &mov(&swtmp(1), "edi");
79 &mov(&swtmp(0), "ebx");
80- &call("DES_encrypt2");
81+ &exch("ebx", "ebp");
82+ &call("DES_encrypt2\@PLT");
83+ &exch("ebx", "ebp");
84 &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
85 &mov(&swtmp(1), "esi");
86 &mov(&swtmp(0), "ebx");
87- &call("DES_encrypt2");
88+ &exch("ebx", "ebp");
89+ &call("DES_encrypt2\@PLT");
90+ &exch("ebx", "ebp");
91
92 &stack_pop(3);
93 &mov($L,&DWP(0,"ebx","",0));
94Index: openssl-0.9.8o/crypto/rc4/Makefile
95===================================================================
96--- openssl-0.9.8o.orig/crypto/rc4/Makefile 2008-11-19 16:03:50.000000000 +0000
97+++ openssl-0.9.8o/crypto/rc4/Makefile 2010-06-06 13:09:28.000000000 +0000
98@@ -51,7 +51,7 @@
99 rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
100 (cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
101
102-rc4-x86_64.s: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@
103+rc4-x86_64.S: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@
104
105 rc4-ia64.s: asm/rc4-ia64.S
106 @case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \
107Index: openssl-0.9.8o/crypto/rc4/asm/rc4-x86_64.pl
108===================================================================
109--- openssl-0.9.8o.orig/crypto/rc4/asm/rc4-x86_64.pl 2008-09-16 10:47:27.000000000 +0000
110+++ openssl-0.9.8o/crypto/rc4/asm/rc4-x86_64.pl 2010-06-06 13:09:28.000000000 +0000
111@@ -270,7 +270,11 @@
112 xor %r10,%r10
113 xor %r11,%r11
114
115+#ifdef OPENSSL_PIC
116+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),$idx#d
117+#else
118 mov OPENSSL_ia32cap_P(%rip),$idx#d
119+#endif
120 bt \$20,$idx#d
121 jnc .Lw1stloop
122 bt \$30,$idx#d
123@@ -338,7 +342,11 @@
124 RC4_options:
125 .picmeup %rax
126 lea .Lopts-.(%rax),%rax
127+#ifdef OPENSSL_PIC
128+ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),%edx
129+#else
130 mov OPENSSL_ia32cap_P(%rip),%edx
131+#endif
132 bt \$20,%edx
133 jnc .Ldone
134 add \$12,%rax
135Index: openssl-0.9.8o/crypto/perlasm/x86unix.pl
136===================================================================
137--- openssl-0.9.8o.orig/crypto/perlasm/x86unix.pl 2008-05-01 23:11:32.000000000 +0000
138+++ openssl-0.9.8o/crypto/perlasm/x86unix.pl 2010-06-06 13:09:28.000000000 +0000
139@@ -400,6 +400,29 @@
140 $stack=4;
141 }
142
143+sub main'function_begin_B_static
144+ {
145+ local($func,$extra)=@_;
146+
147+ &main'external_label($func);
148+ $func=$under.$func;
149+
150+ local($tmp)=<<"EOF";
151+.text
152+EOF
153+ push(@out,$tmp);
154+ if ($main'cpp)
155+ { push(@out,"TYPE($func,\@function)\n"); }
156+ elsif ($main'coff)
157+ { $tmp=push(@out,".def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); }
158+ elsif ($main'aout and !$main'pic)
159+ { }
160+ else { push(@out,".type $func,\@function\n"); }
161+ push(@out,".align\t$align\n");
162+ push(@out,"$func:\n");
163+ $stack=4;
164+ }
165+
166 sub main'function_end
167 {
168 local($func)=@_;
169@@ -694,7 +717,17 @@
170 {
171 $tmp=<<___;
172 .section .init
173+#ifdef OPENSSL_PIC
174+ pushl %ebx
175+ call .pic_point0
176+.pic_point0:
177+ popl %ebx
178+ addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx
179+ call $under$f\@PLT
180+ popl %ebx
181+#else
182 call $under$f
183+#endif
184 jmp .Linitalign
185 .align $align
186 .Linitalign:
187Index: openssl-0.9.8o/crypto/perlasm/cbc.pl
188===================================================================
189--- openssl-0.9.8o.orig/crypto/perlasm/cbc.pl 2005-05-09 21:48:00.000000000 +0000
190+++ openssl-0.9.8o/crypto/perlasm/cbc.pl 2010-06-06 13:09:28.000000000 +0000
191@@ -122,7 +122,11 @@
192 &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
193 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
194
195- &call($enc_func);
196+ &call (&label("pic_point0"));
197+ &set_label("pic_point0");
198+ &blindpop("ebx");
199+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
200+ &call("$enc_func\@PLT");
201
202 &mov("eax", &DWP($data_off,"esp","",0));
203 &mov("ebx", &DWP($data_off+4,"esp","",0));
204@@ -187,7 +191,11 @@
205 &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
206 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
207
208- &call($enc_func);
209+ &call (&label("pic_point1"));
210+ &set_label("pic_point1");
211+ &blindpop("ebx");
212+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point1") . "]");
213+ &call("$enc_func\@PLT");
214
215 &mov("eax", &DWP($data_off,"esp","",0));
216 &mov("ebx", &DWP($data_off+4,"esp","",0));
217@@ -220,7 +228,11 @@
218 &mov(&DWP($data_off,"esp","",0), "eax"); # put back
219 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
220
221- &call($dec_func);
222+ &call (&label("pic_point2"));
223+ &set_label("pic_point2");
224+ &blindpop("ebx");
225+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point2") . "]");
226+ &call("$dec_func\@PLT");
227
228 &mov("eax", &DWP($data_off,"esp","",0)); # get return
229 &mov("ebx", &DWP($data_off+4,"esp","",0)); #
230@@ -263,7 +275,11 @@
231 &mov(&DWP($data_off,"esp","",0), "eax"); # put back
232 &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
233
234- &call($dec_func);
235+ &call (&label("pic_point3"));
236+ &set_label("pic_point3");
237+ &blindpop("ebx");
238+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point3") . "]");
239+ &call("$dec_func\@PLT");
240
241 &mov("eax", &DWP($data_off,"esp","",0)); # get return
242 &mov("ebx", &DWP($data_off+4,"esp","",0)); #
243Index: openssl-0.9.8o/crypto/perlasm/x86_64-xlate.pl
244===================================================================
245--- openssl-0.9.8o.orig/crypto/perlasm/x86_64-xlate.pl 2010-06-06 13:09:00.000000000 +0000
246+++ openssl-0.9.8o/crypto/perlasm/x86_64-xlate.pl 2010-06-06 13:09:28.000000000 +0000
247@@ -435,7 +435,7 @@
248
249 chomp($line);
250
251- $line =~ s|[#!].*$||; # get rid of asm-style comments...
252+# $line =~ s|[#!].*$||; # get rid of asm-style comments...
253 $line =~ s|/\*.*\*/||; # ... and C-style comments...
254 $line =~ s|^\s+||; # ... and skip white spaces in beginning
255
256Index: openssl-0.9.8o/crypto/aes/asm/aes-586.pl
257===================================================================
258--- openssl-0.9.8o.orig/crypto/aes/asm/aes-586.pl 2008-12-17 14:14:51.000000000 +0000
259+++ openssl-0.9.8o/crypto/aes/asm/aes-586.pl 2010-06-06 13:09:28.000000000 +0000
260@@ -250,7 +250,7 @@
261 sub _data_word() { my $i; while(defined($i=shift)) { &data_word($i,$i); } }
262
263 &public_label("AES_Te");
264-&function_begin_B("_x86_AES_encrypt");
265+&function_begin_B_static("_x86_AES_encrypt");
266 if ($vertical_spin) {
267 # I need high parts of volatile registers to be accessible...
268 &exch ($s1="edi",$key="ebx");
269@@ -539,7 +539,7 @@
270 }
271
272 &public_label("AES_Td");
273-&function_begin_B("_x86_AES_decrypt");
274+&function_begin_B_static("_x86_AES_decrypt");
275 # note that caller is expected to allocate stack frame for me!
276 &mov (&DWP(12,"esp"),$key); # save key
277
278@@ -1461,15 +1461,22 @@
279 &public_label("AES_Td");
280 &public_label("AES_Te");
281 &function_begin_B("AES_set_decrypt_key");
282+ &push ("ebx");
283 &mov ("eax",&wparam(0));
284 &mov ("ecx",&wparam(1));
285 &mov ("edx",&wparam(2));
286 &sub ("esp",12);
287+
288+ &call (&label("pic_point0"));
289+ &set_label("pic_point0");
290+ &blindpop("ebx");
291+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
292 &mov (&DWP(0,"esp"),"eax");
293 &mov (&DWP(4,"esp"),"ecx");
294 &mov (&DWP(8,"esp"),"edx");
295- &call ("AES_set_encrypt_key");
296+ &call ("AES_set_encrypt_key\@PLT");
297 &add ("esp",12);
298+ &pop ("ebx");
299 &cmp ("eax",0);
300 &je (&label("proceed"));
301 &ret ();
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/pkg-config.patch b/meta/packages/openssl/openssl-0.9.8o/debian/pkg-config.patch
new file mode 100644
index 0000000000..38923b08bf
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/pkg-config.patch
@@ -0,0 +1,34 @@
1Index: openssl-0.9.8k/Makefile.org
2===================================================================
3--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:34:56.000000000 +0200
4+++ openssl-0.9.8k/Makefile.org 2009-07-19 11:36:02.000000000 +0200
5@@ -444,7 +444,8 @@
6 echo 'Description: OpenSSL cryptography library'; \
7 echo 'Version: '$(VERSION); \
8 echo 'Requires: '; \
9- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
10+ echo 'Libs: -L$${libdir} -lcrypto'; \
11+ echo 'Libs.private: $(EX_LIBS)'; \
12 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
13
14 libssl.pc: Makefile
15@@ -457,7 +458,8 @@
16 echo 'Description: Secure Sockets Layer and cryptography libraries'; \
17 echo 'Version: '$(VERSION); \
18 echo 'Requires: '; \
19- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
20+ echo 'Libs: -L$${libdir} -lssl'; \
21+ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \
22 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
23
24 openssl.pc: Makefile
25@@ -470,7 +472,8 @@
26 echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
27 echo 'Version: '$(VERSION); \
28 echo 'Requires: '; \
29- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
30+ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
31+ echo 'Libs.private: $(EX_LIBS)'; \
32 echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
33
34 Makefile: Makefile.org Configure config
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/rc4-amd64.patch b/meta/packages/openssl/openssl-0.9.8o/debian/rc4-amd64.patch
new file mode 100644
index 0000000000..6f0421a014
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/rc4-amd64.patch
@@ -0,0 +1,14 @@
1Index: openssl-0.9.8k/Configure
2===================================================================
3--- openssl-0.9.8k.orig/Configure 2009-07-19 11:32:41.000000000 +0200
4+++ openssl-0.9.8k/Configure 2009-07-19 11:37:10.000000000 +0200
5@@ -128,6 +128,9 @@
6 my $x86_out_asm="x86cpuid-out.o:bn86-out.o co86-out.o MAYBE-MO86-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 rc4_skey.o:rm86-out.o:r586-out.o";
7
8 my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::rc4-x86_64.o::";
9+# rc4 asm is disabled on amd64 because we configured it with RC4_CHAR while
10+# the assembler only works with int
11+my $x86_64_asm_linux="x86_64cpuid.o:x86_64-gcc.o x86_64-mont.o::aes-x86_64.o::md5-x86_64.o:sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o::::";
12 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 rc4_skey.o::";
13
14 my $no_asm="::::::::::";
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/rehash-crt.patch b/meta/packages/openssl/openssl-0.9.8o/debian/rehash-crt.patch
new file mode 100644
index 0000000000..a8ff28c6f3
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/rehash-crt.patch
@@ -0,0 +1,33 @@
1Index: openssl-0.9.8k/tools/c_rehash.in
2===================================================================
3--- openssl-0.9.8k.orig/tools/c_rehash.in 2002-10-11 22:31:27.000000000 +0200
4+++ openssl-0.9.8k/tools/c_rehash.in 2009-07-19 11:36:26.000000000 +0200
5@@ -59,12 +59,15 @@
6 }
7 }
8 closedir DIR;
9- FILE: foreach $fname (grep {/\.pem$/} @flist) {
10+ FILE: foreach $fname (grep {/\.pem$|\.crt$/} @flist) {
11 # Check to see if certificates and/or CRLs present.
12 my ($cert, $crl) = check_file($fname);
13 if(!$cert && !$crl) {
14- print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
15- next;
16+ ($cert, $crl) = check_file("$openssl x509 -in \"$fname\" -inform der -outform pem | ");
17+ if(!$cert && !$crl) {
18+ print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
19+ next;
20+ }
21 }
22 link_hash_cert($fname) if($cert);
23 link_hash_crl($fname) if($crl);
24@@ -102,6 +105,9 @@
25 my $fname = $_[0];
26 $fname =~ s/'/'\\''/g;
27 my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname'`;
28+ if(!$hash || !fprint) {
29+ ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname' -inform der`;
30+ }
31 chomp $hash;
32 chomp $fprint;
33 $fprint =~ s/^.*=//;
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/rehash_pod.patch b/meta/packages/openssl/openssl-0.9.8o/debian/rehash_pod.patch
new file mode 100644
index 0000000000..94792c48e5
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/rehash_pod.patch
@@ -0,0 +1,60 @@
1Index: openssl-0.9.8k/doc/apps/c_rehash.pod
2===================================================================
3--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4+++ openssl-0.9.8k/doc/apps/c_rehash.pod 2009-07-19 11:36:27.000000000 +0200
5@@ -0,0 +1,55 @@
6+
7+=pod
8+
9+=head1 NAME
10+
11+c_rehash - Create symbolic links to files named by the hash values
12+
13+=head1 SYNOPSIS
14+
15+B<c_rehash>
16+[directory] ...
17+
18+=head1 DESCRIPTION
19+
20+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.
21+
22+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.
23+
24+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.
25+
26+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.
27+
28+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.
29+
30+The program will also warn if there are files with extension .pem which are not certificate or CRL files.
31+
32+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 (=).
33+
34+=head1 OPTIONS
35+
36+None
37+
38+=head1 ENVIRONMENT
39+
40+=over 4
41+
42+=item B<OPENSSL>
43+
44+The name (and path) of an executable to use to generate hashes and fingerprints (see above).
45+
46+=item B<SSL_CERT_DIR>
47+
48+Colon separated list of directories to operate on. Ignored if directories are listed on the command line.
49+
50+=head1 SEE ALSO
51+
52+L<openssl(1)|openssl(1)>, L<x509(1)|x509(1)>
53+
54+=back
55+
56+=head1 BUGS
57+
58+No known bugs
59+
60+=cut
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/series b/meta/packages/openssl/openssl-0.9.8o/debian/series
new file mode 100644
index 0000000000..b764c0414d
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/series
@@ -0,0 +1,20 @@
1ca.patch
2config-hurd.patch
3debian-targets.patch
4engines-path.patch
5kfreebsd-pipe.patch
6make-targets.patch
7man-dir.patch
8man-section.patch
9no-rpath.patch
10no-symbolic.patch
11pic.patch
12pkg-config.patch
13valgrind.patch
14rc4-amd64.patch
15rehash-crt.patch
16rehash_pod.patch
17shared-lib-ext.patch
18stddef.patch
19version-script.patch
20perl-path.diff
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch b/meta/packages/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch
new file mode 100644
index 0000000000..d27e9b2398
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/shared-lib-ext.patch
@@ -0,0 +1,14 @@
1Index: openssl-0.9.8k/Configure
2===================================================================
3--- openssl-0.9.8k.orig/Configure 2009-07-19 11:36:24.000000000 +0200
4+++ openssl-0.9.8k/Configure 2009-07-19 11:37:03.000000000 +0200
5@@ -1568,7 +1568,8 @@
6 elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
7 {
8 my $sotmp = $1;
9- s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
10+# s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
11+ s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/;
12 }
13 elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
14 {
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/stddef.patch b/meta/packages/openssl/openssl-0.9.8o/debian/stddef.patch
new file mode 100644
index 0000000000..bb65b23319
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/stddef.patch
@@ -0,0 +1,12 @@
1Index: openssl-0.9.8k/crypto/sha/sha.h
2===================================================================
3--- openssl-0.9.8k.orig/crypto/sha/sha.h 2008-09-16 12:47:28.000000000 +0200
4+++ openssl-0.9.8k/crypto/sha/sha.h 2009-07-19 11:36:28.000000000 +0200
5@@ -59,6 +59,7 @@
6 #ifndef HEADER_SHA_H
7 #define HEADER_SHA_H
8
9+#include <stddef.h>
10 #include <openssl/e_os2.h>
11 #include <stddef.h>
12
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/valgrind.patch b/meta/packages/openssl/openssl-0.9.8o/debian/valgrind.patch
new file mode 100644
index 0000000000..e9f86eabbf
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/valgrind.patch
@@ -0,0 +1,15 @@
1Index: openssl-0.9.8k/crypto/rand/md_rand.c
2===================================================================
3--- openssl-0.9.8k.orig/crypto/rand/md_rand.c 2008-09-16 13:50:05.000000000 +0200
4+++ openssl-0.9.8k/crypto/rand/md_rand.c 2009-07-19 11:36:05.000000000 +0200
5@@ -477,8 +477,10 @@
6 MD_Update(&m,local_md,MD_DIGEST_LENGTH);
7 MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c));
8 #ifndef PURIFY
9+#if 0 /* Don't add uninitialised data. */
10 MD_Update(&m,buf,j); /* purify complains */
11 #endif
12+#endif
13 k=(st_idx+MD_DIGEST_LENGTH/2)-st_num;
14 if (k > 0)
15 {
diff --git a/meta/packages/openssl/openssl-0.9.8o/debian/version-script.patch b/meta/packages/openssl/openssl-0.9.8o/debian/version-script.patch
new file mode 100644
index 0000000000..64d8fc7fa2
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/debian/version-script.patch
@@ -0,0 +1,33 @@
1Index: openssl-0.9.8m/Configure
2===================================================================
3--- openssl-0.9.8m.orig/Configure 2010-02-27 12:28:32.000000000 +0100
4+++ openssl-0.9.8m/Configure 2010-02-27 12:28:35.000000000 +0100
5@@ -1512,6 +1512,8 @@
6 }
7 }
8
9+$shared_ldflag .= " -Wl,--version-script=openssl.ld";
10+
11 open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
12 unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
13 open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
14Index: openssl-0.9.8m/openssl.ld
15===================================================================
16--- /dev/null 1970-01-01 00:00:00.000000000 +0000
17+++ openssl-0.9.8m/openssl.ld 2010-02-27 12:28:35.000000000 +0100
18@@ -0,0 +1,5 @@
19+OPENSSL_0.9.8 {
20+ global:
21+ *;
22+};
23+
24Index: openssl-0.9.8m/engines/openssl.ld
25===================================================================
26--- /dev/null 1970-01-01 00:00:00.000000000 +0000
27+++ openssl-0.9.8m/engines/openssl.ld 2010-02-27 12:28:35.000000000 +0100
28@@ -0,0 +1,5 @@
29+OPENSSL_0.9.8 {
30+ global:
31+ *;
32+};
33+
diff --git a/meta/packages/openssl/openssl-0.9.8o/shared-libs.patch b/meta/packages/openssl/openssl-0.9.8o/shared-libs.patch
new file mode 100644
index 0000000000..10d9146dc9
--- /dev/null
+++ b/meta/packages/openssl/openssl-0.9.8o/shared-libs.patch
@@ -0,0 +1,48 @@
1diff --git a/Makefile.org b/Makefile.org
2index e87d623..25ff367 100644
3--- a/Makefile.org
4+++ b/Makefile.org
5@@ -355,7 +355,7 @@ libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
6 @if [ "$(SHLIB_TARGET)" != "" ]; then \
7 if [ "$(FIPSCANLIB)" = "libfips" ]; then \
8 $(ARD) libcrypto.a fipscanister.o ; \
9- $(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
10+ $(MAKE) -e SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
11 $(AR) libcrypto.a fips/fipscanister.o ; \
12 else \
13 if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
14@@ -373,7 +373,7 @@ libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
15 @if [ "$(SHLIB_TARGET)" != "" ]; then \
16 shlibdeps=-lcrypto; \
17 [ "$(FIPSCANLIB)" = "libfips" ] && shlibdeps="$$shlibdeps -lfips"; \
18- $(MAKE) SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
19+ $(MAKE) -e SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
20 else \
21 echo "There's no support for shared libraries on this platform" >&2 ; \
22 exit 1; \
23diff --git a/crypto/Makefile b/crypto/Makefile
24index 6557f2b..a69bf7c 100644
25--- a/crypto/Makefile
26+++ b/crypto/Makefile
27@@ -103,7 +103,7 @@ $(LIB): $(LIBOBJ)
28
29 shared: buildinf.h lib subdirs
30 if [ -n "$(SHARED_LIBS)" ]; then \
31- (cd ..; $(MAKE) $(SHARED_LIB)); \
32+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
33 fi
34
35 libs:
36diff --git a/ssl/Makefile b/ssl/Makefile
37index 5ac3507..77ea2bd 100644
38--- a/ssl/Makefile
39+++ b/ssl/Makefile
40@@ -62,7 +62,7 @@ lib: $(LIBOBJ)
41
42 shared: lib
43 if [ -n "$(SHARED_LIBS)" ]; then \
44- (cd ..; $(MAKE) $(SHARED_LIB)); \
45+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
46 fi
47
48 files:
diff --git a/meta/packages/openssl/openssl.inc b/meta/packages/openssl/openssl.inc
index 5663e1cf94..a2a1ce67b8 100644
--- a/meta/packages/openssl/openssl.inc
+++ b/meta/packages/openssl/openssl.inc
@@ -1,8 +1,14 @@
1DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools." 1DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
2HOMEPAGE = "http://www.openssl.org/" 2HOMEPAGE = "http://www.openssl.org/"
3LICENSE = "openssl" 3BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
4SECTION = "libs/network" 4SECTION = "libs/network"
5 5
6# "openssl | SSLeay" dual license
7LICENSE = "openssl"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=83d26c69f6f0172ee7f795790424b453"
9
10DEPENDS = "perl-native"
11
6SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz" 12SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz"
7S = "${WORKDIR}/openssl-${PV}" 13S = "${WORKDIR}/openssl-${PV}"
8 14
@@ -25,6 +31,7 @@ inherit pkgconfig siteinfo
25PACKAGES =+ "libcrypto libssl" 31PACKAGES =+ "libcrypto libssl"
26FILES_libcrypto = "${libdir}/libcrypto.so.*" 32FILES_libcrypto = "${libdir}/libcrypto.so.*"
27FILES_libssl = "${libdir}/libssl.so.*" 33FILES_libssl = "${libdir}/libssl.so.*"
34FILES_${PN} =+ " ${libdir}/ssl/*"
28 35
29do_configure () { 36do_configure () {
30 cd util 37 cd util
diff --git a/meta/packages/openssl/openssl_0.9.8g.bb b/meta/packages/openssl/openssl_0.9.8g.bb
deleted file mode 100644
index 01fa6c9d26..0000000000
--- a/meta/packages/openssl/openssl_0.9.8g.bb
+++ /dev/null
@@ -1,10 +0,0 @@
1require openssl.inc
2
3PR = "r11"
4
5SRC_URI += "file://debian.patch;patch=1 \
6 file://configure-targets.patch;patch=1 \
7 file://fix-md5-x86_64.patch;patch=1 \
8 file://shared-libs.patch;patch=1"
9
10BBCLASSEXTEND = "native"
diff --git a/meta/packages/openssl/openssl_0.9.8o.bb b/meta/packages/openssl/openssl_0.9.8o.bb
new file mode 100644
index 0000000000..31c5568ba1
--- /dev/null
+++ b/meta/packages/openssl/openssl_0.9.8o.bb
@@ -0,0 +1,28 @@
1require openssl.inc
2
3PR = "r0"
4SRC_URI += "file://debian/ca.patch \
5 file://debian/config-hurd.patch;apply=no \
6 file://debian/debian-targets.patch \
7 file://debian/engines-path.patch \
8 file://debian/kfreebsd-pipe.patch;apply=no \
9 file://debian/make-targets.patch \
10 file://debian/man-dir.patch \
11 file://debian/man-section.patch \
12 file://debian/no-rpath.patch \
13 file://debian/no-symbolic.patch \
14 file://debian/pic.patch \
15 file://debian/pkg-config.patch \
16 file://debian/valgrind.patch \
17 file://debian/rc4-amd64.patch \
18 file://debian/rehash-crt.patch \
19 file://debian/rehash_pod.patch \
20 file://debian/shared-lib-ext.patch \
21 file://debian/stddef.patch \
22 file://debian/version-script.patch \
23 file://debian/perl-path.diff"
24
25SRC_URI += "file://configure-targets.patch \
26 file://shared-libs.patch"
27
28BBCLASSEXTEND = "native"