Class BaseSSLContextParameters

    • Field Detail

      • DEFAULT_CIPHER_SUITES_FILTER_INCLUDE

        protected static final List<String> DEFAULT_CIPHER_SUITES_FILTER_INCLUDE
      • DEFAULT_CIPHER_SUITES_FILTER_EXCLUDE

        protected static final List<String> DEFAULT_CIPHER_SUITES_FILTER_EXCLUDE
      • DEFAULT_SECURE_SOCKET_PROTOCOLS_FILTER_INCLUDE

        protected static final List<String> DEFAULT_SECURE_SOCKET_PROTOCOLS_FILTER_INCLUDE
      • DEFAULT_SECURE_SOCKET_PROTOCOLS_FILTER_EXCLUDE

        protected static final List<String> DEFAULT_SECURE_SOCKET_PROTOCOLS_FILTER_EXCLUDE
    • Constructor Detail

      • BaseSSLContextParameters

        public BaseSSLContextParameters()
    • Method Detail

      • setSessionTimeout

        public void setSessionTimeout​(String sessionTimeout)
        Sets the optional SSLSessionContext timeout time for SSLSessions in seconds.
        Parameters:
        sessionTimeout - the timeout value or null to use the default
      • getAllowPassthrough

        protected boolean getAllowPassthrough()
        Returns a flag indicating if default values should be applied in the event that no other property of the instance configures a particular aspect of the entity produced by the instance. This flag is used to allow instances of this class to produce a configurer that simply passes through the current configuration of a configured entity when the instance of this class would otherwise only apply some default configuration.
        See Also:
        SSLContextClientParameters, SSLContextServerParameters
      • configureSSLContext

        protected void configureSSLContext​(SSLContext context)
                                    throws GeneralSecurityException
        Configures the actual SSLContext itself with direct setter calls. This method differs from configuration options that are handled by a configurer instance in that the options are part of the context itself and are not part of some factory or instance object returned by the context.
        Parameters:
        context - the context to configure
        Throws:
        GeneralSecurityException - if there is an error configuring the context
      • getDefaultCipherSuitesFilter

        protected FilterParameters getDefaultCipherSuitesFilter()
      • getDefaultSecureSocketProcotolFilter

        protected FilterParameters getDefaultSecureSocketProcotolFilter()
      • getSSLEngineConfigurers

        protected List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLEngine>> getSSLEngineConfigurers​(SSLContext context)
        Returns the list of configurers to apply to an SSLEngine in order to fully configure it in compliance with the provided configuration options. The configurers are to be applied in the order in which they appear in the list.
        Parameters:
        context - the context that serves as the factory for SSLEngine instances
        Returns:
        the needed configurers
      • getSSLSocketFactoryConfigurers

        protected List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLSocketFactory>> getSSLSocketFactoryConfigurers​(SSLContext context)
        Returns the list of configurers to apply to an SSLSocketFactory in order to fully configure it in compliance with the provided configuration options. The configurers are to be applied in the order in which they appear in the list.

        It is preferred to use getSSLSocketFactorySSLSocketConfigurers(SSLContext) instead of this method as SSLSocketFactory does not contain any configuration options that are non-proprietary.

        Parameters:
        context - the context that serves as the factory for SSLSocketFactory instances
        Returns:
        the needed configurers
        See Also:
        getSSLSocketFactorySSLSocketConfigurers(SSLContext)
      • getSSLSocketFactorySSLSocketConfigurers

        protected List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLSocket>> getSSLSocketFactorySSLSocketConfigurers​(SSLContext context)
        Returns the list of configurers to apply to an SSLSocket in order to fully configure it in compliance with the provided configuration options. These configurers are intended for sockets produced by a SSLSocketFactory, see getSSLServerSocketFactorySSLServerSocketConfigurers(SSLContext) for configurers related to sockets produced by a SSLServerSocketFactory. The configurers are to be applied in the order in which they appear in the list.
        Parameters:
        context - the context that serves as the factory for SSLSocketFactory instances
        Returns:
        the needed configurers
      • getSSLServerSocketFactorySSLServerSocketConfigurers

        protected List<org.apache.camel.support.jsse.BaseSSLContextParameters.Configurer<SSLServerSocket>> getSSLServerSocketFactorySSLServerSocketConfigurers​(SSLContext context)
        Returns the list of configurers to apply to an SSLServerSocket in order to fully configure it in compliance with the provided configuration options. These configurers are intended for sockets produced by a SSLServerSocketFactory, see getSSLSocketFactorySSLSocketConfigurers(SSLContext) for configurers related to sockets produced by a SSLSocketFactory. The configurers are to be applied in the order in which they appear in the list.
        Parameters:
        context - the context that serves as the factory for SSLServerSocketFactory instances
        Returns:
        the needed configurers
      • filter

        protected Collection<String> filter​(Collection<String> explicitValues,
                                            Collection<String> availableValues,
                                            Collection<String> currentValues,
                                            FilterParameters.Patterns patterns,
                                            FilterParameters.Patterns defaultPatterns,
                                            boolean applyDefaults)
        Filters the values in availableValues returning only the values that are explicitly listed in explicitValues (returns them regardless of if they appear in availableValues or not) if explicitValues is not null or according to the following rules:
        1. Match the include patterns in patterns and don't match the exclude patterns in patterns if patterns is not null.
        2. Match the include patterns in defaultPatterns and don't match the exclude patterns in defaultPatterns if patterns is null and applyDefaults is true.
        3. Are provided in currentValues if if patterns is null and applyDefaults is false.
        Parameters:
        explicitValues - the optional explicit values to use
        availableValues - the available values to filter from
        patterns - the optional patterns to use when explicitValues is not used
        defaultPatterns - the required patterns to use when explicitValues and patterns are not used
        applyDefaults - flag indicating whether or not to apply defaults in the event that no explicit values and no patterns apply
        Returns:
        the filtered values
        See Also:
        filter(Collection, Collection, List, List)
      • filter

        protected Collection<String> filter​(Collection<String> explicitValues,
                                            Collection<String> availableValues,
                                            List<Pattern> includePatterns,
                                            List<Pattern> excludePatterns)
        Filters the values in availableValues returning only the values that are explicitly listed in explicitValues (returns them regardless of if they appear in availableValues or not) if explicitValues is not null or as match the patterns in includePatterns and do not match the patterns in excludePatterns if explicitValues is null.
        Parameters:
        explicitValues - the optional explicit values to use
        availableValues - the available values to filter from if explicitValues is null
        includePatterns - the patterns to use for inclusion filtering, required if explicitValues is null
        excludePatterns - the patterns to use for exclusion filtering, required if explicitValues is null
        Returns:
        the filtered values
      • matchesOneOf

        protected boolean matchesOneOf​(String value,
                                       List<Pattern> patterns)
        Returns true if and only if the value is matched by one or more of the supplied patterns.
        Parameters:
        value - the value to match
        patterns - the patterns to try to match against