From 061ee9d38cdf8ff0ade2373c1e075f841c534c47 Mon Sep 17 00:00:00 2001 From: Satya Rohith Date: Wed, 21 Feb 2024 18:13:01 +0530 Subject: fix(ext/node): pass alpnProtocols to Deno.startTls (#22512) --- ext/node/polyfills/_tls_wrap.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ext/node/polyfills/_tls_wrap.ts') diff --git a/ext/node/polyfills/_tls_wrap.ts b/ext/node/polyfills/_tls_wrap.ts index 315cbf74a..a70dd29f1 100644 --- a/ext/node/polyfills/_tls_wrap.ts +++ b/ext/node/polyfills/_tls_wrap.ts @@ -68,7 +68,7 @@ export class TLSSocket extends net.Socket { secureConnecting: boolean; _SNICallback: any; servername: string | null; - alpnProtocol: any; + alpnProtocols: string[] | null; authorized: boolean; authorizationError: any; [kRes]: any; @@ -96,6 +96,7 @@ export class TLSSocket extends net.Socket { caCerts = [new TextDecoder().decode(caCerts)]; } tlsOptions.caCerts = caCerts; + tlsOptions.alpnProtocols = ["h2", "http/1.1"]; super({ handle: _wrapHandle(tlsOptions, socket), @@ -113,7 +114,7 @@ export class TLSSocket extends net.Socket { this.secureConnecting = true; this._SNICallback = null; this.servername = null; - this.alpnProtocol = null; + this.alpnProtocols = tlsOptions.alpnProtocols; this.authorized = false; this.authorizationError = null; this[kRes] = null; -- cgit v1.2.3