Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Problem with a key for HTTP/3 in Jetty server

Hi,

W dniu 25.07.2022 o 18:00, Ludovic Orban pisze:
Hi,

Something is looking strange. QuicServerConnector.doStart() is supposed to do these things in order:

  * check that your keystore contains at least one alias
  * if SslContextFactory.getCertAlias() is not null, load that key pair
  * otherwise load the key pair of the first known alias

The SSLKeyPair class loads the key in its constructor, then later reads it from its export() method.

In SSLKeyPair, since the export() method throws NPE in your case, that means the call to KeyStore.getKey() in the constructor must have returned null. This could happen if you configured a non-existing alias with SslContextFactory.setCertAlias().
> [...]

Oh, I see the problem. I have key_passwd configuration setting but I didn't use it. After adding:
			sslContextFactory.setCertAlias(www_srv_config.cert_alias);
		sslContextFactory.setKeyManagerPassword(www_srv_config.key_passwd);

it looks that my server listens on both HTTP/2 and HTTP/3.

--
Regards,
Michał Niklas



Back to the top