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 Stringprivate static final booleanprivate static final boolean(package private) static final booleanprivate static final InternalLogger(package private) static final String[]private static final booleanprivate static final booleanprivate static final booleanprivate static final Throwableprivate 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 StringcheckTls13Ciphers(InternalLogger logger, String ciphers) (package private) static String[]defaultProtocols(boolean isClient) defaultProtocols(String property) private static booleanprivate static booleandoesSupportProtocol(int protocol, int opt) static voidEnsure thatnetty-tcnativeand its OpenSSL support are available.private static booleaninitializeTcNative(String engine) static booleanDeprecated.static booleanReturnstrueif and only ifnetty-tcnativeand its OpenSSL support are available.(package private) static booleanisAWSLC()(package private) static booleanstatic booleanisCipherSuiteAvailable(String cipherSuite) Returnstrueif and only if the specified cipher suite is available in OpenSSL.static booleanReturnstrueif the used version of OpenSSL supports OCSP stapling.(package private) static booleanisOptionSupported(SslContextOption<?> option) (package private) static boolean(package private) static booleanprivate static void(package private) static longmemoryAddress(ByteBuf buf) (package private) static voidreleaseIfNeeded(ReferenceCounted counted) (package private) static X509CertificateReturns a self-signedX509Certificatefornetty.io.static booleanDeprecated.Will be removed because hostname validation is always done by aTrustManagerimplementation.static booleanReturnstrueifKeyManagerFactoryis supported when using OpenSSL.static ThrowableReturns the cause of unavailability ofnetty-tcnativeand its OpenSSL support.(package private) static booleanstatic intversion()static StringReturns the version string of the used available OpenSSL library ornullifisAvailable()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 -
IS_AWSLC
private static final boolean IS_AWSLC -
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-signedX509Certificatefornetty.io.- Throws:
CertificateException
-
doesSupportOcsp
private static boolean doesSupportOcsp() -
doesSupportProtocol
private static boolean doesSupportProtocol(int protocol, int opt) -
isAvailable
public static boolean isAvailable()Returnstrueif and only ifnetty-tcnativeand its OpenSSL support are available. -
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
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
-
availableCipherSuites
Deprecated. -
availableOpenSslCipherSuites
-
availableJavaCipherSuites
-
isCipherSuiteAvailable
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.Will be removed because hostname validation is always done by aTrustManagerimplementation. -
useKeyManagerFactory
static boolean useKeyManagerFactory() -
memoryAddress
-
loadTcNative
-
initializeTcNative
-
releaseIfNeeded
-
isTlsv13Supported
static boolean isTlsv13Supported() -
isOptionSupported
-
defaultProtocols
-
defaultProtocols
-
isBoringSSL
static boolean isBoringSSL() -
isAWSLC
static boolean isAWSLC()
-
availableOpenSslCipherSuites()