Class DefaultTlsSocketPlugin
java.lang.Object
org.mariadb.jdbc.internal.protocol.tls.DefaultTlsSocketPlugin
- All Implemented Interfaces:
TlsSocketPlugin
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSocketFactory
(Options options) Get socket factory.private static KeyManager
loadClientCerts
(String keyStoreUrl, String keyStorePassword, String keyPassword, String storeType) name()
plugin name.type()
plugin type.void
verify
(String host, SSLSession session, Options options, 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.tls.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) throws SQLException - Throws:
SQLException
-
name
Description copied from interface:TlsSocketPlugin
plugin name.- Specified by:
name
in interfaceTlsSocketPlugin
- Returns:
- plugin name. ex: Mysql native password
-
type
Description copied from interface:TlsSocketPlugin
plugin type.- Specified by:
type
in interfaceTlsSocketPlugin
- Returns:
- plugin type
-
getSocketFactory
Description copied from interface:TlsSocketPlugin
Get socket factory.- Specified by:
getSocketFactory
in interfaceTlsSocketPlugin
- Parameters:
options
- connection string option. Non standard option are stored in `nonMappedOptions` if any specific option is needed.- Returns:
- custom SSL socket factory
- Throws:
SQLException
- if socket factory configuration failed.
-
verify
public void verify(String host, SSLSession session, Options options, long serverThreadId) throws SSLException Description copied from interface:TlsSocketPlugin
Host name verifier implementation.- Specified by:
verify
in interfaceTlsSocketPlugin
- Parameters:
host
- hostnamesession
- ssl sessionoptions
- connection string option. Non standard option are stored in * `nonMappedOptions` if any specific option is needed.serverThreadId
- current server threadId- Throws:
SSLException
- if verification fail
-