pem-keystore icon indicating copy to clipboard operation
pem-keystore copied to clipboard

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

Open jowerner opened this issue 1 year ago • 1 comments
trafficstars

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!

jowerner avatar May 08 '24 12:05 jowerner

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

ctron avatar May 08 '24 12:05 ctron