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

Add support to accept pkcs12 format keys #889

Open
sumitsum opened this issue Aug 18, 2023 · 3 comments
Open

Add support to accept pkcs12 format keys #889

sumitsum opened this issue Aug 18, 2023 · 3 comments

Comments

@sumitsum
Copy link

No description provided.

@exceptionfactory
Copy link
Contributor

@sumitsum Could you provide some additional details around intended use cases for PKCS12? The format support multiple entries, including both standalone certificates and private keys with certificates. A PKCS12 reader could attempt to load multiple private keys, which could be helpful in some scenarios. It is also possible for the PKCS12 file to have a store password that is different from individual key entry passwords, although this is less common.

@hierynomus Any thoughts on supporting PKCS12 as a potential source for private key material? This could be useful as a convenience feature, although tools such as OpenSSL support extracting private keys to PEM PKCS8 from PKCS12, making them readable in SSHJ.

@hierynomus
Copy link
Owner

Is there direct support for PKCS12 keys in other tools like OpenSSH? Then it would make more sense to add it so that you can use your keys irrespective of the tool that you're using to connect.

Indeed it feels more like a convenience method, and the first time this has been asked. Not sure how much work would be involved in building it.

@exceptionfactory
Copy link
Contributor

That's a good question about OpenSSH and other services. Certificate-based authentication with OpenSSH does not use the standard X.509 structure for certificates, so even that scenario does not seem like a good fit for supporting PKCS12.

Most articles mentioning PKCS12 and SSH describe the steps necessary for converting between formats. Although it is an extra step, it keeps the supported capabilities in SSHJ more focused on traditional PEM files.

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

No branches or pull requests

3 participants