summaryrefslogtreecommitdiff
path: root/cli/lsp/config.rs
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2022-01-24 11:27:52 +1100
committerGitHub <noreply@github.com>2022-01-24 11:27:52 +1100
commit3ec248cff8fff1a41c2b2ad5301e7aa3db00c6a8 (patch)
tree549b791b6d9718a51d3f7c8258e076beafab64df /cli/lsp/config.rs
parent3959d9f2d285bd45beb34074cf61090e2c4976dc (diff)
fix(lsp): respect DENO_CERT and other options related to TLS certs (#13467)
Fixes #13437
Diffstat (limited to 'cli/lsp/config.rs')
-rw-r--r--cli/lsp/config.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs
index 89924a22a..37558e1b7 100644
--- a/cli/lsp/config.rs
+++ b/cli/lsp/config.rs
@@ -154,6 +154,10 @@ pub struct WorkspaceSettings {
/// cache/DENO_DIR for the language server.
pub cache: Option<String>,
+ /// Override the default stores used to validate certificates. This overrides
+ /// the environment variable `DENO_TLS_CA_STORE` if present.
+ pub certificate_stores: Option<Vec<String>>,
+
/// An option that points to a path string of the config file to apply to
/// code within the workspace.
pub config: Option<String>,
@@ -179,6 +183,15 @@ pub struct WorkspaceSettings {
#[serde(default)]
pub suggest: CompletionSettings,
+ /// An option which sets the cert file to use when attempting to fetch remote
+ /// resources. This overrides `DENO_CERT` if present.
+ pub tls_certificate: Option<String>,
+
+ /// An option, if set, will unsafely ignore certificate errors when fetching
+ /// remote resources.
+ #[serde(default)]
+ pub unsafely_ignore_certificate_errors: Option<Vec<String>>,
+
#[serde(default)]
pub unstable: bool,
}
@@ -485,6 +498,7 @@ mod tests {
WorkspaceSettings {
enable: false,
cache: None,
+ certificate_stores: None,
config: None,
import_map: None,
code_lens: CodeLensSettings {
@@ -505,6 +519,8 @@ mod tests {
hosts: HashMap::new(),
}
},
+ tls_certificate: None,
+ unsafely_ignore_certificate_errors: None,
unstable: false,
}
);