summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsher Gomez <ashersaupingomez@gmail.com>2024-04-21 13:03:44 +1000
committerGitHub <noreply@github.com>2024-04-21 03:03:44 +0000
commit2f5a6a8514ad8eadce1a0a9f1a7a419692e337ef (patch)
tree882f6bbe3ecd56e55d0a545a63a5c761b09624fc
parent14ae4f897f3c92fd8f2d4ac06ce7fb3015071d2b (diff)
FUTURE(ext/net): remove `Deno.ConnectTlsOptions.(certFile|certChain|privateKey)` (#23270)
Towards #23089 --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
-rw-r--r--tests/specs/future/runtime_api/main.js23
-rw-r--r--tests/specs/future/runtime_api/main.out2
2 files changed, 24 insertions, 1 deletions
diff --git a/tests/specs/future/runtime_api/main.js b/tests/specs/future/runtime_api/main.js
index b44291218..eac8ed194 100644
--- a/tests/specs/future/runtime_api/main.js
+++ b/tests/specs/future/runtime_api/main.js
@@ -74,7 +74,6 @@ const tlsConn = await Deno.connectTls({ port: tlsPort });
console.log("Deno.TlsConn.prototype.rid is", tlsConn.rid);
tlsConn.close();
-tlsListener.close();
const watcher = Deno.watchFs(".");
console.log("Deno.FsWatcher.prototype.rid is", watcher.rid);
@@ -94,6 +93,28 @@ try {
// Note: this could throw with a `Deno.errors.NotFound` error if `keyFile` and
// `certFile` were used.
+const conn1 = await Deno.connectTls({
+ port: tlsPort,
+ certFile: "foo",
+ keyFile: "foo",
+});
+conn1.close();
+console.log("Deno.ConnectTlsOptions.(certFile|keyFile) do nothing");
+
+// Note: this could throw with a `Deno.errors.InvalidData` error if `certChain`
+// and `privateKey` were used.
+const conn2 = await Deno.connectTls({
+ port: tlsPort,
+ certChain: "foo",
+ privateKey: "foo",
+});
+conn2.close();
+console.log("Deno.ConnectTlsOptions.(certChain|privateKey) do nothing");
+
+tlsListener.close();
+
+// Note: this could throw with a `Deno.errors.NotFound` error if `keyFile` and
+// `certFile` were used.
try {
Deno.listenTls({ port: tlsPort, keyFile: "foo", certFile: "foo" });
} catch (error) {
diff --git a/tests/specs/future/runtime_api/main.out b/tests/specs/future/runtime_api/main.out
index 07b588495..4712a06b0 100644
--- a/tests/specs/future/runtime_api/main.out
+++ b/tests/specs/future/runtime_api/main.out
@@ -34,5 +34,7 @@ Deno.TlsListener.prototype.rid is undefined
Deno.TlsConn.prototype.rid is undefined
Deno.FsWatcher.prototype.rid is undefined
Deno.FsFile constructor is illegal
+Deno.ConnectTlsOptions.(certFile|keyFile) do nothing
+Deno.ConnectTlsOptions.(certChain|privateKey) do nothing
Deno.ListenTlsOptions.(keyFile|certFile) do nothing
Deno.customInspect is undefined