summaryrefslogtreecommitdiff
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
parent7ec15f47750b2977972bbbbbe2aadf064c9671d5 (diff)
downloadopenembedded-core-c4713d040a5b3ae90781cbb31a19868a1fa39f4e.tar.gz
openembedded-core-c4713d040a5b3ae90781cbb31a19868a1fa39f4e.tar.bz2
openembedded-core-c4713d040a5b3ae90781cbb31a19868a1fa39f4e.zip
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>
-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 @@
---- openssl-0.9.8g.orig/Makefile
-+++ openssl-0.9.8g/Makefile
-@@ -11,11 +11,11 @@
- SHLIB_VERSION_HISTORY=
- SHLIB_MAJOR=0
- SHLIB_MINOR=9.8
--SHLIB_EXT=
--PLATFORM=dist
--OPTIONS= no-camellia no-gmp no-krb5 no-mdc2 no-rc5 no-rfc3779 no-seed no-shared no-tlsext no-zlib no-zlib-dynamic
--CONFIGURE_ARGS=dist
--SHLIB_TARGET=
-+SHLIB_EXT=.so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
-+PLATFORM=debian-amd64
-+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
-+CONFIGURE_ARGS=--prefix=/usr --openssldir=/usr/lib/ssl no-idea no-mdc2 no-rc5 zlib enable-tlsext debian-amd64
-+SHLIB_TARGET=linux-shared
-
- # HERE indicates where this Makefile lives. This can be used to indicate
- # where sub-Makefiles are expected to be. Currently has very limited usage,
-@@ -26,10 +26,10 @@
- # for, say, /usr/ and yet have everything installed to /tmp/somedir/usr/.
- # Normally it is left empty.
- INSTALL_PREFIX=
--INSTALLTOP=/usr/local/ssl
-+INSTALLTOP=/usr
-
- # Do not edit this manually. Use Configure --openssldir=DIR do change this!
--OPENSSLDIR=/usr/local/ssl
-+OPENSSLDIR=/usr/lib/ssl
-
- # NO_IDEA - Define to build without the IDEA algorithm
- # NO_RC4 - Define to build without the RC4 algorithm
-@@ -59,11 +59,11 @@
- # equal 4.
- # PKCS1_CHECK - pkcs1 tests.
-
--CC= cc
--CFLAG= -O
--DEPFLAG= -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_GMP -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_TLSEXT
-+CC= gcc
-+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
-+DEPFLAG= -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_GMP -DOPENSSL_NO_IDEA -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED
- PEX_LIBS=
--EX_LIBS=
-+EX_LIBS= -ldl -lz
- EXE_EXT=
- ARFLAGS=
- AR=ar $(ARFLAGS) r
-@@ -71,7 +71,7 @@
- PERL= /usr/bin/perl
- TAR= tar
- TARFLAGS= --no-recursion
--MAKEDEPPROG=makedepend
-+MAKEDEPPROG= gcc
-
- # We let the C compiler driver to take care of .s files. This is done in
- # order to be excused from maintaining a separate set of architecture
-@@ -86,15 +86,15 @@
- PROCESSOR=
-
- # CPUID module collects small commonly used assembler snippets
--CPUID_OBJ=
--BN_ASM= bn_asm.o
-+CPUID_OBJ= x86_64cpuid.o
-+BN_ASM= x86_64-gcc.o
- DES_ENC= des_enc.o fcrypt_b.o
- AES_ASM_OBJ= aes_core.o aes_cbc.o
- BF_ENC= bf_enc.o
- CAST_ENC= c_enc.o
- RC4_ENC= rc4_enc.o
- RC5_ENC= rc5_enc.o
--MD5_ASM_OBJ=
-+MD5_ASM_OBJ= md5-x86_64.o
- SHA1_ASM_OBJ=
- RMD160_ASM_OBJ=
-
-@@ -106,14 +106,14 @@
- ZLIB_INCLUDE=
- LIBZLIB=
-
--DIRS= crypto ssl engines apps test tools
-+DIRS= crypto ssl engines apps tools
- SHLIBDIRS= crypto ssl
-
- # dirs in crypto to build
- SDIRS= \
- objects \
- md2 md4 md5 sha hmac ripemd \
-- des aes rc2 rc4 idea bf cast \
-+ des aes rc2 rc4 bf cast \
- bn ec rsa dsa ecdsa dh ecdh dso engine \
- buffer bio stack lhash rand err \
- evp asn1 pem x509 x509v3 conf txt_db pkcs7 pkcs12 comp ocsp ui krb5 \
-@@ -127,10 +127,11 @@
-
- MAKEFILE= Makefile
-
--MANDIR=$(OPENSSLDIR)/man
-+MANDIR=/usr/share/man
- MAN1=1
- MAN3=3
--MANSUFFIX=
-+MANSUFFIX=ssl
-+MANSECTION=SSL
- SHELL=/bin/sh
-
- TOP= .
-@@ -141,8 +142,8 @@
- SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
- SHARED_SSL=libssl$(SHLIB_EXT)
- SHARED_LIBS=
--SHARED_LIBS_LINK_EXTS=
--SHARED_LDFLAGS=
-+SHARED_LIBS_LINK_EXTS=.so
-+SHARED_LDFLAGS=-m64 -Wl,--version-script=openssl.ld
-
- GENERAL= Makefile
- BASENAME= openssl
-@@ -310,7 +311,8 @@
- echo 'Description: OpenSSL cryptography library'; \
- echo 'Version: '$(VERSION); \
- echo 'Requires: '; \
-- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
-+ echo 'Libs: -L$${libdir} -lcrypto'; \
-+ echo 'Libs.private: $(EX_LIBS)'; \
- echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
-
- libssl.pc: Makefile
-@@ -323,7 +325,8 @@
- echo 'Description: Secure Sockets Layer and cryptography libraries'; \
- echo 'Version: '$(VERSION); \
- echo 'Requires: '; \
-- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
-+ echo 'Libs: -L$${libdir} -lssl'; \
-+ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \
- echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
-
- openssl.pc: Makefile
-@@ -336,7 +339,8 @@
- echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
- echo 'Version: '$(VERSION); \
- echo 'Requires: '; \
-- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
-+ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
-+ echo 'Libs.private: $(EX_LIBS)'; \
- echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
-
- Makefile: Makefile.org Configure config
-@@ -480,7 +484,7 @@
- install_sw:
- @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
- $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
-- $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines \
-+ $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines \
- $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
- $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
- $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
-@@ -558,7 +562,7 @@
- echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
- (cd `$(PERL) util/dirname.pl $$i`; \
- sh -c "$$pod2man \
-- --section=$$sec --center=OpenSSL \
-+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
- --release=$(VERSION) `basename $$i`") \
- > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
- $(PERL) util/extract-names.pl < $$i | \
-@@ -575,7 +579,7 @@
- echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
- (cd `$(PERL) util/dirname.pl $$i`; \
- sh -c "$$pod2man \
-- --section=$$sec --center=OpenSSL \
-+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
- --release=$(VERSION) `basename $$i`") \
- > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
- $(PERL) util/extract-names.pl < $$i | \
---- openssl-0.9.8g.orig/Configure
-+++ openssl-0.9.8g/Configure
-@@ -1,4 +1,4 @@
--:
-+#!/usr/local/bin/perl
- eval 'exec perl -S $0 ${1+"$@"}'
- if $running_under_some_shell;
- ##
-@@ -118,7 +118,8 @@
- 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";
- 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";
-
--my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o::::md5-x86_64.o:::rc4-x86_64.o::";
-+#my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o::::md5-x86_64.o:::rc4-x86_64.o::";
-+my $x86_64_asm="x86_64cpuid.o:x86_64-gcc.o::::md5-x86_64.o:::::";
- 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::";
-
- my $no_asm="::::::::::";
-@@ -308,6 +309,47 @@
- "osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared:::.so",
- "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",
-
-+# Debian GNU/* (various architectures)
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+#"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)",
-+"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)",
-+"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)",
-+#"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+#"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",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+"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)",
-+
- ####
- #### Variety of LINUX:-)
- ####
-@@ -476,7 +518,7 @@
- # Cygwin
- "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",
- "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",
--"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",
-+-"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",
-
- # NetWare from David Ward (dsward@novell.com) - requires MetroWerks NLM development tools
- # netware-clib => legacy CLib c-runtime support
-@@ -1300,6 +1342,8 @@
- $shlib_minor=$2;
- }
-
-+$shared_ldflag .= " -Wl,--version-script=openssl.ld";
-+
- open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
- unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
- open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
-@@ -1371,7 +1415,8 @@
- elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
- {
- my $sotmp = $1;
-- s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
-+# s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
-+ s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/;
- }
- elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
- {
-@@ -1490,7 +1535,7 @@
- if (/^#define\s+OPENSSLDIR/)
- { print OUT "#define OPENSSLDIR \"$openssldir\"\n"; }
- elsif (/^#define\s+ENGINESDIR/)
-- { print OUT "#define ENGINESDIR \"$prefix/lib/engines\"\n"; }
-+ { print OUT "#define ENGINESDIR \"$prefix/lib/ssl/engines\"\n"; }
- elsif (/^#((define)|(undef))\s+OPENSSL_EXPORT_VAR_AS_FUNCTION/)
- { printf OUT "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION\n"
- if $export_var_as_fn;
---- openssl-0.9.8g.orig/Makefile.shared
-+++ openssl-0.9.8g/Makefile.shared
-@@ -151,9 +151,9 @@
- SHLIB_SUFFIX=; \
- ALLSYMSFLAGS='-Wl,--whole-archive'; \
- NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
-- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
-+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
-
--DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
-+DO_GNU_APP=LDFLAGS="$(CFLAGS)"
-
- #This is rather special. It's a special target with which one can link
- #applications without bothering with any features that have anything to
---- openssl-0.9.8g.orig/config
-+++ openssl-0.9.8g/config
-@@ -162,8 +162,8 @@
- echo "${MACHINE}-whatever-linux1"; exit 0
- ;;
-
-- GNU*)
-- echo "hurd-x86"; exit 0;
-+ GNU:*|GNU/*:*)
-+ echo "${MACHINE}-gnuish"; exit 0;
- ;;
-
- LynxOS:*)
---- openssl-0.9.8g.orig/Makefile.org
-+++ openssl-0.9.8g/Makefile.org
-@@ -104,7 +104,7 @@
- ZLIB_INCLUDE=
- LIBZLIB=
-
--DIRS= crypto ssl engines apps test tools
-+DIRS= crypto ssl engines apps tools
- SHLIBDIRS= crypto ssl
-
- # dirs in crypto to build
-@@ -125,10 +125,11 @@
-
- MAKEFILE= Makefile
-
--MANDIR=$(OPENSSLDIR)/man
-+MANDIR=/usr/share/man
- MAN1=1
- MAN3=3
--MANSUFFIX=
-+MANSUFFIX=ssl
-+MANSECTION=SSL
- SHELL=/bin/sh
-
- TOP= .
-@@ -308,7 +309,8 @@
- echo 'Description: OpenSSL cryptography library'; \
- echo 'Version: '$(VERSION); \
- echo 'Requires: '; \
-- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
-+ echo 'Libs: -L$${libdir} -lcrypto'; \
-+ echo 'Libs.private: $(EX_LIBS)'; \
- echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
-
- libssl.pc: Makefile
-@@ -321,7 +323,8 @@
- echo 'Description: Secure Sockets Layer and cryptography libraries'; \
- echo 'Version: '$(VERSION); \
- echo 'Requires: '; \
-- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
-+ echo 'Libs: -L$${libdir} -lssl'; \
-+ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \
- echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
-
- openssl.pc: Makefile
-@@ -334,7 +337,8 @@
- echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
- echo 'Version: '$(VERSION); \
- echo 'Requires: '; \
-- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
-+ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
-+ echo 'Libs.private: $(EX_LIBS)'; \
- echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
-
- Makefile: Makefile.org Configure config
-@@ -478,7 +482,7 @@
- install_sw:
- @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
- $(INSTALL_PREFIX)$(INSTALLTOP)/lib \
-- $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines \
-+ $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines \
- $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \
- $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
- $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
-@@ -556,7 +560,7 @@
- echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
- (cd `$(PERL) util/dirname.pl $$i`; \
- sh -c "$$pod2man \
-- --section=$$sec --center=OpenSSL \
-+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
- --release=$(VERSION) `basename $$i`") \
- > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
- $(PERL) util/extract-names.pl < $$i | \
-@@ -573,7 +577,7 @@
- echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
- (cd `$(PERL) util/dirname.pl $$i`; \
- sh -c "$$pod2man \
-- --section=$$sec --center=OpenSSL \
-+ --section=$${sec}$(MANSECTION) --center=OpenSSL \
- --release=$(VERSION) `basename $$i`") \
- > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
- $(PERL) util/extract-names.pl < $$i | \
---- openssl-0.9.8g.orig/openssl.ld
-+++ openssl-0.9.8g/openssl.ld
-@@ -0,0 +1,5 @@
-+OPENSSL_0.9.8 {
-+ global:
-+ *;
-+};
-+
---- openssl-0.9.8g.orig/VMS/VMSify-conf.pl
-+++ openssl-0.9.8g/VMS/VMSify-conf.pl
-@@ -1,4 +1,4 @@
--#! /usr/bin/perl
-+#!/usr/local/bin/perl
-
- use strict;
- use warnings;
---- openssl-0.9.8g.orig/Netware/do_tests.pl
-+++ openssl-0.9.8g/Netware/do_tests.pl
-@@ -1,4 +1,4 @@
--# perl script to run OpenSSL tests
-+#!/usr/local/bin/perl
-
-
- my $base_path = "\\openssl";
---- openssl-0.9.8g.orig/apps/s_time.c
-+++ openssl-0.9.8g/apps/s_time.c
-@@ -117,6 +117,7 @@
-
- /* The following if from times(3) man page. It may need to be changed
- */
-+#undef HZ
- #ifndef HZ
- # ifdef _SC_CLK_TCK
- # define HZ ((double)sysconf(_SC_CLK_TCK))
---- openssl-0.9.8g.orig/apps/CA.sh
-+++ openssl-0.9.8g/apps/CA.sh
-@@ -91,6 +91,7 @@
- -out ${CATOP}/$CAREQ
- $CA -out ${CATOP}/$CACERT $CADAYS -batch \
- -keyfile ${CATOP}/private/$CAKEY -selfsign \
-+ -extensions v3_ca \
- -infiles ${CATOP}/$CAREQ
- RET=$?
- fi
---- openssl-0.9.8g.orig/apps/CA.pl.in
-+++ openssl-0.9.8g/apps/CA.pl.in
-@@ -65,6 +65,7 @@
- foreach (@ARGV) {
- if ( /^(-\?|-h|-help)$/ ) {
- print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
-+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
- exit 0;
- } elsif (/^-newcert$/) {
- # create a certificate
-@@ -165,6 +166,7 @@
- } else {
- print STDERR "Unknown arg $_\n";
- print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
-+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
- exit 1;
- }
- }
---- openssl-0.9.8g.orig/apps/speed.c
-+++ openssl-0.9.8g/apps/speed.c
-@@ -577,7 +577,7 @@
- #define MAX_BLOCK_SIZE 64
- #endif
- unsigned char DES_iv[8];
-- unsigned char iv[MAX_BLOCK_SIZE/8];
-+ unsigned char iv[2*MAX_BLOCK_SIZE/8];
- #ifndef OPENSSL_NO_DES
- DES_cblock *buf_as_des_cblock = NULL;
- static DES_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0};
---- openssl-0.9.8g.orig/apps/CA.pl
-+++ openssl-0.9.8g/apps/CA.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl
-+#!/usr/local/bin/perl
- #
- # CA - wrapper around ca to make it easier to use ... basically ca requires
- # some setup stuff to be done before you can use it and this makes
-@@ -65,6 +65,7 @@
- foreach (@ARGV) {
- if ( /^(-\?|-h|-help)$/ ) {
- print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
-+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
- exit 0;
- } elsif (/^-newcert$/) {
- # create a certificate
-@@ -165,6 +166,7 @@
- } else {
- print STDERR "Unknown arg $_\n";
- print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
-+ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
- exit 1;
- }
- }
---- openssl-0.9.8g.orig/os2/backwardify.pl
-+++ openssl-0.9.8g/os2/backwardify.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl -w
-+#!/usr/local/bin/perl
- use strict;
-
- # Use as $0
---- openssl-0.9.8g.orig/engines/Makefile
-+++ openssl-0.9.8g/engines/Makefile
-@@ -97,13 +97,13 @@
- *DSO_DL*) sfx="sl";; \
- *) sfx="bad";; \
- esac; \
-- cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
-+ cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines/lib$$l.$$sfx.new; \
- else \
- sfx="so"; \
- cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
- fi; \
-- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new; \
-- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.$$sfx ); \
-+ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines/lib$$l.$$sfx.new; \
-+ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/ssl/engines/lib$$l.$$sfx ); \
- done; \
- fi
-
---- openssl-0.9.8g.orig/engines/openssl.ld
-+++ openssl-0.9.8g/engines/openssl.ld
-@@ -0,0 +1,5 @@
-+OPENSSL_0.9.8 {
-+ global:
-+ *;
-+};
-+
---- openssl-0.9.8g.orig/tools/c_rehash
-+++ openssl-0.9.8g/tools/c_rehash
-@@ -6,7 +6,7 @@
-
- my $openssl;
-
--my $dir = "/usr/local/ssl";
-+my $dir = "/usr/lib/ssl";
-
- if(defined $ENV{OPENSSL}) {
- $openssl = $ENV{OPENSSL};
-@@ -59,12 +59,15 @@
- }
- }
- closedir DIR;
-- FILE: foreach $fname (grep {/\.pem$/} @flist) {
-+ FILE: foreach $fname (grep {/\.pem$|\.crt$/} @flist) {
- # Check to see if certificates and/or CRLs present.
- my ($cert, $crl) = check_file($fname);
- if(!$cert && !$crl) {
-- print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
-- next;
-+ ($cert, $crl) = check_file("$openssl x509 -in \"$fname\" -inform der -outform pem | ");
-+ if(!$cert && !$crl) {
-+ print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
-+ next;
-+ }
- }
- link_hash_cert($fname) if($cert);
- link_hash_crl($fname) if($crl);
-@@ -102,6 +105,9 @@
- my $fname = $_[0];
- $fname =~ s/'/'\\''/g;
- my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname'`;
-+ if(!$hash || !fprint) {
-+ ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname' -inform der`;
-+ }
- chomp $hash;
- chomp $fprint;
- $fprint =~ s/^.*=//;
---- openssl-0.9.8g.orig/tools/c_rehash.in
-+++ openssl-0.9.8g/tools/c_rehash.in
-@@ -59,12 +59,15 @@
- }
- }
- closedir DIR;
-- FILE: foreach $fname (grep {/\.pem$/} @flist) {
-+ FILE: foreach $fname (grep {/\.pem$|\.crt$/} @flist) {
- # Check to see if certificates and/or CRLs present.
- my ($cert, $crl) = check_file($fname);
- if(!$cert && !$crl) {
-- print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
-- next;
-+ ($cert, $crl) = check_file("$openssl x509 -in \"$fname\" -inform der -outform pem | ");
-+ if(!$cert && !$crl) {
-+ print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
-+ next;
-+ }
- }
- link_hash_cert($fname) if($cert);
- link_hash_crl($fname) if($crl);
-@@ -102,6 +105,9 @@
- my $fname = $_[0];
- $fname =~ s/'/'\\''/g;
- my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname'`;
-+ if(!$hash || !fprint) {
-+ ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname' -inform der`;
-+ }
- chomp $hash;
- chomp $fprint;
- $fprint =~ s/^.*=//;
---- openssl-0.9.8g.orig/ssl/t1_lib.c
-+++ openssl-0.9.8g/ssl/t1_lib.c
-@@ -132,6 +132,10 @@
- int extdatalen=0;
- unsigned char *ret = p;
-
-+ /* don't add extensions for SSLv3 */
-+ if (s->client_version == SSL3_VERSION)
-+ return p;
-+
- ret+=2;
-
- if (ret>=limit) return NULL; /* this really never occurs, but ... */
-@@ -202,6 +206,10 @@
- int extdatalen=0;
- unsigned char *ret = p;
-
-+ /* don't add extensions for SSLv3 */
-+ if (s->version == SSL3_VERSION)
-+ return p;
-+
- ret+=2;
- if (ret>=limit) return NULL; /* this really never occurs, but ... */
-
---- openssl-0.9.8g.orig/ms/uplink.pl
-+++ openssl-0.9.8g/ms/uplink.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/env perl
-+#!/usr/local/bin/perl
- #
- # For Microsoft CL this is implemented as inline assembler. So that
- # even though this script can generate even Win32 code, we'll be
---- openssl-0.9.8g.orig/demos/tunala/configure.in
-+++ openssl-0.9.8g/demos/tunala/configure.in
-@@ -1,4 +1,4 @@
--dnl Process this file with autoconf to produce a configure script.
-+#!/usr/local/bin/perl
- AC_INIT(tunala.c)
- AM_CONFIG_HEADER(config.h)
- AM_INIT_AUTOMAKE(tunala, 0.0.1-dev)
---- openssl-0.9.8g.orig/doc/Makefile
-+++ openssl-0.9.8g/doc/Makefile
-@@ -0,0 +1,40 @@
-+VERSION =
-+
-+#PODS = $(wildcard *.pod)
-+#MANS = $(addsuffix .man, $(basename $(PODS)))
-+
-+MANS = openssl.1 ssl.3 crypto.3
-+
-+P2M = pod2man --center='OpenSSL Documentation' --release="OpenSSL $(VERSION)"
-+
-+all: manpages
-+
-+.PHONY: manpages
-+
-+manpages: openssl.1 crypto.3 ssl.3
-+
-+openssl.1:
-+ $(P2M) --section=1 openssl.pod > openssl.1
-+
-+crypto.3:
-+ $(P2M) --section=3 crypto.pod > crypto.3
-+
-+ssl.3:
-+ $(P2M) --section=3 ssl.pod > ssl.3
-+
-+.PHONY: install
-+install:
-+ mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man1
-+ mkdir -p $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
-+ install -m 644 -p openssl.1 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man1
-+ install -m 644 -p crypto.3 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
-+ install -m 644 -p ssl.3 $(INSTALL_PREFIX)$(INSTALLTOP)/share/man/man3
-+ rm -f $(MANS)
-+
-+.PHONY: clean
-+clean:
-+ rm -f $(MANS)
-+
-+.PHONY: realclean
-+realclean:
-+ -$(MAKE) clean
---- openssl-0.9.8g.orig/doc/apps/c_rehash.pod
-+++ openssl-0.9.8g/doc/apps/c_rehash.pod
-@@ -0,0 +1,55 @@
-+
-+=pod
-+
-+=head1 NAME
-+
-+c_rehash - Create symbolic links to files named by the hash values
-+
-+=head1 SYNOPSIS
-+
-+B<c_rehash>
-+[directory] ...
-+
-+=head1 DESCRIPTION
-+
-+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.
-+
-+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.
-+
-+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.
-+
-+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.
-+
-+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.
-+
-+The program will also warn if there are files with extension .pem which are not certificate or CRL files.
-+
-+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 (=).
-+
-+=head1 OPTIONS
-+
-+None
-+
-+=head1 ENVIRONMENT
-+
-+=over 4
-+
-+=item B<OPENSSL>
-+
-+The name (and path) of an executable to use to generate hashes and fingerprints (see above).
-+
-+=item B<SSL_CERT_DIR>
-+
-+Colon separated list of directories to operate on. Ignored if directories are listed on the command line.
-+
-+=head1 SEE ALSO
-+
-+L<openssl(1)|openssl(1)>, L<x509(1)|x509(1)>
-+
-+=back
-+
-+=head1 BUGS
-+
-+No known bugs
-+
-+=cut
---- openssl-0.9.8g.orig/crypto/Makefile
-+++ openssl-0.9.8g/crypto/Makefile
-@@ -57,7 +57,7 @@
- echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
- echo '#endif' ) >buildinf.h
-
--x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl
-+x86cpuid-elf.S: x86cpuid.pl perlasm/x86asm.pl
- $(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
- x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
- $(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@
-@@ -70,7 +70,7 @@
- uplink-cof.s: ../ms/uplink.pl
- $(PERL) ../ms/uplink.pl coff > $@
-
--x86_64cpuid.s: x86_64cpuid.pl
-+x86_64cpuid.S: x86_64cpuid.pl
- $(PERL) x86_64cpuid.pl $@
- ia64cpuid.s: ia64cpuid.S
- $(CC) $(CFLAGS) -E ia64cpuid.S > $@
---- openssl-0.9.8g.orig/crypto/x86cpuid.pl
-+++ openssl-0.9.8g/crypto/x86cpuid.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/env perl
-+#!/usr/local/bin/perl
-
- push(@INC,"perlasm");
- require "x86asm.pl";
---- openssl-0.9.8g.orig/crypto/opensslconf.h
-+++ openssl-0.9.8g/crypto/opensslconf.h
-@@ -10,6 +10,9 @@
- #ifndef OPENSSL_NO_GMP
- # define OPENSSL_NO_GMP
- #endif
-+#ifndef OPENSSL_NO_IDEA
-+# define OPENSSL_NO_IDEA
-+#endif
- #ifndef OPENSSL_NO_KRB5
- # define OPENSSL_NO_KRB5
- #endif
-@@ -25,11 +28,11 @@
- #ifndef OPENSSL_NO_SEED
- # define OPENSSL_NO_SEED
- #endif
--#ifndef OPENSSL_NO_TLSEXT
--# define OPENSSL_NO_TLSEXT
--#endif
-
- #endif /* OPENSSL_DOING_MAKEDEPEND */
-+#ifndef OPENSSL_THREADS
-+# define OPENSSL_THREADS
-+#endif
- #ifndef OPENSSL_NO_DYNAMIC_ENGINE
- # define OPENSSL_NO_DYNAMIC_ENGINE
- #endif
-@@ -45,6 +48,9 @@
- # if defined(OPENSSL_NO_GMP) && !defined(NO_GMP)
- # define NO_GMP
- # endif
-+# if defined(OPENSSL_NO_IDEA) && !defined(NO_IDEA)
-+# define NO_IDEA
-+# endif
- # if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
- # define NO_KRB5
- # endif
-@@ -60,11 +66,10 @@
- # if defined(OPENSSL_NO_SEED) && !defined(NO_SEED)
- # define NO_SEED
- # endif
--# if defined(OPENSSL_NO_TLSEXT) && !defined(NO_TLSEXT)
--# define NO_TLSEXT
--# endif
- #endif
-
-+#define OPENSSL_CPUID_OBJ
-+
- /* crypto/opensslconf.h.in */
-
- /* Generate 80386 code? */
-@@ -72,8 +77,8 @@
-
- #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
- #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
--#define ENGINESDIR "/usr/local/ssl/lib/engines"
--#define OPENSSLDIR "/usr/local/ssl"
-+#define ENGINESDIR "/usr/lib/ssl/engines"
-+#define OPENSSLDIR "/usr/lib/ssl"
- #endif
- #endif
-
-@@ -104,14 +109,14 @@
- * - Intel P6 because partial register stalls are very expensive;
- * - elder Alpha because it lacks byte load/store instructions;
- */
--#define RC4_INT unsigned int
-+#define RC4_INT unsigned char
- #endif
- #if !defined(RC4_CHUNK)
- /*
- * This enables code handling data aligned at natural CPU word
- * boundary. See crypto/rc4/rc4_enc.c for further details.
- */
--#undef RC4_CHUNK
-+#define RC4_CHUNK unsigned long
- #endif
- #endif
-
-@@ -119,7 +124,7 @@
- /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
- * %20 speed up (longs are 8 bytes, int's are 4). */
- #ifndef DES_LONG
--#define DES_LONG unsigned long
-+#define DES_LONG unsigned int
- #endif
- #endif
-
-@@ -133,9 +138,9 @@
- /* The prime number generation stuff may not work when
- * EIGHT_BIT but I don't care since I've only used this mode
- * for debuging the bignum libraries */
--#undef SIXTY_FOUR_BIT_LONG
-+#define SIXTY_FOUR_BIT_LONG
- #undef SIXTY_FOUR_BIT
--#define THIRTY_TWO_BIT
-+#undef THIRTY_TWO_BIT
- #undef SIXTEEN_BIT
- #undef EIGHT_BIT
- #endif
-@@ -149,7 +154,7 @@
-
- #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
- #define CONFIG_HEADER_BF_LOCL_H
--#undef BF_PTR
-+#define BF_PTR2
- #endif /* HEADER_BF_LOCL_H */
-
- #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
-@@ -179,7 +184,7 @@
- /* Unroll the inner loop, this sometimes helps, sometimes hinders.
- * Very mucy CPU dependant */
- #ifndef DES_UNROLL
--#undef DES_UNROLL
-+#define DES_UNROLL
- #endif
-
- /* These default values were supplied by
---- openssl-0.9.8g.orig/crypto/x86_64cpuid.pl
-+++ openssl-0.9.8g/crypto/x86_64cpuid.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/env perl
-+#!/usr/local/bin/perl
-
- $output=shift;
- $win64a=1 if ($output =~ /win64a\.[s|asm]/);
-@@ -134,5 +134,9 @@
- .size OPENSSL_ia32_cpuid,.-OPENSSL_ia32_cpuid
-
- .section .init
-+#ifdef OPENSSL_PIC
-+ call OPENSSL_cpuid_setup\@PLT
-+#else
- call OPENSSL_cpuid_setup
-+#endif
- ___
---- openssl-0.9.8g.orig/crypto/md5/asm/md5-x86_64.pl
-+++ openssl-0.9.8g/crypto/md5/asm/md5-x86_64.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl -w
-+#!/usr/local/bin/perl
- #
- # MD5 optimized for AMD64.
- #
---- openssl-0.9.8g.orig/crypto/md5/asm/md5-sparcv9.S
-+++ openssl-0.9.8g/crypto/md5/asm/md5-sparcv9.S
-@@ -74,14 +74,14 @@
- #define Dval R8
-
- #if defined(MD5_BLOCK_DATA_ORDER)
--# if defined(OPENSSL_SYSNAME_ULTRASPARC)
-+/*# if defined(OPENSSL_SYSNAME_ULTRASPARC)*/
- # define LOAD lda
- # define X(i) [%i1+i*4]%asi
- # define md5_block md5_block_asm_data_order_aligned
- # define ASI_PRIMARY_LITTLE 0x88
--# else
-+/*# else
- # error "MD5_BLOCK_DATA_ORDER is supported only on UltraSPARC!"
--# endif
-+# endif*/
- #else
- # define LOAD ld
- # define X(i) [%i1+i*4]
---- openssl-0.9.8g.orig/crypto/sha/sha.h
-+++ openssl-0.9.8g/crypto/sha/sha.h
-@@ -59,6 +59,7 @@
- #ifndef HEADER_SHA_H
- #define HEADER_SHA_H
-
-+#include <stddef.h>
- #include <openssl/e_os2.h>
- #include <stddef.h>
-
---- openssl-0.9.8g.orig/crypto/sha/asm/sha1-ia64.pl
-+++ openssl-0.9.8g/crypto/sha/asm/sha1-ia64.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/env perl
-+#!/usr/local/bin/perl
- #
- # ====================================================================
- # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
---- openssl-0.9.8g.orig/crypto/sha/asm/sha512-sse2.pl
-+++ openssl-0.9.8g/crypto/sha/asm/sha512-sse2.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/env perl
-+#!/usr/local/bin/perl
- #
- # ====================================================================
- # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
---- openssl-0.9.8g.orig/crypto/sha/asm/sha512-ia64.pl
-+++ openssl-0.9.8g/crypto/sha/asm/sha512-ia64.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/env perl
-+#!/usr/local/bin/perl
- #
- # ====================================================================
- # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
---- openssl-0.9.8g.orig/crypto/rand/md_rand.c
-+++ openssl-0.9.8g/crypto/rand/md_rand.c
-@@ -465,8 +465,10 @@
- MD_Update(&m,local_md,MD_DIGEST_LENGTH);
- MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c));
- #ifndef PURIFY
-+#if 0 /* Don't add uninitialised data. */
- MD_Update(&m,buf,j); /* purify complains */
- #endif
-+#endif
- k=(st_idx+MD_DIGEST_LENGTH/2)-st_num;
- if (k > 0)
- {
---- openssl-0.9.8g.orig/crypto/des/asm/desboth.pl
-+++ openssl-0.9.8g/crypto/des/asm/desboth.pl
-@@ -16,6 +16,11 @@
-
- &push("edi");
-
-+ &call (&label("pic_point0"));
-+ &set_label("pic_point0");
-+ &blindpop("ebp");
-+ &add ("ebp", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
-+
- &comment("");
- &comment("Load the data words");
- &mov($L,&DWP(0,"ebx","",0));
-@@ -47,15 +52,21 @@
- &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
- &mov(&swtmp(1), "eax");
- &mov(&swtmp(0), "ebx");
-- &call("DES_encrypt2");
-+ &exch("ebx", "ebp");
-+ &call("DES_encrypt2\@PLT");
-+ &exch("ebx", "ebp");
- &mov(&swtmp(2), (DWC(($enc)?"0":"1")));
- &mov(&swtmp(1), "edi");
- &mov(&swtmp(0), "ebx");
-- &call("DES_encrypt2");
-+ &exch("ebx", "ebp");
-+ &call("DES_encrypt2\@PLT");
-+ &exch("ebx", "ebp");
- &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
- &mov(&swtmp(1), "esi");
- &mov(&swtmp(0), "ebx");
-- &call("DES_encrypt2");
-+ &exch("ebx", "ebp");
-+ &call("DES_encrypt2\@PLT");
-+ &exch("ebx", "ebp");
-
- &stack_pop(3);
- &mov($L,&DWP(0,"ebx","",0));
---- openssl-0.9.8g.orig/crypto/rc4/asm/rc4-x86_64.pl
-+++ openssl-0.9.8g/crypto/rc4/asm/rc4-x86_64.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/env perl
-+#!/usr/local/bin/perl
- #
- # ====================================================================
- # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
---- openssl-0.9.8g.orig/crypto/perlasm/x86unix.pl
-+++ openssl-0.9.8g/crypto/perlasm/x86unix.pl
-@@ -399,6 +399,29 @@
- $stack=4;
- }
-
-+sub main'function_begin_B_static
-+ {
-+ local($func,$extra)=@_;
-+
-+ &main'external_label($func);
-+ $func=$under.$func;
-+
-+ local($tmp)=<<"EOF";
-+.text
-+EOF
-+ push(@out,$tmp);
-+ if ($main'cpp)
-+ { push(@out,"TYPE($func,\@function)\n"); }
-+ elsif ($main'coff)
-+ { $tmp=push(@out,".def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); }
-+ elsif ($main'aout and !$main'pic)
-+ { }
-+ else { push(@out,".type $func,\@function\n"); }
-+ push(@out,".align\t$align\n");
-+ push(@out,"$func:\n");
-+ $stack=4;
-+ }
-+
- sub main'function_end
- {
- local($func)=@_;
-@@ -730,7 +753,17 @@
- {
- $tmp=<<___;
- .section .init
-+#ifdef OPENSSL_PIC
-+ pushl %ebx
-+ call .pic_point0
-+.pic_point0:
-+ popl %ebx
-+ addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx
-+ call $under$f\@PLT
-+ popl %ebx
-+#else
- call $under$f
-+#endif
- jmp .Linitalign
- .align $align
- .Linitalign:
---- openssl-0.9.8g.orig/crypto/perlasm/cbc.pl
-+++ openssl-0.9.8g/crypto/perlasm/cbc.pl
-@@ -122,7 +122,11 @@
- &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
- &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
-
-- &call($enc_func);
-+ &call (&label("pic_point0"));
-+ &set_label("pic_point0");
-+ &blindpop("ebx");
-+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
-+ &call("$enc_func\@PLT");
-
- &mov("eax", &DWP($data_off,"esp","",0));
- &mov("ebx", &DWP($data_off+4,"esp","",0));
-@@ -187,7 +191,11 @@
- &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
- &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
-
-- &call($enc_func);
-+ &call (&label("pic_point1"));
-+ &set_label("pic_point1");
-+ &blindpop("ebx");
-+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point1") . "]");
-+ &call("$enc_func\@PLT");
-
- &mov("eax", &DWP($data_off,"esp","",0));
- &mov("ebx", &DWP($data_off+4,"esp","",0));
-@@ -220,7 +228,11 @@
- &mov(&DWP($data_off,"esp","",0), "eax"); # put back
- &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
-
-- &call($dec_func);
-+ &call (&label("pic_point2"));
-+ &set_label("pic_point2");
-+ &blindpop("ebx");
-+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point2") . "]");
-+ &call("$dec_func\@PLT");
-
- &mov("eax", &DWP($data_off,"esp","",0)); # get return
- &mov("ebx", &DWP($data_off+4,"esp","",0)); #
-@@ -263,7 +275,11 @@
- &mov(&DWP($data_off,"esp","",0), "eax"); # put back
- &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
-
-- &call($dec_func);
-+ &call (&label("pic_point3"));
-+ &set_label("pic_point3");
-+ &blindpop("ebx");
-+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point3") . "]");
-+ &call("$dec_func\@PLT");
-
- &mov("eax", &DWP($data_off,"esp","",0)); # get return
- &mov("ebx", &DWP($data_off+4,"esp","",0)); #
---- openssl-0.9.8g.orig/crypto/perlasm/x86_64-xlate.pl
-+++ openssl-0.9.8g/crypto/perlasm/x86_64-xlate.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/env perl
-+#!/usr/local/bin/perl
-
- # Ascetic x86_64 AT&T to MASM assembler translator by <appro>.
- #
---- openssl-0.9.8g.orig/crypto/pkcs7/pk7_mime.c
-+++ openssl-0.9.8g/crypto/pkcs7/pk7_mime.c
-@@ -335,9 +335,9 @@
-
- if(strcmp(hdr->value, "application/x-pkcs7-signature") &&
- strcmp(hdr->value, "application/pkcs7-signature")) {
-- sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
- PKCS7err(PKCS7_F_SMIME_READ_PKCS7,PKCS7_R_SIG_INVALID_MIME_TYPE);
- ERR_add_error_data(2, "type: ", hdr->value);
-+ sk_MIME_HEADER_pop_free(headers, mime_hdr_free);
- sk_BIO_pop_free(parts, BIO_vfree);
- return NULL;
- }
---- openssl-0.9.8g.orig/crypto/bn/asm/ppc.pl
-+++ openssl-0.9.8g/crypto/bn/asm/ppc.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/env perl
-+#!/usr/local/bin/perl
- #
- # Implemented as a Perl wrapper as we want to support several different
- # architectures with single file. We pick up the target based on the
---- openssl-0.9.8g.orig/crypto/aes/asm/aes-586.pl
-+++ openssl-0.9.8g/crypto/aes/asm/aes-586.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/env perl
-+#!/usr/local/bin/perl
- #
- # ====================================================================
- # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
-@@ -250,7 +250,7 @@
- sub _data_word() { my $i; while(defined($i=shift)) { &data_word($i,$i); } }
-
- &public_label("AES_Te");
--&function_begin_B("_x86_AES_encrypt");
-+&function_begin_B_static("_x86_AES_encrypt");
- if ($vertical_spin) {
- # I need high parts of volatile registers to be accessible...
- &exch ($s1="edi",$key="ebx");
-@@ -539,7 +539,7 @@
- }
-
- &public_label("AES_Td");
--&function_begin_B("_x86_AES_decrypt");
-+&function_begin_B_static("_x86_AES_decrypt");
- # note that caller is expected to allocate stack frame for me!
- &mov (&DWP(12,"esp"),$key); # save key
-
-@@ -1460,15 +1460,22 @@
- &public_label("AES_Td");
- &public_label("AES_Te");
- &function_begin_B("AES_set_decrypt_key");
-+ &push ("ebx");
- &mov ("eax",&wparam(0));
- &mov ("ecx",&wparam(1));
- &mov ("edx",&wparam(2));
- &sub ("esp",12);
-+
-+ &call (&label("pic_point0"));
-+ &set_label("pic_point0");
-+ &blindpop("ebx");
-+ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
- &mov (&DWP(0,"esp"),"eax");
- &mov (&DWP(4,"esp"),"ecx");
- &mov (&DWP(8,"esp"),"edx");
-- &call ("AES_set_encrypt_key");
-+ &call ("AES_set_encrypt_key\@PLT");
- &add ("esp",12);
-+ &pop ("ebx");
- &cmp ("eax",0);
- &je (&label("proceed"));
- &ret ();
---- openssl-0.9.8g.orig/crypto/asn1/charmap.pl
-+++ openssl-0.9.8g/crypto/asn1/charmap.pl
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/perl -w
-+#!/usr/local/bin/perl
-
- use strict;
-
---- openssl-0.9.8g.orig/util/mkerr.pl
-+++ openssl-0.9.8g/util/mkerr.pl
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/perl -w
-+#!/usr/local/bin/perl
-
- my $config = "crypto/err/openssl.ec";
- my $debug = 0;
---- openssl-0.9.8g.orig/util/clean-depend.pl
-+++ openssl-0.9.8g/util/clean-depend.pl
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/perl -w
-+#!/usr/local/bin/perl
- # Clean the dependency list in a makefile of standard includes...
- # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
-
---- openssl-0.9.8g.orig/util/extract-names.pl
-+++ openssl-0.9.8g/util/extract-names.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl
-+#!/usr/local/bin/perl
-
- $/ = ""; # Eat a paragraph at once.
- while(<STDIN>) {
---- openssl-0.9.8g.orig/util/pod2man.pl
-+++ openssl-0.9.8g/util/pod2man.pl
-@@ -1,4 +1,4 @@
--: #!/usr/bin/perl-5.005
-+#!/usr/local/bin/perl
- eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
- if $running_under_some_shell;
-
---- openssl-0.9.8g.orig/util/mkstack.pl
-+++ openssl-0.9.8g/util/mkstack.pl
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/perl -w
-+#!/usr/local/bin/perl
-
- # This is a utility that searches out "DECLARE_STACK_OF()"
- # declarations in .h and .c files, and updates/creates/replaces
---- openssl-0.9.8g.orig/util/selftest.pl
-+++ openssl-0.9.8g/util/selftest.pl
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/perl -w
-+#!/usr/local/bin/perl
- #
- # Run the test suite and generate a report
- #
---- openssl-0.9.8g.orig/util/extract-section.pl
-+++ openssl-0.9.8g/util/extract-section.pl
-@@ -1,4 +1,4 @@
--#!/usr/bin/perl
-+#!/usr/local/bin/perl
-
- while(<STDIN>) {
- if (/=for\s+comment\s+openssl_manual_section:(\S+)/)
---- openssl-0.9.8g.orig/util/mkdef.pl
-+++ openssl-0.9.8g/util/mkdef.pl
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/perl -w
-+#!/usr/local/bin/perl
- #
- # generate a .def file
- #
---- openssl-0.9.8g.orig/util/pl/netware.pl
-+++ openssl-0.9.8g/util/pl/netware.pl
-@@ -1,4 +1,4 @@
--# Metrowerks Codewarrior for NetWare
-+#!/usr/local/bin/perl
- #
-
- # 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 @@
-Fix for building md5-x86_64.pl with recent gcc and binutils (as first discovered
-on my Fedora 13 machine).
-
-Patch taken from upstream bug tracker:
-http://rt.openssl.org/Ticket/Display.html?id=2094&user=guest&pass=guest
-
-This issue is marked as resolved upstream (on 13/11/2009) so we should be able
-to remove this patch when we update openssl.
-
-JL - 07/05/2010
-
-Index: openssl-0.9.8g/crypto/md5/asm/md5-x86_64.pl
-===================================================================
---- openssl-0.9.8g.orig/crypto/md5/asm/md5-x86_64.pl 2010-05-07 00:24:16.000000000 +0100
-+++ openssl-0.9.8g/crypto/md5/asm/md5-x86_64.pl 2010-05-07 00:26:25.639809341 +0100
-@@ -19,6 +19,7 @@
- sub round1_step
- {
- my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
-+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
- $code .= " mov 0*4(%rsi), %r10d /* (NEXT STEP) X[0] */\n" if ($pos == -1);
- $code .= " mov %edx, %r11d /* (NEXT STEP) z' = %edx */\n" if ($pos == -1);
- $code .= <<EOF;
-@@ -42,6 +43,7 @@
- sub round2_step
- {
- my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
-+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
- $code .= " mov 1*4(%rsi), %r10d /* (NEXT STEP) X[1] */\n" if ($pos == -1);
- $code .= " mov %ecx, %r11d /* (NEXT STEP) y' = %ecx */\n" if ($pos == -1);
- $code .= <<EOF;
-@@ -65,6 +67,7 @@
- sub round3_step
- {
- my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
-+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
- $code .= " mov 5*4(%rsi), %r10d /* (NEXT STEP) X[5] */\n" if ($pos == -1);
- $code .= " mov %ecx, %r11d /* (NEXT STEP) y' = %ecx */\n" if ($pos == -1);
- $code .= <<EOF;
-@@ -87,6 +90,7 @@
- sub round4_step
- {
- my ($pos, $dst, $x, $y, $z, $k_next, $T_i, $s) = @_;
-+ $T_i = unpack("l",pack("l", hex($T_i))); # convert to 32-bit signed decimal
- $code .= " mov 0*4(%rsi), %r10d /* (NEXT STEP) X[0] */\n" if ($pos == -1);
- $code .= " mov \$0xffffffff, %r11d\n" if ($pos == -1);
- $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 @@
-diff -urN openssl-0.9.8g.orig/crypto/Makefile openssl-0.9.8g/crypto/Makefile
---- openssl-0.9.8g.orig/crypto/Makefile 2006-02-04 02:48:41.000000000 +0100
-+++ openssl-0.9.8g/crypto/Makefile 2008-05-12 15:17:03.000000000 +0200
-@@ -103,7 +103,7 @@
-
- shared: buildinf.h lib subdirs
- if [ -n "$(SHARED_LIBS)" ]; then \
-- (cd ..; $(MAKE) $(SHARED_LIB)); \
-+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
- fi
-
- libs:
-diff -urN openssl-0.9.8g.orig/Makefile.org openssl-0.9.8g/Makefile.org
---- openssl-0.9.8g.orig/Makefile.org 2007-04-24 01:49:54.000000000 +0200
-+++ openssl-0.9.8g/Makefile.org 2008-05-12 15:16:34.000000000 +0200
-@@ -246,7 +246,7 @@
-
- libcrypto$(SHLIB_EXT): libcrypto.a
- @if [ "$(SHLIB_TARGET)" != "" ]; then \
-- $(MAKE) SHLIBDIRS=crypto build-shared; \
-+ $(MAKE) -e SHLIBDIRS=crypto build-shared; \
- else \
- echo "There's no support for shared libraries on this platform" >&2; \
- exit 1; \
-@@ -254,7 +254,7 @@
-
- libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
- @if [ "$(SHLIB_TARGET)" != "" ]; then \
-- $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
-+ $(MAKE) -e SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \
- else \
- echo "There's no support for shared libraries on this platform" >&2; \
- exit 1; \
-diff -urN openssl-0.9.8g.orig/ssl/Makefile openssl-0.9.8g/ssl/Makefile
---- openssl-0.9.8g.orig/ssl/Makefile 2007-10-11 16:36:59.000000000 +0200
-+++ openssl-0.9.8g/ssl/Makefile 2008-05-12 15:17:26.000000000 +0200
-@@ -62,7 +62,7 @@
-
- shared: lib
- if [ -n "$(SHARED_LIBS)" ]; then \
-- (cd ..; $(MAKE) $(SHARED_LIB)); \
-+ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
- fi
-
- 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 @@
+Index: openssl-0.9.8m/apps/CA.pl.in
+===================================================================
+--- openssl-0.9.8m.orig/apps/CA.pl.in 2006-04-28 00:28:51.000000000 +0000
++++ openssl-0.9.8m/apps/CA.pl.in 2010-02-27 00:36:51.000000000 +0000
+@@ -65,6 +65,7 @@
+ foreach (@ARGV) {
+ if ( /^(-\?|-h|-help)$/ ) {
+ print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
++ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
+ exit 0;
+ } elsif (/^-newcert$/) {
+ # create a certificate
+@@ -165,6 +166,7 @@
+ } else {
+ print STDERR "Unknown arg $_\n";
+ print STDERR "usage: CA -newcert|-newreq|-newreq-nodes|-newca|-sign|-verify\n";
++ print STDERR "usage: CA -signcert certfile keyfile|-newcert|-newreq|-newca|-sign|-verify\n";
+ exit 1;
+ }
+ }
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 @@
+Index: openssl-0.9.8k/config
+===================================================================
+--- openssl-0.9.8k.orig/config 2009-02-16 09:43:41.000000000 +0100
++++ openssl-0.9.8k/config 2009-07-19 11:32:41.000000000 +0200
+@@ -162,8 +162,8 @@
+ echo "${MACHINE}-whatever-linux1"; exit 0
+ ;;
+
+- GNU*)
+- echo "hurd-x86"; exit 0;
++ GNU:*|GNU/*:*)
++ echo "${MACHINE}-gnuish"; exit 0;
+ ;;
+
+ 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 @@
+Index: openssl-0.9.8k/Configure
+===================================================================
+--- openssl-0.9.8k.orig/Configure 2009-12-09 16:09:41.000000000 +0000
++++ openssl-0.9.8k/Configure 2009-12-09 16:09:55.000000000 +0000
+@@ -320,6 +320,49 @@
+ "osf1-alpha-cc", "cc:-std1 -tune host -O4 -readonly_strings::(unknown):::SIXTY_FOUR_BIT_LONG RC4_CHUNK:${no_asm}:dlfcn:alpha-osf1-shared:::.so",
+ "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",
+
++# Debian GNU/* (various architectures)
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++#"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)",
++"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)",
++"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)",
++"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)",
++#"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++#"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",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++"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)",
++
+ ####
+ #### Variety of LINUX:-)
+ ####
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 @@
+Index: openssl-0.9.8m/Makefile.org
+===================================================================
+--- openssl-0.9.8m.orig/Makefile.org 2010-01-27 16:06:36.000000000 +0000
++++ openssl-0.9.8m/Makefile.org 2010-02-27 00:43:04.000000000 +0000
+@@ -620,7 +620,7 @@
+ install_sw:
+ @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \
+ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR) \
+- $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines \
++ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines \
+ $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/pkgconfig \
+ $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \
+ $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \
+Index: openssl-0.9.8m/engines/Makefile
+===================================================================
+--- openssl-0.9.8m.orig/engines/Makefile 2009-11-10 01:53:02.000000000 +0000
++++ openssl-0.9.8m/engines/Makefile 2010-02-27 00:45:03.000000000 +0000
+@@ -101,13 +101,13 @@
+ *DSO_DL*) sfx="sl";; \
+ *) sfx="bad";; \
+ esac; \
+- cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
++ cp lib$$l.$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new; \
+ else \
+ sfx="so"; \
+ cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
+ fi; \
+- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new; \
+- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx ); \
++ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new; \
++ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/lib$$l.$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/lib$$l.$$sfx ); \
+ done; \
+ fi
+
+Index: openssl-0.9.8m/Configure
+===================================================================
+--- openssl-0.9.8m.orig/Configure 2010-02-27 00:40:42.000000000 +0000
++++ openssl-0.9.8m/Configure 2010-02-27 00:46:47.000000000 +0000
+@@ -1738,7 +1738,7 @@
+ # $foo is to become "$prefix/lib$multilib/engines";
+ # as Makefile.org and engines/Makefile are adapted for
+ # $multilib suffix.
+- my $foo = "$prefix/lib/engines";
++ my $foo = "$prefix/lib/ssl/engines";
+ $foo =~ s/\\/\\\\/g;
+ print OUT "#define ENGINESDIR \"$foo\"\n";
+ }
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 @@
+Index: openssl-0.9.8k/crypto/perlasm/x86_64-xlate.pl
+===================================================================
+--- openssl-0.9.8k.orig/crypto/perlasm/x86_64-xlate.pl 2008-02-13 21:01:48.000000000 +0100
++++ openssl-0.9.8k/crypto/perlasm/x86_64-xlate.pl 2009-07-19 11:37:23.000000000 +0200
+@@ -62,7 +62,7 @@
+ my ($outdev,$outino,@junk)=stat($output);
+
+ open STDOUT,">$output" || die "can't open $output: $!"
+- if ($stddev!=$outdev || $stdino!=$outino);
++# if ($stddev!=$outdev || $stdino!=$outino);
+ }
+
+ 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 @@
+Index: openssl-0.9.8k/Makefile.org
+===================================================================
+--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:32:41.000000000 +0200
++++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:31.000000000 +0200
+@@ -131,7 +131,7 @@
+
+ BASEADDR=
+
+-DIRS= crypto fips ssl engines apps test tools
++DIRS= crypto fips ssl engines apps tools
+ SHLIBDIRS= crypto ssl fips
+
+ # 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 @@
+Index: openssl-0.9.8k/Makefile.org
+===================================================================
+--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:32:41.000000000 +0200
++++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:29.000000000 +0200
+@@ -152,7 +152,7 @@
+
+ MAKEFILE= Makefile
+
+-MANDIR=$(OPENSSLDIR)/man
++MANDIR=/usr/share/man
+ MAN1=1
+ MAN3=3
+ 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 @@
+Index: openssl-0.9.8k/Makefile.org
+===================================================================
+--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:34:06.000000000 +0200
++++ openssl-0.9.8k/Makefile.org 2009-07-19 11:37:21.000000000 +0200
+@@ -155,7 +155,8 @@
+ MANDIR=/usr/share/man
+ MAN1=1
+ MAN3=3
+-MANSUFFIX=
++MANSUFFIX=ssl
++MANSECTION=SSL
+ SHELL=/bin/sh
+
+ TOP= .
+@@ -694,7 +695,7 @@
+ echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
+ (cd `$(PERL) util/dirname.pl $$i`; \
+ sh -c "$$pod2man \
+- --section=$$sec --center=OpenSSL \
++ --section=$${sec}$(MANSECTION) --center=OpenSSL \
+ --release=$(VERSION) `basename $$i`") \
+ > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
+ $(PERL) util/extract-names.pl < $$i | \
+@@ -711,7 +712,7 @@
+ echo "installing man$$sec/$$fn.$${sec}$(MANSUFFIX)"; \
+ (cd `$(PERL) util/dirname.pl $$i`; \
+ sh -c "$$pod2man \
+- --section=$$sec --center=OpenSSL \
++ --section=$${sec}$(MANSECTION) --center=OpenSSL \
+ --release=$(VERSION) `basename $$i`") \
+ > $(INSTALL_PREFIX)$(MANDIR)/man$$sec/$$fn.$${sec}$(MANSUFFIX); \
+ $(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 @@
+Index: openssl-0.9.8k/Makefile.shared
+===================================================================
+--- openssl-0.9.8k.orig/Makefile.shared 2008-09-17 17:56:40.000000000 +0200
++++ openssl-0.9.8k/Makefile.shared 2009-07-19 11:37:25.000000000 +0200
+@@ -151,7 +151,7 @@
+ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
+
+-DO_GNU_APP=LDFLAGS="$(CFLAGS) -Wl,-rpath,$(LIBRPATH)"
++DO_GNU_APP=LDFLAGS="$(CFLAGS)"
+
+ #This is rather special. It's a special target with which one can link
+ #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 @@
+Index: openssl-0.9.8k/Makefile.shared
+===================================================================
+--- openssl-0.9.8k.orig/Makefile.shared 2009-07-19 11:35:02.000000000 +0200
++++ openssl-0.9.8k/Makefile.shared 2009-07-19 11:35:48.000000000 +0200
+@@ -149,7 +149,7 @@
+ SHLIB_SUFFIX=; \
+ ALLSYMSFLAGS='-Wl,--whole-archive'; \
+ NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
+- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-Bsymbolic -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
++ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared -Wl,-soname=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX"
+
+ DO_GNU_APP=LDFLAGS="$(CFLAGS)"
+
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 @@
+From: Kurt Roeckx <kurt@roeckx.be>
+Subject: Change the perl path's to /usr/bin/perl
+
+This is the result of running:
+perl util/perlpath.pl /usr/bin
+
+The upstream sources have this set to various different paths.
+
+--- openssl-0.9.8m.orig/Configure
++++ openssl-0.9.8m/Configure
+@@ -1,4 +1,4 @@
+-:
++#!/usr/bin/perl
+ eval 'exec perl -S $0 ${1+"$@"}'
+ if $running_under_some_shell;
+ ##
+--- openssl-0.9.8m.orig/VMS/VMSify-conf.pl
++++ openssl-0.9.8m/VMS/VMSify-conf.pl
+@@ -1,4 +1,4 @@
+-#! /usr/bin/perl
++#!/usr/bin/perl
+
+ use strict;
+ use warnings;
+--- openssl-0.9.8m.orig/Netware/do_tests.pl
++++ openssl-0.9.8m/Netware/do_tests.pl
+@@ -1,4 +1,4 @@
+-# perl script to run OpenSSL tests
++#!/usr/bin/perl
+
+
+ my $base_path = "\\openssl";
+--- openssl-0.9.8m.orig/apps/progs.pl
++++ openssl-0.9.8m/apps/progs.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ print "/* apps/progs.h */\n";
+ print "/* automatically generated by progs.pl for openssl.c */\n\n";
+--- openssl-0.9.8m.orig/os2/backwardify.pl
++++ openssl-0.9.8m/os2/backwardify.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/perl
+ use strict;
+
+ # Use as $0
+--- openssl-0.9.8m.orig/times/091/mips-rel.pl
++++ openssl-0.9.8m/times/091/mips-rel.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ &doit(100,"Pentium 100 32",0.0195,0.1000,0.6406,4.6100); # pentium-100
+ &doit(200,"PPro 200 32",0.0070,0.0340,0.2087,1.4700); # pentium-100
+--- openssl-0.9.8m.orig/fips/mkfipsscr.pl
++++ openssl-0.9.8m/fips/mkfipsscr.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl
+ # Quick & dirty utility to generate a script for executing the
+ # FIPS 140-2 CMVP algorithm tests based on the pathnames of
+ # input algorithm test files actually present (the unqualified
+--- openssl-0.9.8m.orig/fips/fipsalgtest.pl
++++ openssl-0.9.8m/fips/fipsalgtest.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/perl
+ # Perl utility to run or verify FIPS 140-2 CMVP algorithm tests based on the
+ # pathnames of input algorithm test files actually present (the unqualified
+ # file names are consistent but the pathnames are not).
+--- openssl-0.9.8m.orig/ms/uplink.pl
++++ openssl-0.9.8m/ms/uplink.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # For Microsoft CL this is implemented as inline assembler. So that
+ # even though this script can generate even Win32 code, we'll be
+--- openssl-0.9.8m.orig/ms/segrenam.pl
++++ openssl-0.9.8m/ms/segrenam.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ my $quiet = 1;
+
+--- openssl-0.9.8m.orig/ms/cmp.pl
++++ openssl-0.9.8m/ms/cmp.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ ($#ARGV == 1) || die "usage: cmp.pl <file1> <file2>\n";
+
+--- openssl-0.9.8m.orig/test/cms-test.pl
++++ openssl-0.9.8m/test/cms-test.pl
+@@ -1,4 +1,4 @@
+-# test/cms-test.pl
++#!/usr/bin/perl
+ # Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
+ # project.
+ #
+--- openssl-0.9.8m.orig/test/cms-examples.pl
++++ openssl-0.9.8m/test/cms-examples.pl
+@@ -1,4 +1,4 @@
+-# test/cms-examples.pl
++#!/usr/bin/perl
+ # Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
+ # project.
+ #
+--- openssl-0.9.8m.orig/demos/b64.pl
++++ openssl-0.9.8m/demos/b64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ #
+ # Make PEM encoded data have lines of 64 bytes of data
+--- openssl-0.9.8m.orig/demos/tunala/configure.in
++++ openssl-0.9.8m/demos/tunala/configure.in
+@@ -1,4 +1,4 @@
+-dnl Process this file with autoconf to produce a configure script.
++#!/usr/bin/perl
+ AC_INIT(tunala.c)
+ AM_CONFIG_HEADER(config.h)
+ AM_INIT_AUTOMAKE(tunala, 0.0.1-dev)
+--- openssl-0.9.8m.orig/crypto/x86cpuid.pl
++++ openssl-0.9.8m/crypto/x86cpuid.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ push(@INC,"perlasm");
+ require "x86asm.pl";
+--- openssl-0.9.8m.orig/crypto/x86_64cpuid.pl
++++ openssl-0.9.8m/crypto/x86_64cpuid.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ $output=shift;
+ $masm=1 if ($output =~ /\.asm/);
+--- openssl-0.9.8m.orig/crypto/md5/asm/md5-586.pl
++++ openssl-0.9.8m/crypto/md5/asm/md5-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # Normal is the
+ # md5_block_x86(MD5_CTX *c, ULONG *X);
+--- openssl-0.9.8m.orig/crypto/md5/asm/md5-x86_64.pl
++++ openssl-0.9.8m/crypto/md5/asm/md5-x86_64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/perl -w
++#!/usr/bin/perl
+ #
+ # MD5 optimized for AMD64.
+ #
+--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-ia64.pl
++++ openssl-0.9.8m/crypto/sha/asm/sha1-ia64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-x86_64.pl
++++ openssl-0.9.8m/crypto/sha/asm/sha1-x86_64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-sse2.pl
++++ openssl-0.9.8m/crypto/sha/asm/sha512-sse2.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-ia64.pl
++++ openssl-0.9.8m/crypto/sha/asm/sha512-ia64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/sha/asm/sha512-x86_64.pl
++++ openssl-0.9.8m/crypto/sha/asm/sha512-x86_64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/sha/asm/sha1-586.pl
++++ openssl-0.9.8m/crypto/sha/asm/sha1-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ # ====================================================================
+ # [Re]written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/des/asm/des-586.pl
++++ openssl-0.9.8m/crypto/des/asm/des-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # The inner loop instruction sequence and the IP/FP modifications are from
+ # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
+--- openssl-0.9.8m.orig/crypto/des/asm/desboth.pl
++++ openssl-0.9.8m/crypto/des/asm/desboth.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ $L="edi";
+ $R="esi";
+--- openssl-0.9.8m.orig/crypto/des/asm/des686.pl
++++ openssl-0.9.8m/crypto/des/asm/des686.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ $prog="des686.pl";
+
+--- openssl-0.9.8m.orig/crypto/des/asm/crypt586.pl
++++ openssl-0.9.8m/crypto/des/asm/crypt586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # The inner loop instruction sequence and the IP/FP modifications are from
+ # Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>
+--- openssl-0.9.8m.orig/crypto/lhash/num.pl
++++ openssl-0.9.8m/crypto/lhash/num.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ #node 10 -> 4
+
+--- openssl-0.9.8m.orig/crypto/ripemd/asm/rmd-586.pl
++++ openssl-0.9.8m/crypto/ripemd/asm/rmd-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # Normal is the
+ # ripemd160_block_asm_data_order(RIPEMD160_CTX *c, ULONG *X,int blocks);
+--- openssl-0.9.8m.orig/crypto/rc4/asm/rc4-586.pl
++++ openssl-0.9.8m/crypto/rc4/asm/rc4-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # At some point it became apparent that the original SSLeay RC4
+ # assembler implementation performs suboptimaly on latest IA-32
+--- openssl-0.9.8m.orig/crypto/rc4/asm/rc4-x86_64.pl
++++ openssl-0.9.8m/crypto/rc4/asm/rc4-x86_64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/cast/asm/cast-586.pl
++++ openssl-0.9.8m/crypto/cast/asm/cast-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # define for pentium pro friendly version
+ $ppro=1;
+--- openssl-0.9.8m.orig/crypto/rc5/asm/rc5-586.pl
++++ openssl-0.9.8m/crypto/rc5/asm/rc5-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ push(@INC,"perlasm","../../perlasm");
+ require "x86asm.pl";
+--- openssl-0.9.8m.orig/crypto/perlasm/x86ms.pl
++++ openssl-0.9.8m/crypto/perlasm/x86ms.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ package x86ms;
+
+--- openssl-0.9.8m.orig/crypto/perlasm/x86asm.pl
++++ openssl-0.9.8m/crypto/perlasm/x86asm.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # require 'x86asm.pl';
+ # &asm_init("cpp","des-586.pl");
+--- openssl-0.9.8m.orig/crypto/perlasm/x86nasm.pl
++++ openssl-0.9.8m/crypto/perlasm/x86nasm.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ package x86nasm;
+
+--- openssl-0.9.8m.orig/crypto/perlasm/x86unix.pl
++++ openssl-0.9.8m/crypto/perlasm/x86unix.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ package x86unix; # GAS actually...
+
+--- openssl-0.9.8m.orig/crypto/perlasm/cbc.pl
++++ openssl-0.9.8m/crypto/perlasm/cbc.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # void des_ncbc_encrypt(input, output, length, schedule, ivec, enc)
+ # des_cblock (*input);
+--- openssl-0.9.8m.orig/crypto/perlasm/x86_64-xlate.pl
++++ openssl-0.9.8m/crypto/perlasm/x86_64-xlate.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ # Ascetic x86_64 AT&T to MASM assembler translator by <appro>.
+ #
+--- openssl-0.9.8m.orig/crypto/bf/asm/bf-686.pl
++++ openssl-0.9.8m/crypto/bf/asm/bf-686.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ push(@INC,"perlasm","../../perlasm");
+ require "x86asm.pl";
+--- openssl-0.9.8m.orig/crypto/bf/asm/bf-586.pl
++++ openssl-0.9.8m/crypto/bf/asm/bf-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ push(@INC,"perlasm","../../perlasm");
+ require "x86asm.pl";
+--- openssl-0.9.8m.orig/crypto/objects/objects.pl
++++ openssl-0.9.8m/crypto/objects/objects.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ open (NUMIN,"$ARGV[1]") || die "Can't open number file $ARGV[1]";
+ $max_nid=0;
+--- openssl-0.9.8m.orig/crypto/objects/obj_dat.pl
++++ openssl-0.9.8m/crypto/objects/obj_dat.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # fixes bug in floating point emulation on sparc64 when
+ # this script produces off-by-one output on sparc64
+--- openssl-0.9.8m.orig/crypto/conf/keysets.pl
++++ openssl-0.9.8m/crypto/conf/keysets.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ $NUMBER=0x01;
+ $UPPER=0x02;
+--- openssl-0.9.8m.orig/crypto/bn/bn_prime.pl
++++ openssl-0.9.8m/crypto/bn/bn_prime.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # bn_prime.pl
+
+ $num=2048;
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ push(@INC,"perlasm","../../perlasm");
+ require "x86asm.pl";
+--- openssl-0.9.8m.orig/crypto/bn/asm/ppc.pl
++++ openssl-0.9.8m/crypto/bn/asm/ppc.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # Implemented as a Perl wrapper as we want to support several different
+ # architectures with single file. We pick up the target based on the
+--- openssl-0.9.8m.orig/crypto/bn/asm/co-586.pl
++++ openssl-0.9.8m/crypto/bn/asm/co-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ push(@INC,"perlasm","../../perlasm");
+ require "x86asm.pl";
+--- openssl-0.9.8m.orig/crypto/bn/asm/bn-586.pl
++++ openssl-0.9.8m/crypto/bn/asm/bn-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ push(@INC,"perlasm","../../perlasm");
+ require "x86asm.pl";
+--- openssl-0.9.8m.orig/crypto/bn/asm/mo-586.pl
++++ openssl-0.9.8m/crypto/bn/asm/mo-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ # This is crypto/bn/asm/x86-mont.pl (with asciz from crypto/perlasm/x86asm.pl)
+ # from OpenSSL 0.9.9-dev
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86_64-mont.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86_64-mont.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86/comba.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86/comba.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # x86 assember
+
+ sub mul_add_c
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86/add.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86/add.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # x86 assember
+
+ sub bn_add_words
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86/mul.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86/mul.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # x86 assember
+
+ sub bn_mul_words
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86/mul_add.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86/mul_add.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # x86 assember
+
+ sub bn_mul_add_words
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86/sqr.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86/sqr.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # x86 assember
+
+ sub bn_sqr_words
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86/sub.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86/sub.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # x86 assember
+
+ sub bn_sub_words
+--- openssl-0.9.8m.orig/crypto/bn/asm/x86/div.pl
++++ openssl-0.9.8m/crypto/bn/asm/x86/div.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # x86 assember
+
+ sub bn_div_words
+--- openssl-0.9.8m.orig/crypto/aes/asm/aes-586.pl
++++ openssl-0.9.8m/crypto/aes/asm/aes-586.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/aes/asm/aes-x86_64.pl
++++ openssl-0.9.8m/crypto/aes/asm/aes-x86_64.pl
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!/usr/bin/perl
+ #
+ # ====================================================================
+ # Written by Andy Polyakov <appro@fy.chalmers.se> for the OpenSSL
+--- openssl-0.9.8m.orig/crypto/asn1/charmap.pl
++++ openssl-0.9.8m/crypto/asn1/charmap.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl
+
+ use strict;
+
+--- openssl-0.9.8m.orig/util/mksdef.pl
++++ openssl-0.9.8m/util/mksdef.pl
+@@ -1,4 +1,4 @@
+-
++#!/usr/bin/perl
+ # Perl script to split libeay32.def into two distinct DEF files for use in
+ # fipdso mode. It works out symbols in each case by running "link" command and
+ # parsing the output to find the list of missing symbols then splitting
+--- openssl-0.9.8m.orig/util/dirname.pl
++++ openssl-0.9.8m/util/dirname.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ if ($#ARGV < 0) {
+ die "dirname.pl: too few arguments\n";
+--- openssl-0.9.8m.orig/util/tab_num.pl
++++ openssl-0.9.8m/util/tab_num.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ $num=1;
+ $width=40;
+--- openssl-0.9.8m.orig/util/sp-diff.pl
++++ openssl-0.9.8m/util/sp-diff.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # This file takes as input, the files that have been output from
+ # ssleay speed.
+--- openssl-0.9.8m.orig/util/mkerr.pl
++++ openssl-0.9.8m/util/mkerr.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl
+
+ my $config = "crypto/err/openssl.ec";
+ my $debug = 0;
+--- openssl-0.9.8m.orig/util/clean-depend.pl
++++ openssl-0.9.8m/util/clean-depend.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl
+ # Clean the dependency list in a makefile of standard includes...
+ # Written by Ben Laurie <ben@algroup.co.uk> 19 Jan 1999
+
+--- openssl-0.9.8m.orig/util/add_cr.pl
++++ openssl-0.9.8m/util/add_cr.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # This adds a copyright message to a souce code file.
+ # It also gets the file name correct.
+--- openssl-0.9.8m.orig/util/pod2man.pl
++++ openssl-0.9.8m/util/pod2man.pl
+@@ -1,4 +1,4 @@
+-: #!/usr/bin/perl-5.005
++#!/usr/bin/perl
+ eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
+ if $running_under_some_shell;
+
+--- openssl-0.9.8m.orig/util/mkstack.pl
++++ openssl-0.9.8m/util/mkstack.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl
+
+ # This is a utility that searches out "DECLARE_STACK_OF()"
+ # declarations in .h and .c files, and updates/creates/replaces
+--- openssl-0.9.8m.orig/util/selftest.pl
++++ openssl-0.9.8m/util/selftest.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl
+ #
+ # Run the test suite and generate a report
+ #
+--- openssl-0.9.8m.orig/util/ck_errf.pl
++++ openssl-0.9.8m/util/ck_errf.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # This is just a quick script to scan for cases where the 'error'
+ # function name in a XXXerr() macro is wrong.
+--- openssl-0.9.8m.orig/util/mklink.pl
++++ openssl-0.9.8m/util/mklink.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # mklink.pl
+
+--- openssl-0.9.8m.orig/util/src-dep.pl
++++ openssl-0.9.8m/util/src-dep.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # we make up an array of
+ # $file{function_name}=filename;
+--- openssl-0.9.8m.orig/util/deleof.pl
++++ openssl-0.9.8m/util/deleof.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ while (<>)
+ {
+--- openssl-0.9.8m.orig/util/arx.pl
++++ openssl-0.9.8m/util/arx.pl
+@@ -1,4 +1,4 @@
+-#!/bin/perl
++#!/usr/bin/perl
+
+ # Simple perl script to wrap round "ar" program and exclude any
+ # object files in the environment variable EXCL_OBJ
+--- openssl-0.9.8m.orig/util/copy.pl
++++ openssl-0.9.8m/util/copy.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ use Fcntl;
+
+--- openssl-0.9.8m.orig/util/mkdir-p.pl
++++ openssl-0.9.8m/util/mkdir-p.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+
+ # mkdir-p.pl
+
+--- openssl-0.9.8m.orig/util/mkdef.pl
++++ openssl-0.9.8m/util/mkdef.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl -w
++#!/usr/bin/perl
+ #
+ # generate a .def file
+ #
+--- openssl-0.9.8m.orig/util/files.pl
++++ openssl-0.9.8m/util/files.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # used to generate the file MINFO for use by util/mk1mf.pl
+ # It is basically a list of all variables from the passed makefile
+--- openssl-0.9.8m.orig/util/mkfiles.pl
++++ openssl-0.9.8m/util/mkfiles.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # This is a hacked version of files.pl for systems that can't do a 'make files'.
+ # Do a perl util/mkminfo.pl >MINFO to build MINFO
+--- openssl-0.9.8m.orig/util/perlpath.pl
++++ openssl-0.9.8m/util/perlpath.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # modify the '#!/usr/local/bin/perl'
+ # line in all scripts that rely on perl.
+--- openssl-0.9.8m.orig/util/mk1mf.pl
++++ openssl-0.9.8m/util/mk1mf.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # A bit of an evil hack but it post processes the file ../MINFO which
+ # is generated by `make files` in the top directory.
+ # This script outputs one mega makefile that has no shell stuff or any
+--- openssl-0.9.8m.orig/util/err-ins.pl
++++ openssl-0.9.8m/util/err-ins.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # tack error codes onto the end of a file
+ #
+--- openssl-0.9.8m.orig/util/pl/Mingw32.pl
++++ openssl-0.9.8m/util/pl/Mingw32.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # Mingw32.pl -- Mingw
+ #
+--- openssl-0.9.8m.orig/util/pl/unix.pl
++++ openssl-0.9.8m/util/pl/unix.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # unix.pl - the standard unix makefile stuff.
+ #
+--- openssl-0.9.8m.orig/util/pl/netware.pl
++++ openssl-0.9.8m/util/pl/netware.pl
+@@ -1,4 +1,4 @@
+-# Metrowerks Codewarrior or gcc / nlmconv for NetWare
++#!/usr/bin/perl
+ #
+
+ $version_header = "crypto/opensslv.h";
+--- openssl-0.9.8m.orig/util/pl/VC-32.pl
++++ openssl-0.9.8m/util/pl/VC-32.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # VC-32.pl - unified script for Microsoft Visual C++, covering Win32,
+ # Win64 and WinCE [follow $FLAVOR variable to trace the differences].
+ #
+--- openssl-0.9.8m.orig/util/pl/OS2-EMX.pl
++++ openssl-0.9.8m/util/pl/OS2-EMX.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # OS2-EMX.pl - for EMX GCC on OS/2
+ #
+--- openssl-0.9.8m.orig/util/pl/ultrix.pl
++++ openssl-0.9.8m/util/pl/ultrix.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # linux.pl - the standard unix makefile stuff.
+ #
+--- openssl-0.9.8m.orig/util/pl/linux.pl
++++ openssl-0.9.8m/util/pl/linux.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ #
+ # linux.pl - the standard unix makefile stuff.
+ #
+--- openssl-0.9.8m.orig/util/pl/BC-32.pl
++++ openssl-0.9.8m/util/pl/BC-32.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ # Borland C++ builder 3 and 4 -- Janez Jere <jj@void.si>
+ #
+
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 @@
+Index: openssl-0.9.8o/crypto/Makefile
+===================================================================
+--- openssl-0.9.8o.orig/crypto/Makefile 2008-09-17 17:10:55.000000000 +0000
++++ openssl-0.9.8o/crypto/Makefile 2010-06-06 13:09:28.000000000 +0000
+@@ -57,7 +57,7 @@
+ echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
+ echo '#endif' ) >buildinf.h
+
+-x86cpuid-elf.s: x86cpuid.pl perlasm/x86asm.pl
++x86cpuid-elf.S: x86cpuid.pl perlasm/x86asm.pl
+ $(PERL) x86cpuid.pl elf $(CFLAGS) $(PROCESSOR) > $@
+ x86cpuid-cof.s: x86cpuid.pl perlasm/x86asm.pl
+ $(PERL) x86cpuid.pl coff $(CFLAGS) $(PROCESSOR) > $@
+@@ -70,7 +70,7 @@
+ uplink-cof.s: ../ms/uplink.pl
+ $(PERL) ../ms/uplink.pl coff > $@
+
+-x86_64cpuid.s: x86_64cpuid.pl
++x86_64cpuid.S: x86_64cpuid.pl
+ $(PERL) x86_64cpuid.pl $@
+ ia64cpuid.s: ia64cpuid.S
+ $(CC) $(CFLAGS) -E ia64cpuid.S > $@
+Index: openssl-0.9.8o/crypto/x86_64cpuid.pl
+===================================================================
+--- openssl-0.9.8o.orig/crypto/x86_64cpuid.pl 2007-11-11 16:25:00.000000000 +0000
++++ openssl-0.9.8o/crypto/x86_64cpuid.pl 2010-06-06 13:09:28.000000000 +0000
+@@ -95,7 +95,11 @@
+ .size OPENSSL_wipe_cpu,.-OPENSSL_wipe_cpu
+
+ .section .init
++#ifdef OPENSSL_PIC
++ call OPENSSL_cpuid_setup\@PLT
++#else
+ call OPENSSL_cpuid_setup
++#endif
+
+ ___
+
+Index: openssl-0.9.8o/crypto/md5/Makefile
+===================================================================
+--- openssl-0.9.8o.orig/crypto/md5/Makefile 2008-09-17 17:11:02.000000000 +0000
++++ openssl-0.9.8o/crypto/md5/Makefile 2010-06-06 13:09:28.000000000 +0000
+@@ -52,7 +52,8 @@
+ mx86-out.s: asm/md5-586.pl ../perlasm/x86asm.pl
+ (cd asm; $(PERL) md5-586.pl a.out $(CFLAGS) > ../$@)
+
+-md5-x86_64.s: asm/md5-x86_64.pl; $(PERL) asm/md5-x86_64.pl $@
++md5-x86_64.s: asm/md5-x86_64.pl
++ $(PERL) asm/md5-x86_64.pl $@
+
+ files:
+ $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
+Index: openssl-0.9.8o/crypto/des/asm/desboth.pl
+===================================================================
+--- openssl-0.9.8o.orig/crypto/des/asm/desboth.pl 2001-10-24 21:20:56.000000000 +0000
++++ openssl-0.9.8o/crypto/des/asm/desboth.pl 2010-06-06 13:09:28.000000000 +0000
+@@ -16,6 +16,11 @@
+
+ &push("edi");
+
++ &call (&label("pic_point0"));
++ &set_label("pic_point0");
++ &blindpop("ebp");
++ &add ("ebp", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
++
+ &comment("");
+ &comment("Load the data words");
+ &mov($L,&DWP(0,"ebx","",0));
+@@ -47,15 +52,21 @@
+ &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
+ &mov(&swtmp(1), "eax");
+ &mov(&swtmp(0), "ebx");
+- &call("DES_encrypt2");
++ &exch("ebx", "ebp");
++ &call("DES_encrypt2\@PLT");
++ &exch("ebx", "ebp");
+ &mov(&swtmp(2), (DWC(($enc)?"0":"1")));
+ &mov(&swtmp(1), "edi");
+ &mov(&swtmp(0), "ebx");
+- &call("DES_encrypt2");
++ &exch("ebx", "ebp");
++ &call("DES_encrypt2\@PLT");
++ &exch("ebx", "ebp");
+ &mov(&swtmp(2), (DWC(($enc)?"1":"0")));
+ &mov(&swtmp(1), "esi");
+ &mov(&swtmp(0), "ebx");
+- &call("DES_encrypt2");
++ &exch("ebx", "ebp");
++ &call("DES_encrypt2\@PLT");
++ &exch("ebx", "ebp");
+
+ &stack_pop(3);
+ &mov($L,&DWP(0,"ebx","",0));
+Index: openssl-0.9.8o/crypto/rc4/Makefile
+===================================================================
+--- openssl-0.9.8o.orig/crypto/rc4/Makefile 2008-11-19 16:03:50.000000000 +0000
++++ openssl-0.9.8o/crypto/rc4/Makefile 2010-06-06 13:09:28.000000000 +0000
+@@ -51,7 +51,7 @@
+ rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
+ (cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
+
+-rc4-x86_64.s: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@
++rc4-x86_64.S: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@
+
+ rc4-ia64.s: asm/rc4-ia64.S
+ @case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \
+Index: openssl-0.9.8o/crypto/rc4/asm/rc4-x86_64.pl
+===================================================================
+--- openssl-0.9.8o.orig/crypto/rc4/asm/rc4-x86_64.pl 2008-09-16 10:47:27.000000000 +0000
++++ openssl-0.9.8o/crypto/rc4/asm/rc4-x86_64.pl 2010-06-06 13:09:28.000000000 +0000
+@@ -270,7 +270,11 @@
+ xor %r10,%r10
+ xor %r11,%r11
+
++#ifdef OPENSSL_PIC
++ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),$idx#d
++#else
+ mov OPENSSL_ia32cap_P(%rip),$idx#d
++#endif
+ bt \$20,$idx#d
+ jnc .Lw1stloop
+ bt \$30,$idx#d
+@@ -338,7 +342,11 @@
+ RC4_options:
+ .picmeup %rax
+ lea .Lopts-.(%rax),%rax
++#ifdef OPENSSL_PIC
++ mov OPENSSL_ia32cap_P\@GOTPCREL(%rip),%edx
++#else
+ mov OPENSSL_ia32cap_P(%rip),%edx
++#endif
+ bt \$20,%edx
+ jnc .Ldone
+ add \$12,%rax
+Index: openssl-0.9.8o/crypto/perlasm/x86unix.pl
+===================================================================
+--- openssl-0.9.8o.orig/crypto/perlasm/x86unix.pl 2008-05-01 23:11:32.000000000 +0000
++++ openssl-0.9.8o/crypto/perlasm/x86unix.pl 2010-06-06 13:09:28.000000000 +0000
+@@ -400,6 +400,29 @@
+ $stack=4;
+ }
+
++sub main'function_begin_B_static
++ {
++ local($func,$extra)=@_;
++
++ &main'external_label($func);
++ $func=$under.$func;
++
++ local($tmp)=<<"EOF";
++.text
++EOF
++ push(@out,$tmp);
++ if ($main'cpp)
++ { push(@out,"TYPE($func,\@function)\n"); }
++ elsif ($main'coff)
++ { $tmp=push(@out,".def\t$func;\t.scl\t2;\t.type\t32;\t.endef\n"); }
++ elsif ($main'aout and !$main'pic)
++ { }
++ else { push(@out,".type $func,\@function\n"); }
++ push(@out,".align\t$align\n");
++ push(@out,"$func:\n");
++ $stack=4;
++ }
++
+ sub main'function_end
+ {
+ local($func)=@_;
+@@ -694,7 +717,17 @@
+ {
+ $tmp=<<___;
+ .section .init
++#ifdef OPENSSL_PIC
++ pushl %ebx
++ call .pic_point0
++.pic_point0:
++ popl %ebx
++ addl \$_GLOBAL_OFFSET_TABLE_+[.-.pic_point0],%ebx
++ call $under$f\@PLT
++ popl %ebx
++#else
+ call $under$f
++#endif
+ jmp .Linitalign
+ .align $align
+ .Linitalign:
+Index: openssl-0.9.8o/crypto/perlasm/cbc.pl
+===================================================================
+--- openssl-0.9.8o.orig/crypto/perlasm/cbc.pl 2005-05-09 21:48:00.000000000 +0000
++++ openssl-0.9.8o/crypto/perlasm/cbc.pl 2010-06-06 13:09:28.000000000 +0000
+@@ -122,7 +122,11 @@
+ &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
+ &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
+
+- &call($enc_func);
++ &call (&label("pic_point0"));
++ &set_label("pic_point0");
++ &blindpop("ebx");
++ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
++ &call("$enc_func\@PLT");
+
+ &mov("eax", &DWP($data_off,"esp","",0));
+ &mov("ebx", &DWP($data_off+4,"esp","",0));
+@@ -187,7 +191,11 @@
+ &mov(&DWP($data_off,"esp","",0), "eax"); # put in array for call
+ &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
+
+- &call($enc_func);
++ &call (&label("pic_point1"));
++ &set_label("pic_point1");
++ &blindpop("ebx");
++ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point1") . "]");
++ &call("$enc_func\@PLT");
+
+ &mov("eax", &DWP($data_off,"esp","",0));
+ &mov("ebx", &DWP($data_off+4,"esp","",0));
+@@ -220,7 +228,11 @@
+ &mov(&DWP($data_off,"esp","",0), "eax"); # put back
+ &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
+
+- &call($dec_func);
++ &call (&label("pic_point2"));
++ &set_label("pic_point2");
++ &blindpop("ebx");
++ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point2") . "]");
++ &call("$dec_func\@PLT");
+
+ &mov("eax", &DWP($data_off,"esp","",0)); # get return
+ &mov("ebx", &DWP($data_off+4,"esp","",0)); #
+@@ -263,7 +275,11 @@
+ &mov(&DWP($data_off,"esp","",0), "eax"); # put back
+ &mov(&DWP($data_off+4,"esp","",0), "ebx"); #
+
+- &call($dec_func);
++ &call (&label("pic_point3"));
++ &set_label("pic_point3");
++ &blindpop("ebx");
++ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point3") . "]");
++ &call("$dec_func\@PLT");
+
+ &mov("eax", &DWP($data_off,"esp","",0)); # get return
+ &mov("ebx", &DWP($data_off+4,"esp","",0)); #
+Index: openssl-0.9.8o/crypto/perlasm/x86_64-xlate.pl
+===================================================================
+--- openssl-0.9.8o.orig/crypto/perlasm/x86_64-xlate.pl 2010-06-06 13:09:00.000000000 +0000
++++ openssl-0.9.8o/crypto/perlasm/x86_64-xlate.pl 2010-06-06 13:09:28.000000000 +0000
+@@ -435,7 +435,7 @@
+
+ chomp($line);
+
+- $line =~ s|[#!].*$||; # get rid of asm-style comments...
++# $line =~ s|[#!].*$||; # get rid of asm-style comments...
+ $line =~ s|/\*.*\*/||; # ... and C-style comments...
+ $line =~ s|^\s+||; # ... and skip white spaces in beginning
+
+Index: openssl-0.9.8o/crypto/aes/asm/aes-586.pl
+===================================================================
+--- openssl-0.9.8o.orig/crypto/aes/asm/aes-586.pl 2008-12-17 14:14:51.000000000 +0000
++++ openssl-0.9.8o/crypto/aes/asm/aes-586.pl 2010-06-06 13:09:28.000000000 +0000
+@@ -250,7 +250,7 @@
+ sub _data_word() { my $i; while(defined($i=shift)) { &data_word($i,$i); } }
+
+ &public_label("AES_Te");
+-&function_begin_B("_x86_AES_encrypt");
++&function_begin_B_static("_x86_AES_encrypt");
+ if ($vertical_spin) {
+ # I need high parts of volatile registers to be accessible...
+ &exch ($s1="edi",$key="ebx");
+@@ -539,7 +539,7 @@
+ }
+
+ &public_label("AES_Td");
+-&function_begin_B("_x86_AES_decrypt");
++&function_begin_B_static("_x86_AES_decrypt");
+ # note that caller is expected to allocate stack frame for me!
+ &mov (&DWP(12,"esp"),$key); # save key
+
+@@ -1461,15 +1461,22 @@
+ &public_label("AES_Td");
+ &public_label("AES_Te");
+ &function_begin_B("AES_set_decrypt_key");
++ &push ("ebx");
+ &mov ("eax",&wparam(0));
+ &mov ("ecx",&wparam(1));
+ &mov ("edx",&wparam(2));
+ &sub ("esp",12);
++
++ &call (&label("pic_point0"));
++ &set_label("pic_point0");
++ &blindpop("ebx");
++ &add ("ebx", "\$_GLOBAL_OFFSET_TABLE_+[.-" . &label("pic_point0") . "]");
+ &mov (&DWP(0,"esp"),"eax");
+ &mov (&DWP(4,"esp"),"ecx");
+ &mov (&DWP(8,"esp"),"edx");
+- &call ("AES_set_encrypt_key");
++ &call ("AES_set_encrypt_key\@PLT");
+ &add ("esp",12);
++ &pop ("ebx");
+ &cmp ("eax",0);
+ &je (&label("proceed"));
+ &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 @@
+Index: openssl-0.9.8k/Makefile.org
+===================================================================
+--- openssl-0.9.8k.orig/Makefile.org 2009-07-19 11:34:56.000000000 +0200
++++ openssl-0.9.8k/Makefile.org 2009-07-19 11:36:02.000000000 +0200
+@@ -444,7 +444,8 @@
+ echo 'Description: OpenSSL cryptography library'; \
+ echo 'Version: '$(VERSION); \
+ echo 'Requires: '; \
+- echo 'Libs: -L$${libdir} -lcrypto $(EX_LIBS)'; \
++ echo 'Libs: -L$${libdir} -lcrypto'; \
++ echo 'Libs.private: $(EX_LIBS)'; \
+ echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libcrypto.pc
+
+ libssl.pc: Makefile
+@@ -457,7 +458,8 @@
+ echo 'Description: Secure Sockets Layer and cryptography libraries'; \
+ echo 'Version: '$(VERSION); \
+ echo 'Requires: '; \
+- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
++ echo 'Libs: -L$${libdir} -lssl'; \
++ echo 'Libs.private: -lcrypto $(EX_LIBS)'; \
+ echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > libssl.pc
+
+ openssl.pc: Makefile
+@@ -470,7 +472,8 @@
+ echo 'Description: Secure Sockets Layer and cryptography libraries and tools'; \
+ echo 'Version: '$(VERSION); \
+ echo 'Requires: '; \
+- echo 'Libs: -L$${libdir} -lssl -lcrypto $(EX_LIBS)'; \
++ echo 'Libs: -L$${libdir} -lssl -lcrypto'; \
++ echo 'Libs.private: $(EX_LIBS)'; \
+ echo 'Cflags: -I$${includedir} $(KRB5_INCLUDES)' ) > openssl.pc
+
+ 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 @@
+Index: openssl-0.9.8k/Configure
+===================================================================
+--- openssl-0.9.8k.orig/Configure 2009-07-19 11:32:41.000000000 +0200
++++ openssl-0.9.8k/Configure 2009-07-19 11:37:10.000000000 +0200
+@@ -128,6 +128,9 @@
+ 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";
+
+ 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::";
++# rc4 asm is disabled on amd64 because we configured it with RC4_CHAR while
++# the assembler only works with int
++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::::";
+ 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::";
+
+ 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 @@
+Index: openssl-0.9.8k/tools/c_rehash.in
+===================================================================
+--- openssl-0.9.8k.orig/tools/c_rehash.in 2002-10-11 22:31:27.000000000 +0200
++++ openssl-0.9.8k/tools/c_rehash.in 2009-07-19 11:36:26.000000000 +0200
+@@ -59,12 +59,15 @@
+ }
+ }
+ closedir DIR;
+- FILE: foreach $fname (grep {/\.pem$/} @flist) {
++ FILE: foreach $fname (grep {/\.pem$|\.crt$/} @flist) {
+ # Check to see if certificates and/or CRLs present.
+ my ($cert, $crl) = check_file($fname);
+ if(!$cert && !$crl) {
+- print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
+- next;
++ ($cert, $crl) = check_file("$openssl x509 -in \"$fname\" -inform der -outform pem | ");
++ if(!$cert && !$crl) {
++ print STDERR "WARNING: $fname does not contain a certificate or CRL: skipping\n";
++ next;
++ }
+ }
+ link_hash_cert($fname) if($cert);
+ link_hash_crl($fname) if($crl);
+@@ -102,6 +105,9 @@
+ my $fname = $_[0];
+ $fname =~ s/'/'\\''/g;
+ my ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname'`;
++ if(!$hash || !fprint) {
++ ($hash, $fprint) = `"$openssl" x509 -hash -fingerprint -noout -in '$fname' -inform der`;
++ }
+ chomp $hash;
+ chomp $fprint;
+ $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 @@
+Index: openssl-0.9.8k/doc/apps/c_rehash.pod
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ openssl-0.9.8k/doc/apps/c_rehash.pod 2009-07-19 11:36:27.000000000 +0200
+@@ -0,0 +1,55 @@
++
++=pod
++
++=head1 NAME
++
++c_rehash - Create symbolic links to files named by the hash values
++
++=head1 SYNOPSIS
++
++B<c_rehash>
++[directory] ...
++
++=head1 DESCRIPTION
++
++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.
++
++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.
++
++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.
++
++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.
++
++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.
++
++The program will also warn if there are files with extension .pem which are not certificate or CRL files.
++
++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 (=).
++
++=head1 OPTIONS
++
++None
++
++=head1 ENVIRONMENT
++
++=over 4
++
++=item B<OPENSSL>
++
++The name (and path) of an executable to use to generate hashes and fingerprints (see above).
++
++=item B<SSL_CERT_DIR>
++
++Colon separated list of directories to operate on. Ignored if directories are listed on the command line.
++
++=head1 SEE ALSO
++
++L<openssl(1)|openssl(1)>, L<x509(1)|x509(1)>
++
++=back
++
++=head1 BUGS
++
++No known bugs
++
++=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 @@
+ca.patch
+config-hurd.patch
+debian-targets.patch
+engines-path.patch
+kfreebsd-pipe.patch
+make-targets.patch
+man-dir.patch
+man-section.patch
+no-rpath.patch
+no-symbolic.patch
+pic.patch
+pkg-config.patch
+valgrind.patch
+rc4-amd64.patch
+rehash-crt.patch
+rehash_pod.patch
+shared-lib-ext.patch
+stddef.patch
+version-script.patch
+perl-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 @@
+Index: openssl-0.9.8k/Configure
+===================================================================
+--- openssl-0.9.8k.orig/Configure 2009-07-19 11:36:24.000000000 +0200
++++ openssl-0.9.8k/Configure 2009-07-19 11:37:03.000000000 +0200
+@@ -1568,7 +1568,8 @@
+ elsif ($shared_extension ne "" && $shared_extension =~ /^\.s([ol])\.[^\.]*\.[^\.]*$/)
+ {
+ my $sotmp = $1;
+- s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
++# s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp.\$(SHLIB_MAJOR) .s$sotmp/;
++ s/^SHARED_LIBS_LINK_EXTS=.*/SHARED_LIBS_LINK_EXTS=.s$sotmp/;
+ }
+ elsif ($shared_extension ne "" && $shared_extension =~ /^\.[^\.]*\.[^\.]*\.dylib$/)
+ {
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 @@
+Index: openssl-0.9.8k/crypto/sha/sha.h
+===================================================================
+--- openssl-0.9.8k.orig/crypto/sha/sha.h 2008-09-16 12:47:28.000000000 +0200
++++ openssl-0.9.8k/crypto/sha/sha.h 2009-07-19 11:36:28.000000000 +0200
+@@ -59,6 +59,7 @@
+ #ifndef HEADER_SHA_H
+ #define HEADER_SHA_H
+
++#include <stddef.h>
+ #include <openssl/e_os2.h>
+ #include <stddef.h>
+
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 @@
+Index: openssl-0.9.8k/crypto/rand/md_rand.c
+===================================================================
+--- openssl-0.9.8k.orig/crypto/rand/md_rand.c 2008-09-16 13:50:05.000000000 +0200
++++ openssl-0.9.8k/crypto/rand/md_rand.c 2009-07-19 11:36:05.000000000 +0200
+@@ -477,8 +477,10 @@
+ MD_Update(&m,local_md,MD_DIGEST_LENGTH);
+ MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c));
+ #ifndef PURIFY
++#if 0 /* Don't add uninitialised data. */
+ MD_Update(&m,buf,j); /* purify complains */
+ #endif
++#endif
+ k=(st_idx+MD_DIGEST_LENGTH/2)-st_num;
+ if (k > 0)
+ {
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 @@
+Index: openssl-0.9.8m/Configure
+===================================================================
+--- openssl-0.9.8m.orig/Configure 2010-02-27 12:28:32.000000000 +0100
++++ openssl-0.9.8m/Configure 2010-02-27 12:28:35.000000000 +0100
+@@ -1512,6 +1512,8 @@
+ }
+ }
+
++$shared_ldflag .= " -Wl,--version-script=openssl.ld";
++
+ open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
+ unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
+ open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
+Index: openssl-0.9.8m/openssl.ld
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ openssl-0.9.8m/openssl.ld 2010-02-27 12:28:35.000000000 +0100
+@@ -0,0 +1,5 @@
++OPENSSL_0.9.8 {
++ global:
++ *;
++};
++
+Index: openssl-0.9.8m/engines/openssl.ld
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ openssl-0.9.8m/engines/openssl.ld 2010-02-27 12:28:35.000000000 +0100
+@@ -0,0 +1,5 @@
++OPENSSL_0.9.8 {
++ global:
++ *;
++};
++
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 @@
+diff --git a/Makefile.org b/Makefile.org
+index e87d623..25ff367 100644
+--- a/Makefile.org
++++ b/Makefile.org
+@@ -355,7 +355,7 @@ libcrypto$(SHLIB_EXT): libcrypto.a $(SHARED_FIPS)
+ @if [ "$(SHLIB_TARGET)" != "" ]; then \
+ if [ "$(FIPSCANLIB)" = "libfips" ]; then \
+ $(ARD) libcrypto.a fipscanister.o ; \
+- $(MAKE) SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
++ $(MAKE) -e SHLIBDIRS='crypto' SHLIBDEPS='-lfips' build-shared; \
+ $(AR) libcrypto.a fips/fipscanister.o ; \
+ else \
+ if [ "$(FIPSCANLIB)" = "libcrypto" ]; then \
+@@ -373,7 +373,7 @@ libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a
+ @if [ "$(SHLIB_TARGET)" != "" ]; then \
+ shlibdeps=-lcrypto; \
+ [ "$(FIPSCANLIB)" = "libfips" ] && shlibdeps="$$shlibdeps -lfips"; \
+- $(MAKE) SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
++ $(MAKE) -e SHLIBDIRS=ssl SHLIBDEPS="$$shlibdeps" build-shared; \
+ else \
+ echo "There's no support for shared libraries on this platform" >&2 ; \
+ exit 1; \
+diff --git a/crypto/Makefile b/crypto/Makefile
+index 6557f2b..a69bf7c 100644
+--- a/crypto/Makefile
++++ b/crypto/Makefile
+@@ -103,7 +103,7 @@ $(LIB): $(LIBOBJ)
+
+ shared: buildinf.h lib subdirs
+ if [ -n "$(SHARED_LIBS)" ]; then \
+- (cd ..; $(MAKE) $(SHARED_LIB)); \
++ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
+ fi
+
+ libs:
+diff --git a/ssl/Makefile b/ssl/Makefile
+index 5ac3507..77ea2bd 100644
+--- a/ssl/Makefile
++++ b/ssl/Makefile
+@@ -62,7 +62,7 @@ lib: $(LIBOBJ)
+
+ shared: lib
+ if [ -n "$(SHARED_LIBS)" ]; then \
+- (cd ..; $(MAKE) $(SHARED_LIB)); \
++ (cd ..; $(MAKE) -e $(SHARED_LIB)); \
+ fi
+
+ 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 @@
DESCRIPTION = "Secure Socket Layer (SSL) binary and related cryptographic tools."
HOMEPAGE = "http://www.openssl.org/"
-LICENSE = "openssl"
+BUGTRACKER = "http://www.openssl.org/news/vulnerabilities.html"
SECTION = "libs/network"
+# "openssl | SSLeay" dual license
+LICENSE = "openssl"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=83d26c69f6f0172ee7f795790424b453"
+
+DEPENDS = "perl-native"
+
SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz"
S = "${WORKDIR}/openssl-${PV}"
@@ -25,6 +31,7 @@ inherit pkgconfig siteinfo
PACKAGES =+ "libcrypto libssl"
FILES_libcrypto = "${libdir}/libcrypto.so.*"
FILES_libssl = "${libdir}/libssl.so.*"
+FILES_${PN} =+ " ${libdir}/ssl/*"
do_configure () {
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 @@
-require openssl.inc
-
-PR = "r11"
-
-SRC_URI += "file://debian.patch;patch=1 \
- file://configure-targets.patch;patch=1 \
- file://fix-md5-x86_64.patch;patch=1 \
- file://shared-libs.patch;patch=1"
-
-BBCLASSEXTEND = "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 @@
+require openssl.inc
+
+PR = "r0"
+SRC_URI += "file://debian/ca.patch \
+ file://debian/config-hurd.patch;apply=no \
+ file://debian/debian-targets.patch \
+ file://debian/engines-path.patch \
+ file://debian/kfreebsd-pipe.patch;apply=no \
+ file://debian/make-targets.patch \
+ file://debian/man-dir.patch \
+ file://debian/man-section.patch \
+ file://debian/no-rpath.patch \
+ file://debian/no-symbolic.patch \
+ file://debian/pic.patch \
+ file://debian/pkg-config.patch \
+ file://debian/valgrind.patch \
+ file://debian/rc4-amd64.patch \
+ file://debian/rehash-crt.patch \
+ file://debian/rehash_pod.patch \
+ file://debian/shared-lib-ext.patch \
+ file://debian/stddef.patch \
+ file://debian/version-script.patch \
+ file://debian/perl-path.diff"
+
+SRC_URI += "file://configure-targets.patch \
+ file://shared-libs.patch"
+
+BBCLASSEXTEND = "native"