You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Thomas Wolf (Jira)" <ji...@apache.org> on 2021/06/16 19:53:00 UTC
[jira] [Closed] (SSHD-1175) sshd support rsa-sha2-512 or
ras-sha2-256
[ https://issues.apache.org/jira/browse/SSHD-1175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Wolf closed SSHD-1175.
-----------------------------
Resolution: Duplicate
No reply from reporter; closing as duplicate of SSHD-1163.
> 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: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org