Mercurial > 510Connectbot
comparison src/ch/ethz/ssh2/transport/ClientTransportManager.java @ 307:071eccdff8ea ganymed
fix java formatting
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 30 Jul 2014 14:16:58 -0700 |
parents | ca5dd224a87b |
children | 63b23b7c840d |
comparison
equal
deleted
inserted
replaced
305:d2b303406d63 | 307:071eccdff8ea |
---|---|
29 sock.setSoTimeout(timeout); | 29 sock.setSoTimeout(timeout); |
30 } | 30 } |
31 | 31 |
32 public void connect(String hostname, int port, String softwareversion, CryptoWishList cwl, | 32 public void connect(String hostname, int port, String softwareversion, CryptoWishList cwl, |
33 ServerHostKeyVerifier verifier, DHGexParameters dhgex, int connectTimeout, SecureRandom rnd) | 33 ServerHostKeyVerifier verifier, DHGexParameters dhgex, int connectTimeout, SecureRandom rnd) |
34 throws IOException { | 34 throws IOException { |
35 // Establish the TCP connection to the SSH-2 server | 35 // Establish the TCP connection to the SSH-2 server |
36 this.connect(hostname, port, connectTimeout); | 36 this.connect(hostname, port, connectTimeout); |
37 | |
38 // Parse the server line and say hello - important: this information is later needed for the | 37 // Parse the server line and say hello - important: this information is later needed for the |
39 // key exchange (to stop man-in-the-middle attacks) - that is why we wrap it into an object | 38 // key exchange (to stop man-in-the-middle attacks) - that is why we wrap it into an object |
40 // for later use. | 39 // for later use. |
41 | |
42 ClientServerHello csh = ClientServerHello.clientHello(softwareversion, sock.getInputStream(), | 40 ClientServerHello csh = ClientServerHello.clientHello(softwareversion, sock.getInputStream(), |
43 sock.getOutputStream()); | 41 sock.getOutputStream()); |
44 | |
45 TransportConnection tc = new TransportConnection(sock.getInputStream(), sock.getOutputStream(), rnd); | 42 TransportConnection tc = new TransportConnection(sock.getInputStream(), sock.getOutputStream(), rnd); |
46 | |
47 KexManager km = new ClientKexManager(this, csh, cwl, hostname, port, verifier, rnd); | 43 KexManager km = new ClientKexManager(this, csh, cwl, hostname, port, verifier, rnd); |
48 super.init(tc, km); | 44 super.init(tc, km); |
49 | |
50 km.initiateKEX(cwl, dhgex, null, null, null); | 45 km.initiateKEX(cwl, dhgex, null, null, null); |
51 | |
52 this.startReceiver(); | 46 this.startReceiver(); |
53 } | 47 } |
54 | 48 |
55 protected void connect(String hostname, int port, int connectTimeout) | 49 protected void connect(String hostname, int port, int connectTimeout) |
56 throws IOException { | 50 throws IOException { |
57 sock.connect(new InetSocketAddress(hostname, port), connectTimeout); | 51 sock.connect(new InetSocketAddress(hostname, port), connectTimeout); |
58 } | 52 } |
59 } | 53 } |