diff --git a/security/mbedtls/Makefile b/security/mbedtls/Makefile index dd4c87fc05e1..925bfa3da98d 100644 --- a/security/mbedtls/Makefile +++ b/security/mbedtls/Makefile @@ -1,40 +1,43 @@ PORTNAME= mbedtls -PORTVERSION= 2.28.6 DISTVERSIONPREFIX=${PORTNAME}- +DISTVERSION= 2.28.7 CATEGORIES= security devel MAINTAINER= tijl@FreeBSD.org COMMENT= SSL/TLS and cryptography library WWW= https://www.trustedfirmware.org/projects/mbed-tls/ LICENSE= APACHE20 GPLv2+ LICENSE_COMB= dual LICENSE_FILE= ${WRKSRC}/LICENSE -USES= gmake python:test shebangfix +USES= cmake:testing python:build,test shebangfix SHEBANG_FILES= scripts/*.py tests/scripts/*.py +USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= Mbed-TLS -ALL_TARGET= no_test -TEST_TARGET= test -MAKE_ENV= PYTHON=${PYTHON_CMD} SHARED=1 -USE_LDCONFIG= yes +PORTSCOUT= limit:^${DISTVERSION:R:S/./\./g}\. +PLIST_SUB= DISTVERSION=${DISTVERSION} + +CMAKE_TESTING_ON= ENABLE_TESTING -PORTSCOUT= limit:^${PORTVERSION:R:S/./\./g}\. +CMAKE_OFF= ENABLE_TESTING +CMAKE_ON= CMAKE_BUILD_RPATH_USE_ORIGIN \ + ENABLE_PROGRAMS \ + ENABLE_ZLIB_SUPPORT \ + LINK_WITH_PTHREAD \ + USE_SHARED_MBEDTLS_LIBRARY -post-patch: - @${RM} ${WRKSRC}/include/mbedtls/*.orig - @${REINPLACE_CMD} \ - -e 's/PREFIX/NAMEPREFIX/' \ - -e 's/$$(DESTDIR)/&$$(PREFIX)/' \ - ${WRKSRC}/Makefile - @${REINPLACE_CMD} 's/-fpic//' ${WRKSRC}/library/Makefile +pre-configure: + @${WRKSRC}/scripts/config.py -f ${WRKSRC}/include/mbedtls/config.h set MBEDTLS_SSL_DTLS_SRTP + @${WRKSRC}/scripts/config.py -f ${WRKSRC}/include/mbedtls/config.h set MBEDTLS_THREADING_C + @${WRKSRC}/scripts/config.py -f ${WRKSRC}/include/mbedtls/config.h set MBEDTLS_THREADING_PTHREAD post-install: - ${FIND} ${STAGEDIR}${PREFIX}/bin -type f -not -name \*.sh \ - -exec ${STRIP_CMD} {} + - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so + @cd ${STAGEDIR}${PREFIX}/bin && for f in *; do \ + ${MV} "$$f" "mbedtls_$$f"; \ + done .include diff --git a/security/mbedtls/distinfo b/security/mbedtls/distinfo index 5e03bfd1cd4a..b52fa7e7ad9b 100644 --- a/security/mbedtls/distinfo +++ b/security/mbedtls/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1699528221 -SHA256 (Mbed-TLS-mbedtls-mbedtls-2.28.6_GH0.tar.gz) = 18cac49f4efef7269d233972bb09c57ace40d992229fa49804e7b10cf0debe43 -SIZE (Mbed-TLS-mbedtls-mbedtls-2.28.6_GH0.tar.gz) = 3988909 +TIMESTAMP = 1706348469 +SHA256 (Mbed-TLS-mbedtls-mbedtls-2.28.7_GH0.tar.gz) = 4390bc4ab1ea9a1ddf3725f540d0f80838c656d1d7987a1cee8b4da43e4571de +SIZE (Mbed-TLS-mbedtls-mbedtls-2.28.7_GH0.tar.gz) = 3990571 diff --git a/security/mbedtls/files/patch-include_mbedtls_config.h b/security/mbedtls/files/patch-include_mbedtls_config.h deleted file mode 100644 index fa23d72d7946..000000000000 --- a/security/mbedtls/files/patch-include_mbedtls_config.h +++ /dev/null @@ -1,29 +0,0 @@ ---- include/mbedtls/config.h.orig 2021-12-15 13:47:54 UTC -+++ include/mbedtls/config.h -@@ -1946,7 +1946,7 @@ - * - * Uncomment this to enable support for use_srtp extension. - */ --//#define MBEDTLS_SSL_DTLS_SRTP -+#define MBEDTLS_SSL_DTLS_SRTP - - /** - * \def MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE -@@ -2129,7 +2129,7 @@ - * - * Uncomment this to enable pthread mutexes. - */ --//#define MBEDTLS_THREADING_PTHREAD -+#define MBEDTLS_THREADING_PTHREAD - - /** - * \def MBEDTLS_USE_PSA_CRYPTO -@@ -3452,7 +3452,7 @@ - * - * Enable this layer to allow use of mutexes within mbed TLS - */ --//#define MBEDTLS_THREADING_C -+#define MBEDTLS_THREADING_C - - /** - * \def MBEDTLS_TIMING_C diff --git a/security/mbedtls/pkg-plist b/security/mbedtls/pkg-plist index f98edaf834e3..2a3e902aae56 100644 --- a/security/mbedtls/pkg-plist +++ b/security/mbedtls/pkg-plist @@ -1,171 +1,162 @@ bin/mbedtls_benchmark bin/mbedtls_cert_app bin/mbedtls_cert_req bin/mbedtls_cert_write bin/mbedtls_crl_app bin/mbedtls_crypt_and_hash bin/mbedtls_crypto_examples bin/mbedtls_dh_client bin/mbedtls_dh_genprime bin/mbedtls_dh_server -bin/mbedtls_dlopen -bin/mbedtls_dlopen_demo.sh bin/mbedtls_dtls_client bin/mbedtls_dtls_server bin/mbedtls_ecdh_curve25519 bin/mbedtls_ecdsa -bin/mbedtls_fuzz_client -bin/mbedtls_fuzz_dtlsclient -bin/mbedtls_fuzz_dtlsserver -bin/mbedtls_fuzz_privkey -bin/mbedtls_fuzz_pubkey -bin/mbedtls_fuzz_server -bin/mbedtls_fuzz_x509crl -bin/mbedtls_fuzz_x509crt -bin/mbedtls_fuzz_x509csr bin/mbedtls_gen_entropy bin/mbedtls_gen_key bin/mbedtls_gen_random_ctr_drbg bin/mbedtls_gen_random_havege -bin/mbedtls_generate_cpp_dummy_build.sh bin/mbedtls_generic_sum bin/mbedtls_hello bin/mbedtls_key_app bin/mbedtls_key_app_writer bin/mbedtls_key_ladder_demo bin/mbedtls_key_ladder_demo.sh bin/mbedtls_load_roots bin/mbedtls_mini_client bin/mbedtls_mpi_demo bin/mbedtls_pem2der bin/mbedtls_pk_decrypt bin/mbedtls_pk_encrypt bin/mbedtls_pk_sign bin/mbedtls_pk_verify bin/mbedtls_psa_constant_names +bin/mbedtls_ssl_pthread_server bin/mbedtls_query_compile_time_config bin/mbedtls_req_app bin/mbedtls_rsa_decrypt bin/mbedtls_rsa_encrypt bin/mbedtls_rsa_genkey bin/mbedtls_rsa_sign bin/mbedtls_rsa_sign_pss bin/mbedtls_rsa_verify bin/mbedtls_rsa_verify_pss bin/mbedtls_selftest bin/mbedtls_ssl_client1 bin/mbedtls_ssl_client2 bin/mbedtls_ssl_context_info bin/mbedtls_ssl_fork_server bin/mbedtls_ssl_mail_client bin/mbedtls_ssl_server bin/mbedtls_ssl_server2 bin/mbedtls_strerror bin/mbedtls_udp_proxy -bin/mbedtls_udp_proxy_wrapper.sh bin/mbedtls_zeroize include/mbedtls/aes.h include/mbedtls/aesni.h include/mbedtls/arc4.h include/mbedtls/aria.h include/mbedtls/asn1.h include/mbedtls/asn1write.h include/mbedtls/base64.h include/mbedtls/bignum.h include/mbedtls/blowfish.h include/mbedtls/bn_mul.h include/mbedtls/camellia.h include/mbedtls/ccm.h include/mbedtls/certs.h include/mbedtls/chacha20.h include/mbedtls/chachapoly.h include/mbedtls/check_config.h include/mbedtls/cipher.h include/mbedtls/cipher_internal.h include/mbedtls/cmac.h include/mbedtls/compat-1.3.h include/mbedtls/config.h include/mbedtls/config_psa.h include/mbedtls/constant_time.h include/mbedtls/ctr_drbg.h include/mbedtls/debug.h include/mbedtls/des.h include/mbedtls/dhm.h include/mbedtls/ecdh.h include/mbedtls/ecdsa.h include/mbedtls/ecjpake.h include/mbedtls/ecp.h include/mbedtls/ecp_internal.h include/mbedtls/entropy.h include/mbedtls/entropy_poll.h include/mbedtls/error.h include/mbedtls/gcm.h include/mbedtls/havege.h include/mbedtls/hkdf.h include/mbedtls/hmac_drbg.h include/mbedtls/md.h include/mbedtls/md2.h include/mbedtls/md4.h include/mbedtls/md5.h include/mbedtls/md_internal.h include/mbedtls/memory_buffer_alloc.h include/mbedtls/net.h include/mbedtls/net_sockets.h include/mbedtls/nist_kw.h include/mbedtls/oid.h include/mbedtls/padlock.h include/mbedtls/pem.h include/mbedtls/pk.h include/mbedtls/pk_internal.h include/mbedtls/pkcs11.h include/mbedtls/pkcs12.h include/mbedtls/pkcs5.h include/mbedtls/platform.h include/mbedtls/platform_time.h include/mbedtls/platform_util.h include/mbedtls/poly1305.h include/mbedtls/psa_util.h include/mbedtls/ripemd160.h include/mbedtls/rsa.h include/mbedtls/rsa_internal.h include/mbedtls/sha1.h include/mbedtls/sha256.h include/mbedtls/sha512.h include/mbedtls/ssl.h include/mbedtls/ssl_cache.h include/mbedtls/ssl_ciphersuites.h include/mbedtls/ssl_cookie.h include/mbedtls/ssl_internal.h include/mbedtls/ssl_ticket.h include/mbedtls/threading.h include/mbedtls/timing.h include/mbedtls/version.h include/mbedtls/x509.h include/mbedtls/x509_crl.h include/mbedtls/x509_crt.h include/mbedtls/x509_csr.h include/mbedtls/xtea.h include/psa/crypto.h include/psa/crypto_builtin_composites.h include/psa/crypto_builtin_primitives.h include/psa/crypto_compat.h include/psa/crypto_config.h include/psa/crypto_driver_common.h include/psa/crypto_driver_contexts_composites.h include/psa/crypto_driver_contexts_primitives.h include/psa/crypto_extra.h include/psa/crypto_platform.h include/psa/crypto_se_driver.h include/psa/crypto_sizes.h include/psa/crypto_struct.h include/psa/crypto_types.h include/psa/crypto_values.h lib/libmbedcrypto.a lib/libmbedcrypto.so +lib/libmbedcrypto.so.%%DISTVERSION%% lib/libmbedcrypto.so.7 lib/libmbedtls.a lib/libmbedtls.so lib/libmbedtls.so.14 +lib/libmbedtls.so.%%DISTVERSION%% lib/libmbedx509.a lib/libmbedx509.so lib/libmbedx509.so.1 +lib/libmbedx509.so.%%DISTVERSION%%