SSLContext. Should I reload it?

2019-08-02 16:28发布

问题:

I am interested in updating a truststore dynamically.
What would be the best option?
Reload SSLContext or is it possible to recreate TrustManagers?

回答1:

You can't 'reload' an SSLContext, but you can certainly create a new one. A custom TrustManager won't help, as it is the underlying TrustManagerFactory that has the connection to the keystore, not the TrustManager.