diff --git a/security/nettle/Makefile b/security/nettle/Makefile index c8ba2ed6e855..d31d21c9d051 100644 --- a/security/nettle/Makefile +++ b/security/nettle/Makefile @@ -1,57 +1,57 @@ PORTNAME= nettle -PORTVERSION= 3.9.1 +PORTVERSION= 3.10 CATEGORIES= security MASTER_SITES= GNU \ https://www.lysator.liu.se/~nisse/archive/ MAINTAINER= sunpoet@FreeBSD.org COMMENT= Low-level cryptographic library WWW= https://www.lysator.liu.se/~nisse/nettle/ LICENSE= GPLv2+ LGPL3 LICENSE_COMB= multi LICENSE_FILE_GPLv2+ = ${WRKSRC}/COPYINGv2 LICENSE_FILE_LGPL3= ${WRKSRC}/COPYING.LESSERv3 BUILD_DEPENDS= gmp>=6.1.0:math/gmp LIB_DEPENDS= libgmp.so:math/gmp USES= compiler:c11 cpe gmake localbase pathfix CONFIGURE_ARGS= --enable-shared CONFIGURE_ENV= M4="/usr/bin/m4 -g" GNU_CONFIGURE= yes TEST_TARGET= check USE_LDCONFIG= yes INFO= nettle CPE_VENDOR= nettle_project OPTIONS_DEFINE= DOCS EXAMPLES EXAMPLES_CFLAGS= -I${OPENSSLINC} EXAMPLES_USES= ssl EXAMPLES_EXTRA_PATCHES_OFF= ${PATCHDIR}/extra-patch-Makefile.in .include .if ${ARCH} == "mips64" post-patch: @${REINPLACE_CMD} -e 's|__sgi|__unix__|' ${WRKSRC}/configure .endif post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib*.so ${INSTALL_DATA} ${WRKSRC}/nettle.info ${STAGEDIR}${PREFIX}/${INFO_PATH}/nettle.info post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} cd ${WRKSRC} && ${INSTALL_DATA} NEWS README nettle.html nettle.pdf ${STAGEDIR}${DOCSDIR} post-install-EXAMPLES-on: ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} cd ${WRKSRC}/examples && ${INSTALL_PROGRAM} base16dec base16enc base64dec base64enc ecc-benchmark hogweed-benchmark nettle-benchmark random-prime rsa-decrypt rsa-encrypt rsa-keygen rsa-sign rsa-verify ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/examples/*.[ch] ${STAGEDIR}${EXAMPLESDIR} .include diff --git a/security/nettle/distinfo b/security/nettle/distinfo index 9896b862e6a8..5a2c64715488 100644 --- a/security/nettle/distinfo +++ b/security/nettle/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1685792186 -SHA256 (nettle-3.9.1.tar.gz) = ccfeff981b0ca71bbd6fbcb054f407c60ffb644389a5be80d6716d5b550c6ce3 -SIZE (nettle-3.9.1.tar.gz) = 2396741 +TIMESTAMP = 1718690460 +SHA256 (nettle-3.10.tar.gz) = b4c518adb174e484cb4acea54118f02380c7133771e7e9beb98a0787194ee47c +SIZE (nettle-3.10.tar.gz) = 2640485 diff --git a/security/nettle/files/patch-fat-arm64.c b/security/nettle/files/patch-fat-arm64.c index 21b0a1e31bf9..3bb786e1d5fe 100644 --- a/security/nettle/files/patch-fat-arm64.c +++ b/security/nettle/files/patch-fat-arm64.c @@ -1,27 +1,27 @@ ---- fat-arm64.c.orig 2022-07-27 19:23:20 UTC +--- fat-arm64.c.orig 2024-06-16 15:27:54 UTC +++ fat-arm64.c -@@ -50,6 +50,9 @@ - # include - # include - # include +@@ -51,6 +51,9 @@ + #if USE_GETAUXVAL + # include + # include +#elif defined(__FreeBSD__) +# define USE_GETAUXVAL 1 +# include - #endif - - #include "nettle-types.h" -@@ -117,7 +120,14 @@ get_arm64_features (struct arm64_features *features) + #elif defined(__OpenBSD__) + # include + # include +@@ -134,7 +137,14 @@ get_arm64_features (struct arm64_features *features) else { #if USE_GETAUXVAL +#if defined (__FreeBSD__) + unsigned long hwcap; + if(elf_aux_info(AT_HWCAP, &hwcap, sizeof(unsigned long)) != 0) { -+ hwcap = 0; ++ hwcap = 0; + } +#else unsigned long hwcap = getauxval(AT_HWCAP); +#endif features->have_aes = ((hwcap & (HWCAP_ASIMD | HWCAP_AES)) == (HWCAP_ASIMD | HWCAP_AES)); features->have_pmull diff --git a/security/nettle/files/patch-powerpc64-p8-aes-decrypt-internal.asm b/security/nettle/files/patch-powerpc64-p8-aes-decrypt-internal.asm index 6ec80f833cc9..67ceabec79c5 100644 --- a/security/nettle/files/patch-powerpc64-p8-aes-decrypt-internal.asm +++ b/security/nettle/files/patch-powerpc64-p8-aes-decrypt-internal.asm @@ -1,19 +1,19 @@ ---- powerpc64/p8/aes-decrypt-internal.asm.orig 2022-06-02 17:57:16 UTC +--- powerpc64/p8/aes-decrypt-internal.asm.orig 2024-06-16 15:27:54 UTC +++ powerpc64/p8/aes-decrypt-internal.asm -@@ -71,7 +71,7 @@ define(`FUNC_ALIGN', `5') - PROLOGUE(_nettle_aes_decrypt) - vxor ZERO,ZERO,ZERO +@@ -64,7 +64,7 @@ PROLOGUE(_nettle_aes_decrypt) + define(`FUNC_ALIGN', `5') + PROLOGUE(_nettle_aes_decrypt) - DATA_LOAD_VEC(SWAP_MASK,.swap_mask,r5) + DATA_LOAD_VEC(SWAP_MASK,.swap_data,r5) subi ROUNDS,ROUNDS,1 srdi LENGTH,LENGTH,4 -@@ -351,6 +351,6 @@ EPILOGUE(_nettle_aes_decrypt) +@@ -269,6 +269,6 @@ EPILOGUE(_nettle_aes_decrypt) .data .align 4 -.swap_mask: +.swap_data: IF_LE(`.byte 8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7') IF_BE(`.byte 3,2,1,0,7,6,5,4,11,10,9,8,15,14,13,12') diff --git a/security/nettle/pkg-plist b/security/nettle/pkg-plist index a55f056f8e35..5ff413a53f18 100644 --- a/security/nettle/pkg-plist +++ b/security/nettle/pkg-plist @@ -1,124 +1,125 @@ bin/nettle-hash bin/nettle-lfib-stream bin/nettle-pbkdf2 bin/pkcs1-conv bin/sexp-conv include/nettle/aes.h include/nettle/arcfour.h include/nettle/arctwo.h include/nettle/asn1.h include/nettle/balloon.h include/nettle/base16.h include/nettle/base64.h include/nettle/bignum.h include/nettle/blowfish.h include/nettle/buffer.h include/nettle/camellia.h include/nettle/cast128.h include/nettle/cbc.h include/nettle/ccm.h include/nettle/cfb.h include/nettle/chacha-poly1305.h include/nettle/chacha.h include/nettle/cmac.h include/nettle/ctr.h include/nettle/curve25519.h include/nettle/curve448.h include/nettle/des.h +include/nettle/drbg-ctr.h include/nettle/dsa-compat.h include/nettle/dsa.h include/nettle/eax.h include/nettle/ecc-curve.h include/nettle/ecc.h include/nettle/ecdsa.h include/nettle/eddsa.h include/nettle/gcm.h include/nettle/gostdsa.h include/nettle/gosthash94.h include/nettle/hkdf.h include/nettle/hmac.h include/nettle/knuth-lfib.h include/nettle/macros.h include/nettle/md2.h include/nettle/md4.h include/nettle/md5-compat.h include/nettle/md5.h include/nettle/memops.h include/nettle/memxor.h include/nettle/nettle-meta.h include/nettle/nettle-types.h include/nettle/nist-keywrap.h include/nettle/ocb.h include/nettle/pbkdf2.h include/nettle/pgp.h include/nettle/pkcs1.h include/nettle/poly1305.h include/nettle/pss-mgf1.h include/nettle/pss.h include/nettle/realloc.h include/nettle/ripemd160.h include/nettle/rsa.h include/nettle/salsa20.h include/nettle/serpent.h include/nettle/sexp.h include/nettle/sha.h include/nettle/sha1.h include/nettle/sha2.h include/nettle/sha3.h include/nettle/siv-cmac.h include/nettle/siv-gcm.h include/nettle/sm3.h include/nettle/sm4.h include/nettle/streebog.h include/nettle/twofish.h include/nettle/umac.h include/nettle/version.h include/nettle/xts.h include/nettle/yarrow.h lib/libhogweed.a lib/libhogweed.so lib/libhogweed.so.6 -lib/libhogweed.so.6.8 +lib/libhogweed.so.6.9 lib/libnettle.a lib/libnettle.so lib/libnettle.so.8 -lib/libnettle.so.8.8 +lib/libnettle.so.8.9 libdata/pkgconfig/hogweed.pc libdata/pkgconfig/nettle.pc %%PORTDOCS%%%%DOCSDIR%%/NEWS %%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%%%DOCSDIR%%/nettle.html %%PORTDOCS%%%%DOCSDIR%%/nettle.pdf %%PORTEXAMPLES%%%%EXAMPLESDIR%%/base16dec %%PORTEXAMPLES%%%%EXAMPLESDIR%%/base16dec.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/base16enc %%PORTEXAMPLES%%%%EXAMPLESDIR%%/base16enc.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/base64dec %%PORTEXAMPLES%%%%EXAMPLESDIR%%/base64dec.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/base64enc %%PORTEXAMPLES%%%%EXAMPLESDIR%%/base64enc.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/ecc-benchmark %%PORTEXAMPLES%%%%EXAMPLESDIR%%/ecc-benchmark.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/hogweed-benchmark %%PORTEXAMPLES%%%%EXAMPLESDIR%%/hogweed-benchmark.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/io.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/io.h %%PORTEXAMPLES%%%%EXAMPLESDIR%%/nettle-benchmark %%PORTEXAMPLES%%%%EXAMPLESDIR%%/nettle-benchmark.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/nettle-openssl.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-prime %%PORTEXAMPLES%%%%EXAMPLESDIR%%/random-prime.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/read_rsa_key.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rsa-decrypt %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rsa-decrypt.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rsa-encrypt %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rsa-encrypt.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rsa-keygen %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rsa-keygen.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rsa-session.h %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rsa-sign %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rsa-sign.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rsa-verify %%PORTEXAMPLES%%%%EXAMPLESDIR%%/rsa-verify.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/timing.c %%PORTEXAMPLES%%%%EXAMPLESDIR%%/timing.h