- Timestamp:
- Oct 8, 2007, 4:35:12 AM (17 years ago)
- Location:
- trunk/vnc/vnc_javasrc
- Files:
-
- 4 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/vnc/vnc_javasrc/Makefile
r105 r143 20 20 VNCProxyConnectSocketFactory.class VNCProxyConnectSocket.class \ 21 21 HTTPConnectSocket.class ReloginPanel.class \ 22 InStream.class MemInStream.class ZlibInStream.class 22 InStream.class MemInStream.class ZlibInStream.class \ 23 VNCProxyConnectSocketWrapper.class SocketWrapper.class SocketWrapper\$$WrappingSocketImpl.class SIPBTrustManager.class 23 24 24 25 SOURCES = VncViewer.java RfbProto.java AuthPanel.java VncCanvas.java \ … … 30 31 VNCProxyConnectSocketFactory.java VNCProxyConnectSocket.java \ 31 32 HTTPConnectSocket.java ReloginPanel.java \ 32 InStream.java MemInStream.java ZlibInStream.java 33 InStream.java MemInStream.java ZlibInStream.java \ 34 VNCProxyConnectSocketWrapper.java SocketWrapper.java SIPBTrustManager.java 35 36 EXTRAJAR = trust.store 33 37 34 38 all: $(CLASSES) $(ARCHIVE) … … 38 42 39 43 $(ARCHIVE): $(CLASSES) $(MANIFEST) 40 $(JAR) cfm $(ARCHIVE) $(MANIFEST) $(CLASSES) 44 $(JAR) cfm $(ARCHIVE) $(MANIFEST) $(CLASSES) $(EXTRAJAR) 41 45 42 46 install: $(CLASSES) $(ARCHIVE) -
trunk/vnc/vnc_javasrc/VNCProxyConnectSocketFactory.java
r66 r143 27 27 import java.applet.*; 28 28 import java.net.*; 29 import javax.net.ssl.*; 29 30 import java.io.*; 30 31 31 32 class VNCProxyConnectSocketFactory implements SocketFactory { 33 34 SSLSocketFactory factory; 35 36 public VNCProxyConnectSocketFactory() { 37 try { 38 SSLContext c = SSLContext.getInstance("SSL"); 39 c.init(null, 40 new TrustManager[] { new SIPBTrustManager() }, 41 null); 42 factory = 43 (SSLSocketFactory)c.getSocketFactory(); 44 } catch (Exception e) { 45 e.printStackTrace(); 46 } 47 } 32 48 33 49 public Socket createSocket(String host, int port, Applet applet) … … 58 74 System.out.println("VNCProxy CONNECT via proxy " + host + 59 75 " port " + port + " to vm " + vmname); 60 VNCProxyConnectSocket s = 61 new VNCProxyConnectSocket(host, port, vmname, authtoken); 76 SSLSocket ssls = (SSLSocket)factory.createSocket(host, port); 77 ssls.startHandshake(); 78 VNCProxyConnectSocketWrapper s = 79 new VNCProxyConnectSocketWrapper(ssls, vmname, authtoken); 62 80 63 81 return (Socket)s;
Note: See TracChangeset
for help on using the changeset viewer.