// the value is already set. We therefore do not need to look at the component
// level SSLContextParameters again in this method.
SSLContextParameters endpointSslContextParameters = endpoint.getSslContextParameters();
if (endpointSslContextParameters != null) {
SslContextFactory contextFact = new SslContextFactory() {
/**
* We are going to provide the context so none of the configuration options
* matter in the factory. This method does not account for this scenario so
* we short-circuit it here to just let things go when the context is already
* provided.
*/
// This method is for Jetty 7.0.x ~ 7.4.x
@SuppressWarnings("unused")
public boolean checkConfig() {
if (getSslContext() == null) {
return checkSSLContextFactoryConfig(this);
} else {
return true;
}
}
// This method is for Jetty 7.5.x
public void checkKeyStore() {
// here we don't check the SslContext as it is already created
}
};
contextFact.setSslContext(endpointSslContextParameters.createSSLContext());
answer = new SslSelectChannelConnector(contextFact);
} else {
answer = new SslSelectChannelConnector();
// with default null values, jetty ssl system properties
// and console will be read by jetty implementation