Package org.mariadb.jdbc.tls
Interface TlsSocketPlugin
- All Known Implementing Classes:
DefaultTlsSocketPlugin
public interface TlsSocketPlugin
-
Method Summary
Modifier and TypeMethodDescriptiondefault SSLSocket
createSocket
(Socket socket, SSLSocketFactory sslSocketFactory) Returns a socket layered over an existing socket negotiating the use of SSL over an existing socket.getSocketFactory
(Options options) Get socket factory.name()
plugin name.type()
plugin type.void
verify
(String host, SSLSession sslSession, Options options, long serverThreadId) Host name verifier implementation.
-
Method Details
-
name
String name()plugin name.- Returns:
- plugin name. ex: Mysql native password
-
type
String type()plugin type.- Returns:
- plugin type
-
getSocketFactory
Get socket factory.- 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.
-
createSocket
Returns a socket layered over an existing socket negotiating the use of SSL over an existing socket.- Parameters:
socket
- existing socketsslSocketFactory
- SSL socket factory- Returns:
- SSL socket
- Throws:
IOException
- if any socket error occurs.
-
verify
void verify(String host, SSLSession sslSession, Options options, long serverThreadId) throws SSLException Host name verifier implementation.- Parameters:
host
- hostnamesslSession
- 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
-