Class SslConfiguration

java.lang.Object
org.elasticsearch.common.ssl.SslConfiguration

public class SslConfiguration
extends java.lang.Object
A object encapsulating all necessary configuration for an SSL context (client or server). The configuration itself is immutable, but the key config and trust config may depend on reading key and certificate material from files (see getDependentFiles(), and the content of those files may change.
  • Constructor Details

  • Method Details

    • getTrustConfig

      public SslTrustConfig getTrustConfig()
    • getKeyConfig

      public SslKeyConfig getKeyConfig()
    • getVerificationMode

      public SslVerificationMode getVerificationMode()
    • getClientAuth

      public SslClientAuthenticationMode getClientAuth()
    • getCipherSuites

      public java.util.List<java.lang.String> getCipherSuites()
    • getSupportedProtocols

      public java.util.List<java.lang.String> getSupportedProtocols()
    • getDependentFiles

      public java.util.Collection<java.nio.file.Path> getDependentFiles()
      Returns:
      A collection of files that are used by this SSL configuration. If the contents of these files change, then any subsequent call to createSslContext() (or similar methods) may create a context with different behaviour. It is recommended that these files be monitored for changes, and a new ssl-context is created whenever any of the files are modified.
    • createSslContext

      public javax.net.ssl.SSLContext createSslContext()
      Dynamically create a new SSL context based on the current state of the configuration. Because the key config and trust config may change based on the contents of their referenced files (see getDependentFiles(), consecutive calls to this method may return ssl-contexts with different configurations.
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object