diff options
| author | Matt Mastracci <matthew@mastracci.com> | 2024-04-08 15:01:02 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-08 15:01:02 -0600 |
| commit | cb12a9350332860971387e3a1fb40dc77fa992d3 (patch) | |
| tree | 287def7ddad815423f8bc4196a76f9546940435d /ext/http | |
| parent | 3826598974efd44c9d3da7694c0a325b011bc20a (diff) | |
refactor(ext/tls): use cppgc to deduplicate the tls key loading code (#23289)
Pass the certificates and key files as CPPGC objects.
Towards #23233
Diffstat (limited to 'ext/http')
| -rw-r--r-- | ext/http/00_serve.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/http/00_serve.js b/ext/http/00_serve.js index c87480a11..660287edb 100644 --- a/ext/http/00_serve.js +++ b/ext/http/00_serve.js @@ -70,7 +70,7 @@ import { resourceForReadableStream, } from "ext:deno_web/06_streams.js"; import { listen, listenOptionApiName, TcpConn } from "ext:deno_net/01_net.js"; -import { listenTls } from "ext:deno_net/02_tls.js"; +import { hasTlsKeyPairOptions, listenTls } from "ext:deno_net/02_tls.js"; import { SymbolAsyncDispose } from "ext:deno_web/00_infra.js"; const _upgraded = Symbol("_upgraded"); @@ -535,7 +535,7 @@ function serve(arg1, arg2) { options = {}; } - const wantsHttps = options.cert || options.key; + const wantsHttps = hasTlsKeyPairOptions(options); const wantsUnix = ObjectHasOwn(options, "path"); const signal = options.signal; const onError = options.onError ?? function (error) { |
