#[non_exhaustive]pub enum RootCerts {
Specific(Arc<Vec<Certificate<'static>>>),
PlatformVerifier,
WebPki,
}Expand description
Configuration setting for root certs.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Specific(Arc<Vec<Certificate<'static>>>)
Use these specific certificates as root certs.
PlatformVerifier
Use the platform’s verifier.
- For rustls, this uses the
rustls-platform-verifiercrate. It requires the feature platform-verifier. - For native-tls, this uses the roots that native-tls loads by default.
WebPki
Use Mozilla’s root certificates instead of the platform.
This is useful when you can’t trust the system roots, such as in environments where TLS is intercepted and decrypted by a proxy (MITM attack).
This is the default value.
Implementations§
Source§impl RootCerts
impl RootCerts
Sourcepub fn new_with_certs(certs: &[Certificate<'static>]) -> Self
pub fn new_with_certs(certs: &[Certificate<'static>]) -> Self
Use these specific root certificates
Trait Implementations§
Source§impl<I: IntoIterator<Item = Certificate<'static>>> From<I> for RootCerts
impl<I: IntoIterator<Item = Certificate<'static>>> From<I> for RootCerts
Auto Trait Implementations§
impl Freeze for RootCerts
impl RefUnwindSafe for RootCerts
impl Send for RootCerts
impl Sync for RootCerts
impl Unpin for RootCerts
impl UnwindSafe for RootCerts
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