comparison src/ch/ethz/ssh2/Connection.java @ 369:7a5943a514d5

debug kex error
author Carl Byington <carl@five-ten-sg.com>
date Mon, 04 Aug 2014 11:39:58 -0700
parents 145ec135804f
children 071a1ff9b6bf
comparison
equal deleted inserted replaced
368:b198ea5c5ffd 369:7a5943a514d5
23 import ch.ethz.ssh2.compression.CompressionFactory; 23 import ch.ethz.ssh2.compression.CompressionFactory;
24 import ch.ethz.ssh2.crypto.CryptoWishList; 24 import ch.ethz.ssh2.crypto.CryptoWishList;
25 import ch.ethz.ssh2.crypto.SecureRandomFix; 25 import ch.ethz.ssh2.crypto.SecureRandomFix;
26 import ch.ethz.ssh2.crypto.cipher.BlockCipherFactory; 26 import ch.ethz.ssh2.crypto.cipher.BlockCipherFactory;
27 import ch.ethz.ssh2.crypto.digest.MAC; 27 import ch.ethz.ssh2.crypto.digest.MAC;
28 import ch.ethz.ssh2.log.Logger;
28 import ch.ethz.ssh2.packets.PacketIgnore; 29 import ch.ethz.ssh2.packets.PacketIgnore;
29 import ch.ethz.ssh2.transport.ClientTransportManager; 30 import ch.ethz.ssh2.transport.ClientTransportManager;
30 import ch.ethz.ssh2.transport.HTTPProxyClientTransportManager; 31 import ch.ethz.ssh2.transport.HTTPProxyClientTransportManager;
31 import ch.ethz.ssh2.transport.KexManager; 32 import ch.ethz.ssh2.transport.KexManager;
32 import ch.ethz.ssh2.util.TimeoutService.TimeoutToken; 33 import ch.ethz.ssh2.util.TimeoutService.TimeoutToken;
48 * @author Christian Plattner 49 * @author Christian Plattner
49 * @version $Id: Connection.java 160 2014-05-01 14:30:26Z dkocher@sudo.ch $ 50 * @version $Id: Connection.java 160 2014-05-01 14:30:26Z dkocher@sudo.ch $
50 */ 51 */
51 52
52 public class Connection { 53 public class Connection {
54 protected static final Logger log = Logger.getLogger(Connection.class);
55
53 /** 56 /**
54 * The identifier presented to the SSH-2 server. This is the same 57 * The identifier presented to the SSH-2 server. This is the same
55 * as the "softwareversion" defined in RFC 4253. 58 * as the "softwareversion" defined in RFC 4253.
56 * <p/> 59 * <p/>
57 * <b>NOTE: As per the RFC, the "softwareversion" string MUST consist of printable 60 * <b>NOTE: As per the RFC, the "softwareversion" string MUST consist of printable
668 * you don't need a connection anymore - otherwise the receiver thread may 671 * you don't need a connection anymore - otherwise the receiver thread may
669 * run forever. 672 * run forever.
670 */ 673 */
671 674
672 public void close() { 675 public void close() {
676 log.debug("Connection.close()");
673 Throwable t = new Throwable("Closed due to user request."); 677 Throwable t = new Throwable("Closed due to user request.");
674 close(t, false); 678 close(t, false);
675 } 679 }
676 680
677 public void close(Throwable t, boolean hard) { 681 public void close(Throwable t, boolean hard) {
682 log.debug("Connection.close(%s hard=%b)", t.getMessage(), hard);
678 if (cm != null) { 683 if (cm != null) {
679 cm.closeAllChannels(); 684 cm.closeAllChannels();
680 } 685 }
681 686
682 if (tm != null) { 687 if (tm != null) {