diff options
Diffstat (limited to 'ext/tls/lib.rs')
-rw-r--r-- | ext/tls/lib.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/tls/lib.rs b/ext/tls/lib.rs index 123d35acf..3034e2ae9 100644 --- a/ext/tls/lib.rs +++ b/ext/tls/lib.rs @@ -34,6 +34,14 @@ use std::io::Cursor; use std::sync::Arc; use std::time::SystemTime; +/// Lazily resolves the root cert store. +/// +/// This was done because the root cert store is not needed in all cases +/// and takes a bit of time to initialize. +pub trait RootCertStoreProvider: Send + Sync { + fn get_or_try_init(&self) -> Result<&RootCertStore, AnyError>; +} + // This extension has no runtime apis, it only exports some shared native functions. deno_core::extension!(deno_tls); |