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

Support store type probing to help auto-detecting the store type #25

Open
jowerner opened this issue May 8, 2024 · 1 comment
Open

Comments

@jowerner
Copy link

jowerner commented May 8, 2024

The KeyStore class provides a getInstance(...) variant that tries to detect the store type and loads the store with a matching provider:

KeyStore.getInstance(storeFile, storePassword); 

This way, we could use stores of different types interchangeably without having to configure the store type.

This doesn't currently work for PEM key stores. What do you think about adding this feature? Looks like you would have to override KeyStoreSpi.engineProbe(InputStream) to support this. Thanks!

@ctron
Copy link
Owner

ctron commented May 8, 2024

Kind of like a "meta" provider? That sounds like a great idea. PRs welcome 😁

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

2 participants