pub struct VerificationPolicy {
pub identity: Option<String>,
pub issuer: Option<String>,
pub verify_tlog: bool,
pub verify_timestamp: bool,
pub verify_certificate: bool,
pub clock_skew_seconds: i64,
}Expand description
Policy for verifying signatures
Fields§
§identity: Option<String>Expected identity (email or URI)
issuer: Option<String>Expected issuer
verify_tlog: boolVerify transparency log inclusion
verify_timestamp: boolVerify timestamp
verify_certificate: boolVerify certificate chain
clock_skew_seconds: i64Clock skew tolerance in seconds for time validation
This allows for a tolerance when checking that integrated times are not in the future. Default is 60 seconds.
Implementations§
Source§impl VerificationPolicy
impl VerificationPolicy
Sourcepub fn with_identity(identity: impl Into<String>) -> Self
pub fn with_identity(identity: impl Into<String>) -> Self
Create a policy that requires a specific identity
Sourcepub fn with_issuer(issuer: impl Into<String>) -> Self
pub fn with_issuer(issuer: impl Into<String>) -> Self
Create a policy that requires a specific issuer
Sourcepub fn require_identity(self, identity: impl Into<String>) -> Self
pub fn require_identity(self, identity: impl Into<String>) -> Self
Require a specific identity
Sourcepub fn require_issuer(self, issuer: impl Into<String>) -> Self
pub fn require_issuer(self, issuer: impl Into<String>) -> Self
Require a specific issuer
Sourcepub fn skip_timestamp(self) -> Self
pub fn skip_timestamp(self) -> Self
Skip timestamp verification
Sourcepub fn skip_certificate_chain(self) -> Self
pub fn skip_certificate_chain(self) -> Self
Skip certificate chain verification
WARNING: This is unsafe for production use. Only use for testing with bundles that don’t chain to the trusted root.
Sourcepub fn with_clock_skew_seconds(self, seconds: i64) -> Self
pub fn with_clock_skew_seconds(self, seconds: i64) -> Self
Set the clock skew tolerance in seconds
This allows for a tolerance when checking that integrated times are not in the future. Default is 60 seconds.
Trait Implementations§
Source§impl Clone for VerificationPolicy
impl Clone for VerificationPolicy
Source§fn clone(&self) -> VerificationPolicy
fn clone(&self) -> VerificationPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more