Class HostnameUnverifiedException

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String mHostname  
      private javax.net.ssl.SSLSocket mSSLSocket  
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      HostnameUnverifiedException​(javax.net.ssl.SSLSocket socket, java.lang.String hostname)
      Constructor with the SSL socket and the expected hostname.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getHostname()
      Get the expected hostname.
      javax.net.ssl.SSLSocket getSSLSocket()
      Get the SSL socket against which the hostname verification failed.
      private static java.lang.String stringifyPrincipal​(javax.net.ssl.SSLSocket socket)  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • mSSLSocket

        private final javax.net.ssl.SSLSocket mSSLSocket
      • mHostname

        private final java.lang.String mHostname
    • Constructor Detail

      • HostnameUnverifiedException

        public HostnameUnverifiedException​(javax.net.ssl.SSLSocket socket,
                                           java.lang.String hostname)
        Constructor with the SSL socket and the expected hostname.
        Parameters:
        socket - The SSL socket against which the hostname verification failed.
        hostname - The expected hostname.
    • Method Detail

      • stringifyPrincipal

        private static java.lang.String stringifyPrincipal​(javax.net.ssl.SSLSocket socket)
      • getSSLSocket

        public javax.net.ssl.SSLSocket getSSLSocket()
        Get the SSL socket against which the hostname verification failed.
        Returns:
        The SSL socket.
      • getHostname

        public java.lang.String getHostname()
        Get the expected hostname.
        Returns:
        The expected hostname.