# Class HostnameVerifierImpl

java.lang.Object
org.mariadb.jdbc.internal.protocol.tls.HostnameVerifierImpl

All Implemented Interfaces:
  `HostnameVerifier`

public class HostnameVerifierImpl extends Object implements HostnameVerifier

## Constructor Summary

Constructors
Constructor
Description
`HostnameVerifierImpl()`

## Method Summary

Modifier and Type
Method
Description
`void`
`verify(String host, X509Certificate cert, long serverThreadId)`
Verification that throw an exception with a detailed error message in case of error.
`boolean`
`verify(String host, SSLSession session)`
`boolean`
`verify(String host, SSLSession session, long serverThreadId)`
Verification, like HostnameVerifier.verify() with an additional server thread id to identify connection in logs.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### HostnameVerifierImpl

public HostnameVerifierImpl()

## Method Details

### verify

public boolean verify(String host, SSLSession session)

Specified by:
  `verify` in interface `HostnameVerifier`

### verify

public boolean verify(String host, SSLSession session, long serverThreadId)
Verification, like HostnameVerifier.verify() with an additional server thread id to identify connection in logs.

Parameters:
  `host` - host to connect (DNS/IP)
  `session` - SSL session
  `serverThreadId` - connection id to identify connection in logs
Returns:
  true if valid

### verify

public void verify(String host, X509Certificate cert, long serverThreadId) throws SSLException
Verification that throw an exception with a detailed error message in case of error.

Parameters:
  `host` - hostname
  `cert` - certificate
  `serverThreadId` - server thread Identifier to identify connection in logs
Throws:
  `SSLException` - exception