Package org.jgroups.util
Class ReloadingX509KeyManager
- java.lang.Object
-
- javax.net.ssl.X509ExtendedKeyManager
-
- org.jgroups.util.ReloadingX509KeyManager
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,javax.net.ssl.KeyManager
,javax.net.ssl.X509KeyManager
public final class ReloadingX509KeyManager extends javax.net.ssl.X509ExtendedKeyManager implements java.io.Closeable
AX509ExtendedKeyManager
which uses a @FileWatcher
to check for changes.
-
-
Constructor Summary
Constructors Constructor Description ReloadingX509KeyManager(FileWatcher watcher, java.nio.file.Path path, java.util.function.Function<java.nio.file.Path,javax.net.ssl.X509ExtendedKeyManager> action)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
chooseClientAlias(java.lang.String[] keyType, java.security.Principal[] issuers, java.net.Socket socket)
java.lang.String
chooseEngineClientAlias(java.lang.String[] keyType, java.security.Principal[] issuers, javax.net.ssl.SSLEngine engine)
java.lang.String
chooseEngineServerAlias(java.lang.String keyType, java.security.Principal[] issuers, javax.net.ssl.SSLEngine engine)
java.lang.String
chooseServerAlias(java.lang.String keyType, java.security.Principal[] issuers, java.net.Socket socket)
void
close()
java.security.cert.X509Certificate[]
getCertificateChain(java.lang.String alias)
java.lang.String[]
getClientAliases(java.lang.String keyType, java.security.Principal[] issuers)
java.security.PrivateKey
getPrivateKey(java.lang.String alias)
java.lang.String[]
getServerAliases(java.lang.String keyType, java.security.Principal[] issuers)
java.time.Instant
lastLoaded()
-
-
-
Constructor Detail
-
ReloadingX509KeyManager
public ReloadingX509KeyManager(FileWatcher watcher, java.nio.file.Path path, java.util.function.Function<java.nio.file.Path,javax.net.ssl.X509ExtendedKeyManager> action)
-
-
Method Detail
-
getClientAliases
public java.lang.String[] getClientAliases(java.lang.String keyType, java.security.Principal[] issuers)
- Specified by:
getClientAliases
in interfacejavax.net.ssl.X509KeyManager
-
chooseClientAlias
public java.lang.String chooseClientAlias(java.lang.String[] keyType, java.security.Principal[] issuers, java.net.Socket socket)
- Specified by:
chooseClientAlias
in interfacejavax.net.ssl.X509KeyManager
-
getServerAliases
public java.lang.String[] getServerAliases(java.lang.String keyType, java.security.Principal[] issuers)
- Specified by:
getServerAliases
in interfacejavax.net.ssl.X509KeyManager
-
chooseServerAlias
public java.lang.String chooseServerAlias(java.lang.String keyType, java.security.Principal[] issuers, java.net.Socket socket)
- Specified by:
chooseServerAlias
in interfacejavax.net.ssl.X509KeyManager
-
getCertificateChain
public java.security.cert.X509Certificate[] getCertificateChain(java.lang.String alias)
- Specified by:
getCertificateChain
in interfacejavax.net.ssl.X509KeyManager
-
getPrivateKey
public java.security.PrivateKey getPrivateKey(java.lang.String alias)
- Specified by:
getPrivateKey
in interfacejavax.net.ssl.X509KeyManager
-
chooseEngineClientAlias
public java.lang.String chooseEngineClientAlias(java.lang.String[] keyType, java.security.Principal[] issuers, javax.net.ssl.SSLEngine engine)
- Overrides:
chooseEngineClientAlias
in classjavax.net.ssl.X509ExtendedKeyManager
-
chooseEngineServerAlias
public java.lang.String chooseEngineServerAlias(java.lang.String keyType, java.security.Principal[] issuers, javax.net.ssl.SSLEngine engine)
- Overrides:
chooseEngineServerAlias
in classjavax.net.ssl.X509ExtendedKeyManager
-
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
-
-