Pike v8.1 release 6

Method Standards.X509.verify_certificate()


Method verify_certificate

TBSCertificate verify_certificate(string s, mapping(string:Verifier|array(Verifier)) authorities)

Description

Decodes a certificate, checks the signature. Returns the TBSCertificate structure, or 0 if decoding or verification failes. The valid time range for the certificate is not checked.

Authorities is a mapping from (DER-encoded) names to a verifiers.

Note

This function allows self-signed certificates, and it doesn't check that names or extensions make sense.