parse_x509_cert(
cert) ->cert_info,err
Parse an X.509 certificate
Accepts a certificate in PEM or DER format. PEM armor is stripped automatically. Returns a table with these fields:
common_name: the subject's CN, absent when the subject has nonenot_before, not_after: the validity span, Unix timestamps as stringssans: the DNS names of the SubjectAltName extension, absent when nonekey_hash: the SHA-256 of the SubjectPublicKeyInfo, 32 raw byteskey_hash is the value peer_key_hash returns on a LEV TLS client
socket whose server shows this certificate. It depends on the key alone:
a certificate renewed over the same key keeps it.