Class TlsCiphers

java.lang.Object
org.apache.hc.core5.http.ssl.TlsCiphers

public final class TlsCiphers extends Object
TLS cipher suite support methods
Since:
5.0
  • Field Details

    • H2_BLACKLISTED

      private static final Set<String> H2_BLACKLISTED
    • WEAK_KEY_EXCHANGES

      private static final String WEAK_KEY_EXCHANGES
      See Also:
    • WEAK_CIPHERS

      private static final String WEAK_CIPHERS
      See Also:
    • RC100015_DEPRECATED_CIPHERS

      private static final String RC100015_DEPRECATED_CIPHERS
      RFC 10015 Deprecating Obsolete Key Exchange Methods in TLS 1.2 and DTLS 1.2.
      See Also:
    • WEAK_CIPHER_SUITE_PATTERNS

      private static final List<Pattern> WEAK_CIPHER_SUITE_PATTERNS
  • Constructor Details

    • TlsCiphers

      public TlsCiphers()
  • Method Details

    • isH2Blacklisted

      public static boolean isH2Blacklisted(String cipherSuite)
      Tests whether RFC9113 Appendix A Prohibited TLS 1.2 Cipher Suites prohibits the use of a given cipher suite.
      Parameters:
      cipherSuite - The cipher suite name to test.
      Returns:
      Whether RFC9113 prohibits the use of a given cipher suites for HTTP/2.
    • isWeak

      public static boolean isWeak(String cipherSuite)
      Tests whether a given cipher suite is considered weak.

      A cipher suite is considered weak if it is blacklisted for HTTP/2 or matches any of the weak cipher suite patterns.

      Parameters:
      cipherSuite - The cipher suite name to test.
      Returns:
      Whether the cipher suite is considered weak.
    • excludeH2Blacklisted

      public static String[] excludeH2Blacklisted(String... ciphers)
    • excludeWeak

      public static String[] excludeWeak(String... ciphers)
    • getH2Blacklisted

      static Set<String> getH2Blacklisted()