Package io.netty.handler.ssl
Class OpenSsl
java.lang.Object
io.netty.handler.ssl.OpenSsl
Tells if
netty-tcnative
and its OpenSSL support
are available.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String[]
(package private) static final String[]
(package private) static final String
private static final boolean
(package private) static final boolean
private static final InternalLogger
(package private) static final String[]
private static final boolean
private static final boolean
private static final boolean
private static final Throwable
private static final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns all the available cipher suites (Java-style).Returns all the available OpenSSL cipher suites.(package private) static String
checkTls13Ciphers
(InternalLogger logger, String ciphers) (package private) static String[]
defaultProtocols
(boolean isClient) defaultProtocols
(String property) private static boolean
private static boolean
doesSupportProtocol
(int protocol, int opt) static void
Ensure thatnetty-tcnative
and its OpenSSL support are available.private static boolean
initializeTcNative
(String engine) static boolean
Deprecated.static boolean
Returnstrue
if and only ifnetty-tcnative
and its OpenSSL support are available.(package private) static boolean
static boolean
isCipherSuiteAvailable
(String cipherSuite) Returnstrue
if and only if the specified cipher suite is available in OpenSSL.static boolean
Returnstrue
if the used version of OpenSSL supports OCSP stapling.(package private) static boolean
isOptionSupported
(SslContextOption<?> option) (package private) static boolean
(package private) static boolean
private static void
(package private) static long
memoryAddress
(ByteBuf buf) (package private) static void
releaseIfNeeded
(ReferenceCounted counted) (package private) static X509Certificate
Returns a self-signedX509Certificate
fornetty.io
.static boolean
Deprecated.Will be removed because hostname validation is always done by aTrustManager
implementation.static boolean
Returnstrue
ifKeyManagerFactory
is supported when using OpenSSL.static Throwable
Returns the cause of unavailability ofnetty-tcnative
and its OpenSSL support.(package private) static boolean
static int
version()
static String
Returns the version string of the used available OpenSSL library ornull
ifisAvailable()
returnsfalse
.
-
Field Details
-
logger
-
UNAVAILABILITY_CAUSE
-
DEFAULT_CIPHERS
-
AVAILABLE_CIPHER_SUITES
-
AVAILABLE_OPENSSL_CIPHER_SUITES
-
AVAILABLE_JAVA_CIPHER_SUITES
-
SUPPORTS_KEYMANAGER_FACTORY
private static final boolean SUPPORTS_KEYMANAGER_FACTORY -
USE_KEYMANAGER_FACTORY
private static final boolean USE_KEYMANAGER_FACTORY -
SUPPORTS_OCSP
private static final boolean SUPPORTS_OCSP -
TLSV13_SUPPORTED
private static final boolean TLSV13_SUPPORTED -
IS_BORINGSSL
private static final boolean IS_BORINGSSL -
CLIENT_DEFAULT_PROTOCOLS
-
SERVER_DEFAULT_PROTOCOLS
-
SUPPORTED_PROTOCOLS_SET
-
EXTRA_SUPPORTED_TLS_1_3_CIPHERS
-
EXTRA_SUPPORTED_TLS_1_3_CIPHERS_STRING
-
NAMED_GROUPS
-
JAVAX_CERTIFICATE_CREATION_SUPPORTED
static final boolean JAVAX_CERTIFICATE_CREATION_SUPPORTED -
DEFAULT_NAMED_GROUPS
-
-
Constructor Details
-
OpenSsl
private OpenSsl()
-
-
Method Details
-
checkTls13Ciphers
-
isSessionCacheSupported
static boolean isSessionCacheSupported() -
selfSignedCertificate
Returns a self-signedX509Certificate
fornetty.io
.- Throws:
CertificateException
-
doesSupportOcsp
private static boolean doesSupportOcsp() -
doesSupportProtocol
private static boolean doesSupportProtocol(int protocol, int opt) -
isAvailable
public static boolean isAvailable()Returnstrue
if and only ifnetty-tcnative
and its OpenSSL support are available. -
isAlpnSupported
Deprecated.Returnstrue
if the used version of openssl supports ALPN. -
isOcspSupported
public static boolean isOcspSupported()Returnstrue
if the used version of OpenSSL supports OCSP stapling. -
version
public static int version() -
versionString
Returns the version string of the used available OpenSSL library ornull
ifisAvailable()
returnsfalse
. -
ensureAvailability
public static void ensureAvailability()Ensure thatnetty-tcnative
and its OpenSSL support are available.- Throws:
UnsatisfiedLinkError
- if unavailable
-
availableCipherSuites
Deprecated. -
availableOpenSslCipherSuites
Returns all the available OpenSSL cipher suites. Please note that the returned array may include the cipher suites that are insecure or non-functional. -
availableJavaCipherSuites
Returns all the available cipher suites (Java-style). Please note that the returned array may include the cipher suites that are insecure or non-functional. -
isCipherSuiteAvailable
Returnstrue
if and only if the specified cipher suite is available in OpenSSL. Both Java-style cipher suite and OpenSSL-style cipher suite are accepted. -
supportsKeyManagerFactory
public static boolean supportsKeyManagerFactory()Returnstrue
ifKeyManagerFactory
is supported when using OpenSSL. -
supportsHostnameValidation
Deprecated.Will be removed because hostname validation is always done by aTrustManager
implementation. -
useKeyManagerFactory
static boolean useKeyManagerFactory() -
memoryAddress
-
loadTcNative
- Throws:
Exception
-
initializeTcNative
- Throws:
Exception
-
releaseIfNeeded
-
isTlsv13Supported
static boolean isTlsv13Supported() -
isOptionSupported
-
defaultProtocols
-
defaultProtocols
-
isBoringSSL
static boolean isBoringSSL()
-
availableOpenSslCipherSuites()