summaryrefslogtreecommitdiffstats
path: root/common/rfb
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2010-11-18 15:19:47 +0000
committerAdam Tkac <atkac@redhat.com>2010-11-18 15:19:47 +0000
commit3d0af20a51dce357dc90ccaa06b78031af81e081 (patch)
tree697aedafddc0253ee911cb0056afa9aa63e80cb1 /common/rfb
parent1eda6faf1026a57d42375dd9c52137b3c204ef66 (diff)
downloadtigervnc-3d0af20a51dce357dc90ccaa06b78031af81e081.tar.gz
tigervnc-3d0af20a51dce357dc90ccaa06b78031af81e081.zip
[Development] Remove support for the "Tight" security type from C++ code.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4202 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb')
-rw-r--r--common/rfb/CMakeLists.txt2
-rw-r--r--common/rfb/CapsContainer.cxx129
-rw-r--r--common/rfb/CapsContainer.h132
-rw-r--r--common/rfb/CapsList.cxx81
-rw-r--r--common/rfb/CapsList.h75
-rw-r--r--common/rfb/ConnParams.cxx2
-rw-r--r--common/rfb/ConnParams.h1
-rw-r--r--common/rfb/Makefile.am4
-rw-r--r--common/rfb/SConnection.cxx172
-rw-r--r--common/rfb/SConnection.h9
10 files changed, 3 insertions, 604 deletions
diff --git a/common/rfb/CMakeLists.txt b/common/rfb/CMakeLists.txt
index 5ae9ade0..050d408c 100644
--- a/common/rfb/CMakeLists.txt
+++ b/common/rfb/CMakeLists.txt
@@ -13,8 +13,6 @@ add_library(rfb STATIC
CSecurityStack.cxx
CSecurityVeNCrypt.cxx
CSecurityVncAuth.cxx
- CapsContainer.cxx
- CapsList.cxx
ComparingUpdateTracker.cxx
Configuration.cxx
ConnParams.cxx
diff --git a/common/rfb/CapsContainer.cxx b/common/rfb/CapsContainer.cxx
deleted file mode 100644
index 2b569761..00000000
--- a/common/rfb/CapsContainer.cxx
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Copyright (C) 2003-2006 Constantin Kaplinsky. All Rights Reserved.
- *
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- * USA.
- */
-
-//
-// CapsContainer class implementation.
-// Member variables and functions are documented in CapsContainer.h.
-//
-
-#include <rfb/CapsContainer.h>
-#include <string.h>
-
-using namespace rfb;
-
-CapsContainer::CapsContainer(int maxCaps)
-: m_maxSize(maxCaps), m_listSize(0), m_plist(new rdr::U32[m_maxSize])
-{
-}
-
-CapsContainer::~CapsContainer()
-{
- delete[] m_plist;
-
- // Remove char[] strings allocated by the new[] operator.
- std::map<rdr::U32,char*>::const_iterator iter;
- for (iter = m_descMap.begin(); iter != m_descMap.end(); iter++) {
- delete[] iter->second;
- }
-}
-
-void
-CapsContainer::add(rdr::U32 code, const char *vendor, const char *name,
- const char *desc)
-{
- // Fill in an rfbCapabilityInfo structure and pass it to the overloaded
- // function.
- CapabilityInfo capinfo;
- capinfo.code = code;
- memcpy(capinfo.vendorSignature, vendor, 4);
- memcpy(capinfo.nameSignature, name, 8);
- add(&capinfo, desc);
-}
-
-void
-CapsContainer::add(const CapabilityInfo *capinfo, const char *desc)
-{
- m_infoMap[capinfo->code] = *capinfo;
- m_enableMap[capinfo->code] = false;
-
- if (isKnown(capinfo->code)) {
- delete[] m_descMap[capinfo->code];
- }
- char *desc_copy = 0;
- if (desc != 0) {
- desc_copy = new char[strlen(desc) + 1];
- strcpy(desc_copy, desc);
- }
- m_descMap[capinfo->code] = desc_copy;
-}
-
-bool
-CapsContainer::isKnown(rdr::U32 code) const
-{
- return (m_descMap.find(code) != m_descMap.end());
-}
-
-bool
-CapsContainer::getInfo(rdr::U32 code, CapabilityInfo *capinfo) const
-{
- if (isKnown(code)) {
- *capinfo = m_infoMap.find(code)->second;
- return true;
- }
-
- return false;
-}
-
-char *
-CapsContainer::getDescription(rdr::U32 code) const
-{
- return (isKnown(code)) ? m_descMap.find(code)->second : 0;
-}
-
-bool
-CapsContainer::enable(const CapabilityInfo *capinfo)
-{
- if (!isKnown(capinfo->code))
- return false;
-
- const CapabilityInfo *known = &(m_infoMap[capinfo->code]);
- if ( memcmp(known->vendorSignature, capinfo->vendorSignature, 4) != 0 ||
- memcmp(known->nameSignature, capinfo->nameSignature, 8) != 0 ) {
- m_enableMap[capinfo->code] = false;
- return false;
- }
-
- m_enableMap[capinfo->code] = true;
- if (m_listSize < m_maxSize) {
- m_plist[m_listSize++] = capinfo->code;
- }
- return true;
-}
-
-bool
-CapsContainer::isEnabled(rdr::U32 code) const
-{
- return (isKnown(code)) ? m_enableMap.find(code)->second : false;
-}
-
-rdr::U32
-CapsContainer::getByOrder(int idx) const
-{
- return (idx < m_listSize) ? m_plist[idx] : 0;
-}
-
diff --git a/common/rfb/CapsContainer.h b/common/rfb/CapsContainer.h
deleted file mode 100644
index 43fe8155..00000000
--- a/common/rfb/CapsContainer.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Copyright (C) 2003-2006 Constantin Kaplinsky. All Rights Reserved.
- *
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- * USA.
- */
-
-//
-// CapsContainer and associated structures - dealing with TightVNC-specific
-// protocol capability lists.
-//
-
-#ifndef __RFB_CAPSCONTAINER_H__
-#define __RFB_CAPSCONTAINER_H__
-
-#include <rdr/types.h>
-
-#include <map>
-
-namespace rfb {
-
- //
- // CapabilityInfo - structure used to describe protocol options such as
- // tunneling methods, authentication schemes, message types and encoding
- // types (protocol versions 3.7 and 3.8 with TightVNC extensions).
- //
-
- struct CapabilityInfo {
- rdr::U32 code; // numeric identifier
- rdr::U8 vendorSignature[4]; // vendor identification
- rdr::U8 nameSignature[8]; // abbreviated option name
- };
-
- //
- // CapsContainer - a container class to maintain a list of protocol
- // capabilities.
- //
- // Typical usage is as follows. First, the client creates an instance
- // of the CapsContainer class for each type of capabilities (e.g.
- // authentication methods). It adds information about capabilities it
- // supports, by calling add() functions. Then, the client receives
- // information about supported capabilities from the server, and tries
- // to "enable" each capability advertised by the server. Particular
- // capability becomes enabled if it is known (added by the client) and
- // matches that one received from the server. Finally, the client can
- // check if a given capability is enabled, and also get the list of
- // capabilities in the order they were listed by the server.
- //
-
- class CapsContainer
- {
- public:
-
- // Constructor. The maxCaps argument is the maximum number of records
- // in the list used by getByOrder() function. Remaining functions do not
- // impose limitations on the number of capabilities.
- CapsContainer(int maxCaps = 64);
-
- // Destructor.
- virtual ~CapsContainer();
-
- // Add information about a particular capability into the object. These
- // functions overwrite existing capability records with the same code.
- // NOTE: Value 0 should not be used for capability codes.
- void add(const CapabilityInfo *capinfo, const char *desc = 0);
- void add(rdr::U32 code, const char *vendor, const char *name,
- const char *desc = 0);
-
- // Check if a capability with the specified code was added earlier.
- bool isKnown(rdr::U32 code) const;
-
- // Fill in an rfbCapabilityInfo structure with contents corresponding to
- // the specified code. Returns true on success, false if the specified
- // code is not known.
- bool getInfo(rdr::U32 code, CapabilityInfo *capinfo) const;
-
- // Get an optional description string for the specified capability code.
- // Returns 0 either if the code is not known, or if there is no
- // description for the given capability. Otherwise, the return value
- // is a pointer valid until either add() is called again for the same
- // capability, or the CapsContaner object is destroyed.
- char *getDescription(rdr::U32 code) const;
-
- // Mark the specified capability as "enabled". This function compares
- // "vendor" and "name" signatures in the existing record and in the
- // argument structure and enables the capability only if both records
- // are the same.
- bool enable(const CapabilityInfo *capinfo);
-
- // Check if the specified capability is known and enabled.
- bool isEnabled(rdr::U32 code) const;
-
- // Return the number of enabled capabilities.
- int numEnabled() const { return m_listSize; }
-
- // Return the capability code at the specified index, from the list of
- // enabled capabilities. Capabilities are indexed in the order they were
- // enabled, index 0 points to the capability which was enabled first.
- // If the index is not valid, this function returns 0.
- rdr::U32 getByOrder(int idx) const;
-
- private:
-
- // Mapping codes to corresponding CapabilityInfo structures.
- std::map<rdr::U32,CapabilityInfo> m_infoMap;
- // Mapping capability codes to corresponding descriptions.
- std::map<rdr::U32,char*> m_descMap;
- // Mapping codes to boolean flags, true for enabled capabilities.
- std::map<rdr::U32,bool> m_enableMap;
-
- // Allocated size of m_plist[].
- int m_maxSize;
- // Number of valid elements in m_plist[].
- int m_listSize;
- // Array of enabled capabilities (allocated in constructor).
- rdr::U32 *m_plist;
- };
-
-}
-
-#endif // __RFB_CAPSCONTAINER_H__
diff --git a/common/rfb/CapsList.cxx b/common/rfb/CapsList.cxx
deleted file mode 100644
index 11977b2e..00000000
--- a/common/rfb/CapsList.cxx
+++ /dev/null
@@ -1,81 +0,0 @@
-/* Copyright (C) 2006 Constantin Kaplinsky. All Rights Reserved.
- *
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- * USA.
- */
-
-//
-// CapsList class implementation.
-// Member functions are documented in CapsList.h.
-//
-
-#include <rfb/CapsList.h>
-#include <rdr/OutStream.h>
-
-using namespace rfb;
-
-const char *const CapsList::VENDOR_STD = "STDV";
-const char *const CapsList::VENDOR_TIGHT = "TGHT";
-
-CapsList::CapsList(int maxCaps)
- : CapsContainer(maxCaps)
-{
-}
-
-CapsList::~CapsList()
-{
-}
-
-void
-CapsList::addStandard(rdr::U32 code, const char *name)
-{
- add3rdParty(code, name, VENDOR_STD);
-}
-
-void
-CapsList::addTightExt(rdr::U32 code, const char *name)
-{
- add3rdParty(code, name, VENDOR_TIGHT);
-}
-
-void
-CapsList::add3rdParty(rdr::U32 code, const char *name, const char *vendor)
-{
- add(code, vendor, name);
-
- // NOTE: This code is a bit tricky and not the most efficient. However,
- // that's not a problem as we prefer simplicity to performance here.
- // Here we need to "enable capability" but that requires comparing
- // name and vendor strings. So we just make CapsContainer compare
- // the same strings with themselves.
- CapabilityInfo tmp;
- if (getInfo(code, &tmp))
- enable(&tmp);
-}
-
-void
-CapsList::write(rdr::OutStream* os) const
-{
- int count = getSize();
- CapabilityInfo cap;
-
- for (int i = 0; i < count; i++) {
- getInfo(getByOrder(i), &cap);
- os->writeU32(cap.code);
- os->writeBytes(&cap.vendorSignature, 4);
- os->writeBytes(&cap.nameSignature, 8);
- }
-}
-
diff --git a/common/rfb/CapsList.h b/common/rfb/CapsList.h
deleted file mode 100644
index a267e933..00000000
--- a/common/rfb/CapsList.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright (C) 2006 Constantin Kaplinsky. All Rights Reserved.
- *
- * This is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this software; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
- * USA.
- */
-
-//
-// CapsList - a list of server-side protocol capabilities. This class makes
-// it easy to prepare a capability list and send it via OutStream transport.
-//
-
-#ifndef __RFB_CAPSLIST_H__
-#define __RFB_CAPSLIST_H__
-
-#include <rfb/CapsContainer.h>
-
-namespace rdr { class OutStream; }
-
-namespace rfb {
-
- // NOTE: Here we use the CapsContainer class for an off-design purpose.
- // However, that class is so good that I believe it's better to
- // use its well-tested code instead of writing new class from the
- // scratch.
-
- class CapsList : private CapsContainer
- {
- public:
-
- // Constructor.
- // The maxCaps value is the maximum number of capabilities in the list.
- CapsList(int maxCaps = 64);
-
- virtual ~CapsList();
-
- // Current number of capabilities in the list.
- int getSize() const { return numEnabled(); }
-
- // Does the list include nothing more than one particular capability?
- bool includesOnly(rdr::U32 code) {
- return (numEnabled() == 1 && getByOrder(0) == code);
- }
-
- // Add capability ("standard" vendor).
- void addStandard(rdr::U32 code, const char *name);
- // Add capability (TightVNC vendor).
- void addTightExt(rdr::U32 code, const char *name);
- // Add capability (any other vendor).
- void add3rdParty(rdr::U32 code, const char *name, const char *vendor);
-
- // Send the list of capabilities (not including the counter).
- void write(rdr::OutStream* os) const;
-
- protected:
-
- // Pre-defined signatures for known vendors.
- static const char *const VENDOR_STD;
- static const char *const VENDOR_TIGHT;
- };
-
-}
-
-#endif // __RFB_CAPSLIST_H__
diff --git a/common/rfb/ConnParams.cxx b/common/rfb/ConnParams.cxx
index 3ee37087..a6368851 100644
--- a/common/rfb/ConnParams.cxx
+++ b/common/rfb/ConnParams.cxx
@@ -27,7 +27,7 @@
using namespace rfb;
ConnParams::ConnParams()
- : majorVersion(0), minorVersion(0), tightExtensionsEnabled(false),
+ : majorVersion(0), minorVersion(0),
width(0), height(0), useCopyRect(false),
supportsLocalCursor(false), supportsLocalXCursor(false),
supportsDesktopResize(false), supportsExtendedDesktopSize(false),
diff --git a/common/rfb/ConnParams.h b/common/rfb/ConnParams.h
index 54b5ada1..c25e5630 100644
--- a/common/rfb/ConnParams.h
+++ b/common/rfb/ConnParams.h
@@ -40,7 +40,6 @@ namespace rfb {
int majorVersion;
int minorVersion;
- bool tightExtensionsEnabled;
void setVersion(int major, int minor) {
majorVersion = major; minorVersion = minor;
diff --git a/common/rfb/Makefile.am b/common/rfb/Makefile.am
index d9de932d..1894871e 100644
--- a/common/rfb/Makefile.am
+++ b/common/rfb/Makefile.am
@@ -4,7 +4,7 @@ VENCRYPT_HDRS = CSecurityTLS.h SSecurityTLS.h
VENCRYPT_SRCS = CSecurityTLS.cxx SSecurityTLS.cxx
-HDRS = Blacklist.h CapsContainer.h CapsList.h CConnection.h \
+HDRS = Blacklist.h CConnection.h \
CMsgHandler.h CMsgReader.h CMsgReaderV3.h CMsgWriter.h \
CMsgWriterV3.h ColourCube.h ColourMap.h ComparingUpdateTracker.h \
Configuration.h ConnParams.h CSecurity.h CSecurityNone.h \
@@ -32,7 +32,7 @@ HDRS = Blacklist.h CapsContainer.h CapsList.h CConnection.h \
librfb_la_SOURCES = $(HDRS) Blacklist.cxx CConnection.cxx CMsgHandler.cxx \
CMsgReader.cxx CMsgReaderV3.cxx CMsgWriter.cxx CMsgWriterV3.cxx \
CSecurityPlain.cxx CSecurityStack.cxx CSecurityVeNCrypt.cxx \
- CSecurityVncAuth.cxx CapsContainer.cxx CapsList.cxx \
+ CSecurityVncAuth.cxx \
ComparingUpdateTracker.cxx Configuration.cxx ConnParams.cxx \
Cursor.cxx Decoder.cxx d3des.c Encoder.cxx \
HTTPServer.cxx HextileDecoder.cxx HextileEncoder.cxx \
diff --git a/common/rfb/SConnection.cxx b/common/rfb/SConnection.cxx
index bc4c982d..3762fbb0 100644
--- a/common/rfb/SConnection.cxx
+++ b/common/rfb/SConnection.cxx
@@ -20,7 +20,6 @@
#include <rfb/Exception.h>
#include <rfb/Security.h>
#include <rfb/msgTypes.h>
-#include <rfb/CapsList.h>
#include <rfb/SMsgReaderV3.h>
#include <rfb/SMsgWriterV3.h>
#include <rfb/SConnection.h>
@@ -89,8 +88,6 @@ void SConnection::processMsg()
switch (state_) {
case RFBSTATE_PROTOCOL_VERSION: processVersionMsg(); break;
case RFBSTATE_SECURITY_TYPE: processSecurityTypeMsg(); break;
- case RFBSTATE_TIGHT_TUNN_TYPE: processTunnelTypeMsg(); break;
- case RFBSTATE_TIGHT_AUTH_TYPE: processAuthTypeMsg(); break;
case RFBSTATE_SECURITY: processSecurityMsg(); break;
case RFBSTATE_INITIALISATION: processInitMsg(); break;
case RFBSTATE_NORMAL: reader_->readMsg(); break;
@@ -167,9 +164,6 @@ void SConnection::processVersionMsg()
return;
}
- // Add a special security type to advertise TightVNC protocol extensions.
- secTypes.push_back(secTypeTight);
-
// list supported security types for >=3.7 clients
if (secTypes.empty())
@@ -188,107 +182,9 @@ void SConnection::processSecurityTypeMsg()
vlog.debug("processing security type message");
int secType = is->readU8();
- if (secType == secTypeTight) {
- vlog.info("Enabling TightVNC protocol extensions");
- cp.tightExtensionsEnabled = true;
- offerTunneling();
- } else {
- processSecurityType(secType);
- }
-}
-
-//
-// TightVNC-specific protocol initialization (tunneling, authentication)
-//
-
-void SConnection::offerTunneling()
-{
- vlog.debug("offering list of tunneling methods");
- int nTypes = 0;
-
- // Advertise our tunneling capabilities (currently, nothing to advertise).
- os->writeU32(nTypes);
- os->flush();
-
- if (nTypes) {
- // NOTE: Never executed in current version.
- state_ = RFBSTATE_TIGHT_TUNN_TYPE;
- } else {
- offerAuthentication();
- }
-}
-
-// NOTE: This function is never called in current version.
-void SConnection::processTunnelTypeMsg()
-{
- vlog.debug("processing tunneling type message (TightVNC extension)");
- int tunnelType = is->readU32();
- vlog.error("unsupported tunneling type %d requested, ignoring", tunnelType);
- offerAuthentication();
-}
-
-void SConnection::offerAuthentication()
-{
- vlog.debug("offering list of authentication methods");
-
- // See processVersionMsg(), the code below is similar.
-
- std::list<rdr::U8> secTypes;
- std::list<rdr::U8>::iterator i;
-
- // NOTE: In addition to standard security types, we might want to offer
- // TightVNC-specific authentication types. But currently we support
- // only the standard security types: secTypeNone and secTypeVncAuth.
- secTypes = security->GetEnabledSecTypes();
-
- CapsList caps;
- for (i = secTypes.begin(); i != secTypes.end(); i++) {
- // FIXME: Capability info should be provided by SSecurity objects.
- switch (*i) {
- case secTypeNone: caps.addStandard(*i, "NOAUTH__"); break;
- case secTypeVncAuth: caps.addStandard(*i, "VNCAUTH_"); break;
- default:
- // This should not ever happen.
- vlog.error("not offering unknown security type %d", (int)*i);
- }
- }
-
- if (caps.getSize() < 1)
- throwConnFailedException("No supported security types");
-
- if (caps.includesOnly(secTypeNone)) {
- // Special case - if caps includes nothing else than secTypeNone, we send
- // an empty capability list and do not expect security type selection from
- // the client. Then, continue the protocol like if the client has selected
- // secTypeNone (starting at base protocol version 3.8, "security result"
- // will follow).
- os->writeU32(0);
- os->flush();
- processSecurityType(secTypeNone);
- } else {
- // Normal case - sending the list of authentication capabilities.
- os->writeU32(caps.getSize());
- caps.write(os);
- os->flush();
- state_ = RFBSTATE_TIGHT_AUTH_TYPE;
- }
-}
-
-void SConnection::processAuthTypeMsg()
-{
- vlog.debug("processing authentication type message (TightVNC extension)");
-
- // NOTE: Currently, we support only the standard security types, so we
- // just pass TightVNC authentication type for standard processing,
- // just as it was usual RFB security type.
- int secType = is->readU32();
processSecurityType(secType);
}
-//
-// End of TightVNC-specific code
-//
-
void SConnection::processSecurityType(int secType)
{
// Verify that the requested security type should be offered
@@ -415,77 +311,9 @@ void SConnection::setInitialColourMap()
void SConnection::clientInit(bool shared)
{
writer_->writeServerInit();
-
- // FIXME: Send interaction capabilities via writer_?
- if (cp.tightExtensionsEnabled)
- sendInteractionCaps();
-
state_ = RFBSTATE_NORMAL;
}
-// FIXME: Move sendInteractionCaps() to a class derived from SMsgWriterV3?
-void SConnection::sendInteractionCaps()
-{
- //
- // Advertise support for non-standard server-to-client messages
- //
-
- CapsList scaps;
-
- //
- // Advertise support for non-standard client-to-server messages
- //
-
- CapsList ccaps;
-
- //
- // Advertise all supported encoding types (except raw encoding).
- //
-
- CapsList ecaps;
-
- // First, add true encodings.
- for (int i = 1; i <= encodingMax; i++) {
- if (Encoder::supported(i)) {
- // FIXME: Capability info should be provided by Encoder objects.
- switch (i) {
- case encodingRRE: ecaps.addStandard(i, "RRE_____"); break;
- case encodingCoRRE: ecaps.addStandard(i, "CORRE___"); break;
- case encodingHextile: ecaps.addStandard(i, "HEXTILE_"); break;
- case encodingZRLE: ecaps.addStandard(i, "ZRLE____"); break;
- case encodingTight: ecaps.addTightExt(i, "TIGHT___"); break;
- default:
- // This should not ever happen.
- vlog.error("not advertising unknown encoding type %d", (int)i);
- }
- }
- }
-
- // CopyRect is special - Encoder::supported() returns 0 for it,
- // that's why we add it here explicitly.
- ecaps.addStandard(encodingCopyRect, "COPYRECT");
-
- // Add supported pseudo encodings as well.
- ecaps.addTightExt(pseudoEncodingCompressLevel0, "COMPRLVL");
- ecaps.addTightExt(pseudoEncodingQualityLevel0, "JPEGQLVL");
- ecaps.addTightExt(pseudoEncodingXCursor, "X11CURSR");
- ecaps.addTightExt(pseudoEncodingCursor, "RCHCURSR");
- ecaps.addTightExt(pseudoEncodingLastRect, "LASTRECT");
- ecaps.addStandard(pseudoEncodingDesktopSize, "NEWFBSIZ");
-
- os->writeU16(scaps.getSize());
- os->writeU16(ccaps.getSize());
- os->writeU16(ecaps.getSize());
- os->writeU16(0);
- if (scaps.getSize())
- scaps.write(os);
- if (ccaps.getSize())
- ccaps.write(os);
- if (ecaps.getSize())
- ecaps.write(os);
- os->flush();
-}
-
void SConnection::setPixelFormat(const PixelFormat& pf)
{
SMsgHandler::setPixelFormat(pf);
diff --git a/common/rfb/SConnection.h b/common/rfb/SConnection.h
index d0bd499b..cdfde430 100644
--- a/common/rfb/SConnection.h
+++ b/common/rfb/SConnection.h
@@ -156,8 +156,6 @@ namespace rfb {
RFBSTATE_UNINITIALISED,
RFBSTATE_PROTOCOL_VERSION,
RFBSTATE_SECURITY_TYPE,
- RFBSTATE_TIGHT_TUNN_TYPE,
- RFBSTATE_TIGHT_AUTH_TYPE,
RFBSTATE_SECURITY,
RFBSTATE_QUERYING,
RFBSTATE_INITIALISATION,
@@ -179,13 +177,6 @@ namespace rfb {
void processSecurityMsg();
void processInitMsg();
- // These functions add support for TightVNC protocol extensions.
- void offerTunneling();
- void processTunnelTypeMsg();
- void offerAuthentication();
- void processAuthTypeMsg();
- void sendInteractionCaps();
-
int defaultMajorVersion, defaultMinorVersion;
rdr::InStream* is;
rdr::OutStream* os;