Class JsseESTServiceBuilder


  • public class JsseESTServiceBuilder
    extends ESTServiceBuilder
    Build an RFC7030 (EST) service based on the JSSE.
    • Field Detail

      • timeoutMillis

        protected int timeoutMillis
      • supportedSuites

        protected java.util.Set<java.lang.String> supportedSuites
      • absoluteLimit

        protected java.lang.Long absoluteLimit
      • sslSocketFactoryCreatorBuilder

        protected org.bouncycastle.est.jcajce.SSLSocketFactoryCreatorBuilder sslSocketFactoryCreatorBuilder
      • filterCipherSuites

        protected boolean filterCipherSuites
    • Constructor Detail

      • JsseESTServiceBuilder

        public JsseESTServiceBuilder​(java.lang.String hostName,
                                     int portNo,
                                     SSLSocketFactoryCreator socketFactoryCreator)
        Create a builder for a client using a custom SSLSocketFactoryCreator.
        Parameters:
        hostName - hostName to talk to.
        socketFactoryCreator - a custom creator of socket factories.
      • JsseESTServiceBuilder

        public JsseESTServiceBuilder​(java.lang.String server,
                                     SSLSocketFactoryCreator socketFactoryCreator)
        Create a builder for a client using a custom SSLSocketFactoryCreator.
        Parameters:
        server - name of the server to talk to (URL format).
        socketFactoryCreator - a custom creator of socket factories.
      • JsseESTServiceBuilder

        public JsseESTServiceBuilder​(java.lang.String server)
        Create a builder for a client talking to a server that is not yet trusted.
        Parameters:
        server - name of the server to talk to (URL format).
      • JsseESTServiceBuilder

        public JsseESTServiceBuilder​(java.lang.String hostName,
                                     int portNo,
                                     javax.net.ssl.X509TrustManager trustManager)
        Create a builder for a client talking to a trusted server.
        Parameters:
        hostName - name of the server to talk to.
        portNo - port number to connect on.
        trustManager - trust manager to be used for validating the connection.
      • JsseESTServiceBuilder

        public JsseESTServiceBuilder​(java.lang.String server,
                                     javax.net.ssl.X509TrustManager trustManager)
        Create a builder for a client talking to a trusted server.
        Parameters:
        server - name of the server to talk to (URL format).
        trustManager - trust manager to be used for validating the connection.
      • JsseESTServiceBuilder

        public JsseESTServiceBuilder​(java.lang.String hostName,
                                     int portNo,
                                     javax.net.ssl.X509TrustManager[] trustManagers)
        Create a builder for a client talking to a trusted server.
        Parameters:
        hostName - name of the server to talk to.
        portNo - port number to connect on.
        trustManagers - trust managers that can be used for validating the connection.
      • JsseESTServiceBuilder

        public JsseESTServiceBuilder​(java.lang.String server,
                                     javax.net.ssl.X509TrustManager[] trustManagers)
        Create a builder for a client talking to a trusted server.
        Parameters:
        server - name of the server to talk to (URL format).
        trustManagers - trust managers that can be used for validating the connection.
    • Method Detail

      • withSecureRandom

        public JsseESTServiceBuilder withSecureRandom​(java.security.SecureRandom secureRandom)
      • withProvider

        public JsseESTServiceBuilder withProvider​(java.lang.String tlsProviderName)
                                           throws java.security.NoSuchProviderException
        Configure this builder to use the provider with the passed in name.
        Parameters:
        tlsProviderName - the name JSSE Provider to use.
        Returns:
        the current builder instance.
        Throws:
        java.security.NoSuchProviderException - if the specified provider does not exist.
      • withProvider

        public JsseESTServiceBuilder withProvider​(java.security.Provider tlsProvider)
        Configure this builder to use the passed in provider.
        Parameters:
        tlsProvider - the JSSE Provider to use.
        Returns:
        the current builder instance.
      • withKeyManagers

        public JsseESTServiceBuilder withKeyManagers​(javax.net.ssl.KeyManager[] keyManagers)
      • withFilterCipherSuites

        public JsseESTServiceBuilder withFilterCipherSuites​(boolean filter)
        Filter cipher suites with supported before passing to JSSE provider.
        Parameters:
        filter - true, supplied cipher suites will be filtered with supported before passing to the JSSE provider.
        Returns:
        this;