summaryrefslogtreecommitdiffstats
path: root/meta/packages/openssl/openssl-0.9.8g
diff options
context:
space:
mode:
authorQing He <qing.he@intel.com>2010-06-25 17:09:40 +0800
committerRichard Purdie <rpurdie@linux.intel.com>2010-06-30 13:19:05 +0100
commitc4713d040a5b3ae90781cbb31a19868a1fa39f4e (patch)
tree066b4062f2a0646829254c5e1a7195e287a1c4a1 /meta/packages/openssl/openssl-0.9.8g
parent7ec15f47750b2977972bbbbbe2aadf064c9671d5 (diff)
downloadpoky-c4713d040a5b3ae90781cbb31a19868a1fa39f4e.tar.gz
openssl: upgrade to version 0.9.8o
from 0.9.8g update bugtracker and license 1.0.0 and 1.0.0a are available, but introduce some interface changes. Stick on 0.9.8 versions for now for stability (0.9.8 branch is still updated for security fixes) changes: - add perl-native as build dependency - include /usr/lib/ssl/* in the package - break down debian.package into separate patches under directory debian. Original monolithic patch is >1000 lines, and not very maintainable. Verbatim copy the debian patches, among which two are not needed, but still included with apply=no to increase readability The new patches are ~700 lines. Most that was in the monolithic patch but not here have already been fixed in upstream. - fix-md5-x86_64.patch is in upstream and thus removed - rebase shared-libs.patch Signed-off-by: Qing He <qing.he@intel.com>
Diffstat (limited to 'meta/packages/openssl/openssl-0.9.8g')
-rw-r--r--meta/packages/openssl/openssl-0.9.8g/configure-targets.patch24
-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
4 files changed, 0 insertions, 1396 deletions
diff --git a/meta/packages/openssl/openssl-0.9.8g/configure-targets.patch b/meta/packages/openssl/openssl-0.9.8g/configure-targets.patch
deleted file mode 100644
index b68123a233..0000000000
--- a/meta/packages/openssl/openssl-0.9.8g/configure-targets.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1
2The number of colons are important :)
3
4Index: openssl-0.9.8g/Configure
5===================================================================
6--- openssl-0.9.8g.orig/Configure 2008-04-12 04:27:22.000000000 +0200
7+++ openssl-0.9.8g/Configure 2008-04-12 04:38:56.000000000 +0200
8@@ -395,6 +395,16 @@
9 "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}",
10 "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}",
11
12+ # Linux on ARM
13+"linux-elf-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
14+"linux-elf-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
15+"linux-gnueabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
16+"linux-gnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
17+"linux-uclibcgnueabi-arm","$ENV{'CC'}:-DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
18+"linux-uclibcgnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
19+
20+"linux-avr32","$ENV{'CC'}:-DTERMIO -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1::::::::::::dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).",
21+
22 #### *BSD [do see comment about ${BSDthreads} above!]
23 "BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
24 "BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
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: