diff options
author | Adam Tkac <atkac@redhat.com> | 2010-04-23 14:10:17 +0000 |
---|---|---|
committer | Adam Tkac <atkac@redhat.com> | 2010-04-23 14:10:17 +0000 |
commit | f324dc451b343721a0721bdb6ab89608b8792d75 (patch) | |
tree | dba57552f17d471f496c336826954496897f2c47 /win/vncviewer | |
parent | c210e8ab80bc93d792b01762ba81b79801e025cd (diff) | |
download | tigervnc-f324dc451b343721a0721bdb6ab89608b8792d75.tar.gz tigervnc-f324dc451b343721a0721bdb6ab89608b8792d75.zip |
[Development] Use enhanced Security class by both UNIX and Windows viewers.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4042 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'win/vncviewer')
-rw-r--r-- | win/vncviewer/CConn.cxx | 17 | ||||
-rw-r--r-- | win/vncviewer/InfoDialog.cxx | 2 |
2 files changed, 3 insertions, 16 deletions
diff --git a/win/vncviewer/CConn.cxx b/win/vncviewer/CConn.cxx index 3d7f99ab..97ef5201 100644 --- a/win/vncviewer/CConn.cxx +++ b/win/vncviewer/CConn.cxx @@ -102,6 +102,7 @@ bool CConn::initialise(network::Socket* s, bool reverse) { // - Set which auth schemes we support, in order of preference addSecType(secTypeVncAuth); addSecType(secTypeNone); + security->upg = this; /* Security instance is created in CConnection costructor. */ // Start the RFB protocol sock = s; @@ -406,20 +407,6 @@ void CConn::clientCutText(const char* str, int len) { } } - -CSecurity* CConn::getCSecurity(int secType) -{ - switch (secType) { - case secTypeNone: - return new CSecurityNone(); - case secTypeVncAuth: - return new CSecurityVncAuth(this); - default: - throw Exception("Unsupported secType?"); - } -} - - void CConn::setColourMapEntries(int first, int count, U16* rgbs) { vlog.debug("setColourMapEntries: first=%d, count=%d", first, count); @@ -817,7 +804,7 @@ void CConn::getUserPasswd(char** user, char** password) { if ((user && !*user) || (password && !*password)) { // Missing username or password - prompt the user UserPasswdDialog userPasswdDialog; - userPasswdDialog.setCSecurity(getCurrentCSecurity()); + userPasswdDialog.setCSecurity(csecurity); userPasswdDialog.getUserPasswd(user, password); } if (user) options.setUserName(*user); diff --git a/win/vncviewer/InfoDialog.cxx b/win/vncviewer/InfoDialog.cxx index 34644cd9..551ccf23 100644 --- a/win/vncviewer/InfoDialog.cxx +++ b/win/vncviewer/InfoDialog.cxx @@ -59,7 +59,7 @@ void InfoDialog::initDialog() { sprintf(buf, "%d.%d", conn->cp.majorVersion, conn->cp.minorVersion); setItemString(IDC_INFO_VERSION, TStr(buf)); - const CSecurity* cSec = conn->getCurrentCSecurity(); + const CSecurity* cSec = conn->csecurity; setItemString(IDC_INFO_SECURITY, TStr(secTypeName(cSec->getType()))); setItemString(IDC_INFO_ENCRYPTION, TStr(cSec->description())); } |