Package org.jgroups.util
Class ReloadingX509TrustManager
- java.lang.Object
-
- javax.net.ssl.X509ExtendedTrustManager
-
- org.jgroups.util.ReloadingX509TrustManager
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,javax.net.ssl.TrustManager
,javax.net.ssl.X509TrustManager
public class ReloadingX509TrustManager extends javax.net.ssl.X509ExtendedTrustManager implements java.io.Closeable
AX509ExtendedTrustManager
which uses a @FileWatcher
to check for changes.
-
-
Constructor Summary
Constructors Constructor Description ReloadingX509TrustManager(FileWatcher watcher, java.nio.file.Path path, java.util.function.Function<java.nio.file.Path,javax.net.ssl.X509ExtendedTrustManager> action)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType)
void
checkClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType, java.net.Socket socket)
void
checkClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType, javax.net.ssl.SSLEngine engine)
void
checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType)
void
checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType, java.net.Socket socket)
void
checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType, javax.net.ssl.SSLEngine engine)
void
close()
java.security.cert.X509Certificate[]
getAcceptedIssuers()
java.time.Instant
lastLoaded()
-
-
-
Constructor Detail
-
ReloadingX509TrustManager
public ReloadingX509TrustManager(FileWatcher watcher, java.nio.file.Path path, java.util.function.Function<java.nio.file.Path,javax.net.ssl.X509ExtendedTrustManager> action)
-
-
Method Detail
-
checkClientTrusted
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType) throws java.security.cert.CertificateException
- Specified by:
checkClientTrusted
in interfacejavax.net.ssl.X509TrustManager
- Throws:
java.security.cert.CertificateException
-
checkServerTrusted
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType) throws java.security.cert.CertificateException
- Specified by:
checkServerTrusted
in interfacejavax.net.ssl.X509TrustManager
- Throws:
java.security.cert.CertificateException
-
getAcceptedIssuers
public java.security.cert.X509Certificate[] getAcceptedIssuers()
- Specified by:
getAcceptedIssuers
in interfacejavax.net.ssl.X509TrustManager
-
checkClientTrusted
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType, java.net.Socket socket) throws java.security.cert.CertificateException
- Specified by:
checkClientTrusted
in classjavax.net.ssl.X509ExtendedTrustManager
- Throws:
java.security.cert.CertificateException
-
checkServerTrusted
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType, java.net.Socket socket) throws java.security.cert.CertificateException
- Specified by:
checkServerTrusted
in classjavax.net.ssl.X509ExtendedTrustManager
- Throws:
java.security.cert.CertificateException
-
checkClientTrusted
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType, javax.net.ssl.SSLEngine engine) throws java.security.cert.CertificateException
- Specified by:
checkClientTrusted
in classjavax.net.ssl.X509ExtendedTrustManager
- Throws:
java.security.cert.CertificateException
-
checkServerTrusted
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String authType, javax.net.ssl.SSLEngine engine) throws java.security.cert.CertificateException
- Specified by:
checkServerTrusted
in classjavax.net.ssl.X509ExtendedTrustManager
- Throws:
java.security.cert.CertificateException
-
lastLoaded
public java.time.Instant lastLoaded()
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
-