Package com.neovisionaries.ws.client
Class HostnameUnverifiedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.neovisionaries.ws.client.WebSocketException
com.neovisionaries.ws.client.HostnameUnverifiedException
- All Implemented Interfaces:
Serializable
The certificate of the peer does not match the expected hostname.
WebSocketException.getError()
of this class returns HOSTNAME_UNVERIFIED
.
See Verify that certificate is valid for server hostname (#107).
- Since:
- 2.1
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHostnameUnverifiedException
(SSLSocket socket, String hostname) Constructor with the SSL socket and the expected hostname. -
Method Summary
Modifier and TypeMethodDescriptionGet the expected hostname.Get the SSL socket against which the hostname verification failed.private static String
stringifyPrincipal
(SSLSocket socket) Methods inherited from class com.neovisionaries.ws.client.WebSocketException
getError
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
mSSLSocket
-
mHostname
-
-
Constructor Details
-
HostnameUnverifiedException
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 Details
-
stringifyPrincipal
-
getSSLSocket
Get the SSL socket against which the hostname verification failed.- Returns:
- The SSL socket.
-
getHostname
Get the expected hostname.- Returns:
- The expected hostname.
-