Class SSLContext

java.lang.Object
com.predic8.membrane.core.transport.ssl.SSLContext
All Implemented Interfaces:
SSLProvider
Direct Known Subclasses:
AcmeSSLContext, GeneratingSSLContext, StaticSSLContext

public abstract class SSLContext extends Object implements SSLProvider
  • Field Details

    • getApplicationProtocols

      protected static Method getApplicationProtocols
    • setApplicationProtocols

      protected static Method setApplicationProtocols
    • ciphers

      protected String[] ciphers
    • protocols

      protected String[] protocols
    • wantClientAuth

      protected boolean wantClientAuth
    • needClientAuth

      protected boolean needClientAuth
    • endpointIdentificationAlgorithm

      protected String endpointIdentificationAlgorithm
  • Constructor Details

    • SSLContext

      public SSLContext()
  • Method Details

    • init

      public void init(SSLParser sslParser, SSLContext sslc)
    • wrap

      public Socket wrap(Socket socket, byte[] buffer, int position) throws IOException
      Throws:
      IOException
    • applyCiphers

      public void applyCiphers(SSLSocket sslSocket)
    • applyCipherOrdering

      protected void applyCipherOrdering(SSLParameters sslParameters)
    • constructHostNamePattern

      public String constructHostNamePattern()
    • checkChainValidity

      protected void checkChainValidity(List<Certificate> certs)
    • showSSLExceptions

      public boolean showSSLExceptions()
      Specified by:
      showSSLExceptions in interface SSLProvider
    • isUseAsDefault

      public boolean isUseAsDefault()
    • getApplicationProtocols

      public String[] getApplicationProtocols(Socket socket)
      Specified by:
      getApplicationProtocols in interface SSLProvider
      Returns:
      the application protocols selected by the TLS server, or null elsewise (not a TLS connection, ALPN not supported, ...)
    • checkKeyMatchesCert

      protected void checkKeyMatchesCert(Key key, List<Certificate> certs)
    • getValidFrom

      public static long getValidFrom(List<Certificate> certs)
    • getMinimumValidity

      public static long getMinimumValidity(List<Certificate> certs)
    • stop

      public void stop()
      Description copied from interface: SSLProvider
      Advises the SSL Provider to stop providing its services. (For most providers this will be a no-op.)

      No guarantee that this is only called once.

      Specified by:
      stop in interface SSLProvider
    • hasKeyAndCertificate

      public abstract boolean hasKeyAndCertificate()
      Returns:
      whether this context has a working certificate and key
    • getValidFrom

      public abstract long getValidFrom()
    • getValidUntil

      public abstract long getValidUntil()
    • getPrometheusContextTypeName

      public abstract String getPrometheusContextTypeName()