Added in API level 1

SslCertificate

open class SslCertificate
kotlin.Any
   ↳ android.net.http.SslCertificate

SSL certificate info (certificate details) class

Summary

Nested classes
open

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)

    Public constructors
    SslCertificate(issuedTo: String!, issuedBy: String!, validNotBefore: String!, validNotAfter: String!)

    Creates a new SSL certificate object

    SslCertificate(issuedTo: String!, issuedBy: String!, validNotBefore: Date!, validNotAfter: Date!)

    Creates a new SSL certificate object

    Creates a new SSL certificate object from an X509 certificate

    Public methods
    open SslCertificate.DName!

    open SslCertificate.DName!

    open String!

    open Date!

    open String!

    open Date!

    open X509Certificate?

    open static SslCertificate!
    restoreState(bundle: Bundle!)

    Restores the certificate stored in the bundle

    open static Bundle!
    saveState(certificate: SslCertificate!)

    Saves the certificate state to a bundle

    open String

    Public constructors

    SslCertificate

    Added in API level 1
    SslCertificate(
        issuedTo: String!,
        issuedBy: String!,
        validNotBefore: String!,
        validNotAfter: String!)

    Deprecated: Use SslCertificate(java.security.cert.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

    Added in API level 1
    SslCertificate(
        issuedTo: String!,
        issuedBy: String!,
        validNotBefore: Date!,
        validNotAfter: Date!)

    Deprecated: Use SslCertificate(java.security.cert.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

    Added in API level 1
    SslCertificate(certificate: X509Certificate!)

    Creates a new SSL certificate object from an X509 certificate

    Parameters
    certificate X509Certificate!: X509 certificate

    Public methods

    getIssuedBy

    Added in API level 1
    open fun getIssuedBy(): SslCertificate.DName!
    Return
    SslCertificate.DName! Issued-by distinguished name or null if none has been set

    getIssuedTo

    Added in API level 1
    open fun getIssuedTo(): SslCertificate.DName!
    Return
    SslCertificate.DName! Issued-to distinguished name or null if none has been set

    getValidNotAfter

    Added in API level 1
    Deprecated in API level 15
    open fun getValidNotAfter(): String!

    Deprecated: Use getValidNotAfterDate()

    Return
    String! Not-after date from the certificate validity period in ISO 8601 format or "" if none has been set

    getValidNotAfterDate

    Added in API level 8
    open fun getValidNotAfterDate(): Date!
    Return
    Date! Not-after date from the certificate validity period or "" if none has been set

    getValidNotBefore

    Added in API level 1
    Deprecated in API level 15
    open fun getValidNotBefore(): String!

    Deprecated: Use getValidNotBeforeDate()

    Return
    String! Not-before date from the certificate validity period in ISO 8601 format or "" if none has been set

    getValidNotBeforeDate

    Added in API level 8
    open fun getValidNotBeforeDate(): Date!
    Return
    Date! Not-before date from the certificate validity period or "" if none has been set

    getX509Certificate

    Added in API level 29
    open fun getX509Certificate(): X509Certificate?
    Return
    X509Certificate? The X509Certificate used to create this SslCertificate or null if no certificate was provided.

    restoreState

    Added in API level 1
    open static fun restoreState(bundle: Bundle!): SslCertificate!

    Restores the certificate stored in the bundle

    Parameters
    bundle Bundle!: The bundle with the certificate state stored in it
    Return
    SslCertificate! The SSL certificate stored in the bundle or null if fails

    saveState

    Added in API level 1
    open static fun saveState(certificate: SslCertificate!): Bundle!

    Saves the certificate state to a bundle

    Parameters
    certificate SslCertificate!: The SSL certificate to store
    Return
    Bundle! A bundle with the certificate stored in it or null if fails

    toString

    Added in API level 1
    open fun toString(): String
    Return
    String A string representation of this certificate for debugging