X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=third-party%2Fganymed%2Fsrc%2Fmain%2Fjava%2Fch%2Fethz%2Fssh2%2Ftransport%2FTransportManager.java;fp=third-party%2Fganymed%2Fsrc%2Fmain%2Fjava%2Fch%2Fethz%2Fssh2%2Ftransport%2FTransportManager.java;h=963267082b6a27fa37ea02fff635ad85c9c99dfd;hb=eb42b5484e585dfe55e85eeedc762b51181de43f;hp=50e9b287ea077195dbd0edd6e77d56ebb1fd91da;hpb=3965334ee0661e87ca6c9e12d91bd77d493e9c6d;p=controller.git diff --git a/third-party/ganymed/src/main/java/ch/ethz/ssh2/transport/TransportManager.java b/third-party/ganymed/src/main/java/ch/ethz/ssh2/transport/TransportManager.java index 50e9b287ea..963267082b 100644 --- a/third-party/ganymed/src/main/java/ch/ethz/ssh2/transport/TransportManager.java +++ b/third-party/ganymed/src/main/java/ch/ethz/ssh2/transport/TransportManager.java @@ -551,6 +551,31 @@ public class TransportManager receiveThread.start(); } + public void clientInit(Socket socket, String softwareversion, CryptoWishList cwl, + ServerHostKeyVerifier verifier, DHGexParameters dhgex, SecureRandom rnd) throws IOException + { + /* First, establish the TCP connection to the SSH-2 server */ + + sock = socket; + + /* Parse the server line and say hello - important: this information is later needed for the + * key exchange (to stop man-in-the-middle attacks) - that is why we wrap it into an object + * for later use. + */ + + ClientServerHello csh = ClientServerHello.clientHello(softwareversion, sock.getInputStream(), + sock.getOutputStream()); + + tc = new TransportConnection(sock.getInputStream(), sock.getOutputStream(), rnd); + String hostname = sock.getInetAddress().getHostName(); + int port = sock.getPort(); + + km = new ClientKexManager(this, csh, cwl, hostname, port, verifier, rnd); + km.initiateKEX(cwl, dhgex, null, null); + + startReceiver(); + } + public void clientInit(String hostname, int port, String softwareversion, CryptoWishList cwl, ServerHostKeyVerifier verifier, DHGexParameters dhgex, int connectTimeout, SecureRandom rnd, ProxyData proxyData) throws IOException