[packages/rdesktop] - nettle 4.x compatibility patch

qboosh qboosh at pld-linux.org
Thu Oct 22 06:24:25 CEST 2026


commit fe6a30523ec0307ab37af71387447192f07f5504
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Oct 22 06:25:05 2026 +0200

    - nettle 4.x compatibility patch

 rdesktop-nettle4.patch | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++
 rdesktop.spec          |  2 ++
 2 files changed, 55 insertions(+)
---
diff --git a/rdesktop.spec b/rdesktop.spec
index ef9ac50..a4847bf 100644
--- a/rdesktop.spec
+++ b/rdesktop.spec
@@ -11,6 +11,7 @@ Patch0:		%{name}-xinerama.patch
 Patch1:		no-strip.patch
 Patch2:		%{name}-ssl-exp-mod.patch
 Patch3:		%{name}-credssp-linux.patch
+Patch4:		%{name}-nettle4.patch
 URL:		http://www.rdesktop.org/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -46,6 +47,7 @@ wymagane żadne rozszerzenia po stronie serwera.
 %patch -P1 -p1
 %patch -P2 -p1
 %patch -P3 -p1
+%patch -P4 -p1
 
 %build
 %{__aclocal}
diff --git a/rdesktop-nettle4.patch b/rdesktop-nettle4.patch
new file mode 100644
index 0000000..755fd37
--- /dev/null
+++ b/rdesktop-nettle4.patch
@@ -0,0 +1,53 @@
+--- rdesktop-1.9.0/ssl.c.orig	2026-10-22 05:59:27.324585488 +0200
++++ rdesktop-1.9.0/ssl.c	2026-10-22 06:24:04.383250241 +0200
+@@ -25,6 +25,7 @@
+ #include "asn.h"
+ 
+ #include <gnutls/x509.h>
++#include <nettle/version.h>
+ 
+ void
+ rdssl_sha1_init(RDSSL_SHA1 * sha1)
+@@ -41,7 +42,11 @@ rdssl_sha1_update(RDSSL_SHA1 * sha1, uin
+ void
+ rdssl_sha1_final(RDSSL_SHA1 * sha1, uint8 * out_data)
+ {
++#if NETTLE_VERSION_MAJOR >= 4
++	sha1_digest(sha1, out_data);
++#else
+ 	sha1_digest(sha1, SHA1_DIGEST_SIZE, out_data);
++#endif
+ }
+ 
+ void
+@@ -59,7 +64,11 @@ rdssl_md5_update(RDSSL_MD5 * md5, uint8
+ void
+ rdssl_md5_final(RDSSL_MD5 * md5, uint8 * out_data)
+ {
++#if NETTLE_VERSION_MAJOR >= 4
++	md5_digest(md5, out_data);
++#else
+ 	md5_digest(md5, MD5_DIGEST_SIZE, out_data);
++#endif
+ }
+ 
+ void
+@@ -104,7 +113,7 @@ rdssl_rsa_encrypt(uint8 * out, uint8 * i
+ 	mpz_clear(exp);
+ 	mpz_clear(mod);
+ 
+-	if (outlen < (int) modulus_size)
++	if (outlen < (size_t) modulus_size)
+ 		memset(out + outlen, 0, modulus_size - outlen);
+ }
+ 
+@@ -360,5 +369,9 @@ rdssl_hmac_md5(const void *key, int key_
+ 
+ 	hmac_md5_set_key(&ctx, key_len, key);
+ 	hmac_md5_update(&ctx, msg_len, msg);
++#if NETTLE_VERSION_MAJOR >= 4
++	hmac_md5_digest(&ctx, md);
++#else
+ 	hmac_md5_digest(&ctx, MD5_DIGEST_SIZE, md);
++#endif
+ }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rdesktop.git/commitdiff/fe6a30523ec0307ab37af71387447192f07f5504



More information about the pld-cvs-commit mailing list