A human-readable string representation of the certificate's subject Distinguished Name.
Formatted as /<type>=<value> entries (for example,
"/C=US/O=Example/CN=example.com"). Attribute values are not escaped for
structural delimiters such as / or =, so the returned string is
ambiguous and can be spoofed by a peer certificate containing delimiters
inside an attribute value.
Do not parse or match subject for security or trust decisions (for
example, in onBadCertificate). For certificate pinning, compare der
(or a cryptographic hash such as SHA-256 of der). For structured
inspection of Distinguished Name components or Subject Alternative Names,
parse der or pem with an ASN.1 / X.509 parser.
Implementation
String get subject;