X509Cert

class X509Cert(val encodedCertificate: ByteArray)

A data type for a X509 certificate.

Parameters

encodedCertificate

the bytes of the X.509 certificate.

Constructors

Link copied to clipboard
constructor(encodedCertificate: ByteArray)

Types

Link copied to clipboard
class Builder(publicKey: EcPublicKey, signingKey: EcPrivateKey, signatureAlgorithm: Algorithm, serialNumber: ASN1Integer, subject: X500Name, issuer: X500Name, validFrom: Instant, validUntil: Instant)

Builder for X.509 certificate.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The authority key identifier (OID 2.5.29.35), or null if not present in the certificate.

Link copied to clipboard

The OIDs for X.509 extensions which are marked as critical.

Link copied to clipboard

The public key in the certificate, as an Elliptic Curve key.

Link copied to clipboard
Link copied to clipboard

The list of decoded extensions information.

Link copied to clipboard

The issuer of the certificate.

Link copied to clipboard
val X509Cert.javaX509Certificate: <Error class: unknown class>

The Java X509 certificate from the encoded certificate data.

Link copied to clipboard

The key usage (OID 2.5.29.15) or the empty set if not present.

Link copied to clipboard

The OIDs for X.509 extensions which are not marked as critical.

Link copied to clipboard

The certificate serial number.

Link copied to clipboard

The certificate signature.

Link copied to clipboard

The signature algorithm for the certificate.

Link copied to clipboard

The signature algorithm for the certificate as OID string.

Link copied to clipboard

The subject of the certificate.

Link copied to clipboard

The subject key identifier (OID 2.5.29.14), or null if not present in the certificate.

Link copied to clipboard

The bytes of TBSCertificate.

Link copied to clipboard
val validityNotAfter: Instant

The point in time where the certificate is valid until.

Link copied to clipboard
val validityNotBefore: Instant

The point in time where the certificate is valid from.

Link copied to clipboard

The certificate version.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard

Gets the bytes of a X.509 extension.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

Gets an DataItem with the encoded X.509 certificate.

Link copied to clipboard
fun toPem(): String

Encode this certificate in PEM format

Link copied to clipboard
fun verify(publicKey: EcPublicKey)

Checks if the certificate was signed with a given key.