Tiny patch, save the hostname as server name, not the IP, as we use it
for hostname matching in TLS (else hostnames would of course never match
the certificate).
Tested on Win and Linux, doesn't seem to have any side effect.

-- 
Guillaume Destuynder - m-privacy GmbH -

Am Köllnischen Park 1, 10179 Berlin
Tel: +49 30 24342334
Fax: +49 30 24342336
Web: http://www.m-privacy.de, http://oss.m-privacy.de
Handelsregister:
 Amtsgericht Charlottenburg HRB 84946
Geschäftsführer:
 Dipl.-Kfm. Holger Maczkowsky,
 Roman Maczkowsky
GnuPG-Key-ID: 0x3FB1D217
--- tigervnc/unix/vncviewer/CConn.cxx   (revision 4226)
+++ tigervnc/unix/vncviewer/CConn.cxx   (working copy)
@@ -116,7 +116,7 @@ CConn::CConn(Display* dpy_, int argc_, char** argv
 
   sameMachine = sock->sameMachine();
   sock->inStream().setBlockCallback(this);
-  setServerName(sock->getPeerEndpoint());
+  setServerName(serverHost);
   setStreams(&sock->inStream(), &sock->outStream());
   initialiseProtocol();
 }

--- a/win/vncviewer/CConn.cxx	(revision 4241)
+++ b/win/vncviewer/CConn.cxx	(working copy)
@@ -61,7 +62,6 @@
 const int IDM_ACTUAL_SIZE = ID_ACTUAL_SIZE;
 const int IDM_AUTO_SIZE = ID_AUTO_SIZE;
 
-
 static IntParameter debugDelay("DebugDelay","Milliseconds to display inverted "
                                "pixel data - a debugging feature", 0);
 
@@ -90,9 +90,10 @@
 bool CConn::initialise(network::Socket* s, bool reverse) {
   // Set the server's name for MRU purposes
   CharArray endpoint(s->getPeerEndpoint());
-  setServerName(endpoint.buf);
+
   if (!options.host.buf)
     options.setHost(endpoint.buf);
+  setServerName(options.host.buf);
 
   // Initialise the underlying CConnection
   setStreams(&s->inStream(), &s->outStream());
@@ -146,6 +147,7 @@

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to