コード例 #1
0
  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);
      }
    }
  }
コード例 #2
0
 public void verify(final IOSession iosession, final SSLSession sslsession) throws SSLException {
   InetSocketAddress address = (InetSocketAddress) iosession.getRemoteAddress();
   hostnameVerifier.verify(address.getHostName(), sslsession);
 }