pub struct CertificateTransparencyPolicy {
logs: &'static [&'static Log<'static>],
validation_deadline: SystemTime,
}
Expand description
Policy for enforcing Certificate Transparency.
Because Certificate Transparency logs are sharded on a per-year basis and can be trusted or distrusted relatively quickly, rustls stores a validation deadline. Server certificates will be validated against the configured CT logs until the deadline expires. After the deadline, certificates will no longer be validated, and a warning message will be logged. The deadline may vary depending on how often you deploy builds with updated dependencies.
Fields§
§logs: &'static [&'static Log<'static>]
§validation_deadline: SystemTime
Implementations§
source§impl CertificateTransparencyPolicy
impl CertificateTransparencyPolicy
sourcepub fn new(
logs: &'static [&'static Log<'static>],
validation_deadline: SystemTime,
) -> Self
pub fn new( logs: &'static [&'static Log<'static>], validation_deadline: SystemTime, ) -> Self
Create a new policy.
fn verify( &self, cert: &Certificate, now: SystemTime, scts: &mut dyn Iterator<Item = &[u8]>, ) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for CertificateTransparencyPolicy
impl RefUnwindSafe for CertificateTransparencyPolicy
impl Send for CertificateTransparencyPolicy
impl Sync for CertificateTransparencyPolicy
impl Unpin for CertificateTransparencyPolicy
impl UnwindSafe for CertificateTransparencyPolicy
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
§type PreprendResult = Tail
type PreprendResult = Tail
The Resulting [
TupleList
], of an [Prepend::prepend()
] call,
including the prepended entry.