diff --git a/examples/embedded/src/main/java/org/eclipse/jetty/embedded/ManyConnectors.java b/examples/embedded/src/main/java/org/eclipse/jetty/embedded/ManyConnectors.java index 971d929d2fa..79f9675758e 100644 --- a/examples/embedded/src/main/java/org/eclipse/jetty/embedded/ManyConnectors.java +++ b/examples/embedded/src/main/java/org/eclipse/jetty/embedded/ManyConnectors.java @@ -20,9 +20,9 @@ package org.eclipse.jetty.embedded; import java.io.File; import java.io.FileNotFoundException; -import java.security.Provider; import java.security.Security; +import org.conscrypt.OpenSSLProvider; import org.eclipse.jetty.http.HttpVersion; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.HttpConfiguration; @@ -97,7 +97,7 @@ public class ManyConnectors // OPTIONAL: Un-comment the following to use Conscrypt for SSL instead of // the native JSSE implementation. - //Security.addProvider((Provider)ClassLoader.getSystemClassLoader().loadClass("org.conscrypt.OpenSSLProvider").newInstance()); + //Security.addProvider(new OpenSSLProvider()); //sslContextFactory.setProvider("Conscrypt"); // HTTPS Configuration diff --git a/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc b/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc index 6376e8beeed..3071e2487a8 100644 --- a/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc +++ b/jetty-documentation/src/main/asciidoc/configuring/connectors/configuring-ssl.adoc @@ -724,7 +724,7 @@ Implementing Conscrypt is very straightforward process - simply instantiate an i [source, java, subs="{sub-order}"] ---- ... -Security.addProvider((Provider)ClassLoader.getSystemClassLoader().loadClass("org.conscrypt.OpenSSLProvider").newInstance()); +Security.addProvider(new OpenSSLProvider()); ... SslContextFactory sslContextFactory = new SslContextFactory(); sslContextFactory.setKeyStorePath("path/to/keystore");