mirror of
https://github.com/denoland/deno.git
synced 2024-12-21 23:04:45 -05:00
mark Deno.startTls as unstable (#4965)
This commit is contained in:
parent
76ee6fb335
commit
f7ab19b1b7
1 changed files with 7 additions and 1 deletions
|
@ -54,10 +54,11 @@ struct StartTLSArgs {
|
|||
|
||||
pub fn op_start_tls(
|
||||
isolate: &mut CoreIsolate,
|
||||
_state: &State,
|
||||
state: &State,
|
||||
args: Value,
|
||||
_zero_copy: Option<ZeroCopyBuf>,
|
||||
) -> Result<JsonOp, OpError> {
|
||||
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();
|
||||
|
|
Loading…
Reference in a new issue