From ace1202227abeeac78db0266a13b451c1792a6ce Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Wed, 11 Sep 2024 07:55:42 +1000 Subject: BREAKING(net): remove `Deno.ConnectTlsOptions.{certChain,certFile,privateKey}` and `Deno.ListenTlsOptions.certChain,certFile,keyFile}` (#25525) Towards #22079 --- tests/specs/future/runtime_api/main.js | 34 --------------------------------- tests/specs/future/runtime_api/main.out | 3 --- 2 files changed, 37 deletions(-) (limited to 'tests/specs') diff --git a/tests/specs/future/runtime_api/main.js b/tests/specs/future/runtime_api/main.js index a6415b3c1..1b6caac5f 100644 --- a/tests/specs/future/runtime_api/main.js +++ b/tests/specs/future/runtime_api/main.js @@ -31,40 +31,6 @@ 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) { - if ( - error instanceof Deno.errors.InvalidData && - error.message === - "Deno.listenTls requires a key: Error creating TLS certificate" - ) { - console.log("Deno.ListenTlsOptions.(keyFile|certFile) do nothing"); - } -} - self.close(); diff --git a/tests/specs/future/runtime_api/main.out b/tests/specs/future/runtime_api/main.out index f69bd1447..70c62c305 100644 --- a/tests/specs/future/runtime_api/main.out +++ b/tests/specs/future/runtime_api/main.out @@ -2,6 +2,3 @@ window is undefined Deno.Listener.prototype.rid is undefined Deno.TlsListener.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 -- cgit v1.2.3