pub struct CertCache { /* private fields */ }Expand description
Thread-safe LRU cache for per-domain TLS certificates.
On cache miss, generates a new certificate signed by the CA. Expired
entries are evicted on access. The cache is bounded by max_entries.
Implementations§
Source§impl CertCache
impl CertCache
Sourcepub fn new(ca: CaKeyPair, config: &CertCacheConfig) -> Self
pub fn new(ca: CaKeyPair, config: &CertCacheConfig) -> Self
Creates a new certificate cache.
Sourcepub fn get_or_generate(&self, domain: &str) -> Result<Arc<CertifiedKey>>
pub fn get_or_generate(&self, domain: &str) -> Result<Arc<CertifiedKey>>
Returns a cached CertifiedKey for the domain, generating one if
absent or expired.
Auto Trait Implementations§
impl !Freeze for CertCache
impl !RefUnwindSafe for CertCache
impl Send for CertCache
impl Sync for CertCache
impl Unpin for CertCache
impl UnsafeUnpin for CertCache
impl !UnwindSafe for CertCache
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