Class OfficeFloorDefaultSslContextSource

  • All Implemented Interfaces:
    SslContextSource

    public class OfficeFloorDefaultSslContextSource
    extends java.lang.Object
    implements SslContextSource

    OfficeFloor default SslContextSource.

    This should NOT be used within production. The purpose is to allow testing of HTTPS communication without needing manual KeyStore setup.

    Author:
    Daniel Sagenschneider
    • Field Detail

      • PROPERTY_SSL_PROTOCOL

        public static final java.lang.String PROPERTY_SSL_PROTOCOL
        Property to specify the SSL protocol to use.
        See Also:
        Constant Field Values
    • Constructor Detail

      • OfficeFloorDefaultSslContextSource

        public OfficeFloorDefaultSslContextSource()
    • Method Detail

      • createServerSslContext

        public static javax.net.ssl.SSLContext createServerSslContext​(java.lang.String sslProtocol)
                                                               throws java.lang.Exception
        Creates the OfficeFloor default server SSLContext.
        Parameters:
        sslProtocol - SSL protocol. May be null.
        Returns:
        OfficeFloor default server SSLContext.
        Throws:
        java.lang.Exception - If fails to create the SSLContext.
      • createClientSslContext

        public static javax.net.ssl.SSLContext createClientSslContext​(java.lang.String sslProtocol)
                                                               throws java.lang.Exception
        Creates the OfficeFloor default client SSLContext.
        Parameters:
        sslProtocol - SSL protocol. May be null.
        Returns:
        OfficeFloor default client SSLContext.
        Throws:
        java.lang.Exception - If fails to create the SSLContext.
      • createSslContext

        public javax.net.ssl.SSLContext createSslContext​(SourceContext context)
                                                  throws java.lang.Exception
        Description copied from interface: SslContextSource
        Creates a new SSLContext.
        Specified by:
        createSslContext in interface SslContextSource
        Parameters:
        context - SourceContext to configure the SSLContext.
        Returns:
        New SSLContext ready for use.
        Throws:
        java.lang.Exception - If fails to create the SSLContext (possibly because a protocol or cipher is not supported).