Skip to content

Add support for OpenSSH certificates, resolve #31#901

Merged
mwiede merged 7 commits intomwiede:masterfrom
luigidemasi:openssh_certificate_support
Mar 31, 2026
Merged

Add support for OpenSSH certificates, resolve #31#901
mwiede merged 7 commits intomwiede:masterfrom
luigidemasi:openssh_certificate_support

Conversation

@luigidemasi
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@norrisjeremy norrisjeremy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Can you run mvn formatter:format to ensure that everything is formatted correctly?
  2. Does this support SSH certs for host keys? If not, we need to add support for that too, as I'm opposed to only adding support SSH certs for user pubkey auth, w/o also adding support for SSH certs as host keys as well at the same time.

Comment thread src/main/java/com/jcraft/jsch/JSch.java Outdated
Comment thread src/main/java/com/jcraft/jsch/Buffer.java Outdated
Comment thread src/main/java/com/jcraft/jsch/JSch.java Outdated
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificateAwareIdentityFile.java Outdated
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificateUtil.java
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificate.java Outdated
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificateAwareIdentityFile.java Outdated
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificateBuffer.java Outdated
Comment thread src/main/java/com/jcraft/jsch/OpensshCertificateParser.java Outdated
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificateUtil.java Outdated
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificateBuffer.java Outdated
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificateBuffer.java Outdated
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificateBuffer.java Outdated
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificateBuffer.java Outdated
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificateUtil.java Outdated
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificateUtil.java Outdated
@davsclaus
Copy link
Copy Markdown
Contributor

@norrisjeremy is there more feedback to this, as it would be nice to get to the finish line, thanks

@norrisjeremy
Copy link
Copy Markdown
Contributor

@norrisjeremy is there more feedback to this, as it would be nice to get to the finish line, thanks

  1. None of my earlier feedback appears to have actually been incorporated: the PR author simply marked them all as resolved w/o making any of the suggested changes.
  2. To quote part of my earlier review: "Does this support SSH certs for host keys? If not, we need to add support for that too, as I'm opposed to only adding support SSH certs for user pubkey auth, w/o also adding support for SSH certs as host keys as well at the same time."

@luigidemasi
Copy link
Copy Markdown
Contributor Author

@norrisjeremy is there more feedback to this, as it would be nice to get to the finish line, thanks

  1. None of my earlier feedback appears to have actually been incorporated: the PR author simply marked them all as resolved w/o making any of the suggested changes.
  2. To quote part of my earlier review: "Does this support SSH certs for host keys? If not, we need to add support for that too, as I'm opposed to only adding support SSH certs for user pubkey auth, w/o also adding support for SSH certs as host keys as well at the same time."

Hi @norrisjeremy, thanks for following up. I marked the comments as resolved on GitHub because I had already addressed them locally and didn’t want to lose track of your suggestions. I’m currently adding support for host keys as well (it’s nearly finished) and I’ll push everything together in the next update. Please let me know if you have any additional suggestions in the meantime.

@norrisjeremy
Copy link
Copy Markdown
Contributor

Hi @norrisjeremy, thanks for following up. I marked the comments as resolved on GitHub because I had already addressed them locally and didn’t want to lose track of your suggestions. I’m currently adding support for host keys as well (it’s nearly finished) and I’ll push everything together in the next update. Please let me know if you have any additional suggestions in the meantime.

Hi @luigidemasi,

Great, thanks! We are excited to have someone step up and contribute this work!

Thanks,
Jeremy

@luigidemasi
Copy link
Copy Markdown
Contributor Author

@norrisjeremy

  1. Does this support SSH certs for host keys? If not, we need to add support for that too, as I'm opposed to only adding support SSH certs for user pubkey auth, w/o also adding support for SSH certs as host keys as well at the same time.

I added the support for Host Certificate, let me know wdyt.

@davsclaus
Copy link
Copy Markdown
Contributor

Great to see progress on this one. If we are getting close to the finish line it would be good to do the last review and update the reported findings so fingers crossed we can get this merged and released. Thank you.

@norrisjeremy
Copy link
Copy Markdown
Contributor

Great to see progress on this one. If we are getting close to the finish line it would be good to do the last review and update the reported findings so fingers crossed we can get this merged and released. Thank you.

I probably won't have time to start reviewing this again until next week.

@davsclaus
Copy link
Copy Markdown
Contributor

Great to see progress on this one. If we are getting close to the finish line it would be good to do the last review and update the reported findings so fingers crossed we can get this merged and released. Thank you.

I probably won't have time to start reviewing this again until next week.

Thanks for the update, no problem. Just glad we are on path to the goal line.

@davsclaus
Copy link
Copy Markdown
Contributor

Sorry to bother - but would be good to get this reviewed

@norrisjeremy
Copy link
Copy Markdown
Contributor

Sorry to bother - but would be good to get this reviewed

HI @davsclaus,

Yes, I haven't forgotten, I will try to review it when I have some time available.

Thanks,
Jeremy

Copy link
Copy Markdown
Contributor

@norrisjeremy norrisjeremy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few initial comments, I still have a lot left to review.

