Signed-off-by: Martin Koegler <mkoeg...@auto.tuwien.ac.at>
---
 java/src/com/tigervnc/vncviewer/RfbProto.java  |  145 ------------------------
 java/src/com/tigervnc/vncviewer/VncViewer.java |   10 +--
 2 files changed, 1 insertions(+), 154 deletions(-)

diff --git a/java/src/com/tigervnc/vncviewer/RfbProto.java 
b/java/src/com/tigervnc/vncviewer/RfbProto.java
index 9834d3a..07d5752 100644
--- a/java/src/com/tigervnc/vncviewer/RfbProto.java
+++ b/java/src/com/tigervnc/vncviewer/RfbProto.java
@@ -60,22 +60,6 @@ class RfbProto {
     SecTypeX509Vnc   = 261,
     SecTypeX509Plain = 262;
 
-  // Supported tunneling types
-  final static int
-    NoTunneling = 0;
-  final static String
-    SigNoTunneling = "NOTUNNEL";
-
-  // Supported authentication types
-  final static int
-    AuthNone      = 1,
-    AuthVNC       = 2,
-    AuthUnixLogin = 129;
-  final static String
-    SigAuthNone      = "NOAUTH__",
-    SigAuthVNC       = "VNCAUTH_",
-    SigAuthUnixLogin = "ULGNAUTH";
-
   // VNC authentication results
   final static int
     VncAuthOK      = 0,
@@ -130,22 +114,6 @@ class RfbProto {
     EncodingPointerPos     = 0xFFFFFF18,
     EncodingLastRect       = 0xFFFFFF20,
     EncodingNewFBSize      = 0xFFFFFF21;
-  final static String
-    SigEncodingRaw            = "RAW_____",
-    SigEncodingCopyRect       = "COPYRECT",
-    SigEncodingRRE            = "RRE_____",
-    SigEncodingCoRRE          = "CORRE___",
-    SigEncodingHextile        = "HEXTILE_",
-    SigEncodingZlib           = "ZLIB____",
-    SigEncodingTight          = "TIGHT___",
-    SigEncodingZRLE           = "ZRLE____",
-    SigEncodingCompressLevel0 = "COMPRLVL",
-    SigEncodingQualityLevel0  = "JPEGQLVL",
-    SigEncodingXCursor        = "X11CURSR",
-    SigEncodingRichCursor     = "RCHCURSR",
-    SigEncodingPointerPos     = "POINTPOS",
-    SigEncodingLastRect       = "LASTRECT",
-    SigEncodingNewFBSize      = "NEWFBSIZ";
 
   final static int MaxNormalEncoding = 255;
 
@@ -215,10 +183,8 @@ class RfbProto {
   // Protocol version and TightVNC-specific protocol options.
   int serverMajor, serverMinor;
   int clientMajor, clientMinor;
-  boolean protocolTightVNC;
   CapsContainer tunnelCaps, authCaps;
   CapsContainer serverMsgCaps, clientMsgCaps;
-  CapsContainer encodingCaps;
 
   // "Continuous updates" is a TightVNC-specific feature that allows
   // receiving framebuffer updates continuously, without sending update
@@ -331,7 +297,6 @@ class RfbProto {
       clientMinor = 3;
       os.write(versionMsg_3_3.getBytes());
     }
-    protocolTightVNC = false;
     initCapabilities();
   }
 
@@ -380,15 +345,6 @@ class RfbProto {
     byte[] secTypes = new byte[nSecTypes];
     readFully(secTypes);
 
-    // Find out if the server supports TightVNC protocol extensions
-    for (int i = 0; i < nSecTypes; i++) {
-      if (secTypes[i] == SecTypeTight && false) {
-       protocolTightVNC = true;
-       os.write(SecTypeTight);
-       return SecTypeTight;
-      }
-    }
-
     // Find first supported security type.
     for (int i = 0; i < nSecTypes; i++) {
       if (secTypes[i] == SecTypeNone || secTypes[i] == SecTypeVncAuth
@@ -543,17 +499,8 @@ class RfbProto {
   //
 
   void initCapabilities() {
-    tunnelCaps    = new CapsContainer();
-    authCaps      = new CapsContainer();
     serverMsgCaps = new CapsContainer();
     clientMsgCaps = new CapsContainer();
-    encodingCaps  = new CapsContainer();
-
-    // Supported authentication methods
-    authCaps.add(AuthNone, StandardVendor, SigAuthNone,
-                "No authentication");
-    authCaps.add(AuthVNC, StandardVendor, SigAuthVNC,
-                "Standard VNC password authentication");
 
     // Supported non-standard server-to-client messages
     serverMsgCaps.add(EndOfContinuousUpdates, TightVncVendor,
@@ -571,87 +518,6 @@ class RfbProto {
                       SigVideoFreeze,
                       "Disable/enable video rectangle");
 
-    // Supported encoding types
-    encodingCaps.add(EncodingCopyRect, StandardVendor,
-                    SigEncodingCopyRect, "Standard CopyRect encoding");
-    encodingCaps.add(EncodingRRE, StandardVendor,
-                    SigEncodingRRE, "Standard RRE encoding");
-    encodingCaps.add(EncodingCoRRE, StandardVendor,
-                    SigEncodingCoRRE, "Standard CoRRE encoding");
-    encodingCaps.add(EncodingHextile, StandardVendor,
-                    SigEncodingHextile, "Standard Hextile encoding");
-    encodingCaps.add(EncodingZRLE, StandardVendor,
-                    SigEncodingZRLE, "Standard ZRLE encoding");
-    encodingCaps.add(EncodingZlib, TridiaVncVendor,
-                    SigEncodingZlib, "Zlib encoding");
-    encodingCaps.add(EncodingTight, TightVncVendor,
-                    SigEncodingTight, "Tight encoding");
-
-    // Supported pseudo-encoding types
-    encodingCaps.add(EncodingCompressLevel0, TightVncVendor,
-                    SigEncodingCompressLevel0, "Compression level");
-    encodingCaps.add(EncodingQualityLevel0, TightVncVendor,
-                    SigEncodingQualityLevel0, "JPEG quality level");
-    encodingCaps.add(EncodingXCursor, TightVncVendor,
-                    SigEncodingXCursor, "X-style cursor shape update");
-    encodingCaps.add(EncodingRichCursor, TightVncVendor,
-                    SigEncodingRichCursor, "Rich-color cursor shape update");
-    encodingCaps.add(EncodingPointerPos, TightVncVendor,
-                    SigEncodingPointerPos, "Pointer position update");
-    encodingCaps.add(EncodingLastRect, TightVncVendor,
-                    SigEncodingLastRect, "LastRect protocol extension");
-    encodingCaps.add(EncodingNewFBSize, TightVncVendor,
-                    SigEncodingNewFBSize, "Framebuffer size change");
-  }
-
-  //
-  // Setup tunneling (TightVNC protocol extensions)
-  //
-
-  void setupTunneling() throws IOException {
-    int nTunnelTypes = readU32();
-    if (nTunnelTypes != 0) {
-      readCapabilityList(tunnelCaps, nTunnelTypes);
-
-      // We don't support tunneling yet.
-      writeInt(NoTunneling);
-    }
-  }
-
-  //
-  // Negotiate authentication scheme (TightVNC protocol extensions)
-  //
-
-  int negotiateAuthenticationTight() throws Exception {
-    int nAuthTypes = readU32();
-    if (nAuthTypes == 0)
-      return AuthNone;
-
-    readCapabilityList(authCaps, nAuthTypes);
-    for (int i = 0; i < authCaps.numEnabled(); i++) {
-      int authType = authCaps.getByOrder(i);
-      if (authType == AuthNone || authType == AuthVNC) {
-       writeInt(authType);
-       return authType;
-      }
-    }
-    throw new Exception("No suitable authentication scheme found");
-  }
-
-  //
-  // Read a capability list (TightVNC protocol extensions)
-  //
-
-  void readCapabilityList(CapsContainer caps, int count) throws IOException {
-    int code;
-    byte[] vendor = new byte[4];
-    byte[] name = new byte[8];
-    for (int i = 0; i < count; i++) {
-      code = readU32();
-      readFully(vendor);
-      readFully(name);
-      caps.enable(new CapabilityInfo(code, vendor, name));
-    }
   }
 
   //
@@ -711,17 +577,6 @@ class RfbProto {
     readFully(name);
     desktopName = new String(name);
 
-    // Read interaction capabilities (TightVNC protocol extensions)
-    if (protocolTightVNC) {
-      int nServerMessageTypes = readU16();
-      int nClientMessageTypes = readU16();
-      int nEncodingTypes = readU16();
-      readU16();
-      readCapabilityList(serverMsgCaps, nServerMessageTypes);
-      readCapabilityList(clientMsgCaps, nClientMessageTypes);
-      readCapabilityList(encodingCaps, nEncodingTypes);
-    }
-
     if (!clientMsgCaps.isEnabled(EnableContinuousUpdates)) {
       viewer.options.disableContUpdates();
     }
diff --git a/java/src/com/tigervnc/vncviewer/VncViewer.java 
b/java/src/com/tigervnc/vncviewer/VncViewer.java
index 1c6482a..6fadbe8 100644
--- a/java/src/com/tigervnc/vncviewer/VncViewer.java
+++ b/java/src/com/tigervnc/vncviewer/VncViewer.java
@@ -352,16 +352,8 @@ public class VncViewer extends java.applet.Applet
                         rfb.clientMajor + "." + rfb.clientMinor);
 
     int secType = rfb.negotiateSecurity();
-    int authType;
-    if (secType == RfbProto.SecTypeTight) {
-      showConnectionStatus("Enabling TightVNC protocol extensions");
-      rfb.setupTunneling();
-      authType = rfb.negotiateAuthenticationTight();
-    } else {
-      authType = secType;
-    }
 
-    doAuthentification(authType);
+    doAuthentification(secType);
   }
 
     void doAuthentification(int secType) throws Exception {
-- 
1.5.6.5


------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to