Interface HostnameMismatchCallback


  • @Deprecated
    public interface HostnameMismatchCallback
    Deprecated.
    use HostnameMismatchCallback2 and the related classes
    Implementation should react to the event when remote SSL peer's certificate is not matching its hostname.
    Author:
    K. Benedyczak
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void nameMismatch​(javax.net.ssl.SSLSocket socket, java.security.cert.X509Certificate peerCertificate, java.lang.String hostName)
      Deprecated.
      This method is called whenever peer's host name is not matching the peer's certificate DN.
    • Method Detail

      • nameMismatch

        void nameMismatch​(javax.net.ssl.SSLSocket socket,
                          java.security.cert.X509Certificate peerCertificate,
                          java.lang.String hostName)
                   throws javax.net.ssl.SSLException
        Deprecated.
        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 close the socket.
        Parameters:
        socket - the socket
        peerCertificate - peer's certificate (for convenience)
        hostName - peer's host name (for convenience)
        Throws:
        javax.net.ssl.SSLException - SSL exception