Class DefaultTlsSocketPlugin

java.lang.Object
org.mariadb.jdbc.internal.protocol.tls.DefaultTlsSocketPlugin
All Implemented Interfaces:
TlsSocketPlugin

public class DefaultTlsSocketPlugin extends Object implements TlsSocketPlugin
  • Constructor Details

    • DefaultTlsSocketPlugin

      public DefaultTlsSocketPlugin()
  • Method Details

    • name

      public String name()
      Description copied from interface: TlsSocketPlugin
      plugin name.
      Specified by:
      name in interface TlsSocketPlugin
      Returns:
      plugin name. ex: Mysql native password
    • type

      public String type()
      Description copied from interface: TlsSocketPlugin
      plugin type.
      Specified by:
      type in interface TlsSocketPlugin
      Returns:
      plugin type
    • getSocketFactory

      public SSLSocketFactory getSocketFactory(Options options) throws SQLException
      Description copied from interface: TlsSocketPlugin
      Get socket factory.
      Specified by:
      getSocketFactory in interface TlsSocketPlugin
      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 interface TlsSocketPlugin
      Parameters:
      host - hostname
      session - ssl session
      options - 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