Build 1.0_r1(from source)

android.net.http
Class SslCertificate

java.lang.Object
  extended by android.net.http.SslCertificate

public class SslCertificate
extends Object

SSL certificate info (certificate details) class


Nested Class Summary
 class SslCertificate.DName
          A distinguished name helper class: a 3-tuple of: - common name (CN), - organization (O), - organizational unit (OU)
 
Constructor Summary
SslCertificate(String issuedTo, String issuedBy, String validNotBefore, String validNotAfter)
          Creates a new SSL certificate object
SslCertificate(X509Certificate certificate)
          Creates a new SSL certificate object from an X509 certificate
 
Method Summary
 SslCertificate.DName getIssuedBy()
           
 SslCertificate.DName getIssuedTo()
           
 String getValidNotAfter()
           
 String getValidNotBefore()
           
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 containing a concise, human-readable description of the receiver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SslCertificate

public SslCertificate(String issuedTo,
                      String issuedBy,
                      String validNotBefore,
                      String validNotAfter)
Creates a new SSL certificate object

Parameters:
issuedTo - The entity this certificate is issued to
issuedBy - The entity that issued this certificate
validNotBefore - The not-before date from the certificate validity period
validNotAfter - The not-after date from the certificate validity period

SslCertificate

public SslCertificate(X509Certificate certificate)
Creates a new SSL certificate object from an X509 certificate

Parameters:
certificate - X509 certificate
Method Detail

saveState

public static Bundle saveState(SslCertificate certificate)
Saves the certificate state to a bundle

Parameters:
certificate - The SSL certificate to store
Returns:
A bundle with the certificate stored in it or null if fails

restoreState

public static SslCertificate restoreState(Bundle bundle)
Restores the certificate stored in the bundle

Parameters:
bundle - The bundle with the certificate state stored in it
Returns:
The SSL certificate stored in the bundle or null if fails

getValidNotBefore

public String getValidNotBefore()
Returns:
Not-before date from the certificate validity period or "" if none has been set

getValidNotAfter

public String getValidNotAfter()
Returns:
Not-after date from the certificate validity period or "" if none has been set

getIssuedTo

public SslCertificate.DName getIssuedTo()
Returns:
Issued-to distinguished name or null if none has been set

getIssuedBy

public SslCertificate.DName getIssuedBy()
Returns:
Issued-by distinguished name or null if none has been set

toString

public String toString()
Description copied from class: Object
Returns a string containing a concise, human-readable description of the receiver.

Overrides:
toString in class Object
Returns:
A string representation of this certificate for debugging

Build 1.0_r1(from source)

Please submit a feedback, bug or feature