summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-04-26 03:24:24 +0000
committerMike Frysinger <vapier@gentoo.org>2012-04-26 03:24:24 +0000
commit7caf3370b2d24dea0d0ac17491a9b3566a85a988 (patch)
tree7ce36c67575c86c0184a57ecc55bd50647e478da /dev-libs/openssl
parentStable for HPPA (bug #413555). (diff)
downloadgentoo-2-7caf3370b2d24dea0d0ac17491a9b3566a85a988.tar.gz
gentoo-2-7caf3370b2d24dea0d0ac17491a9b3566a85a988.tar.bz2
gentoo-2-7caf3370b2d24dea0d0ac17491a9b3566a85a988.zip
Add fix from upstream for building on non-x86 arches #413559 by Petr Pisar.
(Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/openssl')
-rw-r--r--dev-libs/openssl/ChangeLog6
-rw-r--r--dev-libs/openssl/files/openssl-1.0.1a-hmac-ia32cap.patch52
-rw-r--r--dev-libs/openssl/openssl-1.0.1a.ebuild3
3 files changed, 59 insertions, 2 deletions
diff --git a/dev-libs/openssl/ChangeLog b/dev-libs/openssl/ChangeLog
index 7b74b6a96960..787b518cd994 100644
--- a/dev-libs/openssl/ChangeLog
+++ b/dev-libs/openssl/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-libs/openssl
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.445 2012/04/26 02:12:26 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/ChangeLog,v 1.446 2012/04/26 03:24:24 vapier Exp $
+
+ 26 Apr 2012; Mike Frysinger <vapier@gentoo.org>
+ +files/openssl-1.0.1a-hmac-ia32cap.patch, openssl-1.0.1a.ebuild:
+ Add fix from upstream for building on non-x86 arches #413559 by Petr Pisar.
*openssl-0.9.8w (24 Apr 2012)
diff --git a/dev-libs/openssl/files/openssl-1.0.1a-hmac-ia32cap.patch b/dev-libs/openssl/files/openssl-1.0.1a-hmac-ia32cap.patch
new file mode 100644
index 000000000000..4e0ed86a9965
--- /dev/null
+++ b/dev-libs/openssl/files/openssl-1.0.1a-hmac-ia32cap.patch
@@ -0,0 +1,52 @@
+http://cvs.openssl.org/chngview?cn=22455
+
+fix from upstream for building on non-x86 arches
+
+e_rc4_hmac_md5.c: last commit was inappropriate for non-x86[_64] platforms [from HEAD]. PR: 2792
+
+Index: crypto/evp/e_rc4_hmac_md5.c
+===================================================================
+RCS file: /usr/local/src/openssl/CVSROOT/openssl/crypto/evp/e_rc4_hmac_md5.c,v
+retrieving revision 1.1.2.5
+retrieving revision 1.1.2.6
+diff -u -p -r1.1.2.5 -r1.1.2.6
+--- crypto/evp/e_rc4_hmac_md5.c 18 Apr 2012 17:51:33 -0000 1.1.2.5
++++ crypto/evp/e_rc4_hmac_md5.c 19 Apr 2012 20:43:02 -0000 1.1.2.6
+@@ -121,6 +121,7 @@ static int rc4_hmac_md5_cipher(EVP_CIPHE
+ md5_off = MD5_CBLOCK-key->md.num,
+ blocks;
+ unsigned int l;
++ extern unsigned int OPENSSL_ia32cap_P[];
+ #endif
+ size_t plen = key->payload_length;
+
+@@ -132,7 +133,8 @@ static int rc4_hmac_md5_cipher(EVP_CIPHE
+ /* cipher has to "fall behind" */
+ if (rc4_off>md5_off) md5_off+=MD5_CBLOCK;
+
+- if (plen>md5_off && (blocks=(plen-md5_off)/MD5_CBLOCK)) {
++ if (plen>md5_off && (blocks=(plen-md5_off)/MD5_CBLOCK) &&
++ (OPENSSL_ia32cap_P[0]&(1<<20))==0) {
+ MD5_Update(&key->md,in,md5_off);
+ RC4(&key->ks,rc4_off,in,out);
+
+@@ -172,7 +174,8 @@ static int rc4_hmac_md5_cipher(EVP_CIPHE
+ if (md5_off>rc4_off) rc4_off += 2*MD5_CBLOCK;
+ else rc4_off += MD5_CBLOCK;
+
+- if (len>rc4_off && (blocks=(len-rc4_off)/MD5_CBLOCK)) {
++ if (len>rc4_off && (blocks=(len-rc4_off)/MD5_CBLOCK) &&
++ (OPENSSL_ia32cap_P[0]&(1<<20))==0) {
+ RC4(&key->ks,rc4_off,in,out);
+ MD5_Update(&key->md,out,md5_off);
+
+@@ -289,8 +292,6 @@ static EVP_CIPHER r4_hmac_md5_cipher=
+
+ const EVP_CIPHER *EVP_rc4_hmac_md5(void)
+ {
+- extern unsigned int OPENSSL_ia32cap_P[];
+- /* RC4_CHAR flag ------------vvvvv */
+- return(OPENSSL_ia32cap_P[0]&(1<<20) ? NULL : &r4_hmac_md5_cipher);
++ return(&r4_hmac_md5_cipher);
+ }
+ #endif
diff --git a/dev-libs/openssl/openssl-1.0.1a.ebuild b/dev-libs/openssl/openssl-1.0.1a.ebuild
index 5ee4dfcf57ac..90ac4388d59a 100644
--- a/dev-libs/openssl/openssl-1.0.1a.ebuild
+++ b/dev-libs/openssl/openssl-1.0.1a.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-1.0.1a.ebuild,v 1.2 2012/04/20 17:55:52 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-1.0.1a.ebuild,v 1.3 2012/04/26 03:24:24 vapier Exp $
EAPI="4"
@@ -53,6 +53,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-1.0.1-parallel-build.patch
epatch "${FILESDIR}"/${PN}-1.0.1-x32.patch
epatch "${FILESDIR}"/${PN}-1.0.1-ipv6.patch
+ epatch "${FILESDIR}"/${P}-hmac-ia32cap.patch
epatch_user #332661
fi