public class SslError extends Object
Modifier and Type | Field and Description |
---|---|
static int |
SSL_DATE_INVALID
The date of the certificate is invalid
|
static int |
SSL_EXPIRED
The certificate has expired
|
static int |
SSL_IDMISMATCH
Hostname mismatch
|
static int |
SSL_INVALID
A generic error occurred
|
static int |
SSL_MAX_ERROR
Deprecated.
This constant is not necessary for using the SslError API and
can change from release to release.
|
static int |
SSL_NOTYETVALID
The certificate is not yet valid
|
static int |
SSL_UNTRUSTED
The certificate authority is not trusted
|
Constructor and Description |
---|
SslError(int error,
SslCertificate certificate)
Deprecated.
|
SslError(int error,
SslCertificate certificate,
String url)
Creates a new SslError object using the supplied error, certificate and
URL.
|
SslError(int error,
X509Certificate certificate)
Deprecated.
|
SslError(int error,
X509Certificate certificate,
String url)
Creates a new SslError object using the supplied error, certificate and
URL.
|
Modifier and Type | Method and Description |
---|---|
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.
|
static SslError |
SslErrorFromChromiumErrorCode(int error,
SslCertificate cert,
String url)
Creates an SslError object from a chromium error code.
|
String |
toString()
Returns a string representation of this object.
|
public static final int SSL_NOTYETVALID
public static final int SSL_EXPIRED
public static final int SSL_IDMISMATCH
public static final int SSL_UNTRUSTED
public static final int SSL_DATE_INVALID
public static final int SSL_INVALID
@Deprecated public static final int SSL_MAX_ERROR
@Deprecated public SslError(int error, SslCertificate certificate)
SslError(int, SslCertificate, String)
error
- The SSL errorcertificate
- The associated SSL certificate@Deprecated public SslError(int error, X509Certificate certificate)
SslError(int, X509Certificate, String)
error
- The SSL errorcertificate
- The associated SSL certificatepublic SslError(int error, SslCertificate certificate, String url)
error
- The SSL errorcertificate
- The associated SSL certificateurl
- The associated URLpublic SslError(int error, X509Certificate certificate, String url)
error
- The SSL errorcertificate
- The associated SSL certificateurl
- The associated URLpublic static SslError SslErrorFromChromiumErrorCode(int error, SslCertificate cert, String url)
error
- The chromium error codecertificate
- The associated SSL certificateurl
- The associated URL.public SslCertificate getCertificate()
public String getUrl()
public boolean addError(int error)
error
- The SSL error to addpublic boolean hasError(int error)
error
- The SSL error to check forpublic int getPrimaryError()