SslProvider Type — netty Architecture
Architecture documentation for the SslProvider type/interface in SslProvider.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 10910ffb_b24a_e81d_8998_cf25440af93b["SslProvider"] 8fa90d63_7da7_e209_c8fc_9d3cda4b0a0d["SslProvider.java"] 10910ffb_b24a_e81d_8998_cf25440af93b -->|defined in| 8fa90d63_7da7_e209_c8fc_9d3cda4b0a0d style 10910ffb_b24a_e81d_8998_cf25440af93b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/SslProvider.java lines 27–115
public enum SslProvider {
/**
* JDK's default implementation.
*/
JDK,
/**
* OpenSSL-based implementation.
*/
OPENSSL,
/**
* OpenSSL-based implementation which does not have finalizers and instead implements {@link ReferenceCounted}.
*/
@UnstableApi
OPENSSL_REFCNT;
/**
* Returns {@code true} if the specified {@link SslProvider} supports
* <a href="https://tools.ietf.org/html/rfc7301#section-6">TLS ALPN Extension</a>, {@code false} otherwise.
*/
@SuppressWarnings("deprecation")
public static boolean isAlpnSupported(final SslProvider provider) {
switch (provider) {
case JDK:
return JdkAlpnApplicationProtocolNegotiator.isAlpnSupported();
case OPENSSL:
case OPENSSL_REFCNT:
return OpenSsl.isAlpnSupported();
default:
throw new Error("Unexpected SslProvider: " + provider);
}
}
/**
* Returns {@code true} if the specified {@link SslProvider} supports
* <a href="https://tools.ietf.org/html/rfc8446">TLS 1.3</a>, {@code false} otherwise.
*/
public static boolean isTlsv13Supported(final SslProvider sslProvider) {
return isTlsv13Supported(sslProvider, null);
}
/**
* Returns {@code true} if the specified {@link SslProvider} supports
* <a href="https://tools.ietf.org/html/rfc8446">TLS 1.3</a>, {@code false} otherwise.
*/
public static boolean isTlsv13Supported(final SslProvider sslProvider, Provider provider) {
switch (sslProvider) {
case JDK:
return SslUtils.isTLSv13SupportedByJDK(provider);
case OPENSSL:
case OPENSSL_REFCNT:
return OpenSsl.isTlsv13Supported();
default:
throw new Error("Unexpected SslProvider: " + sslProvider);
}
}
/**
* Returns {@code true} if the specified {@link SslProvider} supports the specified {@link SslContextOption},
* {@code false} otherwise.
*/
public static boolean isOptionSupported(SslProvider sslProvider, SslContextOption<?> option) {
switch (sslProvider) {
case JDK:
// We currently don't support any SslContextOptions when using the JDK implementation
return false;
case OPENSSL:
case OPENSSL_REFCNT:
return OpenSsl.isOptionSupported(option);
default:
throw new Error("Unexpected SslProvider: " + sslProvider);
}
}
/**
* Returns {@code true} if the specified {@link SslProvider} enables
* <a href="https://tools.ietf.org/html/rfc8446">TLS 1.3</a> by default, {@code false} otherwise.
*/
static boolean isTlsv13EnabledByDefault(final SslProvider sslProvider, Provider provider) {
switch (sslProvider) {
case JDK:
return SslUtils.isTLSv13EnabledByJDK(provider);
Source
Frequently Asked Questions
What is the SslProvider type?
SslProvider is a type/interface in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/SslProvider.java.
Where is SslProvider defined?
SslProvider is defined in handler/src/main/java/io/netty/handler/ssl/SslProvider.java at line 27.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free