Class EnforcingNameMismatchCallback

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void nameMismatch​(java.security.cert.X509Certificate peerCertificate, java.lang.String hostName)
      This method is called whenever peer's host name is not matching the peer's certificate DN.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EnforcingNameMismatchCallback

        public EnforcingNameMismatchCallback()
    • Method Detail

      • nameMismatch

        public void nameMismatch​(java.security.cert.X509Certificate peerCertificate,
                                 java.lang.String hostName)
                          throws java.security.cert.CertificateException
        Description copied from interface: HostnameMismatchCallback2
        This method is called whenever peer's host name is not matching the peer's certificate DN. The method can log the problem/display a popup with a question what to do or simply can throw an exception indicating that the socket should be closed
        Specified by:
        nameMismatch in interface HostnameMismatchCallback2
        Parameters:
        peerCertificate - peer's certificate (for convenience)
        hostName - peer's host name (for convenience)
        Throws:
        java.security.cert.CertificateException - if the error is considered fatal and the socket should be closed