Class OpenSSLCipherConfigurationParser
java.lang.Object
org.apache.tomcat.util.net.openssl.ciphers.OpenSSLCipherConfigurationParser
Class in charge with parsing openSSL expressions to define a list of ciphers.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an OpenSSLCipherConfigurationParser. -
Method Summary
Modifier and TypeMethodDescriptionconvertForJSSE(Collection<Cipher> ciphers) Converts a collection of OpenSSL ciphers to their JSSE names.static booleanisTls13Cipher(String cipherSuiteName) Determines if the provided name is the name of a TLS 1.3 cipher suite.static StringjsseToOpenSSL(String jsseCipherName) Converts a JSSE cipher name to an OpenSSL cipher name.static voidMain entry point for the cipher configuration parser tool.static StringopenSSLToJsse(String opensslCipherName) Converts an OpenSSL cipher name to a JSSE cipher name.static LinkedHashSet<Cipher> Parses an OpenSSL cipher expression into a set of ciphers.parseExpression(String expression) Parse the specified expression according to the OpenSSL syntax and returns a list of standard JSSE cipher names.static voidusage()Prints usage information for the command-line tool.
-
Constructor Details
-
OpenSSLCipherConfigurationParser
public OpenSSLCipherConfigurationParser()Constructs an OpenSSLCipherConfigurationParser.
-
-
Method Details
-
parse
Parses an OpenSSL cipher expression into a set of ciphers.- Parameters:
expression- The cipher expression to parse- Returns:
- The set of matching ciphers
-
convertForJSSE
Converts a collection of OpenSSL ciphers to their JSSE names.- Parameters:
ciphers- The OpenSSL ciphers to convert- Returns:
- The list of JSSE cipher names
-
isTls13Cipher
Determines if the provided name is the name of a TLS 1.3 cipher suite.- Parameters:
cipherSuiteName- The name to test- Returns:
trueif the provided String is recognised as the name of a TLS 1.3 cipherSuite.
-
parseExpression
-
jsseToOpenSSL
-
openSSLToJsse
Converts an OpenSSL cipher name to a JSSE cipher name.- Parameters:
opensslCipherName- The OpenSSL name for a cipher- Returns:
- The JSSE name for the specified OpenSSL cipher. If none is known, the IANA standard name will be returned instead
-
usage
public static void usage()Prints usage information for the command-line tool. -
main
-