sshtools / maverick-synergy

Next Generation Java SSH API
https://jadaptive.com
GNU Lesser General Public License v3.0
96 stars 26 forks source link

ed25519 keys are broken since version 3.0.8 #43

Closed tprus closed 2 years ago

tprus commented 2 years ago

Hi, i'm using:

com.sshtools maverick-synergy-client 3.0.8

SshKeyPair pair = SshKeyPairGenerator.generateKeyPair(SshKeyPairGenerator.ED25519); SshPrivateKeyFile sshPrivateKeyFile = SshPrivateKeyFileFactory.create(pair, passphrase, SshPrivateKeyFileFactory.OPENSSH_FORMAT); SshPublicKey sshPublicKey = pair.getPublicKey(); SshPublicKeyFile sshPublicKeyFile = SshPublicKeyFileFactory.create(sshPublicKey, comment, SshPrivateKeyFileFactory.OPENSSH_FORMAT);

and generated keys not working with eg. GitHub, but if i change version to 3.0.7 or 3.0.6 it works. Version 3.0.9 is also broken

ludup commented 2 years ago

I would have expected that for 3.0.8, as the change to use JCE interfaces was problematic and fixed in 3.0.9, but after a hard look at the commits and a sanity test, it seems that issue was missed when cherry-picking from our hotfixes branch.

I've just cherry-picked the fix for that and pushed it across to the develop branch. There should be a snapshot building automatically in the next few minutes. It's should be in 3.0.10-SNAPSHOT.