Class ASN1Subject

    • Method Detail

      • country

        public final String country()

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

        Returns:
        Two-digit code that specifies the country in which the certificate subject located.
      • organization

        public final String organization()

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

        Returns:
        Legal name of the organization with which the certificate subject is affiliated.
      • organizationalUnit

        public final String organizationalUnit()

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

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

        public final String distinguishedNameQualifier()

        Disambiguating information for the certificate subject.

        Returns:
        Disambiguating information for the certificate subject.
      • state

        public final String state()

        State in which the subject of the certificate is located.

        Returns:
        State in which the subject of the certificate is located.
      • commonName

        public final String commonName()

        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.

        Returns:
        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.

      • serialNumber

        public final String serialNumber()

        The certificate serial number.

        Returns:
        The certificate serial number.
      • locality

        public final String locality()

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

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

        public final String title()

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

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

        public final String surname()

        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.

        Returns:
        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.
      • givenName

        public final String givenName()

        First name.

        Returns:
        First name.
      • initials

        public final String initials()

        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.

        Returns:
        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.
      • pseudonym

        public final String pseudonym()

        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.

        Returns:
        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.
      • generationQualifier

        public final String generationQualifier()

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

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

        public final boolean hasCustomAttributes()
        For responses, this returns true if the service returned a value for the CustomAttributes property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
      • customAttributes

        public final List<CustomAttribute> customAttributes()

        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.

        Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

        This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasCustomAttributes() method.

        Returns:

        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.

      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)