Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Dec 2019 19:29:08 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r518865 - in head/security/boringssl: . files
Message-ID:  <201912021929.xB2JT8hU026023@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Mon Dec  2 19:29:08 2019
New Revision: 518865
URL: https://svnweb.freebsd.org/changeset/ports/518865

Log:
  security/boringssl: update to new snapshot [1]
  
  While here, fix build on aarch64 [2]
  
  PR:		242388 [2]
  Submitted by:	mikael.urankar@gmail.com [2]

Added:
  head/security/boringssl/files/
  head/security/boringssl/files/patch-crypto_cpu-aarch64-linux.c   (contents, props changed)
Modified:
  head/security/boringssl/Makefile   (contents, props changed)
  head/security/boringssl/distinfo   (contents, props changed)
  head/security/boringssl/pkg-plist   (contents, props changed)

Modified: head/security/boringssl/Makefile
==============================================================================
--- head/security/boringssl/Makefile	Mon Dec  2 19:00:24 2019	(r518864)
+++ head/security/boringssl/Makefile	Mon Dec  2 19:29:08 2019	(r518865)
@@ -1,17 +1,22 @@
 # $FreeBSD$
 
 PORTNAME=	boringssl
-PORTVERSION=	0.0.0.0.2018.10.30.01
+PORTVERSION=	0.0.0.0.2019.12.02.01
 CATEGORIES=	security
 
 MAINTAINER=	swills@FreeBSD.org
 COMMENT=	Fork of OpenSSL
 
+LICENSE=	OpenSSL
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		cmake:insource go:no_targets localbase perl5
+
 USE_GITHUB=	yes
 GH_ACCOUNT=	google
-GH_TAGNAME=	144d924
-USES=		cmake:insource go:no_targets localbase perl5
-CMAKE_ARGS+=	-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1
+GH_TAGNAME=	f8fcab9
+CMAKE_ARGS+=	-DBUILD_SHARED_LIBS=1 \
+		-DCMAKE_BUILD_TYPE=Release
 USE_LDCONFIG=	yes
 LDFLAGS+=	-Wl,-rpath,${PREFIX}/lib
 TEST_TARGET=	run_tests

Modified: head/security/boringssl/distinfo
==============================================================================
--- head/security/boringssl/distinfo	Mon Dec  2 19:00:24 2019	(r518864)
+++ head/security/boringssl/distinfo	Mon Dec  2 19:29:08 2019	(r518865)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1540910656
-SHA256 (google-boringssl-0.0.0.0.2018.10.30.01-144d924_GH0.tar.gz) = db873a10e44df5dcfde757038c95d1e73a1e270a983a90873e57da8593218380
-SIZE (google-boringssl-0.0.0.0.2018.10.30.01-144d924_GH0.tar.gz) = 17079162
+TIMESTAMP = 1575314030
+SHA256 (google-boringssl-0.0.0.0.2019.12.02.01-f8fcab9_GH0.tar.gz) = 801579716b146956255c44be1354907e46b2832161ff84b60feb935c51c8067a
+SIZE (google-boringssl-0.0.0.0.2019.12.02.01-f8fcab9_GH0.tar.gz) = 18027392

Added: head/security/boringssl/files/patch-crypto_cpu-aarch64-linux.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/boringssl/files/patch-crypto_cpu-aarch64-linux.c	Mon Dec  2 19:29:08 2019	(r518865)
@@ -0,0 +1,74 @@
+--- crypto/cpu-aarch64-linux.c.orig	2019-12-02 17:52:12 UTC
++++ crypto/cpu-aarch64-linux.c
+@@ -14,49 +14,46 @@
+ 
+ #include <openssl/cpu.h>
+ 
+-#if defined(OPENSSL_AARCH64) && defined(OPENSSL_LINUX) && \
+-    !defined(OPENSSL_STATIC_ARMCAP)
++#if defined(OPENSSL_AARCH64)
+ 
+-#include <sys/auxv.h>
+-
+ #include <openssl/arm_arch.h>
+ 
+ #include "internal.h"
+ 
+-
+ extern uint32_t OPENSSL_armcap_P;
+ 
+-void OPENSSL_cpuid_setup(void) {
+-  unsigned long hwcap = getauxval(AT_HWCAP);
++#include <sys/types.h>
++#include <machine/_stdint.h>
++#include <machine/armreg.h>
+ 
+-  // See /usr/include/asm/hwcap.h on an aarch64 installation for the source of
+-  // these values.
+-  static const unsigned long kNEON = 1 << 1;
+-  static const unsigned long kAES = 1 << 3;
+-  static const unsigned long kPMULL = 1 << 4;
+-  static const unsigned long kSHA1 = 1 << 5;
+-  static const unsigned long kSHA256 = 1 << 6;
++#ifndef ID_AA64ISAR0_AES_VAL
++#define ID_AA64ISAR0_AES_VAL ID_AA64ISAR0_AES
++#endif
++#ifndef ID_AA64ISAR0_SHA1_VAL
++#define ID_AA64ISAR0_SHA1_VAL ID_AA64ISAR0_SHA1
++#endif
++#ifndef ID_AA64ISAR0_SHA2_VAL
++#define ID_AA64ISAR0_SHA2_VAL ID_AA64ISAR0_SHA2
++#endif
+ 
+-  if ((hwcap & kNEON) == 0) {
+-    // Matching OpenSSL, if NEON is missing, don't report other features
+-    // either.
+-    return;
+-  }
++void OPENSSL_cpuid_setup(void) {
++  uint64_t id_aa64isar0;
+ 
++  id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1);
++
+   OPENSSL_armcap_P |= ARMV7_NEON;
+ 
+-  if (hwcap & kAES) {
++  if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) >= ID_AA64ISAR0_AES_BASE) {
+     OPENSSL_armcap_P |= ARMV8_AES;
+   }
+-  if (hwcap & kPMULL) {
++  if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) {
+     OPENSSL_armcap_P |= ARMV8_PMULL;
+   }
+-  if (hwcap & kSHA1) {
++  if (ID_AA64ISAR0_SHA1_VAL(id_aa64isar0) == ID_AA64ISAR0_SHA1_BASE) {
+     OPENSSL_armcap_P |= ARMV8_SHA1;
+   }
+-  if (hwcap & kSHA256) {
++  if(ID_AA64ISAR0_SHA2_VAL(id_aa64isar0) >= ID_AA64ISAR0_SHA2_BASE) {
+     OPENSSL_armcap_P |= ARMV8_SHA256;
+   }
+ }
+-
+-#endif  // OPENSSL_AARCH64 && !OPENSSL_STATIC_ARMCAP
++#endif  // OPENSSL_AARCH64

Modified: head/security/boringssl/pkg-plist
==============================================================================
--- head/security/boringssl/pkg-plist	Mon Dec  2 19:00:24 2019	(r518864)
+++ head/security/boringssl/pkg-plist	Mon Dec  2 19:29:08 2019	(r518865)
@@ -37,6 +37,7 @@ include/openssl/evp.h
 include/openssl/ex_data.h
 include/openssl/hkdf.h
 include/openssl/hmac.h
+include/openssl/hrss.h
 include/openssl/is_boringssl.h
 include/openssl/lhash.h
 include/openssl/md4.h
@@ -61,6 +62,7 @@ include/openssl/ripemd.h
 include/openssl/rsa.h
 include/openssl/safestack.h
 include/openssl/sha.h
+include/openssl/siphash.h
 include/openssl/span.h
 include/openssl/srtp.h
 include/openssl/ssl.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912021929.xB2JT8hU026023>