From b1ac671208876b45555608bd0cfcb995a1c4d976 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Wed, 13 Mar 2024 08:21:33 +1100 Subject: [PATCH 1/2] refactor(http): use `cert` and `key` for `Deno.listenTls()` --- http/server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http/server.ts b/http/server.ts index 98d951543c3c..7ec8639a71bf 100644 --- a/http/server.ts +++ b/http/server.ts @@ -246,8 +246,8 @@ export class Server { const listener = Deno.listenTls({ port: this.#port ?? HTTPS_PORT, hostname: this.#host ?? "0.0.0.0", - certFile, - keyFile, + cert: await Deno.readTextFile(certFile), + key: await Deno.readTextFile(keyFile), transport: "tcp", // ALPN protocol support not yet stable. // alpnProtocols: ["h2", "http/1.1"], From 238f284bd5e44982a02f0fb5884963c21ddb4847 Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Wed, 13 Mar 2024 13:07:40 +1100 Subject: [PATCH 2/2] fix --- http/server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http/server.ts b/http/server.ts index 7ec8639a71bf..f03dac51a003 100644 --- a/http/server.ts +++ b/http/server.ts @@ -246,8 +246,8 @@ export class Server { const listener = Deno.listenTls({ port: this.#port ?? HTTPS_PORT, hostname: this.#host ?? "0.0.0.0", - cert: await Deno.readTextFile(certFile), - key: await Deno.readTextFile(keyFile), + cert: Deno.readTextFileSync(certFile), + key: Deno.readTextFileSync(keyFile), transport: "tcp", // ALPN protocol support not yet stable. // alpnProtocols: ["h2", "http/1.1"],