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

tk0214 updated SSHD-1175:
-------------------------
    Description: 
in class org.apache.sshd.client.kex.DHGEXClient

String keyAlg = KeyUtils.getKeyType(serverKey);  {color:#de350b}// when chosen 
rsa-sha2-512, the keyAlg wouldb be ras-ssh,getKeyType form sig would be 
better.{color}
if (GenericUtils.isEmpty(keyAlg)) {
 throw new SshException(
 "Unsupported server key type: " + serverKey.getAlgorithm()
 + " [" + serverKey.getFormat() + "]");
}

buffer = new ByteArrayBuffer();
buffer.putBytes(v_c);
buffer.putBytes(v_s);
buffer.putBytes(i_c);
buffer.putBytes(i_s);
buffer.putBytes(k_s);
buffer.putInt(min);
buffer.putInt(prf);
buffer.putInt(max);
buffer.putMPInt(getP());
buffer.putMPInt(g);
buffer.putMPInt(getE());
buffer.putMPInt(f);
buffer.putMPInt(k);
hash.update(buffer.array(), 0, buffer.available());
h = hash.digest();

Signature verif = ValidateUtils.checkNotNull(
 NamedFactory.create(session.getSignatureFactories(), keyAlg), // 
{color:#de350b}session.getSignatureFactories() would be [rsa-sha2-512],  not 
macth keyAlg, so the return value would b null, the conection could not be 
created.{color}
 "No verifier located for algorithm=%s", keyAlg);
verif.initVerifier(session, serverKey);
verif.update(session, h);
if (!verif.verify(session, sig)) {
        Summary: sshd support rsa-sha2-512 or ras-sha2-256  (was: sshd support 
rsa-杀)

> sshd support rsa-sha2-512 or ras-sha2-256
> -----------------------------------------
>
>                 Key: SSHD-1175
>                 URL: https://issues.apache.org/jira/browse/SSHD-1175
>             Project: MINA SSHD
>          Issue Type: Bug
>            Reporter: tk0214
>            Priority: Major
>
> in class org.apache.sshd.client.kex.DHGEXClient
> String keyAlg = KeyUtils.getKeyType(serverKey);  {color:#de350b}// when 
> chosen rsa-sha2-512, the keyAlg wouldb be ras-ssh,getKeyType form sig would 
> be better.{color}
> if (GenericUtils.isEmpty(keyAlg)) {
>  throw new SshException(
>  "Unsupported server key type: " + serverKey.getAlgorithm()
>  + " [" + serverKey.getFormat() + "]");
> }
> buffer = new ByteArrayBuffer();
> buffer.putBytes(v_c);
> buffer.putBytes(v_s);
> buffer.putBytes(i_c);
> buffer.putBytes(i_s);
> buffer.putBytes(k_s);
> buffer.putInt(min);
> buffer.putInt(prf);
> buffer.putInt(max);
> buffer.putMPInt(getP());
> buffer.putMPInt(g);
> buffer.putMPInt(getE());
> buffer.putMPInt(f);
> buffer.putMPInt(k);
> hash.update(buffer.array(), 0, buffer.available());
> h = hash.digest();
> Signature verif = ValidateUtils.checkNotNull(
>  NamedFactory.create(session.getSignatureFactories(), keyAlg), // 
> {color:#de350b}session.getSignatureFactories() would be [rsa-sha2-512],  not 
> macth keyAlg, so the return value would b null, the conection could not be 
> created.{color}
>  "No verifier located for algorithm=%s", keyAlg);
> verif.initVerifier(session, serverKey);
> verif.update(session, h);
> if (!verif.verify(session, sig)) {



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to