From f7ab19b1b7ba929f7fd1550e2e4ecebe91cd9ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 28 Apr 2020 18:01:13 +0200 Subject: [PATCH] mark Deno.startTls as unstable (#4965) --- cli/ops/tls.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cli/ops/tls.rs b/cli/ops/tls.rs index d422014fd5beff..48c89be81083c4 100644 --- a/cli/ops/tls.rs +++ b/cli/ops/tls.rs @@ -54,10 +54,11 @@ struct StartTLSArgs { pub fn op_start_tls( isolate: &mut CoreIsolate, - _state: &State, + state: &State, args: Value, _zero_copy: Option, ) -> Result { + state.check_unstable("Deno.startTls"); let args: StartTLSArgs = serde_json::from_value(args)?; let rid = args.rid as u32; let cert_file = args.cert_file.clone(); @@ -68,6 +69,11 @@ pub fn op_start_tls( domain.push_str("localhost"); } + state.check_net(&domain, 0)?; + if let Some(path) = cert_file.clone() { + state.check_read(Path::new(&path))?; + } + let op = async move { let mut resource_holder = { let mut resource_table_ = resource_table.borrow_mut();