From f61a00a7530a0aad1fe8f71a22a2f20967d42407 Mon Sep 17 00:00:00 2001 From: Markus Theil Date: Thu, 9 Apr 2026 22:22:30 +0200 Subject: [PATCH] openssl: cleanup already upstreamed patches Signed-off-by: Markus Theil --- ...-gcm-ppc-remove-localentry-directive.patch | 65 ------------------- .../openssl/3.6/mingw-define-netreset.patch | 30 --------- .../development/libraries/openssl/default.nix | 25 +------ 3 files changed, 2 insertions(+), 118 deletions(-) delete mode 100644 pkgs/development/libraries/openssl/3.5/openssl-aes-gcm-ppc-remove-localentry-directive.patch delete mode 100644 pkgs/development/libraries/openssl/3.6/mingw-define-netreset.patch diff --git a/pkgs/development/libraries/openssl/3.5/openssl-aes-gcm-ppc-remove-localentry-directive.patch b/pkgs/development/libraries/openssl/3.5/openssl-aes-gcm-ppc-remove-localentry-directive.patch deleted file mode 100644 index 43e6d333844d..000000000000 --- a/pkgs/development/libraries/openssl/3.5/openssl-aes-gcm-ppc-remove-localentry-directive.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 5aaa7e5fdc59e88a13d2911cb86d814d4e2669da Mon Sep 17 00:00:00 2001 -From: Danny Tsen -Date: Wed, 28 Jan 2026 07:23:13 -0500 -Subject: [PATCH] aes-gcm-ppc.pl: Removed .localentry directive - -Otherwise there is mixing of ELFv1 ABI and ELFv2 ABI directives -and PPC64 big endian builds fail. - -Fixes #29815 - -Signed-off-by: Danny Tsen - -Reviewed-by: Paul Dale -Reviewed-by: Shane Lontis -Reviewed-by: Tomas Mraz -MergeDate: Tue Feb 3 08:39:50 2026 -(Merged from https://github.com/openssl/openssl/pull/29827) ---- - crypto/modes/asm/aes-gcm-ppc.pl | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/crypto/modes/asm/aes-gcm-ppc.pl b/crypto/modes/asm/aes-gcm-ppc.pl -index 68918a9305a2b..fd5dcc22a6117 100644 ---- a/crypto/modes/asm/aes-gcm-ppc.pl -+++ b/crypto/modes/asm/aes-gcm-ppc.pl -@@ -409,7 +409,6 @@ - ################################################################################ - .align 4 - aes_gcm_crypt_1x: --.localentry aes_gcm_crypt_1x,0 - - cmpdi 5, 16 - bge __More_1x -@@ -492,7 +491,6 @@ - ################################################################################ - .align 4 - __Process_partial: --.localentry __Process_partial,0 - - # create partial mask - vspltisb 16, -1 -@@ -564,7 +562,6 @@ - .global ppc_aes_gcm_encrypt - .align 5 - ppc_aes_gcm_encrypt: --.localentry ppc_aes_gcm_encrypt,0 - - SAVE_REGS - LOAD_HASH_TABLE -@@ -752,7 +749,6 @@ - .global ppc_aes_gcm_decrypt - .align 5 - ppc_aes_gcm_decrypt: --.localentry ppc_aes_gcm_decrypt, 0 - - SAVE_REGS - LOAD_HASH_TABLE -@@ -1032,7 +1028,6 @@ - .size ppc_aes_gcm_decrypt,.-ppc_aes_gcm_decrypt - - aes_gcm_out: --.localentry aes_gcm_out,0 - - mr 3, 11 # return count - diff --git a/pkgs/development/libraries/openssl/3.6/mingw-define-netreset.patch b/pkgs/development/libraries/openssl/3.6/mingw-define-netreset.patch deleted file mode 100644 index 6da9be22ff72..000000000000 --- a/pkgs/development/libraries/openssl/3.6/mingw-define-netreset.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 3d04d5b678c2f95975d1639dc21398b79308af54 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Alexander=20Hansen=20F=C3=A6r=C3=B8y?= -Date: Wed, 28 Jan 2026 17:55:02 +0100 -Subject: [PATCH] Explicitly define `SIO_UDP_NETRESET` for MinGW builds. - -This patch explicitly defines the value `SIO_UDP_NETRESET` according to -both what Windows and ReactOS does. - -Fixes: #29818. ---- - ssl/quic/quic_reactor.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/ssl/quic/quic_reactor.c b/ssl/quic/quic_reactor.c -index a754f285bbe2b..d8ac969d02a69 100644 ---- a/ssl/quic/quic_reactor.c -+++ b/ssl/quic/quic_reactor.c -@@ -76,6 +76,12 @@ void ossl_quic_reactor_cleanup(QUIC_REACTOR *rtor) - } - - #if defined(OPENSSL_SYS_WINDOWS) -+ -+/* Work around for MinGW builds. */ -+#if defined(__MINGW32__) && !defined(SIO_UDP_NETRESET) -+# define SIO_UDP_NETRESET _WSAIOW(IOC_VENDOR, 15) -+#endif -+ - /* - * On Windows recvfrom() may return WSAECONNRESET when destination port - * used in preceding call to sendto() is no longer reachable. The reset diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index b440dda6e3ae..3c001e2801a3 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -483,18 +483,10 @@ in else ./3.5/use-etc-ssl-certs.patch ) - - # Don't cause ELF ABI mismatch on powerpc64 - # https://github.com/openssl/openssl/issues/29815 - ./3.5/openssl-aes-gcm-ppc-remove-localentry-directive.patch ] ++ lib.optionals stdenv.hostPlatform.isMinGW [ ./3.5/fix-mingw-linking.patch - ] - ++ - # https://cygwin.com/cgit/cygwin-packages/openssl/plain/openssl-3.0.18-skip-dllmain-detach.patch?id=219272d762128451822755e80a61db5557428598 - # and also https://github.com/openssl/openssl/pull/29321 - lib.optional stdenv.hostPlatform.isCygwin ./openssl-3.0.18-skip-dllmain-detach.patch; + ]; withDocs = true; @@ -523,20 +515,7 @@ in else ./3.5/use-etc-ssl-certs.patch ) - - # Don't cause ELF ABI mismatch on powerpc64 - # https://github.com/openssl/openssl/issues/29815 - ./3.5/openssl-aes-gcm-ppc-remove-localentry-directive.patch - ] - ++ lib.optionals stdenv.hostPlatform.isMinGW [ - # Fix from https://github.com/openssl/openssl/pull/29826 - # Merged, will be in 3.6.2 - ./3.6/mingw-define-netreset.patch - ] - ++ - # https://cygwin.com/cgit/cygwin-packages/openssl/plain/openssl-3.0.18-skip-dllmain-detach.patch?id=219272d762128451822755e80a61db5557428598 - # and also https://github.com/openssl/openssl/pull/29321 - lib.optional stdenv.hostPlatform.isCygwin ./openssl-3.0.18-skip-dllmain-detach.patch; + ]; withDocs = true;