Package org.mariadb.jdbc.plugin
Interface TlsSocketPlugin
-
- All Known Implementing Classes:
DefaultTlsSocketPlugin
public interface TlsSocketPlugin
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default javax.net.ssl.SSLSocket
createSocket(java.net.Socket socket, javax.net.ssl.SSLSocketFactory sslSocketFactory)
Returns a socket layered over an existing socket negotiating the use of SSL over an existing socket.javax.net.ssl.SSLSocketFactory
getSocketFactory(Configuration conf, ExceptionFactory exceptionFactory)
Get socket factory.java.lang.String
type()
plugin type.void
verify(java.lang.String host, javax.net.ssl.SSLSession sslSession, long serverThreadId)
Host name verifier implementation.
-
-
-
Method Detail
-
type
java.lang.String type()
plugin type.- Returns:
- plugin type
-
getSocketFactory
javax.net.ssl.SSLSocketFactory getSocketFactory(Configuration conf, ExceptionFactory exceptionFactory) throws java.sql.SQLException
Get socket factory.- Parameters:
conf
- connection string option. Non-standard option are stored in `nonMappedOptions` if any specific option is needed.exceptionFactory
- exception handler- Returns:
- custom SSL socket factory
- Throws:
java.sql.SQLException
- if socket factory configuration failed.
-
createSocket
default javax.net.ssl.SSLSocket createSocket(java.net.Socket socket, javax.net.ssl.SSLSocketFactory sslSocketFactory) throws java.io.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:
java.io.IOException
- if any socket error occurs.
-
verify
void verify(java.lang.String host, javax.net.ssl.SSLSession sslSession, long serverThreadId) throws javax.net.ssl.SSLException
Host name verifier implementation.- Parameters:
host
- hostnamesslSession
- ssl sessionserverThreadId
- current server threadId- Throws:
javax.net.ssl.SSLException
- if verification fail
-
-