summaryrefslogtreecommitdiffstats
path: root/yocto-poky/meta/recipes-support/nettle
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-support/nettle')
-rw-r--r--yocto-poky/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch (renamed from yocto-poky/meta/recipes-support/nettle/nettle-3.1.1/CVE-2015-8803_8805.patch)46
-rw-r--r--yocto-poky/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8804.patch (renamed from yocto-poky/meta/recipes-support/nettle/nettle-3.1.1/CVE-2015-8804.patch)29
-rw-r--r--yocto-poky/meta/recipes-support/nettle/nettle.inc12
-rw-r--r--yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb6
-rw-r--r--yocto-poky/meta/recipes-support/nettle/nettle_3.2.bb (renamed from yocto-poky/meta/recipes-support/nettle/nettle_3.1.1.bb)9
5 files changed, 44 insertions, 58 deletions
diff --git a/yocto-poky/meta/recipes-support/nettle/nettle-3.1.1/CVE-2015-8803_8805.patch b/yocto-poky/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch
index b4ff228f6..a956f426b 100644
--- a/yocto-poky/meta/recipes-support/nettle/nettle-3.1.1/CVE-2015-8803_8805.patch
+++ b/yocto-poky/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch
@@ -8,18 +8,16 @@ Same fix for both.
Signed-off-by: Armin Kuster <akuster@mvista.com>
-Index: nettle-3.1.1/ecc-256.c
+Index: nettle-2.7.1/ecc-256.c
===================================================================
---- nettle-3.1.1.orig/ecc-256.c
-+++ nettle-3.1.1/ecc-256.c
-@@ -113,8 +113,19 @@ ecc_256_modp (const struct ecc_modulo *p
+--- nettle-2.7.1.orig/ecc-256.c
++++ nettle-2.7.1/ecc-256.c
+@@ -96,9 +96,19 @@ ecc_256_modp (const struct ecc_curve *ec
+ q2 += t + (q1 < t);
assert (q2 < 2);
-
-- /* We multiply by two low limbs of p, 2^96 - 1, so we could use
-- shifts rather than mul. */
+ /*
-+ n-1 n-2 n-3 n-4
++ n-1 n-2 n-3 n-4
+ +---+---+---+---+
+ | u1| u0| u low |
+ +---+---+---+---+
@@ -27,38 +25,40 @@ Index: nettle-3.1.1/ecc-256.c
+ +-------+---+
+ |q2(2^.)|
+ +-------+
-+
-+ We multiply by two low limbs of p, 2^96 - 1, so we could use
-+ shifts rather than mul.
+
+- /* We multiply by two low limbs of p, 2^96 - 1, so we could use
+- shifts rather than mul. */
++ We multiply by two low limbs of p, 2^96 - 1, so we could use
++ shifts rather than mul.
+ */
- t = mpn_submul_1 (rp + n - 4, p->m, 2, q1);
- t += cnd_sub_n (q2, rp + n - 3, p->m, 1);
+ t = mpn_submul_1 (rp + n - 4, ecc->p, 2, q1);
+ t += cnd_sub_n (q2, rp + n - 3, ecc->p, 1);
t += (-q2) & 0xffffffff;
-@@ -124,7 +135,10 @@ ecc_256_modp (const struct ecc_modulo *p
+@@ -108,7 +118,10 @@ ecc_256_modp (const struct ecc_curve *ec
u0 -= t;
t = (u1 < cy);
u1 -= cy;
-- u1 += cnd_add_n (t, rp + n - 4, p->m, 3);
+- u1 += cnd_add_n (t, rp + n - 4, ecc->p, 3);
+
-+ cy = cnd_add_n (t, rp + n - 4, p->m, 2);
++ cy = cnd_add_n (t, rp + n - 4, ecc->p, 2);
+ u0 += cy;
+ u1 += (u0 < cy);
u1 -= (-t) & 0xffffffff;
}
rp[2] = u0;
-@@ -211,7 +225,7 @@ ecc_256_modq (const struct ecc_modulo *q
+@@ -195,7 +208,7 @@ ecc_256_modq (const struct ecc_curve *ec
/* Conditional add of p */
u1 += t;
- u2 += (t<<32) + (u0 < t);
+ u2 += (t<<32) + (u1 < t);
- t = cnd_add_n (t, rp + n - 4, q->m, 2);
+ t = cnd_add_n (t, rp + n - 4, ecc->q, 2);
u1 += t;
-Index: nettle-3.1.1/ChangeLog
+Index: nettle-2.7.1/ChangeLog
===================================================================
---- nettle-3.1.1.orig/ChangeLog
-+++ nettle-3.1.1/ChangeLog
+--- nettle-2.7.1.orig/ChangeLog
++++ nettle-2.7.1/ChangeLog
@@ -1,3 +1,9 @@
+2015-12-10 Niels Möller <nisse@lysator.liu.se>
+
@@ -66,6 +66,6 @@ Index: nettle-3.1.1/ChangeLog
+ reported by Hanno Böck.
+ (ecc_256_modq): Fixed another carry propagation bug.
+
- 2015-04-24 Niels Möller <nisse@lysator.liu.se>
+ 2013-05-28 Niels Möller <nisse@lysator.liu.se>
- * Released nettle-3.1.1.
+ * Released nettle-2.7.1.
diff --git a/yocto-poky/meta/recipes-support/nettle/nettle-3.1.1/CVE-2015-8804.patch b/yocto-poky/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8804.patch
index 1d34db735..73723a998 100644
--- a/yocto-poky/meta/recipes-support/nettle/nettle-3.1.1/CVE-2015-8804.patch
+++ b/yocto-poky/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8804.patch
@@ -4,10 +4,10 @@ Upstream-Status: Backport
CVE: CVE-2015-8804
Signed-off-by: Armin Kuster <akuster@mvista.com>
-Index: nettle-3.1.1/ChangeLog
+Index: nettle-2.7.1/ChangeLog
===================================================================
---- nettle-3.1.1.orig/ChangeLog
-+++ nettle-3.1.1/ChangeLog
+--- nettle-2.7.1.orig/ChangeLog
++++ nettle-2.7.1/ChangeLog
@@ -1,3 +1,11 @@
+2015-12-15 Niels Möller <nisse@lysator.liu.se>
+
@@ -20,20 +20,11 @@ Index: nettle-3.1.1/ChangeLog
2015-12-10 Niels Möller <nisse@lysator.liu.se>
* ecc-256.c (ecc_256_modp): Fixed carry propagation bug. Problem
-Index: nettle-3.1.1/x86_64/ecc-384-modp.asm
+Index: nettle-2.7.1/x86_64/ecc-384-modp.asm
===================================================================
---- nettle-3.1.1.orig/x86_64/ecc-384-modp.asm
-+++ nettle-3.1.1/x86_64/ecc-384-modp.asm
-@@ -1,7 +1,7 @@
- C x86_64/ecc-384-modp.asm
-
- ifelse(<
-- Copyright (C) 2013 Niels Möller
-+ Copyright (C) 2013, 2015 Niels Möller
-
- This file is part of GNU Nettle.
-
-@@ -33,7 +33,7 @@ ifelse(<
+--- nettle-2.7.1.orig/x86_64/ecc-384-modp.asm
++++ nettle-2.7.1/x86_64/ecc-384-modp.asm
+@@ -20,7 +20,7 @@ C MA 02111-1301, USA.
.file "ecc-384-modp.asm"
define(<RP>, <%rsi>)
@@ -42,7 +33,7 @@ Index: nettle-3.1.1/x86_64/ecc-384-modp.asm
define(<T0>, <%rbx>)
define(<T1>, <%rcx>)
define(<T2>, <%rdx>)
-@@ -48,8 +48,8 @@ define(<H4>, <%r13>)
+@@ -35,8 +35,8 @@ define(<H4>, <%r13>)
define(<H5>, <%r14>)
define(<C2>, <%r15>)
define(<C0>, H5) C Overlap
@@ -53,7 +44,7 @@ Index: nettle-3.1.1/x86_64/ecc-384-modp.asm
PROLOGUE(nettle_ecc_384_modp)
W64_ENTRY(2, 0)
-@@ -61,34 +61,38 @@ PROLOGUE(nettle_ecc_384_modp)
+@@ -48,34 +48,38 @@ PROLOGUE(nettle_ecc_384_modp)
push %r14
push %r15
@@ -116,7 +107,7 @@ Index: nettle-3.1.1/x86_64/ecc-384-modp.asm
xor C2, C2
add H4, H0
-@@ -127,118 +131,95 @@ PROLOGUE(nettle_ecc_384_modp)
+@@ -114,118 +118,95 @@ PROLOGUE(nettle_ecc_384_modp)
adc H3, T5
adc $0, C0
diff --git a/yocto-poky/meta/recipes-support/nettle/nettle.inc b/yocto-poky/meta/recipes-support/nettle/nettle.inc
index fafff6d8d..af51fb6c7 100644
--- a/yocto-poky/meta/recipes-support/nettle/nettle.inc
+++ b/yocto-poky/meta/recipes-support/nettle/nettle.inc
@@ -2,10 +2,6 @@ SUMMARY = "A low level cryptographic library"
HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/"
SECTION = "libs"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
- file://serpent-decrypt.c;beginline=53;endline=67;md5=bcfd4745d53ca57f82907089898e390d \
- file://serpent-set-key.c;beginline=56;endline=70;md5=bcfd4745d53ca57f82907089898e390d"
-
DEPENDS += "gmp"
SRC_URI = "http://www.lysator.liu.se/~nisse/archive/${BP}.tar.gz \
@@ -13,13 +9,12 @@ SRC_URI = "http://www.lysator.liu.se/~nisse/archive/${BP}.tar.gz \
file://run-ptest \
"
-SRC_URI[md5sum] = "003d5147911317931dd453520eb234a5"
-SRC_URI[sha256sum] = "bc71ebd43435537d767799e414fce88e521b7278d48c860651216e1fc6555b40"
-
-EXTRA_OECONF = "--disable-openssl"
+UPSTREAM_CHECK_REGEX = "nettle-(?P<pver>\d+(\.\d+)+)\.tar"
inherit autotools ptest
+EXTRA_OECONF = "--disable-openssl"
+
do_configure_prepend() {
if [ ! -e ${S}/acinclude.m4 -a -e ${S}/aclocal.m4 ]; then
cp ${S}/aclocal.m4 ${S}/acinclude.m4
@@ -39,5 +34,4 @@ do_install_ptest() {
install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
}
-
BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb b/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb
index ae2574a23..d4df0a3a8 100644
--- a/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb
+++ b/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb
@@ -10,3 +10,9 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
SRC_URI[md5sum] = "003d5147911317931dd453520eb234a5"
SRC_URI[sha256sum] = "bc71ebd43435537d767799e414fce88e521b7278d48c860651216e1fc6555b40"
+SRC_URI += "\
+ file://CVE-2015-8803_8805.patch \
+ file://CVE-2015-8804.patch \
+ "
+
+DISABLE_STATIC = ""
diff --git a/yocto-poky/meta/recipes-support/nettle/nettle_3.1.1.bb b/yocto-poky/meta/recipes-support/nettle/nettle_3.2.bb
index 4a40e9ae5..2b7977974 100644
--- a/yocto-poky/meta/recipes-support/nettle/nettle_3.1.1.bb
+++ b/yocto-poky/meta/recipes-support/nettle/nettle_3.2.bb
@@ -7,10 +7,5 @@ LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6
file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e \
file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e"
-SRC_URI += "\
- file://CVE-2015-8803_8805.patch \
- file://CVE-2015-8804.patch \
- "
-
-SRC_URI[md5sum] = "b40fa88dc32f37a182b6b42092ebb144"
-SRC_URI[sha256sum] = "5fd4d25d64d8ddcb85d0d897572af73b05b4d163c6cc49438a5bfbb8ff293d4c"
+SRC_URI[md5sum] = "afb15b4764ebf1b4e6d06c62bd4d29e4"
+SRC_URI[sha256sum] = "ea4283def236413edab5a4cf9cf32adf540c8df1b9b67641cfc2302fca849d97"
OpenPOWER on IntegriCloud