Comment thread src/main/java/com/jcraft/jsch/Buffer.java Outdated
Comment thread src/main/java/com/jcraft/jsch/Buffer.java Outdated
Comment thread src/main/java/com/jcraft/jsch/KeyExchange.java Outdated
Comment thread src/main/java/com/jcraft/jsch/KeyExchange.java Outdated
Comment thread src/main/java/com/jcraft/jsch/KeyExchange.java Outdated
Comment thread src/main/java/com/jcraft/jsch/KeyExchange.java Outdated
Comment thread src/main/java/com/jcraft/jsch/KeyExchange.java Outdated
Comment thread src/main/java/com/jcraft/jsch/KeyExchange.java Outdated
Comment thread src/main/java/com/jcraft/jsch/Session.java Outdated
Comment thread src/main/java/com/jcraft/jsch/UserAuthPublicKey.java Outdated
Comment thread src/test/java/com/jcraft/jsch/HostCertificateIT.java Outdated
Comment thread src/test/java/com/jcraft/jsch/HostCertificateIT.java Outdated
Comment thread src/main/java/com/jcraft/jsch/Session.java Outdated
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificateHostKeyVerifier.java Outdated
Comment thread src/main/java/com/jcraft/jsch/Session.java Outdated
Comment thread src/main/java/com/jcraft/jsch/Session.java Outdated
Comment thread src/main/java/com/jcraft/jsch/Session.java Outdated
Comment thread src/main/java/com/jcraft/jsch/SignatureWrapper.java Outdated
Comment thread src/main/java/com/jcraft/jsch/SignatureWrapper.java Outdated
Comment thread src/main/java/com/jcraft/jsch/SignatureWrapper.java
Comment thread src/main/java/com/jcraft/jsch/SignatureWrapper.java Outdated
Comment thread src/main/java/com/jcraft/jsch/SignatureWrapper.java Outdated
@luigidemasi luigidemasi force-pushed the openssh_certificate_support branch from e3194d7 to 7db8379 Compare October 18, 2025 12:50
Comment thread src/main/java/com/jcraft/jsch/Session.java Outdated
@luigidemasi luigidemasi force-pushed the openssh_certificate_support branch from e382afb to d5103ba Compare March 10, 2026 11:55
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificateUtil.java Outdated
Comment thread src/main/java/com/jcraft/jsch/Session.java
Comment thread src/main/java/com/jcraft/jsch/Session.java
@luigidemasi luigidemasi force-pushed the openssh_certificate_support branch from d5103ba to 647420f Compare March 10, 2026 17:27
Comment thread src/main/java/com/jcraft/jsch/Session.java Outdated
Comment thread src/main/java/com/jcraft/jsch/Session.java Outdated
@luigidemasi luigidemasi force-pushed the openssh_certificate_support branch from 647420f to 7a8050d Compare March 10, 2026 18:50
@norrisjeremy
Copy link
Copy Markdown
Contributor

Looks like we need to run mvn formatter:format?

@luigidemasi luigidemasi force-pushed the openssh_certificate_support branch from 7a8050d to 36b3e80 Compare March 10, 2026 19:10
Comment thread src/main/java/com/jcraft/jsch/Session.java Outdated
@luigidemasi luigidemasi force-pushed the openssh_certificate_support branch from 36b3e80 to d5fd786 Compare March 11, 2026 15:34
Comment thread src/main/java/com/jcraft/jsch/Session.java Outdated
@luigidemasi luigidemasi force-pushed the openssh_certificate_support branch from d5fd786 to db970b2 Compare March 12, 2026 14:25
Comment thread src/main/java/com/jcraft/jsch/Session.java
Comment thread src/main/java/com/jcraft/jsch/Session.java Outdated
Comment thread src/main/java/com/jcraft/jsch/Session.java
Comment thread src/main/java/com/jcraft/jsch/OpenSshCertificateBuffer.java Outdated
@luigidemasi
Copy link
Copy Markdown
Contributor Author

@norrisjeremy, @mwiede

this PR is open since September 2025. We're almost in April 2026 and every week there's a new comment about changing a log level, removing an empty line, reordering an import, checking what OpenSSH does for this edge case. I've addressed every round within days but there's always something new the week after.

I'm tired of this. The OpenSSH behavior questions are fair, but they could have been raised months ago, not one at a time spread across half a year.

So please review the whole thing, and tell me everything that's left. All of it, at once. I'll fix it. Then we merge. I'm not going to keep going back and forth on cosmetic stuff until September 2026.

@luigidemasi luigidemasi force-pushed the openssh_certificate_support branch from db970b2 to 85a6dc4 Compare March 27, 2026 10:17
@sonarqubecloud
Copy link
Copy Markdown

@mwiede
Copy link
Copy Markdown
Owner

mwiede commented Mar 29, 2026

@luigidemasi I am basically fine with the PR and I am about to merge it. I even let Claude Code review it, and it does't have any critical findings.
@norrisjeremy can you please give your approval

@norrisjeremy
Copy link
Copy Markdown
Contributor

Hi @luigidemasi,

Thank you for dedication and effort towards implementing this feature, and your patience working with us during the review process!

@mwiede, I think we may want to increment the major version to 2.28 since this is a significant feature.

Thanks!
Jeremy

@mwiede mwiede merged commit d8a5d81 into mwiede:master Mar 31, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants