mirror of
https://github.com/denoland/deno.git
synced 2025-01-03 04:48:52 -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(
|
pub fn op_start_tls(
|
||||||
isolate: &mut CoreIsolate,
|
isolate: &mut CoreIsolate,
|
||||||
_state: &State,
|
state: &State,
|
||||||
args: Value,
|
args: Value,
|
||||||
_zero_copy: Option<ZeroCopyBuf>,
|
_zero_copy: Option<ZeroCopyBuf>,
|
||||||
) -> Result<JsonOp, OpError> {
|
) -> Result<JsonOp, OpError> {
|
||||||
|
state.check_unstable("Deno.startTls");
|
||||||
let args: StartTLSArgs = serde_json::from_value(args)?;
|
let args: StartTLSArgs = serde_json::from_value(args)?;
|
||||||
let rid = args.rid as u32;
|
let rid = args.rid as u32;
|
||||||
let cert_file = args.cert_file.clone();
|
let cert_file = args.cert_file.clone();
|
||||||
|
@ -68,6 +69,11 @@ pub fn op_start_tls(
|
||||||
domain.push_str("localhost");
|
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 op = async move {
|
||||||
let mut resource_holder = {
|
let mut resource_holder = {
|
||||||
let mut resource_table_ = resource_table.borrow_mut();
|
let mut resource_table_ = resource_table.borrow_mut();
|
||||||
|
|
Loading…
Reference in a new issue