Package org.mariadb.jdbc.plugin
Interface TlsSocketPlugin
-
- All Known Implementing Classes:
DefaultTlsSocketPlugin
public interface TlsSocketPluginTLS Socket interface plugin
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default SSLSocketcreateSocket(Socket socket, SSLSocketFactory sslSocketFactory)Returns a socket layered over an existing socket negotiating the use of SSL over an existing socket.KeyManager[]getKeyManager(Configuration conf, ExceptionFactory exceptionFactory)TrustManager[]getTrustManager(Configuration conf, ExceptionFactory exceptionFactory, HostAddress hostAddress)Stringtype()plugin type.voidverify(String host, SSLSession sslSession, long serverThreadId)Host name verifier implementation.
-
-
-
Method Detail
-
type
String type()
plugin type.- Returns:
- plugin type
-
getTrustManager
TrustManager[] getTrustManager(Configuration conf, ExceptionFactory exceptionFactory, HostAddress hostAddress) throws SQLException
- Throws:
SQLException
-
getKeyManager
KeyManager[] getKeyManager(Configuration conf, ExceptionFactory exceptionFactory) throws SQLException
- Throws:
SQLException
-
createSocket
default SSLSocket createSocket(Socket socket, SSLSocketFactory sslSocketFactory) throws IOException
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, long serverThreadId) throws SSLException
Host name verifier implementation.- Parameters:
host- hostnamesslSession- ssl sessionserverThreadId- current server threadId- Throws:
SSLException- if verification fail
-
-