[ 
https://issues.apache.org/jira/browse/SSHD-436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet updated SSHD-436:
---------------------------------
    Attachment: SSHD-436.patch

While I like the first 3 points, I find the use of a **common initializer** a 
bit too much complicated.
I think {{KeyExchangeFactoryFactory}} and the related classes could be removed.
I've attached such a modified patch so we can discuss further.

In addition, I wonder if we could remove one Factory level in the cipher and dh 
enums, and completely remove the various cipher and dh classes when it makes 
sense.
I.e. instead of having a class AES128CBC and an enum which creates this class, 
we could refactor the AES128CBC class into the enum and have the enum directly 
implement NamedFactory<Cipher> instead of NamedFactory<NamedFactory<Cipher>>.  
Same for the DH implementations.

> Use as much as possible common code for client and server KEX
> -------------------------------------------------------------
>
>                 Key: SSHD-436
>                 URL: https://issues.apache.org/jira/browse/SSHD-436
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 1.0.0
>            Reporter: Goldstein Lyor
>         Attachments: 
> 0038-SSHD-436-Use-as-much-as-possible-common-code-for-cli.patch, 
> SSHD-436.patch
>
>
> The idea is that the basic KEX mechanism is almost the same for client and 
> server - there are some differences in the messages they send and the way 
> they choose the KEX parameters (_p_, _g_ values). The attached patch contains 
> the following changes:
> * The common code has been moved to _org.apache.sshd.common.kex_
> * The respective _org.apache.sshd.client.kex_ and 
> _org.apache.sshd.server.kex_ packages contain only the *differences*
> * The built-in KEX mechanisms have been encapsulated into an _enum_, and the 
> logic of whether they are supported by default has been attached to each 
> specific enum value
> * The setup of the client/server now uses a *common* initializer in order to 
> avoid code duplication.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to