Package-level declarations

Types

Link copied to clipboard
object CertScan

Properties

Link copied to clipboard
const val ALT_DNS_NAME: Int = 2
Link copied to clipboard
const val ALT_IPA_NAME: Int = 7
Link copied to clipboard
const val ALT_RFC822_NAME: Int = 1
Link copied to clipboard

PEM certificate pattern

Link copied to clipboard
Link copied to clipboard

Returns the certificate subject DN (common name) from the certificate

Link copied to clipboard

Returns the certificate expiry date time in UTC.

Link copied to clipboard

Returns true if the certificate is a CA certificate.

Link copied to clipboard

Returns true if the certificate is an intermediate CA certificate, false otherwise.

Link copied to clipboard
Link copied to clipboard

Returns true if the certificate is self-signed, false otherwise.

Link copied to clipboard

Returns the subject alternative names from the certificate.

Functions

Link copied to clipboard
fun encodePem(type: String, encoded: ByteArray): String

Encodes the given encoded bytes to PEM format.

Link copied to clipboard
fun isPem(data: String): Boolean

Checks if the given string is a PEM encoded certificate.

Link copied to clipboard

Returns true if the cert chain is signed by given Root CA

Link copied to clipboard

Read all X.509 certificates from the given PEM encoded certificate.

Link copied to clipboard

Returns true if the certificate is signed by the given ca cert., false otherwise.