Class AcmeSSLContext
java.lang.Object
com.predic8.membrane.core.transport.ssl.SSLContext
com.predic8.membrane.core.transport.ssl.AcmeSSLContext
- All Implemented Interfaces:
SSLProvider
-
Field Summary
FieldsFields inherited from class com.predic8.membrane.core.transport.ssl.SSLContext
ciphers, endpointIdentificationAlgorithm, getApplicationProtocols, needClientAuth, protocols, setApplicationProtocols, wantClientAuth -
Constructor Summary
ConstructorsConstructorDescriptionAcmeSSLContext(SSLParser parser, String[] hosts, HttpClientFactory httpClientFactory, TimerManager timerManager) -
Method Summary
Modifier and TypeMethodDescriptioncreateServerSocket(int port, int backlog, InetAddress bindAddress) createSocket(String host, int port, int connectTimeout, String sniServerName, String[] applicationProtocols) createSocket(String host, int port, InetAddress addr, int localPort, int connectTimeout, String sniServerName, String[] applicationProtocols) createSocket(Socket s, String host, int port, int connectTimeout, String sniServerName, String[] applicationProtocols) String[]getHosts()longlongbooleanvoidinit(KubernetesClientFactory kubernetesClientFactory, HttpClientFactory httpClientFactory) booleanisReady()static longrenewAt(long validFrom, long validUntil) voidschedule()voidstop()Advises the SSL Provider to stop providing its services.wrapAcceptedSocket(Socket socket) Methods inherited from class com.predic8.membrane.core.transport.ssl.SSLContext
applyCipherOrdering, applyCiphers, checkChainValidity, checkKeyMatchesCert, constructHostNamePattern, getApplicationProtocols, getMinimumValidity, getValidFrom, init, isUseAsDefault, showSSLExceptions
-
Field Details
-
TLS_CERTIFICATE_UNKNOWN
public static final int TLS_CERTIFICATE_UNKNOWN- See Also:
-
-
Constructor Details
-
AcmeSSLContext
public AcmeSSLContext(SSLParser parser, String[] hosts, @Nullable HttpClientFactory httpClientFactory, @Nullable TimerManager timerManager)
-
-
Method Details
-
init
public void init(@Nullable KubernetesClientFactory kubernetesClientFactory, @Nullable HttpClientFactory httpClientFactory) -
getClient
-
getHosts
-
createServerSocket
public ServerSocket createServerSocket(int port, int backlog, InetAddress bindAddress) throws IOException - Throws:
IOException
-
createSocket
- Throws:
IOException
-
createSocket
public Socket createSocket(Socket s, String host, int port, int connectTimeout, @Nullable String sniServerName, @Nullable String[] applicationProtocols) throws IOException host- relevant to verify the server cert onlyport- relevant to verify the server cert only- Throws:
IOException
-
createSocket
public Socket createSocket(String host, int port, int connectTimeout, @Nullable String sniServerName, @Nullable String[] applicationProtocols) throws IOException - Throws:
IOException
-
createSocket
public Socket createSocket(String host, int port, InetAddress addr, int localPort, int connectTimeout, @Nullable String sniServerName, @Nullable String[] applicationProtocols) throws IOException - Throws:
IOException
-
wrapAcceptedSocket
- Throws:
IOException
-
wrap
- Overrides:
wrapin classSSLContext- Throws:
IOException
-
schedule
public void schedule() -
renewAt
public static long renewAt(long validFrom, long validUntil) -
stop
public void stop()Description copied from interface:SSLProviderAdvises 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:
stopin interfaceSSLProvider- Overrides:
stopin classSSLContext
-
isReady
public boolean isReady() -
hasKeyAndCertificate
public boolean hasKeyAndCertificate()- Specified by:
hasKeyAndCertificatein classSSLContext- Returns:
- whether this context has a working certificate and key
-
getValidFrom
public long getValidFrom()- Specified by:
getValidFromin classSSLContext
-
getValidUntil
public long getValidUntil()- Specified by:
getValidUntilin classSSLContext
-
getPrometheusContextTypeName
- Specified by:
getPrometheusContextTypeNamein classSSLContext
-