Revision: 4249
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4249&view=rev
Author:   atkac
Date:     2011-02-01 15:06:03 +0000 (Tue, 01 Feb 2011)

Log Message:
-----------
[Bugfix] viewers: set server's hostname as a server name. (Thanks to Guillaume 
Destuynder)

We use the server name for hostname matching in X.509 code. Otherwise
certificate wouldn't match hostname.

Modified Paths:
--------------
    trunk/unix/vncviewer/CConn.cxx
    trunk/win/vncviewer/CConn.cxx

Modified: trunk/unix/vncviewer/CConn.cxx
===================================================================
--- trunk/unix/vncviewer/CConn.cxx      2011-02-01 14:36:51 UTC (rev 4248)
+++ trunk/unix/vncviewer/CConn.cxx      2011-02-01 15:06:03 UTC (rev 4249)
@@ -116,7 +116,7 @@
 
   sameMachine = sock->sameMachine();
   sock->inStream().setBlockCallback(this);
-  setServerName(sock->getPeerEndpoint());
+  setServerName(serverHost);
   setStreams(&sock->inStream(), &sock->outStream());
   initialiseProtocol();
 }

Modified: trunk/win/vncviewer/CConn.cxx
===================================================================
--- trunk/win/vncviewer/CConn.cxx       2011-02-01 14:36:51 UTC (rev 4248)
+++ trunk/win/vncviewer/CConn.cxx       2011-02-01 15:06:03 UTC (rev 4249)
@@ -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());


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
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-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to