pub struct CaPolicy {
pub ca_file: PathBuf,
pub subject: Vec<String>,
pub san: Vec<String>,
pub ip_in_dns: bool,
}Expand description
A CA trust policy: certificates signed by the CAs in a PEM file whose subject and subject alternative names match optional globs.
Fields§
§ca_file: PathBufPEM file with the trusted CA certificates.
subject: Vec<String>Globs matched against the subject, rendered as by x509-parser; empty matches any.
san: Vec<String>Globs matched against the subject alternative names; empty matches any, otherwise one
name must match one glob. A glob without a prefix matches a DNS, email, URI or IP name;
dns:, ip:, email:, uri: or upn: limits it to that kind. IP addresses are
matched in canonical text (IPv6 compressed, an IPv4-mapped address as its IPv4 one),
and a glob that is an IP literal is made canonical too, so ip:::1 matches
0:0:0:0:0:0:0:1.
ip_in_dns: boolWhether a DNS name that is an IP literal also matches as that address (an ip: glob,
in canonical text). Some issuers put an address in a dNSName for clients that do not
read IP SANs. true by default; false matches an ip: glob against iPAddress
names only.