Package com.helger.http.tls
Class TLSConfigurationMode
java.lang.Object
com.helger.http.tls.TLSConfigurationMode
- All Implemented Interfaces:
ITLSConfigurationMode
Standalone implementation of
ITLSConfigurationMode.- Since:
- 9.0.5
- Author:
- Philip Helger
-
Constructor Summary
ConstructorsConstructorDescriptionTLSConfigurationMode(@NonNull @Nonempty ETLSVersion[] aTLSVersions, @NonNull String[] aCipherSuites) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean@NonNull com.helger.collection.commons.ICommonsList<String> @Nullable String[]@NonNull com.helger.collection.commons.ICommonsList<String> @Nullable String[]@NonNull com.helger.collection.commons.ICommonsList<ETLSVersion> inthashCode()static booleanisSupportedCipherSuiteInSSLContext(@NonNull ETLSVersion[] aTLSVersions, @NonNull @Nonempty String sCipherSuite) Check if the provided cipher suite is supported in the SSL context for any of the provided TLS versions.toString()
-
Constructor Details
-
TLSConfigurationMode
public TLSConfigurationMode(@Nonempty @NonNull @Nonempty ETLSVersion[] aTLSVersions, @NonNull String[] aCipherSuites) Constructor. The constructor uses only the cipher suites that are supported by the underlying operating system and TLS version.getAllCipherSuites()returns the filtered list.- Parameters:
aTLSVersions- The supported TLS versions. Order is important and maintained. MAy neither benullnor empty.aCipherSuites- The cipher suites to be used. May not benulland may not containnullvalues.
-
-
Method Details
-
isSupportedCipherSuiteInSSLContext
public static boolean isSupportedCipherSuiteInSSLContext(@NonNull ETLSVersion[] aTLSVersions, @Nonempty @NonNull @Nonempty String sCipherSuite) Check if the provided cipher suite is supported in the SSL context for any of the provided TLS versions.- Parameters:
aTLSVersions- The TLS versions to check against. May not benull.sCipherSuite- The cipher suite name to check. May neither benullnor empty.- Returns:
trueif the cipher suite is supported in at least one of the provided TLS versions,falseotherwise.
-
getAllTLSVersions
@ReturnsMutableCopy public @NonNull com.helger.collection.commons.ICommonsList<ETLSVersion> getAllTLSVersions()- Specified by:
getAllTLSVersionsin interfaceITLSConfigurationMode- Returns:
- A list of supported TLS versions in the correct order. May not be
null.
-
getAllTLSVersionIDs
@ReturnsMutableCopy public @NonNull com.helger.collection.commons.ICommonsList<String> getAllTLSVersionIDs()- Specified by:
getAllTLSVersionIDsin interfaceITLSConfigurationMode- Returns:
- A list of the IDs of the supported TLS versions in the correct
order. May not be
null.
-
getAllTLSVersionIDsAsArray
- Specified by:
getAllTLSVersionIDsAsArrayin interfaceITLSConfigurationMode- Returns:
- A list of the IDs of the supported TLS versions in the correct
order. May be
nullif no TLS versions are defined.
-
getAllCipherSuites
@ReturnsMutableCopy public @NonNull com.helger.collection.commons.ICommonsList<String> getAllCipherSuites()- Specified by:
getAllCipherSuitesin interfaceITLSConfigurationMode- Returns:
- All cipher suites in the correct order. May not be
null.
-
getAllCipherSuitesAsArray
- Specified by:
getAllCipherSuitesAsArrayin interfaceITLSConfigurationMode- Returns:
- All cipher suites in the correct order. May be
nullif no cipher suite is defined.
-
equals
-
hashCode
public int hashCode() -
toString
-