Class SslUtils


  • public class SslUtils
    extends java.lang.Object
    Various HTTPS utilities.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.concurrent.ConcurrentMap<java.lang.String,​java.lang.Integer> keySizesCache
      Cache of SSL key sizes for various cipher suites.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private SslUtils()
      Private constructor to ensure that the class acts as a true utility class i.e.
    • Field Detail

      • keySizesCache

        private static final java.util.concurrent.ConcurrentMap<java.lang.String,​java.lang.Integer> keySizesCache
        Cache of SSL key sizes for various cipher suites.
    • Constructor Detail

      • SslUtils

        private SslUtils()
        Private constructor to ensure that the class acts as a true utility class i.e. it isn't instantiable and extensible.
    • Method Detail

      • extractKeySize

        public static java.lang.Integer extractKeySize​(java.lang.String sslCipherSuite)
        Extract the SSL key size of a given cipher suite.
        Parameters:
        sslCipherSuite - The SSL cipher suite.
        Returns:
        The SSL key size.
      • getSslContextFactory

        public static SslContextFactory getSslContextFactory​(RestletHelper<?> helper)
        Returns the SSL context factory. It first look for a "sslContextFactory" attribute (instance), then for a "sslContextFactory" parameter (class name to instantiate).
        Parameters:
        helper - The helper to use.
        Returns:
        The SSL context factory.