From dfcc26ba93173c323930786dd53a5780dadb8293 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Fri, 9 Mar 2018 07:59:17 +0000 Subject: [PATCH] MFH: r463696 security/nss: update to 3.36 Changes: https://developer.mozilla.org/docs/Mozilla/Projects/NSS/NSS_3.36_release_notes Changes: https://hg.mozilla.org/projects/nss/shortlog/NSS_3_36_RTM ABI: https://abi-laboratory.pro/tracker/timeline/nss/ Approved by: ports-secteam (riggs) --- security/ca_root_nss/Makefile | 2 +- security/ca_root_nss/distinfo | 6 +-- security/nss/Makefile | 4 +- security/nss/distinfo | 6 +-- security/nss/files/patch-bug1432455 | 27 ----------- security/nss/files/patch-bug1443400 | 69 +++++++++++++++++++++++++++++ security/nss/pkg-plist | 1 - 7 files changed, 78 insertions(+), 37 deletions(-) delete mode 100644 security/nss/files/patch-bug1432455 create mode 100644 security/nss/files/patch-bug1443400 diff --git a/security/ca_root_nss/Makefile b/security/ca_root_nss/Makefile index 56554c619ae1..9662270908aa 100644 --- a/security/ca_root_nss/Makefile +++ b/security/ca_root_nss/Makefile @@ -32,7 +32,7 @@ PLIST_SUB+= CERTDIR=${CERTDIR} # !!! Please DO NOT submit patches for new version until it has !!! # !!! been committed there first. !!! # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -VERSION_NSS= 3.35 +VERSION_NSS= 3.36 #NSS_SUFFIX= -with-ckbi-1.98 CERTDATA_TXT_PATH= nss-${VERSION_NSS}/nss/lib/ckfw/builtins/certdata.txt BUNDLE_PROCESSOR= MAca-bundle.pl diff --git a/security/ca_root_nss/distinfo b/security/ca_root_nss/distinfo index 7ac15e756846..dcdaf0a88aba 100644 --- a/security/ca_root_nss/distinfo +++ b/security/ca_root_nss/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1516285199 -SHA256 (nss-3.35.tar.gz) = f4127de09bede39f5fd0f789d33c3504c5d261e69ea03022d46b319b3e32f6fa -SIZE (nss-3.35.tar.gz) = 9620041 +TIMESTAMP = 1520265512 +SHA256 (nss-3.36.tar.gz) = a33cc7b8299b5ce3acf03f617c7896932ae26927ff9fb7c71c1b69a200c30095 +SIZE (nss-3.36.tar.gz) = 23025578 diff --git a/security/nss/Makefile b/security/nss/Makefile index 8ae8c329d7b7..0b4525986c2a 100644 --- a/security/nss/Makefile +++ b/security/nss/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= nss -PORTVERSION= 3.35 +PORTVERSION= 3.36 #DISTVERSIONSUFFIX= -with-ckbi-1.98 CATEGORIES= security MASTER_SITES= MOZILLA/security/${PORTNAME}/releases/${DISTNAME:tu:C/[-.]/_/g}_RTM/src @@ -41,7 +41,7 @@ DIST= ${WRKSRC:H}/dist EXTRACT_AFTER_ARGS=--exclude */lib/zlib --exclude */lib/dbm --exclude */lib/sqlite -INSTALL_BINS= certcgi certutil cmsutil crlutil derdump makepqg \ +INSTALL_BINS= certutil cmsutil crlutil derdump makepqg \ mangle modutil ocspclnt oidcalc p7content p7env p7sign \ p7verify pk12util rsaperf shlibsign signtool signver \ ssltap strsclnt symkeyutil vfychain vfyserv diff --git a/security/nss/distinfo b/security/nss/distinfo index 7ac15e756846..dcdaf0a88aba 100644 --- a/security/nss/distinfo +++ b/security/nss/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1516285199 -SHA256 (nss-3.35.tar.gz) = f4127de09bede39f5fd0f789d33c3504c5d261e69ea03022d46b319b3e32f6fa -SIZE (nss-3.35.tar.gz) = 9620041 +TIMESTAMP = 1520265512 +SHA256 (nss-3.36.tar.gz) = a33cc7b8299b5ce3acf03f617c7896932ae26927ff9fb7c71c1b69a200c30095 +SIZE (nss-3.36.tar.gz) = 23025578 diff --git a/security/nss/files/patch-bug1432455 b/security/nss/files/patch-bug1432455 deleted file mode 100644 index 70d743c77055..000000000000 --- a/security/nss/files/patch-bug1432455 +++ /dev/null @@ -1,27 +0,0 @@ -commit 1668fafc1db4 -Author: Daiki Ueno -Date: Tue Jan 23 13:29:34 2018 +0100 - - Bug 1432455, Build Hacl_Poly1305_64.o on AArch64 even with make, r=fkiefer ---- - lib/freebl/Makefile | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git lib/freebl/Makefile lib/freebl/Makefile -index 0b3daa2756..6c8e6a2ead 100644 ---- lib/freebl/Makefile -+++ lib/freebl/Makefile -@@ -527,7 +527,12 @@ ifndef NSS_DISABLE_CHACHAPOLY - EXTRA_SRCS += chacha20_vec.c - endif - else -- EXTRA_SRCS += poly1305.c -+ ifeq ($(CPU_ARCH),aarch64) -+ EXTRA_SRCS += Hacl_Poly1305_64.c -+ else -+ EXTRA_SRCS += poly1305.c -+ endif -+ - EXTRA_SRCS += chacha20.c - VERIFIED_SRCS += Hacl_Chacha20.c - endif # x86_64 diff --git a/security/nss/files/patch-bug1443400 b/security/nss/files/patch-bug1443400 new file mode 100644 index 000000000000..b1cebb9a3ece --- /dev/null +++ b/security/nss/files/patch-bug1443400 @@ -0,0 +1,69 @@ +Don't try to use getauxval() if unsupported by platform. + +diff --git lib/freebl/blinit.c lib/freebl/blinit.c +index 4ac1c49adb..830d038374 100644 +--- lib/freebl/blinit.c ++++ lib/freebl/blinit.c +@@ -92,22 +92,33 @@ CheckX86CPUSupport() + #endif /* NSS_X86_OR_X64 */ + + #if (defined(__aarch64__) || defined(__arm__)) && !defined(__ANDROID__) +-#if defined(__GNUC__) && __GNUC__ >= 2 && defined(__ELF__) ++#ifndef __has_include ++#define __has_include(x) 0 ++#endif ++#if (__has_include() || defined(__linux__)) && defined(__GNUC__) && __GNUC__ >= 2 && defined(__ELF__) + #include + extern unsigned long getauxval(unsigned long type) __attribute__((weak)); + #else + static unsigned long (*getauxval)(unsigned long) = NULL; +-#define AT_HWCAP2 +-#define AT_HWCAP ++#define AT_HWCAP2 0 ++#define AT_HWCAP 0 + #endif /* defined(__GNUC__) && __GNUC__ >= 2 && defined(__ELF__)*/ + #endif /* (defined(__aarch64__) || defined(__arm__)) && !defined(__ANDROID__) */ + + #if defined(__aarch64__) && !defined(__ANDROID__) + // Defines from hwcap.h in Linux kernel - ARM64 ++#ifndef HWCAP_AES + #define HWCAP_AES (1 << 3) ++#endif ++#ifndef HWCAP_PMULL + #define HWCAP_PMULL (1 << 4) ++#endif ++#ifndef HWCAP_SHA1 + #define HWCAP_SHA1 (1 << 5) ++#endif ++#ifndef HWCAP_SHA2 + #define HWCAP_SHA2 (1 << 6) ++#endif + + void + CheckARMSupport() +@@ -131,15 +142,25 @@ CheckARMSupport() + /* + * HWCAP flags - for elf_hwcap (in kernel) and AT_HWCAP + */ ++#ifndef HWCAP_NEON + #define HWCAP_NEON (1 << 12) ++#endif + + /* + * HWCAP2 flags - for elf_hwcap2 (in kernel) and AT_HWCAP2 + */ ++#ifndef HWCAP2_AES + #define HWCAP2_AES (1 << 0) ++#endif ++#ifndef HWCAP2_PMULL + #define HWCAP2_PMULL (1 << 1) ++#endif ++#ifndef HWCAP2_SHA1 + #define HWCAP2_SHA1 (1 << 2) ++#endif ++#ifndef HWCAP2_SHA2 + #define HWCAP2_SHA2 (1 << 3) ++#endif + + void + CheckARMSupport() diff --git a/security/nss/pkg-plist b/security/nss/pkg-plist index e3f050180a75..f6aa6d0fa5cd 100644 --- a/security/nss/pkg-plist +++ b/security/nss/pkg-plist @@ -1,4 +1,3 @@ -bin/certcgi bin/certutil bin/cmsutil bin/crlutil