EchConfigMismatchException
public
class
EchConfigMismatchException
extends SSLException
| java.lang.Object | |||||
| ↳ | java.lang.Throwable | ||||
| ↳ | java.lang.Exception | ||||
| ↳ | java.io.IOException | ||||
| ↳ | javax.net.ssl.SSLException | ||||
| ↳ | android.net.ssl.EchConfigMismatchException | ||||
Exception thrown when the provided ECH (Encrypted Client Hello) config does not match the server.
Before accessing the retry configuration, clients must call getPublicHostname()
and verify that the hostname matches the connection hostname (using their preferred HostnameVerifier). If the returned hostname is null, any provided retry
configuration must be ignored.
Clients can then attempt to establish a new connection, using the provided retry EchConfigList, if available. A retry EchConfigList may not be available if the server
has not provided any.
Summary
Public constructors | |
|---|---|
EchConfigMismatchException(String message, String publicName, EchConfigList echRetryConfigList)
Constructs a new |
|
Public methods | |
|---|---|
String
|
getPublicHostname()
Returns the hostname that should be used for verification. |
EchConfigList
|
getRetryConfigList()
Returns the |
boolean
|
hasRetryConfigList()
Returns |
Inherited methods | |
|---|---|
Public constructors
EchConfigMismatchException
public EchConfigMismatchException (String message, String publicName, EchConfigList echRetryConfigList)
Constructs a new EchConfigMismatchException.
| Parameters | |
|---|---|
message |
String: the detail message.
This value may be null. |
publicName |
String: the hostname that must be used for verification, or null if the
server did not provide a valid public name. |
echRetryConfigList |
EchConfigList: the EchConfigList provided by the server for retrying the
connection, or null if no retry configuration was set by the server. |
Public methods
getPublicHostname
public String getPublicHostname ()
Returns the hostname that should be used for verification.
This method must be called before interpreting the retry config list, returned by getRetryConfigList().
For more details see section 6.1.7 "Authenticating for the Public Name" in RFC TLS Encrypted
Client Hello (draft-ietf-tls-esni-25).
| Returns | |
|---|---|
String |
This value may be null. |
getRetryConfigList
public EchConfigList getRetryConfigList ()
Returns the EchConfigList provided by the server for retrying the connection, or
null if no retry configuration was set by the server.
Prior to reading this value, the client must verify that the certificate is valid for
the name returned by getPublicHostname().
| Returns | |
|---|---|
EchConfigList |
|
hasRetryConfigList
public boolean hasRetryConfigList ()
Returns true if a retry EchConfigList is available, false otherwise.
| Returns | |
|---|---|
boolean |
|