summaryrefslogtreecommitdiff
path: root/ext/net/ops_tls.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-09-27 22:36:33 +0200
committerGitHub <noreply@github.com>2022-09-27 22:36:33 +0200
commit212b7dd6da487c070229b6348ec7907b4fecbcf9 (patch)
tree3eb743f90e8b293182a830722eb4ff26bec72039 /ext/net/ops_tls.rs
parenta344368603063bcb281e743f3810ca1e4e46e85d (diff)
feat: Add requesting API name to permission prompt (#15936)
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
Diffstat (limited to 'ext/net/ops_tls.rs')
-rw-r--r--ext/net/ops_tls.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/net/ops_tls.rs b/ext/net/ops_tls.rs
index 1c91674df..230f4359e 100644
--- a/ext/net/ops_tls.rs
+++ b/ext/net/ops_tls.rs
@@ -799,7 +799,7 @@ where
{
let mut s = state.borrow_mut();
let permissions = s.borrow_mut::<NP>();
- permissions.check_net(&(hostname, Some(0)))?;
+ permissions.check_net(&(hostname, Some(0)), "Deno.startTls()")?;
}
let ca_certs = args
@@ -904,9 +904,9 @@ where
{
let mut s = state.borrow_mut();
let permissions = s.borrow_mut::<NP>();
- permissions.check_net(&(hostname, Some(port)))?;
+ permissions.check_net(&(hostname, Some(port)), "Deno.connectTls()")?;
if let Some(path) = cert_file {
- permissions.check_read(Path::new(path))?;
+ permissions.check_read(Path::new(path), "Deno.connectTls()")?;
}
}
@@ -1051,12 +1051,12 @@ where
{
let permissions = state.borrow_mut::<NP>();
- permissions.check_net(&(hostname, Some(port)))?;
+ permissions.check_net(&(hostname, Some(port)), "Deno.listenTls()")?;
if let Some(path) = cert_file {
- permissions.check_read(Path::new(path))?;
+ permissions.check_read(Path::new(path), "Deno.listenTls()")?;
}
if let Some(path) = key_file {
- permissions.check_read(Path::new(path))?;
+ permissions.check_read(Path::new(path), "Deno.listenTls()")?;
}
}