-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSA certificate key determination is broken #599
Comments
Ouch, good find. The unit tests are missing a test I think ;) |
Just for information. Having switched to the actual master of SSHJ, some of our private integration tests have started failing because of various |
I also noticed this in #600. The reason seems to be that the KeyAlgorithms used for pubkey auth are not all the ones configured, but only the ones that the server advertises a host key for. |
* Fix RSA certificate key determination. Fixes #599. * Correct serialization of RSA certificates with unlimited dates. * The test for connecting with RSA certificate. * Remove redundant change in TransportImpl.java * Add forgotten test keys. * Make net.schmizz.sshj.common.KeyType.CertUtils.epochFromDate readable. Co-authored-by: Vladimir Lagunov <vladimir.lagunov@jetbrains.com> Co-authored-by: Jeroen van Erp <jeroen@hierynomus.com>
net.schmizz.sshj.common.KeyType#fromKey
iterates over these values:Supposing there's attempt to determine the type of a
ssh-rsa-cert-v01@openssh.com
.KeyProvider.getPublic()
would return an instance ofcom.hierynomus.sshj.userauth.certificate.Certificate
.The first iteration checks that
KeyAlgorithm.RSA.equals(key.getAlgorithm())
and returns true. So,KeyType.fromKey
decides that it'sKeyType.RSA
, butKeyType.RSA_CERT
is expected.The text was updated successfully, but these errors were encountered: