Browse Source

[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.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4249 3789f03b-4d11-0410-bbf8-ca57d06f2519
tags/v1.0.90
Adam Tkac 13 years ago
parent
commit
0b4287185b
2 changed files with 3 additions and 2 deletions
  1. 1
    1
      unix/vncviewer/CConn.cxx
  2. 2
    1
      win/vncviewer/CConn.cxx

+ 1
- 1
unix/vncviewer/CConn.cxx View File



sameMachine = sock->sameMachine(); sameMachine = sock->sameMachine();
sock->inStream().setBlockCallback(this); sock->inStream().setBlockCallback(this);
setServerName(sock->getPeerEndpoint());
setServerName(serverHost);
setStreams(&sock->inStream(), &sock->outStream()); setStreams(&sock->inStream(), &sock->outStream());
initialiseProtocol(); initialiseProtocol();
} }

+ 2
- 1
win/vncviewer/CConn.cxx View File

bool CConn::initialise(network::Socket* s, bool reverse) { bool CConn::initialise(network::Socket* s, bool reverse) {
// Set the server's name for MRU purposes // Set the server's name for MRU purposes
CharArray endpoint(s->getPeerEndpoint()); CharArray endpoint(s->getPeerEndpoint());
setServerName(endpoint.buf);
if (!options.host.buf) if (!options.host.buf)
options.setHost(endpoint.buf); options.setHost(endpoint.buf);
setServerName(options.host.buf);


// Initialise the underlying CConnection // Initialise the underlying CConnection
setStreams(&s->inStream(), &s->outStream()); setStreams(&s->inStream(), &s->outStream());

Loading…
Cancel
Save