# HG changeset patch # User Carl Byington # Date 1406823979 25200 # Node ID 90537ba718973b678c73a550e9c0c6388a6327c3 # Parent a713e91c59c8709c4bd5e9dc45f164c7c2b3b68d add ecdsa key support everywhere diff -r a713e91c59c8 -r 90537ba71897 src/ch/ethz/ssh2/auth/AuthenticationManager.java --- a/src/ch/ethz/ssh2/auth/AuthenticationManager.java Thu Jul 31 09:03:50 2014 -0700 +++ b/src/ch/ethz/ssh2/auth/AuthenticationManager.java Thu Jul 31 09:26:19 2014 -0700 @@ -69,7 +69,7 @@ private byte[] deQueue() throws IOException { if (connectionClosed) { - throw tm.getReasonClosedCause(); + throw new IOException("The connection is closed.").initCause(tm.getReasonClosedCause()); } // Wait for packet diff -r a713e91c59c8 -r 90537ba71897 src/ch/ethz/ssh2/transport/KexManager.java --- a/src/ch/ethz/ssh2/transport/KexManager.java Thu Jul 31 09:03:50 2014 -0700 +++ b/src/ch/ethz/ssh2/transport/KexManager.java Thu Jul 31 09:26:19 2014 -0700 @@ -98,7 +98,7 @@ } if (connectionClosed) { - throw tm.getReasonClosedCause(); + throw new IOException("Key exchange was not finished, connection is closed.").initCause(tm.getReasonClosedCause()); } try { diff -r a713e91c59c8 -r 90537ba71897 src/ch/ethz/ssh2/transport/TransportManager.java --- a/src/ch/ethz/ssh2/transport/TransportManager.java Thu Jul 31 09:03:50 2014 -0700 +++ b/src/ch/ethz/ssh2/transport/TransportManager.java Thu Jul 31 09:26:19 2014 -0700 @@ -199,7 +199,7 @@ } // check if we need to inform the monitors - List monitors = null; + List monitors = null; synchronized (this) { // Short term lock to protect "connectionMonitors" @@ -207,7 +207,7 @@ // (they may be modified concurrently) if (monitorsWereInformed == false) { monitorsWereInformed = true; - monitors = (List) connectionMonitors.clone(); + monitors = new ArrayList(connectionMonitors); } } @@ -280,7 +280,7 @@ public void sendKexMessage(byte[] msg) throws IOException { synchronized (connectionSemaphore) { if (connectionClosed) { - throw reasonClosedCause; + throw new IOException("Sorry, this connection is closed.").initCause(reasonClosedCause); } flagKexOngoing = true; @@ -366,8 +366,7 @@ public void setConnectionMonitors(List monitors) { synchronized (this) { - connectionMonitors = new ArrayList(); - connectionMonitors.addAll(monitors); + connectionMonitors = new ArrayList(monitors); } } @@ -403,7 +402,7 @@ synchronized (connectionSemaphore) { while (true) { if (connectionClosed) { - throw reasonClosedCause; + throw new IOException("Sorry, this connection is closed.").initCause(reasonClosedCause); } if (!flagKexOngoing) {