public void verify(final IOSession iosession, final SSLSession sslsession) throws SSLException {
    SocketAddress remoteAddress = iosession.getRemoteAddress();
    String address;
    if (remoteAddress instanceof InetSocketAddress) {
      address = ((InetSocketAddress) remoteAddress).getHostName();
    } else {
      address = remoteAddress.toString();
    }

    if (verificationManager != null) {
      try {
        verificationManager.verifyRevocationStatus(sslsession.getPeerCertificateChain());
      } catch (CertificateVerificationException e) {
        throw new SSLException("Certificate Chain Validation failed for host : " + address, e);
      }
    }
  }
 public void verify(final IOSession iosession, final SSLSession sslsession) throws SSLException {
   InetSocketAddress address = (InetSocketAddress) iosession.getRemoteAddress();
   hostnameVerifier.verify(address.getHostName(), sslsession);
 }