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 intprivate static final intprivate static final intprivate static final intprivate static final booleanprivate static final booleanprivate static final intprivate static final intprivate static final intprivate static final intprivate 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 intgetProtocolBit(String protocol) 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 booleanisProtocolSupported(String protocol) static booleanReturnstrueif the used version of OpenSSL supports renegotiation.(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
-
SSL_V2_HELLO
private static final int SSL_V2_HELLO- See Also:
-
SSL_V2
private static final int SSL_V2- See Also:
-
SSL_V3
private static final int SSL_V3- See Also:
-
TLS_V1
private static final int TLS_V1- See Also:
-
TLS_V1_1
private static final int TLS_V1_1- See Also:
-
TLS_V1_2
private static final int TLS_V1_2- See Also:
-
TLS_V1_3
private static final int TLS_V1_3- See Also:
-
supportedProtocolsPacked
private static final int supportedProtocolsPacked -
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. -
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
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
-
isProtocolSupported
-
getProtocolBit
-
unpackSupportedProtocols
-
isBoringSSL
static boolean isBoringSSL() -
isAWSLC
static boolean isAWSLC()
-
availableOpenSslCipherSuites()