- java.lang.Object
-
- io.netty5.handler.ssl.OpenSsl
-
public final class OpenSsl extends Object
Tells ifnetty-tcnativeand 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 voidensureAvailability()Ensure thatnetty-tcnativeand its OpenSSL support are available.static booleanisAlpnSupported()Deprecated.static booleanisAvailable()Returnstrueif and only ifnetty-tcnativeand its OpenSSL support are available.static booleanisCipherSuiteAvailable(String cipherSuite)Returnstrueif and only if the specified cipher suite is available in OpenSSL.static booleanisOcspSupported()Returnstrueif the used version of OpenSSL supports OCSP stapling.static booleansupportsHostnameValidation()Deprecated.Will be removed because hostname validation is always done by aTrustManagerimplementation.static booleansupportsKeyManagerFactory()ReturnstrueifKeyManagerFactoryis supported when using OpenSSL.static ThrowableunavailabilityCause()Returns the cause of unavailability ofnetty-tcnativeand its OpenSSL support.static intversion()static StringversionString()Returns the version string of the used available OpenSSL library ornullifisAvailable()returnsfalse.
-
-
-
Method Detail
-
isAvailable
public static boolean isAvailable()
Returnstrueif and only ifnetty-tcnativeand its OpenSSL support are available.
-
isAlpnSupported
@Deprecated public static boolean isAlpnSupported()
Deprecated.Returnstrueif the used version of openssl supports ALPN.
-
isOcspSupported
public static boolean isOcspSupported()
Returnstrueif 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 ornullifisAvailable()returnsfalse.
-
ensureAvailability
public static void ensureAvailability()
Ensure thatnetty-tcnativeand its OpenSSL support are available.- Throws:
UnsatisfiedLinkError- if unavailable
-
unavailabilityCause
public static Throwable unavailabilityCause()
Returns the cause of unavailability ofnetty-tcnativeand its OpenSSL support.- Returns:
- the cause if unavailable.
nullif 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)
Returnstrueif 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()
ReturnstrueifKeyManagerFactoryis supported when using OpenSSL.
-
supportsHostnameValidation
@Deprecated public static boolean supportsHostnameValidation()
Deprecated.Will be removed because hostname validation is always done by aTrustManagerimplementation.
-
-