crypto.parse_x509_cert

crypto

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:

key_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.