// 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() {
// 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());
for (Constructor<?> c : SslSelectChannelConnector.class.getConstructors()) {
if (c.getParameterTypes().length == 1
&& c.getParameterTypes()[0].isInstance(contextFact)) {
answer = (SslSelectChannelConnector)c.newInstance(contextFact);
}