From 4bdc8126370af3552c005327e35bd927dc2f3570 Mon Sep 17 00:00:00 2001 From: talregev Date: Wed, 23 Oct 2024 09:00:41 +0300 Subject: [PATCH] [shiftmedia-libgnutls, nettle] update shiftmedia-libgnutls to 3.8.7, add symbols in nettle for shiftmedia-libgnutls (#41704) --- ports/nettle/nettle-arm.def | 4 ++ ports/nettle/nettle-arm64.def | 4 ++ ports/nettle/nettle-x64.def | 4 ++ ports/nettle/nettle-x86.def | 4 ++ ports/nettle/vcpkg.json | 1 + .../external-libtasn1.patch | 47 +++++++++++++++---- ports/shiftmedia-libgnutls/fix-warnings.patch | 32 ------------- ports/shiftmedia-libgnutls/mkdir.patch | 13 ----- ports/shiftmedia-libgnutls/portfile.cmake | 5 +- .../ssize_t_already_define.patch | 14 ------ ports/shiftmedia-libgnutls/vcpkg.json | 3 +- versions/baseline.json | 6 +-- versions/n-/nettle.json | 5 ++ versions/s-/shiftmedia-libgnutls.json | 5 ++ 14 files changed, 69 insertions(+), 78 deletions(-) delete mode 100644 ports/shiftmedia-libgnutls/fix-warnings.patch delete mode 100644 ports/shiftmedia-libgnutls/mkdir.patch delete mode 100644 ports/shiftmedia-libgnutls/ssize_t_already_define.patch diff --git a/ports/nettle/nettle-arm.def b/ports/nettle/nettle-arm.def index 3eb03f929a..52d5fb1b40 100644 --- a/ports/nettle/nettle-arm.def +++ b/ports/nettle/nettle-arm.def @@ -561,3 +561,7 @@ EXPORTS _nettle_aes_decrypt_table nettle_aes_decrypt _nettle_aes_decrypt + nettle_sha3_256_shake_output + nettle_sha3_128_init + nettle_sha3_128_update + nettle_sha3_128_shake_output diff --git a/ports/nettle/nettle-arm64.def b/ports/nettle/nettle-arm64.def index 7d5b8146ff..448d040ee1 100644 --- a/ports/nettle/nettle-arm64.def +++ b/ports/nettle/nettle-arm64.def @@ -585,3 +585,7 @@ EXPORTS _nettle_aes_decrypt_table nettle_aes_decrypt _nettle_aes_decrypt + nettle_sha3_256_shake_output + nettle_sha3_128_init + nettle_sha3_128_update + nettle_sha3_128_shake_output diff --git a/ports/nettle/nettle-x64.def b/ports/nettle/nettle-x64.def index 037568abac..4155da9cb4 100644 --- a/ports/nettle/nettle-x64.def +++ b/ports/nettle/nettle-x64.def @@ -592,3 +592,7 @@ EXPORTS _nettle_aes_decrypt_table nettle_aes_decrypt _nettle_aes_decrypt + nettle_sha3_256_shake_output + nettle_sha3_128_init + nettle_sha3_128_update + nettle_sha3_128_shake_output diff --git a/ports/nettle/nettle-x86.def b/ports/nettle/nettle-x86.def index 02001b5085..edfd5019a6 100644 --- a/ports/nettle/nettle-x86.def +++ b/ports/nettle/nettle-x86.def @@ -561,3 +561,7 @@ EXPORTS _nettle_aes_decrypt_table nettle_aes_decrypt _nettle_aes_decrypt + nettle_sha3_256_shake_output + nettle_sha3_128_init + nettle_sha3_128_update + nettle_sha3_128_shake_output diff --git a/ports/nettle/vcpkg.json b/ports/nettle/vcpkg.json index ca1bd8fbd9..4ae4e73f80 100644 --- a/ports/nettle/vcpkg.json +++ b/ports/nettle/vcpkg.json @@ -1,6 +1,7 @@ { "name": "nettle", "version": "3.10", + "port-version": 1, "description": "Nettle is a low-level cryptographic library that is designed to fit easily in more or less any context: In crypto toolkits for object-oriented languages (C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space.", "homepage": "https://git.lysator.liu.se/nettle/nettle", "license": null, diff --git a/ports/shiftmedia-libgnutls/external-libtasn1.patch b/ports/shiftmedia-libgnutls/external-libtasn1.patch index b08697a90f..68a94c4f6d 100644 --- a/ports/shiftmedia-libgnutls/external-libtasn1.patch +++ b/ports/shiftmedia-libgnutls/external-libtasn1.patch @@ -1,8 +1,18 @@ diff --git a/SMP/libgnutls.vcxproj.filters b/SMP/libgnutls.vcxproj.filters -index 0e810b202..5a69f12ec 100644 +index ef202f4ac..a397e1574 100644 --- a/SMP/libgnutls.vcxproj.filters +++ b/SMP/libgnutls.vcxproj.filters -@@ -1520,30 +1520,6 @@ +@@ -103,9 +103,6 @@ + + {ae0c3eeb-53df-4c72-a85a-6b46de35e7ba} + +- +- {32be60b7-8c65-486e-9df5-7e529443cf07} +- + + {1f3549a8-3c3d-475f-8fd6-20451d336464} + +@@ -1535,30 +1532,6 @@ Source Files\lib\nettle @@ -34,31 +44,48 @@ index 0e810b202..5a69f12ec 100644 Source Files\lib\nettle\gost diff --git a/SMP/libgnutls_files.props b/SMP/libgnutls_files.props -index 7fe1f88d5..cbc2d45c1 100644 +index 55049b70b..2bb76e3b0 100644 --- a/SMP/libgnutls_files.props +++ b/SMP/libgnutls_files.props -@@ -172,16 +172,6 @@ +@@ -175,13 +175,6 @@ - - - -- -- $(IntDir)\tasn1_$(filename).obj -- - - - - - + +@@ -545,9 +538,6 @@ + + + REPLACE_PRINTF_POSIX=1;REPLACE_FPRINTF_POSIX=1;REPLACE_VPRINTF_POSIX=1;REPLACE_VFPRINTF_POSIX=1;%(PreprocessorDefinitions) +- +- +- $(IntDir)\tasn1_$(filename).obj + + + $(IntDir)\alg_%(Filename).obj diff --git a/SMP/libgnutls_winrt.vcxproj.filters b/SMP/libgnutls_winrt.vcxproj.filters -index 761877440..cd40b5bb7 100644 +index f6a355e7e..299749c2a 100644 --- a/SMP/libgnutls_winrt.vcxproj.filters +++ b/SMP/libgnutls_winrt.vcxproj.filters -@@ -1520,30 +1520,6 @@ +@@ -103,9 +103,6 @@ + + {ae0c3eeb-53df-4c72-a85a-6b46de35e7ba} + +- +- {32be60b7-8c65-486e-9df5-7e529443cf07} +- + + {4fada990-3138-4089-a6c7-ae722a0e7fe9} + +@@ -1535,30 +1532,6 @@ Source Files\lib\nettle diff --git a/ports/shiftmedia-libgnutls/fix-warnings.patch b/ports/shiftmedia-libgnutls/fix-warnings.patch deleted file mode 100644 index 563fc5635d..0000000000 --- a/ports/shiftmedia-libgnutls/fix-warnings.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/lib/includes/gnutls/ocsp.h b/lib/includes/gnutls/ocsp.h -index 9e271476cf..80d8ccc8f5 100644 ---- a/lib/includes/gnutls/ocsp.h -+++ b/lib/includes/gnutls/ocsp.h -@@ -224,9 +224,9 @@ int gnutls_ocsp_resp_get_single(gnutls_ocsp_resp_const_t resp, unsigned indx, - gnutls_datum_t *issuer_name_hash, - gnutls_datum_t *issuer_key_hash, - gnutls_datum_t *serial_number, -- unsigned int *cert_status, time_t *this_update, -+ gnutls_ocsp_cert_status_t *cert_status, time_t *this_update, - time_t *next_update, time_t *revocation_time, -- unsigned int *revocation_reason); -+ gnutls_x509_crl_reason_t *revocation_reason); - int gnutls_ocsp_resp_get_extension(gnutls_ocsp_resp_const_t resp, unsigned indx, - gnutls_datum_t *oid, unsigned int *critical, - gnutls_datum_t *data); -diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c -index 0120129d50..3a46f2d174 100644 ---- a/lib/x509/ocsp.c -+++ b/lib/x509/ocsp.c -@@ -1433,9 +1433,9 @@ int gnutls_ocsp_resp_get_single(gnutls_ocsp_resp_const_t resp, unsigned indx, - gnutls_datum_t *issuer_name_hash, - gnutls_datum_t *issuer_key_hash, - gnutls_datum_t *serial_number, -- unsigned int *cert_status, time_t *this_update, -+ gnutls_ocsp_cert_status_t *cert_status, time_t *this_update, - time_t *next_update, time_t *revocation_time, -- unsigned int *revocation_reason) -+ gnutls_x509_crl_reason_t *revocation_reason) - { - char name[MAX_NAME_SIZE]; - int ret, result; diff --git a/ports/shiftmedia-libgnutls/mkdir.patch b/ports/shiftmedia-libgnutls/mkdir.patch deleted file mode 100644 index d598d32987..0000000000 --- a/ports/shiftmedia-libgnutls/mkdir.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/SMP/unistd.h b/SMP/unistd.h -index b54d4be15..273204e00 100644 ---- a/SMP/unistd.h -+++ b/SMP/unistd.h -@@ -32,6 +32,8 @@ - #include - #include - -+#define mkdir(path, mode) _mkdir(path) -+ - #define R_OK 4 /* Test for read permission. */ - #define W_OK 2 /* Test for write permission. */ - //#define X_OK 1 /* execute permission - unsupported in windows*/ diff --git a/ports/shiftmedia-libgnutls/portfile.cmake b/ports/shiftmedia-libgnutls/portfile.cmake index 0fcddef1bd..eb4d9209a3 100644 --- a/ports/shiftmedia-libgnutls/portfile.cmake +++ b/ports/shiftmedia-libgnutls/portfile.cmake @@ -4,14 +4,11 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ShiftMediaProject/gnutls REF ${VERSION} - SHA512 5bd515da85f9e87b98f09a29472f788e869ccc3355f9583fbb4215d954cc5f97239e017120a0b358d259e58d0bd8e538fd00ea102fdbc1b29363cd92f06d0299 + SHA512 ff3991012425fb047229b3a72f3ab465981e002f93840df0dc3729b152fb497f88c74cb50022fc6f30aa2f6db3c34ed4e44e5556ec249f8da5b20886bb4116b1 HEAD_REF master PATCHES external-libtasn1.patch pkgconfig.patch - ssize_t_already_define.patch - fix-warnings.patch - mkdir.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/devel/perlasm") diff --git a/ports/shiftmedia-libgnutls/ssize_t_already_define.patch b/ports/shiftmedia-libgnutls/ssize_t_already_define.patch deleted file mode 100644 index fc305cb73c..0000000000 --- a/ports/shiftmedia-libgnutls/ssize_t_already_define.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/SMP/gnutls/gnutls.h b/SMP/gnutls/gnutls.h -index af1c296a69..796d838064 100644 ---- a/SMP/gnutls/gnutls.h -+++ b/SMP/gnutls/gnutls.h -@@ -39,7 +39,9 @@ - /* Get ssize_t. */ - #ifdef _MSC_VER - # include -+# ifndef ssize_t - typedef SSIZE_T ssize_t; -+# endif - # include - #else - # include diff --git a/ports/shiftmedia-libgnutls/vcpkg.json b/ports/shiftmedia-libgnutls/vcpkg.json index 33764e58ad..77539df13b 100644 --- a/ports/shiftmedia-libgnutls/vcpkg.json +++ b/ports/shiftmedia-libgnutls/vcpkg.json @@ -1,7 +1,6 @@ { "name": "shiftmedia-libgnutls", - "version": "3.8.4", - "port-version": 3, + "version": "3.8.7", "description": "Unofficial GnuTLS fork with added custom native Visual Studio project build tools. ", "homepage": "https://github.com/ShiftMediaProject/gnutls", "license": "LGPL-2.1-only", diff --git a/versions/baseline.json b/versions/baseline.json index 0e59282418..8b2b4ad44d 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6286,7 +6286,7 @@ }, "nettle": { "baseline": "3.10", - "port-version": 0 + "port-version": 1 }, "networkdirect-sdk": { "baseline": "2.0.1", @@ -8269,8 +8269,8 @@ "port-version": 1 }, "shiftmedia-libgnutls": { - "baseline": "3.8.4", - "port-version": 3 + "baseline": "3.8.7", + "port-version": 0 }, "shiftmedia-libgpg-error": { "baseline": "1.45", diff --git a/versions/n-/nettle.json b/versions/n-/nettle.json index 74ed045ded..e066ad1a77 100644 --- a/versions/n-/nettle.json +++ b/versions/n-/nettle.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "8e33e188623d99135e4d6db52d98840da86ffc0d", + "version": "3.10", + "port-version": 1 + }, { "git-tree": "9326fbe0ac4d6a3e70d622443d40b29d9538a9ff", "version": "3.10", diff --git a/versions/s-/shiftmedia-libgnutls.json b/versions/s-/shiftmedia-libgnutls.json index 0bb095fee3..7faede969c 100644 --- a/versions/s-/shiftmedia-libgnutls.json +++ b/versions/s-/shiftmedia-libgnutls.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "86914b66df06648d0bf9cfff13c272a852768df4", + "version": "3.8.7", + "port-version": 0 + }, { "git-tree": "b18bd4e582995b852d1b9eac4b79805d84aaa656", "version": "3.8.4",