- java.lang.Object
-
- io.netty5.handler.ssl.OpenSsl
-
public final class OpenSsl extends Object
Tells ifnetty-tcnative
and its OpenSSL support are available.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Set<String>
availableCipherSuites()
Deprecated.static Set<String>
availableJavaCipherSuites()
Returns all the available cipher suites (Java-style).static Set<String>
availableOpenSslCipherSuites()
Returns all the available OpenSSL cipher suites.static void
ensureAvailability()
Ensure thatnetty-tcnative
and its OpenSSL support are available.static boolean
isAlpnSupported()
Deprecated.static boolean
isAvailable()
Returnstrue
if and only ifnetty-tcnative
and its OpenSSL support are available.static boolean
isCipherSuiteAvailable(String cipherSuite)
Returnstrue
if and only if the specified cipher suite is available in OpenSSL.static boolean
isOcspSupported()
Returnstrue
if the used version of OpenSSL supports OCSP stapling.static boolean
supportsHostnameValidation()
Deprecated.Will be removed because hostname validation is always done by aTrustManager
implementation.static boolean
supportsKeyManagerFactory()
Returnstrue
ifKeyManagerFactory
is supported when using OpenSSL.static Throwable
unavailabilityCause()
Returns the cause of unavailability ofnetty-tcnative
and its OpenSSL support.static int
version()
static String
versionString()
Returns the version string of the used available OpenSSL library ornull
ifisAvailable()
returnsfalse
.
-
-
-
Method Detail
-
isAvailable
public static boolean isAvailable()
Returnstrue
if and only ifnetty-tcnative
and its OpenSSL support are available.
-
isAlpnSupported
@Deprecated public static boolean 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
public static String 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
-
unavailabilityCause
public static Throwable unavailabilityCause()
Returns the cause of unavailability ofnetty-tcnative
and its OpenSSL support.- Returns:
- the cause if unavailable.
null
if available.
-
availableCipherSuites
@Deprecated public static Set<String> availableCipherSuites()
Deprecated.
-
availableOpenSslCipherSuites
public static Set<String> 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
public static Set<String> 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
public static boolean isCipherSuiteAvailable(String cipherSuite)
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 public static boolean supportsHostnameValidation()
Deprecated.Will be removed because hostname validation is always done by aTrustManager
implementation.
-
-