public
class
SslCertificate
extends Object
java.lang.Object | |
↳ | android.net.http.SslCertificate |
SSL certificate info (certificate details) class
Nested classes | |
---|---|
class |
SslCertificate.DName
A distinguished name helper class: a 3-tuple of:
|
Public constructors | |
---|---|
SslCertificate(String issuedTo, String issuedBy, String validNotBefore, String validNotAfter)
This constructor was deprecated
in API level 8.
Use |
|
SslCertificate(String issuedTo, String issuedBy, Date validNotBefore, Date validNotAfter)
This constructor was deprecated
in API level 12.
Use |
|
SslCertificate(X509Certificate certificate)
Creates a new SSL certificate object from an X509 certificate |
Public methods | |
---|---|
SslCertificate.DName
|
getIssuedBy()
|
SslCertificate.DName
|
getIssuedTo()
|
String
|
getValidNotAfter()
This method was deprecated
in API level 8.
Use |
Date
|
getValidNotAfterDate()
|
String
|
getValidNotBefore()
This method was deprecated
in API level 8.
Use |
Date
|
getValidNotBeforeDate()
|
static
SslCertificate
|
restoreState(Bundle bundle)
Restores the certificate stored in the bundle |
static
Bundle
|
saveState(SslCertificate certificate)
Saves the certificate state to a bundle |
String
|
toString()
Returns a string representation of the object. |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
SslCertificate (String issuedTo, String issuedBy, String validNotBefore, String validNotAfter)
This constructor was deprecated
in API level 8.
Use SslCertificate(X509Certificate)
Creates a new SSL certificate object
Parameters | |
---|---|
issuedTo |
String :
The entity this certificate is issued to |
issuedBy |
String :
The entity that issued this certificate |
validNotBefore |
String :
The not-before date from the certificate
validity period in ISO 8601 format |
validNotAfter |
String :
The not-after date from the certificate
validity period in ISO 8601 format |
SslCertificate (String issuedTo, String issuedBy, Date validNotBefore, Date validNotAfter)
This constructor was deprecated
in API level 12.
Use SslCertificate(X509Certificate)
Creates a new SSL certificate object
Parameters | |
---|---|
issuedTo |
String :
The entity this certificate is issued to |
issuedBy |
String :
The entity that issued this certificate |
validNotBefore |
Date :
The not-before date from the certificate validity period |
validNotAfter |
Date :
The not-after date from the certificate validity period |
SslCertificate (X509Certificate certificate)
Creates a new SSL certificate object from an X509 certificate
Parameters | |
---|---|
certificate |
X509Certificate :
X509 certificate
|
SslCertificate.DName getIssuedBy ()
Returns | |
---|---|
SslCertificate.DName |
Issued-by distinguished name or null if none has been set |
SslCertificate.DName getIssuedTo ()
Returns | |
---|---|
SslCertificate.DName |
Issued-to distinguished name or null if none has been set |
String getValidNotAfter ()
This method was deprecated
in API level 8.
Use getValidNotAfterDate()
Returns | |
---|---|
String |
Not-after date from the certificate validity period in ISO 8601 format or "" if none has been set |
Date getValidNotAfterDate ()
Returns | |
---|---|
Date |
Not-after date from the certificate validity period or "" if none has been set |
String getValidNotBefore ()
This method was deprecated
in API level 8.
Use getValidNotBeforeDate()
Returns | |
---|---|
String |
Not-before date from the certificate validity period in ISO 8601 format or "" if none has been set |
Date getValidNotBeforeDate ()
Returns | |
---|---|
Date |
Not-before date from the certificate validity period or "" if none has been set |
SslCertificate restoreState (Bundle bundle)
Restores the certificate stored in the bundle
Parameters | |
---|---|
bundle |
Bundle :
The bundle with the certificate state stored in it |
Returns | |
---|---|
SslCertificate |
The SSL certificate stored in the bundle or null if fails |
Bundle saveState (SslCertificate certificate)
Saves the certificate state to a bundle
Parameters | |
---|---|
certificate |
SslCertificate :
The SSL certificate to store |
Returns | |
---|---|
Bundle |
A bundle with the certificate stored in it or null if fails |
String toString ()
Returns a string representation of the object. In general, the
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
Returns | |
---|---|
String |
A string representation of this certificate for debugging |