diff options
Diffstat (limited to 'runtime/worker.rs')
-rw-r--r-- | runtime/worker.rs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/runtime/worker.rs b/runtime/worker.rs index c64ef2baf..69602d0dd 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -22,6 +22,7 @@ use deno_core::ModuleLoader; use deno_core::ModuleSpecifier; use deno_core::RuntimeOptions; use deno_core::SharedArrayBufferStore; +use deno_tls::rustls::RootCertStore; use deno_web::BlobStore; use log::debug; use std::env; @@ -49,7 +50,7 @@ pub struct WorkerOptions { pub args: Vec<String>, pub debug_flag: bool, pub unstable: bool, - pub ca_data: Option<Vec<u8>>, + pub root_cert_store: Option<RootCertStore>, pub user_agent: String, pub seed: Option<u64>, pub module_loader: Rc<dyn ModuleLoader>, @@ -99,13 +100,13 @@ impl MainWorker { deno_web::init(options.blob_store.clone(), options.location.clone()), deno_fetch::init::<Permissions>( options.user_agent.clone(), - options.ca_data.clone(), + options.root_cert_store.clone(), None, None, ), deno_websocket::init::<Permissions>( options.user_agent.clone(), - options.ca_data.clone(), + options.root_cert_store.clone(), ), deno_webstorage::init(options.origin_storage_dir.clone()), deno_crypto::init(options.seed), @@ -126,7 +127,11 @@ impl MainWorker { ops::fs::init(), ops::io::init(), ops::io::init_stdio(), - deno_net::init::<Permissions>(options.ca_data.clone(), options.unstable), + deno_tls::init(), + deno_net::init::<Permissions>( + options.root_cert_store.clone(), + options.unstable, + ), ops::os::init(), ops::permissions::init(), ops::process::init(), @@ -295,7 +300,7 @@ mod tests { args: vec![], debug_flag: false, unstable: false, - ca_data: None, + root_cert_store: None, seed: None, js_error_create_fn: None, create_web_worker_cb: Arc::new(|_| unreachable!()), |