diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java index 8183a92b9..f9e80121e 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java @@ -39,6 +39,7 @@ import org.apache.sshd.common.config.keys.KeyUtils; import org.apache.sshd.common.io.IoSession; import org.apache.sshd.common.io.IoWriteFuture; +import org.apache.sshd.common.kex.KexProposalOption; import org.apache.sshd.common.util.Readable; import org.apache.sshd.common.util.buffer.Buffer; import org.eclipse.jgit.errors.InvalidPatternException; @@ -200,6 +201,24 @@ public void messageReceived(Readable buffer) throws Exception { } } + @Override + protected Map setNegotiationResult( + Map guess) { + Map result = super.setNegotiationResult( + guess); + // This should be doable with a SessionListener, too, but I don't see + // how to add a listener in time to catch the negotiation end for sure + // given that the super-constructor already starts KEX. + // + // TODO: This override can be removed once we use sshd 2.8.0. + if (log.isDebugEnabled()) { + result.forEach((option, value) -> log.debug( + "setNegotiationResult({}) Kex: {} = {}", this, //$NON-NLS-1$ + option.getDescription(), value)); + } + return result; + } + @Override protected String resolveAvailableSignaturesProposal( FactoryManager manager) {