Blame SOURCES/tigervnc11-rh692048.patch

2bf600
From 1f8aba3147ec13aaa70a44372775b72bb4e59941 Mon Sep 17 00:00:00 2001
2bf600
From: Pierre Ossman <ossman@cendio.se>
2bf600
Date: Tue, 29 Dec 2015 15:02:11 +0100
2bf600
Subject: Add workaround for Vino's VeNCrypt implementation
2bf600
2bf600
2bf600
diff --git a/common/rfb/Security.cxx b/common/rfb/Security.cxx
2bf600
index e623ab5..0666041 100644
2bf600
--- a/common/rfb/Security.cxx
2bf600
+++ b/common/rfb/Security.cxx
2bf600
@@ -74,7 +74,18 @@ const std::list<rdr::U8> Security::GetEnabledSecTypes(void)
136d7b
   list<rdr::U8> result;
136d7b
   list<U32>::iterator i;
2bf600
136d7b
-  result.push_back(secTypeVeNCrypt);
2bf600
+  /* Partial workaround for Vino's stupid behaviour. It doesn't allow
2bf600
+   * the basic authentication types as part of the VeNCrypt handshake,
2bf600
+   * making it impossible for a client to do opportunistic encryption.
2bf600
+   * At least make it possible to connect when encryption is explicitly
2bf600
+   * disabled. */
2bf600
+  for (i = enabledSecTypes.begin(); i != enabledSecTypes.end(); i++) {
2bf600
+    if (*i >= 0x100) {
2bf600
+      result.push_back(secTypeVeNCrypt);
2bf600
+      break;
2bf600
+    }
2bf600
+  }
2bf600
+
136d7b
   for (i = enabledSecTypes.begin(); i != enabledSecTypes.end(); i++)
136d7b
     if (*i < 0x100)
136d7b
       result.push_back(*i);