Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-1175

sshd support rsa-sha2-512 or ras-sha2-256

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None

    Description

      in class org.apache.sshd.client.kex.DHGEXClient

      String keyAlg = KeyUtils.getKeyType(serverKey);  // when chosen rsa-sha2-512, the keyAlg wouldb be ras-ssh,getKeyType form sig would be better.
      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), // session.getSignatureFactories() would be [rsa-sha2-512],  not macth keyAlg, so the return value would b null, the conection could not be created.
      "No verifier located for algorithm=%s", keyAlg);
      verif.initVerifier(session, serverKey);
      verif.update(session, h);
      if (!verif.verify(session, sig)) {

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tk0214 tk0214
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: