l***@apache.org
2018-10-29 19:31:01 UTC
Repository: mina-sshd
Updated Branches:
refs/heads/master 32e1877d0 -> 0241783b1
[SSHD-858] Allow users to handle incoming un-implemented session messages via ReservedSessionMessagesHandler
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/0241783b
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/0241783b
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/0241783b
Branch: refs/heads/master
Commit: 0241783b13c6dfa9b89f3ddcf318ff473ee35772
Parents: 9d17811
Author: Lyor Goldstein <***@apache.org>
Authored: Mon Oct 29 11:27:57 2018 +0200
Committer: Lyor Goldstein <***@apache.org>
Committed: Mon Oct 29 21:36:26 2018 +0200
----------------------------------------------------------------------
README.md | 20 +++++++++++++++-----
.../session/ReservedSessionMessagesHandler.java | 8 +++++---
.../helpers/AbstractConnectionService.java | 2 +-
.../common/session/helpers/AbstractSession.java | 12 +++++++++---
.../ReservedSessionMessagesHandlerAdapter.java | 17 ++++++++++-------
.../common/session/helpers/SessionHelper.java | 2 +-
.../session/helpers/AbstractSessionTest.java | 2 +-
7 files changed, 42 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0241783b/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 30d7922..dd17a91 100644
--- a/README.md
+++ b/README.md
@@ -1335,6 +1335,17 @@ configuration properties that can be used to configure said behavior - please be
#### `ReservedSessionMessagesHandler`
+Can be used to handle the following cases:
+
+* [SSH_MSG_IGNORE](https://tools.ietf.org/html/rfc4253#section-11.2)
+* [SSH_MSG_DEBUG](https://tools.ietf.org/html/rfc4253#section-11.3)
+* [SSH_MSG_UNIMPLEMENTED](https://tools.ietf.org/html/rfc4253#section-11.4)
+* Any other unrecognized message received in the session.
+
+**Note:** The `handleUnimplementedMessage` method serves both for handling `SSH_MSG_UNIMPLEMENTED` and any other unrecognized
+message received in the session as well.
+
+
```java
// client side
@@ -1386,11 +1397,10 @@ rather than being accumulated. However, one can use the `EventListenerUtils` and
### `RequestHandler`(s)
-The code supports both [global](https://tools.ietf.org/html/rfc4254#section-4) and [channel-specific](https://tools.ietf.org/html/rfc4254#section-5.4) requests via the registration of `RequestHandler`(s).
-The global handlers are derived from `ConnectionServiceRequestHandler`(s) whereas the channel-specific
-ones are derived from `ChannelRequestHandler`(s). In order to add a handler one need only register the correct
-implementation and handle the request when it is detected. For global request handlers this is done by registering
-them on the server:
+The code supports both [global](https://tools.ietf.org/html/rfc4254#section-4) and [channel-specific](https://tools.ietf.org/html/rfc4254#section-5.4)
+requests via the registration of `RequestHandler`(s). The global handlers are derived from `ConnectionServiceRequestHandler`(s) whereas the channel-specific
+ones are derived from `ChannelRequestHandler`(s). In order to add a handler one need only register the correct implementation and handle the request when
+it is detected. For global request handlers this is done by registering them on the server:
```java
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0241783b/sshd-core/src/main/java/org/apache/sshd/common/session/ReservedSessionMessagesHandler.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/ReservedSessionMessagesHandler.java b/sshd-core/src/main/java/org/apache/sshd/common/session/ReservedSessionMessagesHandler.java
index 08292ea..c7c6012 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/ReservedSessionMessagesHandler.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/ReservedSessionMessagesHandler.java
@@ -54,14 +54,16 @@ public interface ReservedSessionMessagesHandler extends SshdEventListener {
}
/**
- * Invoked when an {@code SSH_MSG_UNIMPLEMENTED} packet is received
+ * Invoked when a packet with an un-implemented message is received - including
+ * {@code SSH_MSG_UNIMPLEMENTED} itself
*
* @param session The {@code Session} through which the message was received
- * @param buffer The {@code Buffer} containing the data
+ * @param cmd The received (un-implemented) command
+ * @param buffer The {@code Buffer} containing the data - positioned just beyond the command
* @throws Exception If failed to handle the message
* @see <A HREF="https://tools.ietf.org/html/rfc4253#section-11.4">RFC 4253 - section 11.4</A>
*/
- default void handleUnimplementedMessage(Session session, Buffer buffer) throws Exception {
+ default void handleUnimplementedMessage(Session session, int cmd, Buffer buffer) throws Exception {
// ignored
}
}
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0241783b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java
index c66a7e3..fcac6f2 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java
@@ -381,7 +381,7 @@ public abstract class AbstractConnectionService
log.debug("process({}) Unsupported command: {}",
session, SshConstants.getCommandMessageName(cmd));
}
- session.notImplemented();
+ session.notImplemented(cmd, buffer);
}
}
}
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0241783b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
index 1862dc6..1f5efbb 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
@@ -64,6 +64,7 @@ import org.apache.sshd.common.kex.KeyExchange;
import org.apache.sshd.common.mac.Mac;
import org.apache.sshd.common.mac.MacInformation;
import org.apache.sshd.common.random.Random;
+import org.apache.sshd.common.session.ReservedSessionMessagesHandler;
import org.apache.sshd.common.session.SessionListener;
import org.apache.sshd.common.session.SessionWorkBuffer;
import org.apache.sshd.common.util.EventListenerUtils;
@@ -408,7 +409,7 @@ public abstract class AbstractSession extends SessionHelper {
log.debug("process({}) Unsupported command: {}",
this, SshConstants.getCommandMessageName(cmd));
}
- notImplemented();
+ notImplemented(cmd, buffer);
}
break;
}
@@ -1346,11 +1347,16 @@ public abstract class AbstractSession extends SessionHelper {
* contain the sequence id of the unsupported packet: this number
* is assumed to be the last packet received.
*
+ * @param cmd The un-implemented command value
+ * @param buffer The {@link Buffer} that contains the command. <b>Note:</b> the
+ * buffer's read position is just beyond the command.
* @return An {@link IoWriteFuture} that can be used to wait for packet write completion
- * @throws IOException if an error occurred sending the packet
+ * @throws Exception if an error occurred while handling the packet.
* @see #sendNotImplemented(long)
*/
- protected IoWriteFuture notImplemented() throws IOException {
+ protected IoWriteFuture notImplemented(int cmd, Buffer buffer) throws Exception {
+ ReservedSessionMessagesHandler handler = resolveReservedSessionMessagesHandler();
+ handler.handleUnimplementedMessage(this, cmd, buffer);
return sendNotImplemented(seqi - 1L);
}
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0241783b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/ReservedSessionMessagesHandlerAdapter.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/ReservedSessionMessagesHandlerAdapter.java b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/ReservedSessionMessagesHandlerAdapter.java
index bcc0a5f..6abd4b3 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/ReservedSessionMessagesHandlerAdapter.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/ReservedSessionMessagesHandlerAdapter.java
@@ -19,6 +19,7 @@
package org.apache.sshd.common.session.helpers;
+import org.apache.sshd.common.SshConstants;
import org.apache.sshd.common.session.ReservedSessionMessagesHandler;
import org.apache.sshd.common.session.Session;
import org.apache.sshd.common.util.buffer.Buffer;
@@ -68,13 +69,15 @@ public class ReservedSessionMessagesHandlerAdapter
}
@Override
- public void handleUnimplementedMessage(Session session, Buffer buffer) throws Exception {
- handleUnimplementedMessage(session, buffer, buffer.getUInt());
- }
-
- public void handleUnimplementedMessage(Session session, Buffer buffer, long seqNo) throws Exception {
- if (log.isDebugEnabled()) {
- log.debug("handleUnimplementedMessage({}) SSH_MSG_UNIMPLEMENTED - seqNo={}", session, seqNo);
+ public void handleUnimplementedMessage(Session session, int cmd, Buffer buffer) throws Exception {
+ boolean debugEnabled = log.isDebugEnabled();
+ if (debugEnabled) {
+ if (cmd == SshConstants.SSH_MSG_UNIMPLEMENTED) {
+ long seqNo = buffer.getUInt();
+ log.debug("handleUnimplementedMessage({}) SSH_MSG_UNIMPLEMENTED - seqNo={}", session, seqNo);
+ } else {
+ log.debug("handleUnimplementedMessage({}): {}", session, SshConstants.getCommandMessageName(cmd));
+ }
}
}
}
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0241783b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/SessionHelper.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/SessionHelper.java b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/SessionHelper.java
index 50ae49a..f4d4f30 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/SessionHelper.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/SessionHelper.java
@@ -347,7 +347,7 @@ public abstract class SessionHelper extends AbstractKexFactoryManager implements
resetIdleTimeout();
ReservedSessionMessagesHandler handler = resolveReservedSessionMessagesHandler();
- handler.handleUnimplementedMessage(this, buffer);
+ handler.handleUnimplementedMessage(this, SshConstants.SSH_MSG_UNIMPLEMENTED, buffer);
}
@Override
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0241783b/sshd-core/src/test/java/org/apache/sshd/common/session/helpers/AbstractSessionTest.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/test/java/org/apache/sshd/common/session/helpers/AbstractSessionTest.java b/sshd-core/src/test/java/org/apache/sshd/common/session/helpers/AbstractSessionTest.java
index 682c11a..cf6779f 100644
--- a/sshd-core/src/test/java/org/apache/sshd/common/session/helpers/AbstractSessionTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/common/session/helpers/AbstractSessionTest.java
@@ -202,7 +202,7 @@ public class AbstractSessionTest extends BaseTestSupport {
public void testMalformedUnimplementedMessage() throws Exception {
session.setReservedSessionMessagesHandler(new ReservedSessionMessagesHandler() {
@Override
- public void handleUnimplementedMessage(Session session, Buffer buffer) throws Exception {
+ public void handleUnimplementedMessage(Session session, int cmd, Buffer buffer) throws Exception {
fail("Unexpected invocation: available=" + buffer.available());
}
});
Updated Branches:
refs/heads/master 32e1877d0 -> 0241783b1
[SSHD-858] Allow users to handle incoming un-implemented session messages via ReservedSessionMessagesHandler
Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/0241783b
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/0241783b
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/0241783b
Branch: refs/heads/master
Commit: 0241783b13c6dfa9b89f3ddcf318ff473ee35772
Parents: 9d17811
Author: Lyor Goldstein <***@apache.org>
Authored: Mon Oct 29 11:27:57 2018 +0200
Committer: Lyor Goldstein <***@apache.org>
Committed: Mon Oct 29 21:36:26 2018 +0200
----------------------------------------------------------------------
README.md | 20 +++++++++++++++-----
.../session/ReservedSessionMessagesHandler.java | 8 +++++---
.../helpers/AbstractConnectionService.java | 2 +-
.../common/session/helpers/AbstractSession.java | 12 +++++++++---
.../ReservedSessionMessagesHandlerAdapter.java | 17 ++++++++++-------
.../common/session/helpers/SessionHelper.java | 2 +-
.../session/helpers/AbstractSessionTest.java | 2 +-
7 files changed, 42 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0241783b/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 30d7922..dd17a91 100644
--- a/README.md
+++ b/README.md
@@ -1335,6 +1335,17 @@ configuration properties that can be used to configure said behavior - please be
#### `ReservedSessionMessagesHandler`
+Can be used to handle the following cases:
+
+* [SSH_MSG_IGNORE](https://tools.ietf.org/html/rfc4253#section-11.2)
+* [SSH_MSG_DEBUG](https://tools.ietf.org/html/rfc4253#section-11.3)
+* [SSH_MSG_UNIMPLEMENTED](https://tools.ietf.org/html/rfc4253#section-11.4)
+* Any other unrecognized message received in the session.
+
+**Note:** The `handleUnimplementedMessage` method serves both for handling `SSH_MSG_UNIMPLEMENTED` and any other unrecognized
+message received in the session as well.
+
+
```java
// client side
@@ -1386,11 +1397,10 @@ rather than being accumulated. However, one can use the `EventListenerUtils` and
### `RequestHandler`(s)
-The code supports both [global](https://tools.ietf.org/html/rfc4254#section-4) and [channel-specific](https://tools.ietf.org/html/rfc4254#section-5.4) requests via the registration of `RequestHandler`(s).
-The global handlers are derived from `ConnectionServiceRequestHandler`(s) whereas the channel-specific
-ones are derived from `ChannelRequestHandler`(s). In order to add a handler one need only register the correct
-implementation and handle the request when it is detected. For global request handlers this is done by registering
-them on the server:
+The code supports both [global](https://tools.ietf.org/html/rfc4254#section-4) and [channel-specific](https://tools.ietf.org/html/rfc4254#section-5.4)
+requests via the registration of `RequestHandler`(s). The global handlers are derived from `ConnectionServiceRequestHandler`(s) whereas the channel-specific
+ones are derived from `ChannelRequestHandler`(s). In order to add a handler one need only register the correct implementation and handle the request when
+it is detected. For global request handlers this is done by registering them on the server:
```java
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0241783b/sshd-core/src/main/java/org/apache/sshd/common/session/ReservedSessionMessagesHandler.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/ReservedSessionMessagesHandler.java b/sshd-core/src/main/java/org/apache/sshd/common/session/ReservedSessionMessagesHandler.java
index 08292ea..c7c6012 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/ReservedSessionMessagesHandler.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/ReservedSessionMessagesHandler.java
@@ -54,14 +54,16 @@ public interface ReservedSessionMessagesHandler extends SshdEventListener {
}
/**
- * Invoked when an {@code SSH_MSG_UNIMPLEMENTED} packet is received
+ * Invoked when a packet with an un-implemented message is received - including
+ * {@code SSH_MSG_UNIMPLEMENTED} itself
*
* @param session The {@code Session} through which the message was received
- * @param buffer The {@code Buffer} containing the data
+ * @param cmd The received (un-implemented) command
+ * @param buffer The {@code Buffer} containing the data - positioned just beyond the command
* @throws Exception If failed to handle the message
* @see <A HREF="https://tools.ietf.org/html/rfc4253#section-11.4">RFC 4253 - section 11.4</A>
*/
- default void handleUnimplementedMessage(Session session, Buffer buffer) throws Exception {
+ default void handleUnimplementedMessage(Session session, int cmd, Buffer buffer) throws Exception {
// ignored
}
}
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0241783b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java
index c66a7e3..fcac6f2 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractConnectionService.java
@@ -381,7 +381,7 @@ public abstract class AbstractConnectionService
log.debug("process({}) Unsupported command: {}",
session, SshConstants.getCommandMessageName(cmd));
}
- session.notImplemented();
+ session.notImplemented(cmd, buffer);
}
}
}
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0241783b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
index 1862dc6..1f5efbb 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
@@ -64,6 +64,7 @@ import org.apache.sshd.common.kex.KeyExchange;
import org.apache.sshd.common.mac.Mac;
import org.apache.sshd.common.mac.MacInformation;
import org.apache.sshd.common.random.Random;
+import org.apache.sshd.common.session.ReservedSessionMessagesHandler;
import org.apache.sshd.common.session.SessionListener;
import org.apache.sshd.common.session.SessionWorkBuffer;
import org.apache.sshd.common.util.EventListenerUtils;
@@ -408,7 +409,7 @@ public abstract class AbstractSession extends SessionHelper {
log.debug("process({}) Unsupported command: {}",
this, SshConstants.getCommandMessageName(cmd));
}
- notImplemented();
+ notImplemented(cmd, buffer);
}
break;
}
@@ -1346,11 +1347,16 @@ public abstract class AbstractSession extends SessionHelper {
* contain the sequence id of the unsupported packet: this number
* is assumed to be the last packet received.
*
+ * @param cmd The un-implemented command value
+ * @param buffer The {@link Buffer} that contains the command. <b>Note:</b> the
+ * buffer's read position is just beyond the command.
* @return An {@link IoWriteFuture} that can be used to wait for packet write completion
- * @throws IOException if an error occurred sending the packet
+ * @throws Exception if an error occurred while handling the packet.
* @see #sendNotImplemented(long)
*/
- protected IoWriteFuture notImplemented() throws IOException {
+ protected IoWriteFuture notImplemented(int cmd, Buffer buffer) throws Exception {
+ ReservedSessionMessagesHandler handler = resolveReservedSessionMessagesHandler();
+ handler.handleUnimplementedMessage(this, cmd, buffer);
return sendNotImplemented(seqi - 1L);
}
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0241783b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/ReservedSessionMessagesHandlerAdapter.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/ReservedSessionMessagesHandlerAdapter.java b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/ReservedSessionMessagesHandlerAdapter.java
index bcc0a5f..6abd4b3 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/ReservedSessionMessagesHandlerAdapter.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/ReservedSessionMessagesHandlerAdapter.java
@@ -19,6 +19,7 @@
package org.apache.sshd.common.session.helpers;
+import org.apache.sshd.common.SshConstants;
import org.apache.sshd.common.session.ReservedSessionMessagesHandler;
import org.apache.sshd.common.session.Session;
import org.apache.sshd.common.util.buffer.Buffer;
@@ -68,13 +69,15 @@ public class ReservedSessionMessagesHandlerAdapter
}
@Override
- public void handleUnimplementedMessage(Session session, Buffer buffer) throws Exception {
- handleUnimplementedMessage(session, buffer, buffer.getUInt());
- }
-
- public void handleUnimplementedMessage(Session session, Buffer buffer, long seqNo) throws Exception {
- if (log.isDebugEnabled()) {
- log.debug("handleUnimplementedMessage({}) SSH_MSG_UNIMPLEMENTED - seqNo={}", session, seqNo);
+ public void handleUnimplementedMessage(Session session, int cmd, Buffer buffer) throws Exception {
+ boolean debugEnabled = log.isDebugEnabled();
+ if (debugEnabled) {
+ if (cmd == SshConstants.SSH_MSG_UNIMPLEMENTED) {
+ long seqNo = buffer.getUInt();
+ log.debug("handleUnimplementedMessage({}) SSH_MSG_UNIMPLEMENTED - seqNo={}", session, seqNo);
+ } else {
+ log.debug("handleUnimplementedMessage({}): {}", session, SshConstants.getCommandMessageName(cmd));
+ }
}
}
}
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0241783b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/SessionHelper.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/SessionHelper.java b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/SessionHelper.java
index 50ae49a..f4d4f30 100644
--- a/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/SessionHelper.java
+++ b/sshd-core/src/main/java/org/apache/sshd/common/session/helpers/SessionHelper.java
@@ -347,7 +347,7 @@ public abstract class SessionHelper extends AbstractKexFactoryManager implements
resetIdleTimeout();
ReservedSessionMessagesHandler handler = resolveReservedSessionMessagesHandler();
- handler.handleUnimplementedMessage(this, buffer);
+ handler.handleUnimplementedMessage(this, SshConstants.SSH_MSG_UNIMPLEMENTED, buffer);
}
@Override
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/0241783b/sshd-core/src/test/java/org/apache/sshd/common/session/helpers/AbstractSessionTest.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/test/java/org/apache/sshd/common/session/helpers/AbstractSessionTest.java b/sshd-core/src/test/java/org/apache/sshd/common/session/helpers/AbstractSessionTest.java
index 682c11a..cf6779f 100644
--- a/sshd-core/src/test/java/org/apache/sshd/common/session/helpers/AbstractSessionTest.java
+++ b/sshd-core/src/test/java/org/apache/sshd/common/session/helpers/AbstractSessionTest.java
@@ -202,7 +202,7 @@ public class AbstractSessionTest extends BaseTestSupport {
public void testMalformedUnimplementedMessage() throws Exception {
session.setReservedSessionMessagesHandler(new ReservedSessionMessagesHandler() {
@Override
- public void handleUnimplementedMessage(Session session, Buffer buffer) throws Exception {
+ public void handleUnimplementedMessage(Session session, int cmd, Buffer buffer) throws Exception {
fail("Unexpected invocation: available=" + buffer.available());
}
});