Package org.mariadb.jdbc.plugin.tls.main
Class DefaultTlsSocketPlugin
java.lang.Object
org.mariadb.jdbc.plugin.tls.main.DefaultTlsSocketPlugin
- All Implemented Interfaces:
TlsSocketPlugin
Default TLS socket plugin
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static InputStream
getInputStreamFromPath
(String path) getKeyManager
(Configuration conf, ExceptionFactory exceptionFactory) getTrustManager
(Configuration conf, ExceptionFactory exceptionFactory, HostAddress hostAddress) private static KeyManager
loadClientCerts
(String keyStoreUrl, String keyStorePassword, String keyPassword, String storeType, ExceptionFactory exceptionFactory) private static InputStream
loadFromUrl
(String keyStoreUrl) type()
plugin type.void
verify
(String host, SSLSession session, long serverThreadId) Host name verifier implementation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mariadb.jdbc.plugin.TlsSocketPlugin
createSocket
-
Field Details
-
logger
-
-
Constructor Details
-
DefaultTlsSocketPlugin
public DefaultTlsSocketPlugin()
-
-
Method Details
-
loadClientCerts
private static KeyManager loadClientCerts(String keyStoreUrl, String keyStorePassword, String keyPassword, String storeType, ExceptionFactory exceptionFactory) throws SQLException - Throws:
SQLException
-
loadFromUrl
- Throws:
FileNotFoundException
-
getInputStreamFromPath
- Throws:
IOException
-
type
Description copied from interface:TlsSocketPlugin
plugin type.- Specified by:
type
in interfaceTlsSocketPlugin
- Returns:
- plugin type
-
getTrustManager
public TrustManager[] getTrustManager(Configuration conf, ExceptionFactory exceptionFactory, HostAddress hostAddress) throws SQLException - Specified by:
getTrustManager
in interfaceTlsSocketPlugin
- Throws:
SQLException
-
getKeyManager
public KeyManager[] getKeyManager(Configuration conf, ExceptionFactory exceptionFactory) throws SQLException - Specified by:
getKeyManager
in interfaceTlsSocketPlugin
- Throws:
SQLException
-
verify
Description copied from interface:TlsSocketPlugin
Host name verifier implementation.- Specified by:
verify
in interfaceTlsSocketPlugin
- Parameters:
host
- hostnamesession
- ssl sessionserverThreadId
- current server threadId- Throws:
SSLException
- if verification fail
-