summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorZheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>2018-12-05 02:22:50 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-05 12:37:02 +0000
commit2218fe92a397f6a2155497eaec6448d4de637444 (patch)
tree0e56a9b2bb33ce9f09668ca0b1667688ab6f1352 /meta
parent84986d45b7befc616e88aaeb35af2de539d3a866 (diff)
downloadpoky-2218fe92a397f6a2155497eaec6448d4de637444.tar.gz
nss: Fix SHA_HTONL bug for arm 32be.
Rpm use nss as digest crypto library and which will cause an error as follows: error: test-manual-1.2.3-20181012.noarch.rpm: Header SHA1 digest: BAD (Expected f1deb7dc4a10742d88ccd1e967dbc62ae45095a5 !=4ad9d7dad6d70d6086eefec62612ad5d77f2fe81) => this value is wrong error: test-manual-1.2.3-20181012.noarch.rpm: not an rpm package (or package manifest) The error is caused by SHA_HTONL in nss, for there is no need to reverse the host value for arm 32be, so fix it. (From OE-Core rev: 50a554a8ffff0bb34f844fb6cb9dd69362caafa5) Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/nss/nss/nss-fix-SHA_HTONL-bug-for-arm-32be.patch34
-rw-r--r--meta/recipes-support/nss/nss_3.40.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-support/nss/nss/nss-fix-SHA_HTONL-bug-for-arm-32be.patch b/meta/recipes-support/nss/nss/nss-fix-SHA_HTONL-bug-for-arm-32be.patch
new file mode 100644
index 0000000000..7ba8d16483
--- /dev/null
+++ b/meta/recipes-support/nss/nss/nss-fix-SHA_HTONL-bug-for-arm-32be.patch
@@ -0,0 +1,34 @@
1Subject: [PATCH] Fix SHA_HTONL bug for arm 32be.
2
3In arm 32be, there is no need to reverse the host value.
4
5Upstream Status: Pending
6
7Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com>
8---
9 lib/freebl/sha_fast.h | 2 ++
10 1 file changed, 2 insertions(+)
11
12diff --git a/nss/lib/freebl/sha_fast.h b/nss/lib/freebl/sha_fast.h
13index 4f37d13..8072eda 100644
14--- a/nss/lib/freebl/sha_fast.h
15+++ b/nss/lib/freebl/sha_fast.h
16@@ -99,6 +99,7 @@ swap4b(PRUint32 value)
17 defined(__ARM_ARCH_7__) || \
18 defined(__ARM_ARCH_7A__) || \
19 defined(__ARM_ARCH_7R__)))
20+#if defined(IS_LITTLE_ENDIAN)
21 static __inline__ PRUint32
22 swap4b(PRUint32 value)
23 {
24@@ -109,6 +110,7 @@ swap4b(PRUint32 value)
25 return ret;
26 }
27 #define SHA_HTONL(x) swap4b(x)
28+#endif
29
30 #endif /* x86 family */
31
32--
332.7.4
34
diff --git a/meta/recipes-support/nss/nss_3.40.bb b/meta/recipes-support/nss/nss_3.40.bb
index 23c95dd0d1..afc50817f1 100644
--- a/meta/recipes-support/nss/nss_3.40.bb
+++ b/meta/recipes-support/nss/nss_3.40.bb
@@ -28,6 +28,7 @@ SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSIO
28 file://blank-cert9.db \ 28 file://blank-cert9.db \
29 file://blank-key4.db \ 29 file://blank-key4.db \
30 file://system-pkcs11.txt \ 30 file://system-pkcs11.txt \
31 file://nss-fix-SHA_HTONL-bug-for-arm-32be.patch \
31 " 32 "
32 33
33SRC_URI[md5sum] = "f7aec858d192ae03d0e9a35a730c70fa" 34SRC_URI[md5sum] = "f7aec858d192ae03d0e9a35a730c70fa"