From b7341438f29de88f3458b32a835bfad560bda52e Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Fri, 29 Oct 2021 17:13:31 +0200 Subject: feat: stabilize Deno.startTls (#12581) This commit stabilizes `Deno.startTls` and removes `certFile` from the `StartTlsOptions`. --- cli/tests/unit/tls_test.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'cli/tests/unit') diff --git a/cli/tests/unit/tls_test.ts b/cli/tests/unit/tls_test.ts index c66f958d0..fb8888be4 100644 --- a/cli/tests/unit/tls_test.ts +++ b/cli/tests/unit/tls_test.ts @@ -1105,23 +1105,6 @@ unitTest( }, ); -unitTest( - { permissions: { read: true, net: true } }, - async function startTLSCertFile() { - const plainConn = await Deno.connect({ - hostname: "localhost", - port: 4557, - }); - const conn = await Deno.startTls(plainConn, { - hostname: "localhost", - certFile: "cli/tests/testdata/tls/RootCA.pem", - }); - const result = decoder.decode(await readAll(conn)); - assertEquals(result, "PASS"); - conn.close(); - }, -); - unitTest( { permissions: { read: true, net: true } }, async function tlsHandshakeSuccess() { @@ -1235,7 +1218,7 @@ unitTest( const tcpConn = await Deno.connect({ hostname, port }); const tlsConn = await Deno.startTls(tcpConn, { hostname: "foo.land", - certFile: "cli/tests/testdata/tls/RootCA.crt", + caCerts: [Deno.readTextFileSync("cli/tests/testdata/tls/RootCA.pem")], }); // Handshake fails because hostname doesn't match the certificate. await assertRejects( -- cgit v1.2.3