Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Updating SSL keystore

On 06/02/2017 00:59, Simone Bordet wrote:
Yes it is possible since we fixed
https://github.com/eclipse/jetty.project/issues/918.

I'm having a play with this, but I still don't understand what the parameter to reload is for. I see in the example you use it to change the keystore path:

sslContextFactory.reload(sslContextFactory -> {
  if (sslContextFactory.getKeyStorePath().endsWith(KEYSTORE_1))
    sslContextFactory.setKeyStorePath(KEYSTORE_2);
  else
    sslContextFactory.setKeyStorePath(KEYSTORE_1);
});

but what does this give that this doesn't?

if (sslContextFactory.getKeyStorePath().endsWith(KEYSTORE_1))
  sslContextFactory.setKeyStorePath(KEYSTORE_2);
else
  sslContextFactory.setKeyStorePath(KEYSTORE_1);
sslContextFactory.reload(sslContextFactory -> { });

I'm still getting used to Java 8, so forgive me if this is a stupid question...
--
John English


Back to the top