diff --git a/security/boringssl/Makefile b/security/boringssl/Makefile index f849e419498f..61508c0eaf32 100644 --- a/security/boringssl/Makefile +++ b/security/boringssl/Makefile @@ -1,46 +1,46 @@ PORTNAME= boringssl -PORTVERSION= 0.0.0.0.2022.10.11.01 +PORTVERSION= 0.0.0.0.2022.10.12.01 CATEGORIES= security MAINTAINER= osa@FreeBSD.org COMMENT= Fork of OpenSSL WWW= https://boringssl.googlesource.com/boringssl/ LICENSE= OpenSSL LICENSE_FILE= ${WRKSRC}/LICENSE USES= cmake:insource cpe go:no_targets localbase perl5 CONFLICTS_INSTALL= security/libressl security/libressl-devel \ security/openssl security/openssl-devel \ security/openssl-quictls CPE_VENDOR= google USE_GITHUB= yes GH_ACCOUNT= google -GH_TAGNAME= 1783227 +GH_TAGNAME= d66bba9 GH_TUPLE= golang:crypto:c07d793c2f9a:golang_crypto/vendor/golang.org/x/crypto \ golang:net:04defd469f4e:golang_net/vendor/golang.org/x/net \ golang:sys:04245dca01da:golang_sys/vendor/golang.org/x/sys \ golang:term:7de9c90e9dd1:golang_term/vendor/golang.org/x/term CMAKE_ARGS+= -DBUILD_SHARED_LIBS=1 \ -DCMAKE_BUILD_TYPE=Release USE_LDCONFIG= yes LDFLAGS+= -Wl,-rpath,${LOCALBASE}/lib TEST_TARGET= run_tests MAKE_ENV+= GOFLAGS=-mod=vendor \ GOPATH=${WRKSRC}/vendor \ GOPROXY=off do-install: ${INSTALL_PROGRAM} ${WRKSRC}/tool/bssl ${STAGEDIR}${PREFIX}/bin/ (cd ${WRKSRC}/include && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include) ${INSTALL_LIB} ${WRKSRC}/crypto/libcrypto.so ${STAGEDIR}${PREFIX}/lib/libcrypto.so.1.0.0 ${INSTALL_LIB} ${WRKSRC}/ssl/libssl.so ${STAGEDIR}${PREFIX}/lib/libssl.so.1.0.0 ${LN} -sf libcrypto.so.1 ${STAGEDIR}${PREFIX}/lib/libcrypto.so ${LN} -sf libcrypto.so.1.0.0 ${STAGEDIR}${PREFIX}/lib/libcrypto.so.1 ${LN} -sf libssl.so.1 ${STAGEDIR}${PREFIX}/lib/libssl.so ${LN} -sf libssl.so.1.0.0 ${STAGEDIR}${PREFIX}/lib/libssl.so.1 .include diff --git a/security/boringssl/distinfo b/security/boringssl/distinfo index 0496288ef64f..046cd51a7592 100644 --- a/security/boringssl/distinfo +++ b/security/boringssl/distinfo @@ -1,11 +1,11 @@ -TIMESTAMP = 1665579192 -SHA256 (google-boringssl-0.0.0.0.2022.10.11.01-1783227_GH0.tar.gz) = 00e7bdce6ec9bc434e3ebb2e1dc1d0245282414cb0ef1e37d7a56b5273b87e79 -SIZE (google-boringssl-0.0.0.0.2022.10.11.01-1783227_GH0.tar.gz) = 30977360 +TIMESTAMP = 1665588245 +SHA256 (google-boringssl-0.0.0.0.2022.10.12.01-d66bba9_GH0.tar.gz) = c62a19fffaf57b75b0ccb011d3796c418e3fe1f8ff7f1c6aea6c9749e7e7c785 +SIZE (google-boringssl-0.0.0.0.2022.10.12.01-d66bba9_GH0.tar.gz) = 30975262 SHA256 (golang-crypto-c07d793c2f9a_GH0.tar.gz) = bd1e0856c43287c6ebd20d59e2b4f2ffa91c5cc275dbb02bb2cfc822e6dc18a4 SIZE (golang-crypto-c07d793c2f9a_GH0.tar.gz) = 1732023 SHA256 (golang-net-04defd469f4e_GH0.tar.gz) = 6009a6f0989341df975799276ff1c49af650d4a4ed3fd6db3501b91eb601810d SIZE (golang-net-04defd469f4e_GH0.tar.gz) = 1252122 SHA256 (golang-sys-04245dca01da_GH0.tar.gz) = b90ec2bae1f7e395eb368638a6627199efdc28fa9c592a72aac0ae32351fd5d7 SIZE (golang-sys-04245dca01da_GH0.tar.gz) = 1231301 SHA256 (golang-term-7de9c90e9dd1_GH0.tar.gz) = 73603eaab2ab2bfe05061d64ad09f8ed7469de6964a672398f7bf82cffb4b1da SIZE (golang-term-7de9c90e9dd1_GH0.tar.gz) = 15239 diff --git a/security/boringssl/files/patch-crypto_CMakeLists.txt b/security/boringssl/files/patch-crypto_CMakeLists.txt index d46e32af0db3..06002b4a1b35 100644 --- a/security/boringssl/files/patch-crypto_CMakeLists.txt +++ b/security/boringssl/files/patch-crypto_CMakeLists.txt @@ -1,22 +1,10 @@ --- crypto/CMakeLists.txt.orig 2022-07-25 14:53:51.000000000 -0400 +++ crypto/CMakeLists.txt 2022-07-26 12:18:36.169803000 -0400 -@@ -264,9 +264,11 @@ - cipher_extra/tls_cbc.c - conf/conf.c - cpu_aarch64_apple.c -+ cpu_aarch64_freebsd.c - cpu_aarch64_fuchsia.c - cpu_aarch64_linux.c - cpu_aarch64_win.c -+ cpu_arm_freebsd.c - cpu_arm_linux.c - cpu_arm.c - cpu_intel.c @@ -464,6 +466,7 @@ endif() SET_TARGET_PROPERTIES(crypto PROPERTIES LINKER_LANGUAGE C) +SET_TARGET_PROPERTIES(crypto PROPERTIES SOVERSION 1) if(NOT WIN32 AND NOT ANDROID) target_link_libraries(crypto pthread) diff --git a/security/boringssl/files/patch-crypto_cpu__aarch64__freebsd.c b/security/boringssl/files/patch-crypto_cpu__aarch64__freebsd.c deleted file mode 100644 index fe7b139f23ed..000000000000 --- a/security/boringssl/files/patch-crypto_cpu__aarch64__freebsd.c +++ /dev/null @@ -1,65 +0,0 @@ ---- /dev/null 2022-07-26 12:16:14.406018000 -0400 -+++ crypto/cpu_aarch64_freebsd.c 2022-07-26 12:15:28.130832000 -0400 -@@ -0,0 +1,62 @@ -+/* Copyright (c) 2016, Google Inc. -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -+ -+#include "internal.h" -+ -+#if defined(OPENSSL_AARCH64) -+ -+ -+#include -+ -+ -+extern uint32_t OPENSSL_armcap_P; -+ -+#if defined(OPENSSL_FREEBSD) -+#include -+#include -+#include -+#endif -+ -+#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 -+ -+void OPENSSL_cpuid_setup(void) { -+ uint64_t id_aa64isar0; -+ -+ id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); -+ -+ OPENSSL_armcap_P |= ARMV7_NEON; -+ -+ if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) >= ID_AA64ISAR0_AES_BASE) { -+ OPENSSL_armcap_P |= ARMV8_AES; -+ } -+ if (ID_AA64ISAR0_AES_VAL(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) { -+ OPENSSL_armcap_P |= ARMV8_PMULL; -+ } -+ if (ID_AA64ISAR0_SHA1_VAL(id_aa64isar0) == ID_AA64ISAR0_SHA1_BASE) { -+ OPENSSL_armcap_P |= ARMV8_SHA1; -+ } -+ if (ID_AA64ISAR0_SHA2_VAL(id_aa64isar0) >= ID_AA64ISAR0_SHA2_BASE) { -+ OPENSSL_armcap_P |= ARMV8_SHA256; -+ } -+} -+ -+#endif // OPENSSL_AARCH64 diff --git a/security/boringssl/files/patch-crypto_cpu__arm__freebsd.c b/security/boringssl/files/patch-crypto_cpu__arm__freebsd.c deleted file mode 100644 index eab921b971a7..000000000000 --- a/security/boringssl/files/patch-crypto_cpu__arm__freebsd.c +++ /dev/null @@ -1,55 +0,0 @@ ---- crypto/cpu_arm_freebsd.c.orig 2022-07-24 00:49:45 UTC -+++ crypto/cpu_arm_freebsd.c -@@ -0,0 +1,52 @@ -+/* Copyright (c) 2016, Google Inc. -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -+ * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -+ -+#include "internal.h" -+ -+#if defined(OPENSSL_ARM) && defined(OPENSSL_FREEBSD) && \ -+ !defined(OPENSSL_STATIC_ARMCAP) -+#include -+#include -+ -+#include -+#include -+ -+extern uint32_t OPENSSL_armcap_P; -+ -+void OPENSSL_cpuid_setup(void) { -+ unsigned long hwcap = 0, hwcap2 = 0; -+ -+ elf_aux_info(AT_HWCAP, &hwcap, sizeof hwcap); -+ elf_aux_info(AT_HWCAP2, &hwcap2, sizeof hwcap2); -+ -+ // Matching OpenSSL, only report other features if NEON is present. -+ if (hwcap & HWCAP_NEON) { -+ OPENSSL_armcap_P |= ARMV7_NEON; -+ -+ if (hwcap2 & HWCAP2_AES) { -+ OPENSSL_armcap_P |= ARMV8_AES; -+ } -+ if (hwcap2 & HWCAP2_PMULL) { -+ OPENSSL_armcap_P |= ARMV8_PMULL; -+ } -+ if (hwcap2 & HWCAP2_SHA1) { -+ OPENSSL_armcap_P |= ARMV8_SHA1; -+ } -+ if (hwcap2 & HWCAP2_SHA2) { -+ OPENSSL_armcap_P |= ARMV8_SHA256; -+ } -+ } -+} -+ -+#endif // OPENSSL_ARM && OPENSSL_OPENBSD && !OPENSSL_STATIC_ARMCAP