Pike v8.0 release 1738

Method Standards.X509.load_authorities()


Method load_authorities

mapping(string:array(Verifier)) load_authorities(string|array(string)|void root_cert_dirs)

Description

Convenience function for loading known root certificates.

Parameter root_cert_dirs

Directory/directories containing the PEM-encoded root certificates to load. Defaults to a rather long list of directories, including "/etc/ssl/certs", "/etc/pki/tls/certs" and "/System/Library/OpenSSL/certs", which seem to be the most common locations.

Returns

Returns a mapping from DER-encoded issuer to Verifiers compatible with eg verify_certificate()

Note

If a certificate directory contains a file named "ca-certificates.crt", it is assumed to contain a concatenation of all the certificates in the directory.

See also

verify_certificate(), verify_certificate_chain()