Skip to content
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

Added PKCS5 key file support (without requiring BouncyCastle) #262

Merged
merged 9 commits into from
Aug 15, 2016

Conversation

joval
Copy link

@joval joval commented Aug 13, 2016

I'm doing some experimentation with this SSH client, to see if we might leverage it in our project. However, we don't want to add a hard requirement for BouncyCastle just to perform public key authentication.

Therefore, I've implemented a PKCS5KeyFile class that can parse PKCS5 key files. I've also updated the test resource for pkcs8 (as it was actually a pkcs5 file), and updated the test classes as well.

Additional minor modifications I've made permit interoperability with older versions of SLF4J (back to 1.6), and the addition of a few methods to the OpenSSHKnownHosts.HostEntry interface (to make it possible to get the entry type and fingerprint string).

I plan to add a few more features in the coming days.

David Solin added 9 commits August 10, 2016 21:45
Updated StreamCopier class to make it compatible with older SLF4J versions.
Removed BouncyCastle dependency for public key authentication.
Removed 3rd-party JARs from source control
Re-introduced original BouncyCastle-dependent PKCS5KeyFile class
Re-named non-BouncyCastle-dependent PKCS8KeyFile class to PKCS5KeyFile, since it really only supports PKCS5 formats anyway
…urces to properly differentiate between PKCS5 and PKCS8 file formats.
@hierynomus hierynomus merged commit 233f376 into hierynomus:master Aug 15, 2016
@hierynomus
Copy link
Owner

Hi Joval,

Thanks for this contribution. As a suggestion, could you split different things up into multiple PRs?

The older SLF4J support for instance had no real place in this PR, neither did the additions to the HostEntry interface.

Still a great PR though, awaiting your other features!

@joval
Copy link
Author

joval commented Aug 15, 2016

Yeah, sorry, I'll try to group changes more logically in the future. Thanks for accepting the changes!

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.

2 participants