CertificateSubject

data class CertificateSubject(val commonName: String? = null, val country: String? = null, val customAttributes: List<CertificateCustomAttribute>? = null, val distinguishedNameQualifier: String? = null, val generationQualifier: String? = null, val givenName: String? = null, val initials: String? = null, val locality: String? = null, val organization: String? = null, val organizationalUnit: String? = null, val pseudonym: String? = null, val serialNumber: String? = null, val state: String? = null, val surname: String? = null, val title: String? = null)

Contains information about the certificate subject. The `Subject` field in the certificate identifies the entity that owns or controls the public key in the certificate. The entity can be a user, computer, device, or service. The `Subject`must contain an X.500 distinguished name (DN). A DN is a sequence of relative distinguished names (RDNs). The RDNs are separated by commas in the certificate.

Constructors

Link copied to clipboard
constructor(commonName: String? = null, country: String? = null, customAttributes: List<CertificateCustomAttribute>? = null, distinguishedNameQualifier: String? = null, generationQualifier: String? = null, givenName: String? = null, initials: String? = null, locality: String? = null, organization: String? = null, organizationalUnit: String? = null, pseudonym: String? = null, serialNumber: String? = null, state: String? = null, surname: String? = null, title: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val commonName: String? = null

For CA and end-entity certificates in a private PKI, the common name (CN) can be any string within the length limit. Note: In publicly trusted certificates, the common name must be a fully qualified domain name (FQDN) associated with the certificate subject.

Link copied to clipboard
val country: String? = null

Two-digit code that specifies the country in which the certificate subject located.

Link copied to clipboard

Contains a sequence of one or more X.500 relative distinguished names (RDNs), each of which consists of an object identifier (OID) and a value. For more information, see NIST’s definition of Object Identifier (OID). Custom attributes cannot be used in combination with standard attributes.

Link copied to clipboard

Disambiguating information for the certificate subject.

Link copied to clipboard

Typically a qualifier appended to the name of an individual. Examples include Jr. for junior, Sr. for senior, and III for third.

Link copied to clipboard
val givenName: String? = null

First name.

Link copied to clipboard
val initials: String? = null

Concatenation that typically contains the first letter of the GivenName, the first letter of the middle name if one exists, and the first letter of the Surname.

Link copied to clipboard
val locality: String? = null

The locality (such as a city or town) in which the certificate subject is located.

Link copied to clipboard
val organization: String? = null

Legal name of the organization with which the certificate subject is affiliated.

Link copied to clipboard

A subdivision or unit of the organization (such as sales or finance) with which the certificate subject is affiliated.

Link copied to clipboard
val pseudonym: String? = null

Typically a shortened version of a longer GivenName. For example, Jonathan is often shortened to John. Elizabeth is often shortened to Beth, Liz, or Eliza.

Link copied to clipboard
val serialNumber: String? = null

The certificate serial number.

Link copied to clipboard
val state: String? = null

State in which the subject of the certificate is located.

Link copied to clipboard
val surname: String? = null

Family name. In the US and the UK, for example, the surname of an individual is ordered last. In Asian cultures the surname is typically ordered first.

Link copied to clipboard
val title: String? = null

A title such as Mr. or Ms., which is pre-pended to the name to refer formally to the certificate subject.