Jim
Jim

Reputation: 19582

SSLContext. Should I reload it?

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

Upvotes: 1

Views: 1926

Answers (2)

Hakan54
Hakan54

Reputation: 3879

It is possible to reload the TrustManager within the SSLContext while using the existing SSLContext. See here for the answer which I posted for a similar question: https://stackoverflow.com/a/69507126/6777695 It contains the full snippet of code samples.

Upvotes: 0

user207421
user207421

Reputation: 310985

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.

Upvotes: 1

Related Questions