You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Java version/vendor(use: java -version)
openjdk version "1.8.0_422"
build 1.8.0_422-BiSheng_JDK8_Enterprise_202.1.0.420.B002-b05)
OS type/version
eulerosv2r12.x86_64
Description
When the client sends an HTTPS request, the extension of the client hello in the tsl handshake information does not contain server_name.
We try to write server_name in two ways, but it does not take effect.
Example 1
SSLContext context = createSSLContext(option, custom);
SslContextFactory.Client factory = new SslContextFactory.Client(false) { @OverRide
public void customize(SSLEngine sslEngine) {
super.customize(sslEngine);
SniProvider sniProvider = getSNIProvider();
if (sniProvider != null) {
List sniServerNames = new ArrayList<>();
sslEngine.getPeerHost();
sniServerNames.add(new SNIHostName("xxx.xxx.xxx.com")); //Here need to update the server fqdn ?
sniProvider.apply(sslEngine, sniServerNames);
}
}
};
factory.setSslContext(context);
factory.setIncludeProtocols(option.getProtocols().split(","));
factory.setIncludeCipherSuites(option.getCiphers().split(","));
factory.setRenegotiationAllowed(option.isAllowRenegociate());
factory.setEndpointIdentificationAlgorithm(null);
Example 2
SSLContext context = createSSLContext(option, custom);
SslContextFactory.Client factory = new SslContextFactory.Client(false);
List sniServerNames = new ArrayList<>();
SslContextFactory.Client.SniProvider sni = factory.getSNIProvider();
SSLEngine sslEngine = context.createSSLEngine();
sniServerNames.add(new SNIHostName("xxx.xxx.xxx.com"));
sni.apply(sslEngine, sniServerNames);
factory.setSNIProvider(sni)
factory.setSslContext(context);
factory.setIncludeProtocols(option.getProtocols().split(","));
factory.setIncludeCipherSuites(option.getCiphers().split(","));
factory.setRenegotiationAllowed(option.isAllowRenegociate());
factory.setEndpointIdentificationAlgorithm(null);
When we debug, we find that after factory.setSslContext(context), SniProvider is still No fields to display.
How to reproduce?
The text was updated successfully, but these errors were encountered:
Upgrade to a supported version of Jetty and try again (at this point in time that would be Jetty 12).
If it continues as a problem for you, then open a new issue.
Commercial support options exist for all Jetty versions, see above links for more details.
Upgrade to a supported version of Jetty and try again (at this point in time that would be Jetty 12). If it continues as a problem for you, then open a new issue.
Commercial support options exist for all Jetty versions, see above links for more details.
Jetty version(s)
jetty-client-9.4.56.
jetty-http-9.4.56.
Jetty Environment
Java version/vendor
(use: java -version)
openjdk version "1.8.0_422"
build 1.8.0_422-BiSheng_JDK8_Enterprise_202.1.0.420.B002-b05)
OS type/version
eulerosv2r12.x86_64
Description
When the client sends an HTTPS request, the extension of the client hello in the tsl handshake information does not contain server_name.
We try to write server_name in two ways, but it does not take effect.
Example 1
SSLContext context = createSSLContext(option, custom);
SslContextFactory.Client factory = new SslContextFactory.Client(false) {
@OverRide
public void customize(SSLEngine sslEngine) {
super.customize(sslEngine);
SniProvider sniProvider = getSNIProvider();
if (sniProvider != null) {
List sniServerNames = new ArrayList<>();
sslEngine.getPeerHost();
sniServerNames.add(new SNIHostName("xxx.xxx.xxx.com")); //Here need to update the server fqdn ?
sniProvider.apply(sslEngine, sniServerNames);
}
}
};
factory.setSslContext(context);
factory.setIncludeProtocols(option.getProtocols().split(","));
factory.setIncludeCipherSuites(option.getCiphers().split(","));
factory.setRenegotiationAllowed(option.isAllowRenegociate());
factory.setEndpointIdentificationAlgorithm(null);
Example 2
SSLContext context = createSSLContext(option, custom);
SslContextFactory.Client factory = new SslContextFactory.Client(false);
List sniServerNames = new ArrayList<>();
SslContextFactory.Client.SniProvider sni = factory.getSNIProvider();
SSLEngine sslEngine = context.createSSLEngine();
sniServerNames.add(new SNIHostName("xxx.xxx.xxx.com"));
sni.apply(sslEngine, sniServerNames);
factory.setSNIProvider(sni)
factory.setSslContext(context);
factory.setIncludeProtocols(option.getProtocols().split(","));
factory.setIncludeCipherSuites(option.getCiphers().split(","));
factory.setRenegotiationAllowed(option.isAllowRenegociate());
factory.setEndpointIdentificationAlgorithm(null);
When we debug, we find that after factory.setSslContext(context), SniProvider is still No fields to display.
How to reproduce?
The text was updated successfully, but these errors were encountered: