pub struct DynCertResolver { /* private fields */ }Expand description
Thread-safe certificate store that resolves certs by SNI hostname.
New certs can be added at runtime without restarting the TLS listener.
Implementations§
Source§impl DynCertResolver
impl DynCertResolver
pub fn new() -> Self
Sourcepub fn with_fallback() -> Result<Self>
pub fn with_fallback() -> Result<Self>
A resolver that answers every handshake, using a self-signed certificate when it has none for the requested name. The client then gets a certificate warning and, past it, orca’s error page, instead of a dead connection.
Sourcepub fn add_cert(&self, domain: &str, key: Arc<CertifiedKey>)
pub fn add_cert(&self, domain: &str, key: Arc<CertifiedKey>)
Add or replace a certificate for a domain.
Trait Implementations§
Source§impl Clone for DynCertResolver
impl Clone for DynCertResolver
Source§impl Debug for DynCertResolver
impl Debug for DynCertResolver
Source§impl Default for DynCertResolver
impl Default for DynCertResolver
Source§impl ResolvesServerCert for DynCertResolver
impl ResolvesServerCert for DynCertResolver
Source§fn resolve(&self, client_hello: ClientHello<'_>) -> Option<Arc<CertifiedKey>>
fn resolve(&self, client_hello: ClientHello<'_>) -> Option<Arc<CertifiedKey>>
Choose a certificate chain and matching key given simplified
ClientHello information. Read more
Source§fn only_raw_public_keys(&self) -> bool
fn only_raw_public_keys(&self) -> bool
Return true when the server only supports raw public keys.
Auto Trait Implementations§
impl !RefUnwindSafe for DynCertResolver
impl !UnwindSafe for DynCertResolver
impl Freeze for DynCertResolver
impl Send for DynCertResolver
impl Sync for DynCertResolver
impl Unpin for DynCertResolver
impl UnsafeUnpin for DynCertResolver
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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