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!
The
KeyStore
class provides agetInstance(...)
variant that tries to detect the store type and loads the store with a matching provider: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!