public class SslCertificate extends Object
Modifier and Type | Class and Description |
---|---|
class |
SslCertificate.DName
A distinguished name helper class: a 3-tuple of:
the most specific common name (CN)
the most specific organization (O)
the most specific organizational unit (OU)
|
Constructor and Description |
---|
SslCertificate(String issuedTo,
String issuedBy,
Date validNotBefore,
Date validNotAfter)
Deprecated.
|
SslCertificate(String issuedTo,
String issuedBy,
String validNotBefore,
String validNotAfter)
Deprecated.
|
SslCertificate(X509Certificate certificate)
Creates a new SSL certificate object from an X509 certificate
|
Modifier and Type | Method and Description |
---|---|
SslCertificate.DName |
getIssuedBy() |
SslCertificate.DName |
getIssuedTo() |
String |
getValidNotAfter()
Deprecated.
|
Date |
getValidNotAfterDate() |
String |
getValidNotBefore()
Deprecated.
|
Date |
getValidNotBeforeDate() |
View |
inflateCertificateView(Context context)
Inflates the SSL certificate view (helper method).
|
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.
|
@Deprecated public SslCertificate(String issuedTo, String issuedBy, String validNotBefore, String validNotAfter)
SslCertificate(X509Certificate)
issuedTo
- The entity this certificate is issued toissuedBy
- The entity that issued this certificatevalidNotBefore
- The not-before date from the certificate
validity period in ISO 8601 formatvalidNotAfter
- The not-after date from the certificate
validity period in ISO 8601 format@Deprecated public SslCertificate(String issuedTo, String issuedBy, Date validNotBefore, Date validNotAfter)
SslCertificate(X509Certificate)
issuedTo
- The entity this certificate is issued toissuedBy
- The entity that issued this certificatevalidNotBefore
- The not-before date from the certificate validity periodvalidNotAfter
- The not-after date from the certificate validity periodpublic SslCertificate(X509Certificate certificate)
certificate
- X509 certificatepublic static Bundle saveState(SslCertificate certificate)
certificate
- The SSL certificate to storepublic static SslCertificate restoreState(Bundle bundle)
bundle
- The bundle with the certificate state stored in itpublic Date getValidNotBeforeDate()
@Deprecated public String getValidNotBefore()
getValidNotBeforeDate()
public Date getValidNotAfterDate()
@Deprecated public String getValidNotAfter()
getValidNotAfterDate()
public SslCertificate.DName getIssuedTo()
public SslCertificate.DName getIssuedBy()
public String toString()
Object
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())