Class MariaDbX509KeyManager
- java.lang.Object
-
- javax.net.ssl.X509ExtendedKeyManager
-
- org.mariadb.jdbc.internal.protocol.tls.MariaDbX509KeyManager
-
- All Implemented Interfaces:
KeyManager
,X509KeyManager
public class MariaDbX509KeyManager extends X509ExtendedKeyManager
Key manager implementation that implement only client verification and rely only on private key for mutual authentication, without Server Name Indication (SNI) verification.
-
-
Constructor Summary
Constructors Constructor Description MariaDbX509KeyManager(KeyStore keyStore, char[] pwd)
Creates Key manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket)
String
chooseEngineClientAlias(String[] keyType, Principal[] issuers, SSLEngine engine)
String
chooseEngineServerAlias(String keyType, Principal[] issuers, SSLEngine engine)
String
chooseServerAlias(String keyType, Principal[] issuers, Socket socket)
X509Certificate[]
getCertificateChain(String alias)
String[]
getClientAliases(String keyType, Principal[] issuers)
PrivateKey
getPrivateKey(String alias)
String[]
getServerAliases(String keyType, Principal[] issuers)
-
-
-
Constructor Detail
-
MariaDbX509KeyManager
public MariaDbX509KeyManager(KeyStore keyStore, char[] pwd) throws KeyStoreException
Creates Key manager.- Parameters:
keyStore
- keyStore (must have been initialized)pwd
- keyStore password- Throws:
KeyStoreException
- if keyStore hasn't been initialized.
-
-
Method Detail
-
chooseClientAlias
public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket)
-
getCertificateChain
public X509Certificate[] getCertificateChain(String alias)
-
chooseEngineClientAlias
public String chooseEngineClientAlias(String[] keyType, Principal[] issuers, SSLEngine engine)
- Overrides:
chooseEngineClientAlias
in classX509ExtendedKeyManager
-
getPrivateKey
public PrivateKey getPrivateKey(String alias)
-
chooseServerAlias
public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket)
-
chooseEngineServerAlias
public String chooseEngineServerAlias(String keyType, Principal[] issuers, SSLEngine engine)
- Overrides:
chooseEngineServerAlias
in classX509ExtendedKeyManager
-
-