tomaswolf commented on a change in pull request #105: SSHD-930 Send the client 
version string after receiving the version string of the server
URL: https://github.com/apache/mina-sshd/pull/105#discussion_r303486677
 
 

 ##########
 File path: 
sshd-core/src/main/java/org/apache/sshd/client/session/AbstractClientSession.java
 ##########
 @@ -231,37 +240,55 @@ public KeyPair removePublicKeyIdentity(KeyPair kp) {
             return null;
         }
 
-        int index = AuthenticationIdentitiesProvider.findIdentityIndex(
-            identities, 
AuthenticationIdentitiesProvider.KEYPAIR_IDENTITY_COMPARATOR, kp);
+        int index = 
AuthenticationIdentitiesProvider.findIdentityIndex(identities,
+                AuthenticationIdentitiesProvider.KEYPAIR_IDENTITY_COMPARATOR, 
kp);
         if (index >= 0) {
             return (KeyPair) identities.remove(index);
         } else {
             return null;
         }
     }
 
-    protected IoWriteFuture sendClientIdentification() throws Exception {
-        clientVersion = 
resolveIdentificationString(ClientFactoryManager.CLIENT_IDENTIFICATION);
+    protected void initializeKexPhase() throws Exception {
+        sendClientIdentification();
+
+        KexExtensionHandler extHandler = getKexExtensionHandler();
+        if ((extHandler == null) || 
(!extHandler.isKexExtensionsAvailable(this, AvailabilityPhase.PREKEX))) {
+            kexState.set(KexState.INIT);
+            sendKexInit();
+        } else {
+            if (log.isDebugEnabled()) {
+                log.debug("initializeKexPhase({}) delay KEX-INIT until 
server-side one received", this);
+            }
+        }
+    }
 
+    protected ClientProxyConnector initializeProxyConnector() throws Exception 
{
 
 Review comment:
   Why return the ClientProxyConnector here? The only place it's called the 
return value is ignored, and subclasses could get it via 
`getClientProxyConnector()` anyway. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to