Package io.netty.handler.ssl
Class OpenSsl
- java.lang.Object
-
- io.netty.handler.ssl.OpenSsl
-
public final class OpenSsl extends java.lang.ObjectTells ifnetty-tcnativeand its OpenSSL support are available.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.util.Set<java.lang.String>availableCipherSuites()Deprecated.static java.util.Set<java.lang.String>availableJavaCipherSuites()Returns all the available cipher suites (Java-style).static java.util.Set<java.lang.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(java.lang.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 booleanisRenegotiationSupported()Returnstrueif the used version of OpenSSL supports renegotiation.static booleansupportsHostnameValidation()Deprecated.Will be removed because hostname validation is always done by aTrustManagerimplementation.static booleansupportsKeyManagerFactory()ReturnstrueifKeyManagerFactoryis supported when using OpenSSL.static java.lang.ThrowableunavailabilityCause()Returns the cause of unavailability ofnetty-tcnativeand its OpenSSL support.static intversion()static java.lang.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.
-
isRenegotiationSupported
public static boolean isRenegotiationSupported()
Returnstrueif the used version of OpenSSL supports renegotiation.Some implementations, such as BoringSSL and AWS-LC, intentionally do not support renegotiation.
- Returns:
trueif renegotiation is supported, otherwisefalse.
-
version
public static int version()
-
versionString
public static java.lang.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:
java.lang.UnsatisfiedLinkError- if unavailable
-
unavailabilityCause
public static java.lang.Throwable unavailabilityCause()
Returns the cause of unavailability ofnetty-tcnativeand its OpenSSL support.- Returns:
- the cause if unavailable.
nullif available.
-
availableCipherSuites
@Deprecated public static java.util.Set<java.lang.String> availableCipherSuites()
Deprecated.
-
availableOpenSslCipherSuites
public static java.util.Set<java.lang.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 java.util.Set<java.lang.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(java.lang.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.
-
-