pub struct KeyTrustPolicy {
pub mode: VerificationTrustMode,
pub verify_x509_chains: bool,
pub max_x509_chain_depth: usize,
pub max_x509_candidate_paths: usize,
pub allowed_legacy_signature_algorithms: HashSet<SignatureAlgorithm>,
pub parameterized_rsa_pss: RsaPssPermission,
pub certificate_signature_algorithms: Option<CertificateSignatureAlgorithms>,
pub rsa_keys: RsaKeyPolicy,
pub dsa_keys: DsaKeyPolicy,
pub allowed_extended_key_usages: HashSet<ExtendedKeyPurpose>,
pub check_crls: bool,
pub verification_time: Option<SystemTime>,
}Expand description
X.509 and key-resolution decisions for verification.
Fields§
§mode: VerificationTrustModeWhether mathematical validity alone is sufficient for the operation.
verify_x509_chains: boolRequire embedded or selected certificates to chain to a configured anchor.
max_x509_chain_depth: usizeMaximum validated path depth.
max_x509_candidate_paths: usizeMaximum complete or partial signature-valid path states generated.
allowed_legacy_signature_algorithms: HashSet<SignatureAlgorithm>Legacy signature algorithms explicitly permitted for verification.
parameterized_rsa_pss: RsaPssPermissionIndependent legacy-hash permission for parameterized RSA-PSS verification.
certificate_signature_algorithms: Option<CertificateSignatureAlgorithms>Certificate and CRL signature permissions, independent of XML signatures.
None permits supported classical algorithms but rejects PQ algorithms;
Explicit permissions select either an exact allowlist (including PSS
parameters) or all provider-supported algorithms for compatibility.
rsa_keys: RsaKeyPolicyRSA requirements enforced for resolved verification keys and issuer keys.
dsa_keys: DsaKeyPolicyDSA requirements enforced for resolved verification keys.
allowed_extended_key_usages: HashSet<ExtendedKeyPurpose>Purposes accepted when any certificate in a path carries ExtendedKeyUsage.
An empty set accepts only paths whose certificates omit ExtendedKeyUsage
or use anyExtendedKeyUsage; it does not treat TLS/code-signing purposes
as a generic authorization for XML signatures.
check_crls: boolAuthenticate and enforce embedded CRLs during path validation.
Requires Self::verify_x509_chains.
verification_time: Option<SystemTime>Verification time override; None selects the system clock.
Trait Implementations§
Source§impl Clone for KeyTrustPolicy
impl Clone for KeyTrustPolicy
Source§impl Debug for KeyTrustPolicy
impl Debug for KeyTrustPolicy
Source§impl Default for KeyTrustPolicy
Available on crate feature xmldsig only.
impl Default for KeyTrustPolicy
xmldsig only.