comparison src/ch/ethz/ssh2/transport/ServerTransportManager.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 beaccc9df37b
children
comparison
equal deleted inserted replaced
305:d2b303406d63 307:071eccdff8ea
6 import ch.ethz.ssh2.server.ServerConnectionState; 6 import ch.ethz.ssh2.server.ServerConnectionState;
7 7
8 /** 8 /**
9 * @version $Id: ServerTransportManager.java 151 2014-04-28 10:03:39Z dkocher@sudo.ch $ 9 * @version $Id: ServerTransportManager.java 151 2014-04-28 10:03:39Z dkocher@sudo.ch $
10 */ 10 */
11 public class ServerTransportManager extends TransportManager 11 public class ServerTransportManager extends TransportManager {
12 {
13 12
14 private final Socket sock; 13 private final Socket sock;
15 14
16 public ServerTransportManager(final Socket socket) 15 public ServerTransportManager(final Socket socket) {
17 { 16 super(socket);
18 super(socket); 17 // TCP connection is already established
19 // TCP connection is already established 18 this.sock = socket;
20 this.sock = socket; 19 }
21 }
22 20
23 public void connect(ServerConnectionState state) throws IOException 21 public void connect(ServerConnectionState state) throws IOException {
24 { 22 /* Parse the client lin
25 /* Parse the client lin 23 e and say hello - important: this information is later needed for the
26 e and say hello - important: this information is later needed for the 24 * key exchange (to stop man-in-the-middle attacks) - that is why we wrap it into an object
27 * key exchange (to stop man-in-the-middle attacks) - that is why we wrap it into an object 25 * for later use.
28 * for later use. 26 */
29 */ 27 state.csh = ClientServerHello.serverHello(state.softwareversion, sock.getInputStream(), sock.getOutputStream());
30 28 TransportConnection tc = new TransportConnection(sock.getInputStream(), sock.getOutputStream(), state.generator);
31 state.csh = ClientServerHello.serverHello(state.softwareversion, sock.getInputStream(), sock.getOutputStream()); 29 KexManager km = new ServerKexManager(state);
32 30 super.init(tc, km);
33 TransportConnection tc = new TransportConnection(sock.getInputStream(), sock.getOutputStream(), state.generator); 31 km.initiateKEX(state.next_cryptoWishList, null, state.next_dsa_key, state.next_rsa_key, state.next_ec_key);
34 KexManager km = new ServerKexManager(state); 32 this.startReceiver();
35 33 }
36 super.init(tc, km);
37
38 km.initiateKEX(state.next_cryptoWishList, null, state.next_dsa_key, state.next_rsa_key, state.next_ec_key);
39
40 this.startReceiver();
41 }
42 } 34 }