pub fn validate_path_with_profile<V, P>(
chain: &[Certificate],
anchors: &[TrustAnchor],
profile: &P,
now_unix: u64,
verifier: &V,
) -> Result<ValidatedPath>where
V: SignatureVerifier,
P: Profile,Expand description
Validate a certificate chain using a Profile to produce the policy.
This is a convenience wrapper around validate_path for callers that
work with a Profile implementation rather than constructing a
ValidationPolicy directly.
The profile’s Profile::policy method is called with now_unix to
produce the ValidationPolicy. The returned policy’s current_time_unix
is then unconditionally overwritten with now_unix, so that a buggy
Profile implementation that returns the wrong clock value cannot silently
cause validity checks to run against the wrong time.
See validate_path for full documentation of the remaining parameters
and error semantics.
§Errors
Returns Err(Error::...) for each validation failure. See Error for the full list of failure conditions.