Open criege opened 8 years ago
Thanks for the feedback. :)
Just to clarify: Your code falls back to the default system key manager specifically when the passphrase is missing?
Sure, a pull request would be great. Perhaps I could later add an overload for buildMergedWithSystem()
that takes a passphrase.
I haven't tested this extensively yet but in a nutshell, lets assume there is a
KeyStore
holding two entries, one of typePrivateKeyEntry
and the other oftrustedCertEntry
. Additionally the store is protected by a password.Retrieving the KeyStore by calling one of the methods on
KeyStoreLoader
that takes a password everything works as expected.However once trying to call
SslContextUtils.buildMergedWithSystem(KeyStore)
the method fails due to a missing password – namely the password of thePrivateKeyEntry
(which happens to be different from the store password). Here's the stack:I've fixed this locally by not using
CompositeX509KeyManager
but just the default system key manager. But I'm not sure if this is to your intention :). If you want I'll make a PR …