Class SSLConfiguration

java.lang.Object
fr.gouv.vitam.common.client.configuration.SSLConfiguration

public class SSLConfiguration extends Object
SSL Configuration
  • Constructor Details

    • SSLConfiguration

      public SSLConfiguration()
      Empty SSLConfiguration constructor for YAMLFactory
    • SSLConfiguration

      public SSLConfiguration(List<SSLKey> keystore, List<SSLKey> truststore)
      SSLConfiguration Constructor
      Parameters:
      keystore -
      truststore -
      Throws:
      IllegalArgumentException - if keystore/truststore is null or empty
  • Method Details

    • getRegistry

      public org.apache.http.config.Registry<org.apache.http.conn.socket.ConnectionSocketFactory> getRegistry(SSLContext sslContext) throws FileNotFoundException
      Parameters:
      sslContext - using a given SSLContext
      Returns:
      the associate Registry for Apache Ssl configuration
      Throws:
      FileNotFoundException
    • createSSLContext

      public SSLContext createSSLContext() throws VitamException
      Returns:
      SSL Context
      Throws:
      VitamException
    • getTruststore

      public List<SSLKey> getTruststore()
      Returns:
      the truststore
    • getKeystore

      public List<SSLKey> getKeystore()
      Returns:
      the keystore
    • setTruststore

      public SSLConfiguration setTruststore(List<SSLKey> truststore)
      Parameters:
      truststore - the truststore to set
      Returns:
      this
    • setKeystore

      public SSLConfiguration setKeystore(List<SSLKey> keystore)
      Parameters:
      keystore - the keystore to set
      Returns:
      this
    • getProtocol

      public String getProtocol()
    • setProtocol

      public void setProtocol(String protocol)