SSL Certificate Examples · Example 2 of 4 in Certificate Problems
A Self-Signed Certificate
A self-signed certificate: issuer equals subject, self_signed is true and invalid_reason says "self-signed certificate".
Asks for the certificate of self-signed.badssl.com.
issuer.dn and subject.dn are the same (CN=*.badssl.com,O=BadSSL,L=San Francisco,ST=California,C=US): the certificate signs itself. signature.self_signed is true, signature.valid is false and invalid_reason is self-signed certificate, although the certificate has not expired.