# Print output for @column tags ?>
public
class
SslError
extends Object
java.lang.Object | |
↳ | android.net.http.SslError |
This class represents a set of one or more SSL errors and the associated SSL certificate.
Constants | |
---|---|
int |
SSL_DATE_INVALID
The date of the certificate is invalid |
int |
SSL_EXPIRED
The certificate has expired |
int |
SSL_IDMISMATCH
Hostname mismatch |
int |
SSL_INVALID
A generic error occurred |
int |
SSL_MAX_ERROR
This constant is deprecated. This constant is not necessary for using the SslError API and can change from release to release. |
int |
SSL_NOTYETVALID
The certificate is not yet valid |
int |
SSL_UNTRUSTED
The certificate authority is not trusted |
Public constructors | |
---|---|
SslError(int error, SslCertificate certificate)
This constructor is deprecated.
Use |
|
SslError(int error, X509Certificate certificate)
This constructor is deprecated.
Use |
|
SslError(int error, SslCertificate certificate, String url)
Creates a new SslError object using the supplied error, certificate and URL. |
|
SslError(int error, X509Certificate certificate, String url)
Creates a new SslError object using the supplied error, certificate and URL. |
Public methods | |
---|---|
boolean
|
addError(int error)
Adds the supplied SSL error to the set. |
SslCertificate
|
getCertificate()
Gets the SSL certificate associated with this object. |
int
|
getPrimaryError()
Gets the most severe SSL error in this object's set of errors. |
String
|
getUrl()
Gets the URL associated with this object. |
boolean
|
hasError(int error)
Determines whether this object includes the supplied error. |
String
|
toString()
Returns a string representation of this object. |
Inherited methods | |
---|---|
public static final int SSL_DATE_INVALID
The date of the certificate is invalid
Constant Value: 4 (0x00000004)
public static final int SSL_EXPIRED
The certificate has expired
Constant Value: 1 (0x00000001)
public static final int SSL_IDMISMATCH
Hostname mismatch
Constant Value: 2 (0x00000002)
public static final int SSL_INVALID
A generic error occurred
Constant Value: 5 (0x00000005)
public static final int SSL_MAX_ERROR
This constant is deprecated.
This constant is not necessary for using the SslError API and
can change from release to release.
The number of different SSL errors.
Constant Value: 6 (0x00000006)
public static final int SSL_NOTYETVALID
The certificate is not yet valid
Constant Value: 0 (0x00000000)
public static final int SSL_UNTRUSTED
The certificate authority is not trusted
Constant Value: 3 (0x00000003)
public SslError (int error, SslCertificate certificate)
This constructor is deprecated.
Use SslError(int, android.net.http.SslCertificate, java.lang.String)
Creates a new SslError object using the supplied error and certificate. The URL will be set to the empty string.
Parameters | |
---|---|
error |
int : The SSL error |
certificate |
SslCertificate : The associated SSL certificate |
public SslError (int error, X509Certificate certificate)
This constructor is deprecated.
Use SslError(int, java.security.cert.X509Certificate, java.lang.String)
Creates a new SslError object using the supplied error and certificate. The URL will be set to the empty string.
Parameters | |
---|---|
error |
int : The SSL error |
certificate |
X509Certificate : The associated SSL certificate |
public SslError (int error, SslCertificate certificate, String url)
Creates a new SslError object using the supplied error, certificate and URL.
Parameters | |
---|---|
error |
int : The SSL error |
certificate |
SslCertificate : The associated SSL certificate |
url |
String : The associated URL |
public SslError (int error, X509Certificate certificate, String url)
Creates a new SslError object using the supplied error, certificate and URL.
Parameters | |
---|---|
error |
int : The SSL error |
certificate |
X509Certificate : The associated SSL certificate |
url |
String : The associated URL |
public boolean addError (int error)
Adds the supplied SSL error to the set.
Parameters | |
---|---|
error |
int : The SSL error to add |
Returns | |
---|---|
boolean |
True if the error being added is a known SSL error, otherwise false. |
public SslCertificate getCertificate ()
Gets the SSL certificate associated with this object.
Returns | |
---|---|
SslCertificate |
The SSL certificate, non-null. |
public int getPrimaryError ()
Gets the most severe SSL error in this object's set of errors. Returns -1 if the set is empty.
Returns | |
---|---|
int |
The most severe SSL error, or -1 if the set is empty. |
public String getUrl ()
Gets the URL associated with this object.
Returns | |
---|---|
String |
The URL, non-null. |
public boolean hasError (int error)
Determines whether this object includes the supplied error.
Parameters | |
---|---|
error |
int : The SSL error to check for |
Returns | |
---|---|
boolean |
True if this object includes the error, otherwise false. |