-
Notifications
You must be signed in to change notification settings - Fork 602
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
Encrypted RSA key in OpenSSHKey format results- error in libcrypto #705
Comments
@arpoch How is this an SSHJ issue? |
The fingerprint generated for the decrypted private key(SSHJ library to decrypt the key) doesn't match with the actual private key(encrypted) fingerprint. So I believe there is an issue while decrypting an encrypted private key in OpenSSH format using SSHJ. |
Forgot to add that the issue is encountered for RSA encrypted openssh formated keys, I have tested with ECDSA and it's working as expected. |
Can you add a test case in a PR? Then we can have a look. |
Sure, will try my best. |
@arpoch and @hierynomus I traced the issue down to RSA Private Key parsing in |
The mentioned PR #726 has been merged. I'm closing this issue. |
I am using sshj library to decrypt an encrypted RSA private key using the code below
The above code works great and results in a decrypted private but to use it for git SSH authentication purpose through command line using
GIT_SSH_COMMAND
environment variable, I am converting the generated PKCS8(from getformat) byte encoded key to PEM and writing it in a temp file using the code belowBut I am getting this error message every time I try to perform any git operation which requires authentication
sign_and_send_pubkey: signing failed: error in libcrypto
only for Encrypted RSA OpenSSH formatted key, I have test over ecdas19 and it works fine.As I am currently working with
OS- Windows 10
OpenSSH- OpenSSH_for_Windows_8.1p1
The text was updated successfully, but these errors were encountered: