Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package tigervnc for openSUSE:Factory 
checked in at 2026-08-01 18:28:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tigervnc (Old)
 and      /work/SRC/openSUSE:Factory/.tigervnc.new.16738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tigervnc"

Sat Aug  1 18:28:29 2026 rev:117 rq:1366353 version:1.16.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/tigervnc/tigervnc.changes        2026-03-31 
15:22:33.141000570 +0200
+++ /work/SRC/openSUSE:Factory/.tigervnc.new.16738/tigervnc.changes     
2026-08-01 18:29:11.439486614 +0200
@@ -1,0 +2,6 @@
+Tue Jul 14 08:40:48 UTC 2026 - Pedro Monreal <[email protected]>
+
+- Add nettle4 compatibility [b434432] (bsc#1257934)
+  * Add tigervnc-nettle4-compat-b434432b.patch
+
+-------------------------------------------------------------------

New:
----
  tigervnc-nettle4-compat-b434432b.patch

----------(New B)----------
  New:- Add nettle4 compatibility [b434432] (bsc#1257934)
  * Add tigervnc-nettle4-compat-b434432b.patch
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tigervnc.spec ++++++
--- /var/tmp/diff_new_pack.52QNa3/_old  2026-08-01 18:29:13.571559251 +0200
+++ /var/tmp/diff_new_pack.52QNa3/_new  2026-08-01 18:29:13.587559796 +0200
@@ -75,6 +75,8 @@
 %if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
 Patch8:         n_tigervnc-reproducible-jar-mtime.patch
 %endif
+#PATCH-FIX-UPSTREAM bsc#1257934 Add nettle4 compatibility
+Patch9:         tigervnc-nettle4-compat-b434432b.patch
 Patch1260871:   U_Prevent-other-users-reading-x0vncserver-screen.patch
 Provides:       tightvnc = 1.5.0
 Obsoletes:      tightvnc < 1.5.0

++++++ tigervnc-nettle4-compat-b434432b.patch ++++++
>From 04c3a9688c14638fa900908f83b25b34ae9a943e Mon Sep 17 00:00:00 2001
From: Alexander Zeijlon <[email protected]>
Date: Wed, 29 Apr 2026 21:34:54 +0200
Subject: [PATCH 1/3] Initialize digest buffers to zero

Let's avoid storing random garbage at the last 12 indices when SHA1 is
being used.
---
 common/rfb/CSecurityRSAAES.cxx | 4 ++++
 common/rfb/SSecurityRSAAES.cxx | 3 +++
 2 files changed, 7 insertions(+)

Index: tigervnc-1.16.1/common/rfb/CSecurityRSAAES.cxx
===================================================================
--- tigervnc-1.16.1.orig/common/rfb/CSecurityRSAAES.cxx
+++ tigervnc-1.16.1/common/rfb/CSecurityRSAAES.cxx
@@ -34,6 +34,7 @@
 #include <nettle/bignum.h>
 #include <nettle/sha1.h>
 #include <nettle/sha2.h>
+#include <nettle/version.h>
 
 #include <core/LogWriter.h>
 #include <core/string.h>
@@ -221,13 +222,17 @@ void CSecurityRSAAES::verifyServer()
     (uint8_t)((serverKeyLength & 0xff00) >> 8),
     (uint8_t)(serverKeyLength & 0xff)
   };
-  uint8_t f[8];
+  uint8_t f[SHA1_DIGEST_SIZE];
   struct sha1_ctx ctx;
   sha1_init(&ctx);
   sha1_update(&ctx, 4, lenServerKey);
   sha1_update(&ctx, serverKey.size, serverKeyN);
   sha1_update(&ctx, serverKey.size, serverKeyE);
-  sha1_digest(&ctx, sizeof(f), f);
+#if NETTLE_VERSION_MAJOR >= 4
+  sha1_digest(&ctx, f);
+#else
+  sha1_digest(&ctx, SHA1_DIGEST_SIZE, f);
+#endif
   const char *title = "Server key fingerprint";
   std::string text = core::format(
     "The server has provided the following identifying information:\n"
@@ -299,30 +304,47 @@ void CSecurityRSAAES::setCipher()
 {
   rawis = cc->getInStream();
   rawos = cc->getOutStream();
-  uint8_t key[32];
+  uint8_t key[SHA256_DIGEST_SIZE];
+  memset(key, 0, sizeof(key));
   if (keySize == 128) {
     struct sha1_ctx ctx;
     sha1_init(&ctx);
     sha1_update(&ctx, 16, clientRandom);
     sha1_update(&ctx, 16, serverRandom);
-    sha1_digest(&ctx, 16, key);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha1_digest(&ctx, key);
+#else
+    sha1_digest(&ctx, SHA1_DIGEST_SIZE, key);
+#endif
     rais = new rdr::AESInStream(rawis, key, 128);
     sha1_init(&ctx);
     sha1_update(&ctx, 16, serverRandom);
     sha1_update(&ctx, 16, clientRandom);
-    sha1_digest(&ctx, 16, key);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha1_digest(&ctx, key);
+#else
+    sha1_digest(&ctx, SHA1_DIGEST_SIZE, key);
+#endif
     raos = new rdr::AESOutStream(rawos, key, 128);
   } else {
     struct sha256_ctx ctx;
     sha256_init(&ctx);
     sha256_update(&ctx, 32, clientRandom);
     sha256_update(&ctx, 32, serverRandom);
-    sha256_digest(&ctx, 32, key);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha256_digest(&ctx, key);
+#else
+    sha256_digest(&ctx, SHA256_DIGEST_SIZE, key);
+#endif
     rais = new rdr::AESInStream(rawis, key, 256);
     sha256_init(&ctx);
     sha256_update(&ctx, 32, serverRandom);
     sha256_update(&ctx, 32, clientRandom);
-    sha256_digest(&ctx, 32, key);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha256_digest(&ctx, key);
+#else
+    sha256_digest(&ctx, SHA256_DIGEST_SIZE, key);
+#endif
     raos = new rdr::AESOutStream(rawos, key, 256);
   }
   if (isAllEncrypted)
@@ -331,7 +353,8 @@ void CSecurityRSAAES::setCipher()
 
 void CSecurityRSAAES::writeHash()
 {
-  uint8_t hash[32];
+  uint8_t hash[SHA256_DIGEST_SIZE];
+  memset(hash, 0, sizeof(hash));
   size_t len = serverKeyLength;
   uint8_t lenServerKey[4] = {
     (uint8_t)((len & 0xff000000) >> 24),
@@ -348,7 +371,7 @@ void CSecurityRSAAES::writeHash()
   };
   int hashSize;
   if (keySize == 128) {
-    hashSize = 20;
+    hashSize = SHA1_DIGEST_SIZE;
     struct sha1_ctx ctx;
     sha1_init(&ctx);
     sha1_update(&ctx, 4, lenClientKey);
@@ -357,9 +380,13 @@ void CSecurityRSAAES::writeHash()
     sha1_update(&ctx, 4, lenServerKey);
     sha1_update(&ctx, serverKey.size, serverKeyN);
     sha1_update(&ctx, serverKey.size, serverKeyE);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha1_digest(&ctx, hash);
+#else
     sha1_digest(&ctx, hashSize, hash);
+#endif
   } else {
-    hashSize = 32;
+    hashSize = SHA256_DIGEST_SIZE;
     struct sha256_ctx ctx;
     sha256_init(&ctx);
     sha256_update(&ctx, 4, lenClientKey);
@@ -368,7 +395,11 @@ void CSecurityRSAAES::writeHash()
     sha256_update(&ctx, 4, lenServerKey);
     sha256_update(&ctx, serverKey.size, serverKeyN);
     sha256_update(&ctx, serverKey.size, serverKeyE);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha256_digest(&ctx, hash);
+#else
     sha256_digest(&ctx, hashSize, hash);
+#endif
   }
   raos->writeBytes(hash, hashSize);
   raos->flush();
@@ -376,9 +407,17 @@ void CSecurityRSAAES::writeHash()
 
 bool CSecurityRSAAES::readHash()
 {
-  uint8_t hash[32];
-  uint8_t realHash[32];
-  int hashSize = keySize == 128 ? 20 : 32;
+  uint8_t hash[SHA256_DIGEST_SIZE];
+  uint8_t realHash[SHA256_DIGEST_SIZE];
+  memset(hash, 0, sizeof(hash));
+  memset(realHash, 0, sizeof(realHash));
+  int hashSize;
+  if (keySize == 128) {
+    hashSize = SHA1_DIGEST_SIZE;
+  } else {
+    hashSize = SHA256_DIGEST_SIZE;
+  }
+
   if (!rais->hasData(hashSize))
     return false;
   rais->readBytes(hash, hashSize);
@@ -405,7 +444,11 @@ bool CSecurityRSAAES::readHash()
     sha1_update(&ctx, 4, lenClientKey);
     sha1_update(&ctx, clientKey.size, clientKeyN);
     sha1_update(&ctx, clientKey.size, clientKeyE);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha1_digest(&ctx, realHash);
+#else
     sha1_digest(&ctx, hashSize, realHash);
+#endif
   } else {
     struct sha256_ctx ctx;
     sha256_init(&ctx);
@@ -415,7 +458,11 @@ bool CSecurityRSAAES::readHash()
     sha256_update(&ctx, 4, lenClientKey);
     sha256_update(&ctx, clientKey.size, clientKeyN);
     sha256_update(&ctx, clientKey.size, clientKeyE);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha256_digest(&ctx, realHash);
+#else
     sha256_digest(&ctx, hashSize, realHash);
+#endif
   }
   if (memcmp(hash, realHash, hashSize) != 0)
     throw protocol_error("Hash doesn't match");
Index: tigervnc-1.16.1/common/rfb/SSecurityRSAAES.cxx
===================================================================
--- tigervnc-1.16.1.orig/common/rfb/SSecurityRSAAES.cxx
+++ tigervnc-1.16.1/common/rfb/SSecurityRSAAES.cxx
@@ -36,6 +36,7 @@
 #include <nettle/sha2.h>
 #include <nettle/base64.h>
 #include <nettle/asn1.h>
+#include <nettle/version.h>
 
 #include <core/Exception.h>
 #include <core/LogWriter.h>
@@ -406,30 +407,47 @@ void SSecurityRSAAES::setCipher()
 {
   rawis = sc->getInStream();
   rawos = sc->getOutStream();
-  uint8_t key[32];
+  uint8_t key[SHA256_DIGEST_SIZE];
+  memset(key, 0, sizeof(key));
   if (keySize == 128) {
     struct sha1_ctx ctx;
     sha1_init(&ctx);
     sha1_update(&ctx, 16, serverRandom);
     sha1_update(&ctx, 16, clientRandom);
-    sha1_digest(&ctx, 16, key);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha1_digest(&ctx, key);
+#else
+    sha1_digest(&ctx, SHA1_DIGEST_SIZE, key);
+#endif
     rais = new rdr::AESInStream(rawis, key, 128);
     sha1_init(&ctx);
     sha1_update(&ctx, 16, clientRandom);
     sha1_update(&ctx, 16, serverRandom);
-    sha1_digest(&ctx, 16, key);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha1_digest(&ctx, key);
+#else
+    sha1_digest(&ctx, SHA1_DIGEST_SIZE, key);
+#endif
     raos = new rdr::AESOutStream(rawos, key, 128);
   } else {
     struct sha256_ctx ctx;
     sha256_init(&ctx);
     sha256_update(&ctx, 32, serverRandom);
     sha256_update(&ctx, 32, clientRandom);
-    sha256_digest(&ctx, 32, key);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha256_digest(&ctx, key);
+#else
+    sha256_digest(&ctx, SHA256_DIGEST_SIZE, key);
+#endif
     rais = new rdr::AESInStream(rawis, key, 256);
     sha256_init(&ctx);
     sha256_update(&ctx, 32, clientRandom);
     sha256_update(&ctx, 32, serverRandom);
-    sha256_digest(&ctx, 32, key);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha256_digest(&ctx, key);
+#else
+    sha256_digest(&ctx, SHA256_DIGEST_SIZE, key);
+#endif
     raos = new rdr::AESOutStream(rawos, key, 256);
   }
   if (isAllEncrypted)
@@ -455,7 +473,7 @@ void SSecurityRSAAES::writeHash()
   };
   int hashSize;
   if (keySize == 128) {
-    hashSize = 20;
+    hashSize = SHA1_DIGEST_SIZE;
     struct sha1_ctx ctx;
     sha1_init(&ctx);
     sha1_update(&ctx, 4, lenServerKey);
@@ -464,9 +482,13 @@ void SSecurityRSAAES::writeHash()
     sha1_update(&ctx, 4, lenClientKey);
     sha1_update(&ctx, clientKey.size, clientKeyN);
     sha1_update(&ctx, clientKey.size, clientKeyE);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha1_digest(&ctx, hash);
+#else
     sha1_digest(&ctx, hashSize, hash);
+#endif
   } else {
-    hashSize = 32;
+    hashSize = SHA256_DIGEST_SIZE;
     struct sha256_ctx ctx;
     sha256_init(&ctx);
     sha256_update(&ctx, 4, lenServerKey);
@@ -475,7 +497,11 @@ void SSecurityRSAAES::writeHash()
     sha256_update(&ctx, 4, lenClientKey);
     sha256_update(&ctx, clientKey.size, clientKeyN);
     sha256_update(&ctx, clientKey.size, clientKeyE);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha256_digest(&ctx, hash);
+#else
     sha256_digest(&ctx, hashSize, hash);
+#endif
   }
   raos->writeBytes(hash, hashSize);
   raos->flush();
@@ -483,9 +509,17 @@ void SSecurityRSAAES::writeHash()
 
 bool SSecurityRSAAES::readHash()
 {
-  uint8_t hash[32];
-  uint8_t realHash[32];
-  int hashSize = keySize == 128 ? 20 : 32;
+  uint8_t hash[SHA256_DIGEST_SIZE];
+  uint8_t realHash[SHA256_DIGEST_SIZE];
+  memset(hash, 0, sizeof(hash));
+  memset(realHash, 0, sizeof(realHash));
+  int hashSize;
+  if (keySize == 128) {
+    hashSize = SHA1_DIGEST_SIZE;
+  } else {
+    hashSize = SHA256_DIGEST_SIZE;
+  }
+
   if (!rais->hasData(hashSize))
     return false;
   rais->readBytes(hash, hashSize);
@@ -512,7 +546,11 @@ bool SSecurityRSAAES::readHash()
     sha1_update(&ctx, 4, lenServerKey);
     sha1_update(&ctx, serverKey.size, serverKeyN);
     sha1_update(&ctx, serverKey.size, serverKeyE);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha1_digest(&ctx, realHash);
+#else
     sha1_digest(&ctx, hashSize, realHash);
+#endif
   } else {
     struct sha256_ctx ctx;
     sha256_init(&ctx);
@@ -522,7 +560,11 @@ bool SSecurityRSAAES::readHash()
     sha256_update(&ctx, 4, lenServerKey);
     sha256_update(&ctx, serverKey.size, serverKeyN);
     sha256_update(&ctx, serverKey.size, serverKeyE);
+#if NETTLE_VERSION_MAJOR >= 4
+    sha256_digest(&ctx, realHash);
+#else
     sha256_digest(&ctx, hashSize, realHash);
+#endif
   }
   if (memcmp(hash, realHash, hashSize) != 0)
     throw protocol_error("Hash doesn't match");
Index: tigervnc-1.16.1/common/rdr/AESInStream.cxx
===================================================================
--- tigervnc-1.16.1.orig/common/rdr/AESInStream.cxx
+++ tigervnc-1.16.1/common/rdr/AESInStream.cxx
@@ -27,6 +27,9 @@
 #include <rdr/AESInStream.h>
 
 #ifdef HAVE_NETTLE
+
+#include <nettle/version.h>
+
 using namespace rdr;
 
 AESInStream::AESInStream(InStream* _in, const uint8_t* key,
@@ -49,29 +52,37 @@ bool AESInStream::fillBuffer()
     return false;
   const uint8_t* buf = in->getptr(2);
   size_t length = ((int)buf[0] << 8) | (int)buf[1];
-  if (!in->hasData(2 + length + 16))
+  if (!in->hasData(2 + length + EAX_DIGEST_SIZE))
     return false;
   ensureSpace(length);
-  buf = in->getptr(2 + length + 16);
+  buf = in->getptr(2 + length + EAX_DIGEST_SIZE);
   const uint8_t* ad = buf;
   const uint8_t* data = buf + 2;
   const uint8_t* mac = buf + 2 + length;
-  uint8_t macComputed[16];
+  uint8_t macComputed[EAX_DIGEST_SIZE];
 
   if (keySize == 128) {
     EAX_SET_NONCE(&eaxCtx128, aes128_encrypt, 16, counter);
     EAX_UPDATE(&eaxCtx128, aes128_encrypt, 2, ad);
     EAX_DECRYPT(&eaxCtx128, aes128_encrypt, length, (uint8_t*)end, data);
-    EAX_DIGEST(&eaxCtx128, aes128_encrypt, 16, macComputed);
+#if NETTLE_VERSION_MAJOR >= 4
+    EAX_DIGEST(&eaxCtx128, aes128_encrypt, macComputed);
+#else
+    EAX_DIGEST(&eaxCtx128, aes128_encrypt, EAX_DIGEST_SIZE, macComputed);
+#endif
   } else {
     EAX_SET_NONCE(&eaxCtx256, aes256_encrypt, 16, counter);
     EAX_UPDATE(&eaxCtx256, aes256_encrypt, 2, ad);
     EAX_DECRYPT(&eaxCtx256, aes256_encrypt, length, (uint8_t*)end, data);
-    EAX_DIGEST(&eaxCtx256, aes256_encrypt, 16, macComputed);
+#if NETTLE_VERSION_MAJOR >= 4
+    EAX_DIGEST(&eaxCtx256, aes256_encrypt, macComputed);
+#else
+    EAX_DIGEST(&eaxCtx256, aes256_encrypt, EAX_DIGEST_SIZE, macComputed);
+#endif
   }
-  if (memcmp(mac, macComputed, 16) != 0)
+  if (memcmp(mac, macComputed, EAX_DIGEST_SIZE) != 0)
     throw std::runtime_error("AESInStream: Failed to authenticate message");
-  in->setptr(2 + length + 16);
+  in->setptr(2 + length + EAX_DIGEST_SIZE);
   end += length;
 
   // Update nonce by incrementing the counter as a
Index: tigervnc-1.16.1/common/rdr/AESOutStream.cxx
===================================================================
--- tigervnc-1.16.1.orig/common/rdr/AESOutStream.cxx
+++ tigervnc-1.16.1/common/rdr/AESOutStream.cxx
@@ -27,6 +27,9 @@
 #include <rdr/AESOutStream.h>
 
 #ifdef HAVE_NETTLE
+
+#include <nettle/version.h>
+
 using namespace rdr;
 
 const int MaxMessageSize = 8192;
@@ -83,14 +86,22 @@ void AESOutStream::writeMessage(const ui
     EAX_SET_NONCE(&eaxCtx128, aes128_encrypt, 16, counter);
     EAX_UPDATE(&eaxCtx128, aes128_encrypt, 2, msg);
     EAX_ENCRYPT(&eaxCtx128, aes128_encrypt, length, msg + 2, data);
-    EAX_DIGEST(&eaxCtx128, aes128_encrypt, 16, msg + 2 + length);
+#if NETTLE_VERSION_MAJOR >= 4
+    EAX_DIGEST(&eaxCtx128, aes128_encrypt, msg + 2 + length);
+#else
+    EAX_DIGEST(&eaxCtx128, aes128_encrypt, EAX_DIGEST_SIZE, msg + 2 + length);
+#endif
   } else {
     EAX_SET_NONCE(&eaxCtx256, aes256_encrypt, 16, counter);
     EAX_UPDATE(&eaxCtx256, aes256_encrypt, 2, msg);
     EAX_ENCRYPT(&eaxCtx256, aes256_encrypt, length, msg + 2, data);
-    EAX_DIGEST(&eaxCtx256, aes256_encrypt, 16, msg + 2 + length);
+#if NETTLE_VERSION_MAJOR >= 4
+    EAX_DIGEST(&eaxCtx256, aes256_encrypt, msg + 2 + length);
+#else
+    EAX_DIGEST(&eaxCtx256, aes256_encrypt, EAX_DIGEST_SIZE, msg + 2 + length);
+#endif
   }
-  out->writeBytes(msg, 2 + length + 16);
+  out->writeBytes(msg, 2 + length + EAX_DIGEST_SIZE);
   out->flush();
 
   // Update nonce by incrementing the counter as a
Index: tigervnc-1.16.1/common/rfb/CSecurityDH.cxx
===================================================================
--- tigervnc-1.16.1.orig/common/rfb/CSecurityDH.cxx
+++ tigervnc-1.16.1/common/rfb/CSecurityDH.cxx
@@ -34,6 +34,7 @@
 #include <nettle/aes.h>
 #include <nettle/md5.h>
 #include <nettle/bignum.h>
+#include <nettle/version.h>
 #include <rfb/CSecurityDH.h>
 #include <rfb/CConnection.h>
 #include <rdr/InStream.h>
@@ -121,11 +122,15 @@ void CSecurityDH::writeCredentials()
   std::vector<uint8_t> BBytes(keyLength);
   nettle_mpz_get_str_256(sharedSecret.size(), sharedSecret.data(), k);
   nettle_mpz_get_str_256(BBytes.size(), BBytes.data(), B);
-  uint8_t key[16];
+  uint8_t key[MD5_DIGEST_SIZE];
   struct md5_ctx md5Ctx;
   md5_init(&md5Ctx);
   md5_update(&md5Ctx, sharedSecret.size(), sharedSecret.data());
-  md5_digest(&md5Ctx, 16, key);
+#if NETTLE_VERSION_MAJOR >= 4
+  md5_digest(&md5Ctx, key);
+#else
+  md5_digest(&md5Ctx, MD5_DIGEST_SIZE, key);
+#endif
   struct aes128_ctx aesCtx;
   aes128_set_encrypt_key(&aesCtx, key);
 

Reply via email to