mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
feat: stabilize 'alpnProtocols' setting (#19704)
Ref https://github.com/denoland/deno/issues/19685
This commit is contained in:
parent
aaabff710f
commit
39872646eb
4 changed files with 17 additions and 38 deletions
|
@ -4788,7 +4788,7 @@ fn lsp_completions_auto_import() {
|
||||||
"source": "./b.ts",
|
"source": "./b.ts",
|
||||||
"data": {
|
"data": {
|
||||||
"exportName": "foo",
|
"exportName": "foo",
|
||||||
"exportMapKey": "foo|6799|file:///a/b",
|
"exportMapKey": "foo|6802|file:///a/b",
|
||||||
"moduleSpecifier": "./b.ts",
|
"moduleSpecifier": "./b.ts",
|
||||||
"fileName": "file:///a/b.ts"
|
"fileName": "file:///a/b.ts"
|
||||||
},
|
},
|
||||||
|
|
35
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
35
cli/tsc/dts/lib.deno.unstable.d.ts
vendored
|
@ -1132,13 +1132,6 @@ declare namespace Deno {
|
||||||
* PEM formatted (RSA or PKCS8) private key of client certificate.
|
* PEM formatted (RSA or PKCS8) private key of client certificate.
|
||||||
*/
|
*/
|
||||||
privateKey?: string;
|
privateKey?: string;
|
||||||
/** **UNSTABLE**: New API, yet to be vetted.
|
|
||||||
*
|
|
||||||
* Application-Layer Protocol Negotiation (ALPN) protocols supported by
|
|
||||||
* the client. If not specified, no ALPN extension will be included in the
|
|
||||||
* TLS handshake.
|
|
||||||
*/
|
|
||||||
alpnProtocols?: string[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** **UNSTABLE**: New API, yet to be vetted.
|
/** **UNSTABLE**: New API, yet to be vetted.
|
||||||
|
@ -1188,34 +1181,6 @@ declare namespace Deno {
|
||||||
*/
|
*/
|
||||||
export function connectTls(options: ConnectTlsOptions): Promise<TlsConn>;
|
export function connectTls(options: ConnectTlsOptions): Promise<TlsConn>;
|
||||||
|
|
||||||
/** **UNSTABLE**: New API, yet to be vetted.
|
|
||||||
*
|
|
||||||
* @category Network
|
|
||||||
*/
|
|
||||||
export interface ListenTlsOptions {
|
|
||||||
/** **UNSTABLE**: New API, yet to be vetted.
|
|
||||||
*
|
|
||||||
* Application-Layer Protocol Negotiation (ALPN) protocols to announce to
|
|
||||||
* the client. If not specified, no ALPN extension will be included in the
|
|
||||||
* TLS handshake.
|
|
||||||
*/
|
|
||||||
alpnProtocols?: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** **UNSTABLE**: New API, yet to be vetted.
|
|
||||||
*
|
|
||||||
* @category Network
|
|
||||||
*/
|
|
||||||
export interface StartTlsOptions {
|
|
||||||
/** **UNSTABLE**: New API, yet to be vetted.
|
|
||||||
*
|
|
||||||
* Application-Layer Protocol Negotiation (ALPN) protocols to announce to
|
|
||||||
* the client. If not specified, no ALPN extension will be included in the
|
|
||||||
* TLS handshake.
|
|
||||||
*/
|
|
||||||
alpnProtocols?: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** **UNSTABLE**: New API, yet to be vetted.
|
/** **UNSTABLE**: New API, yet to be vetted.
|
||||||
*
|
*
|
||||||
* Acquire an advisory file-system lock for the provided file.
|
* Acquire an advisory file-system lock for the provided file.
|
||||||
|
|
16
ext/net/lib.deno_net.d.ts
vendored
16
ext/net/lib.deno_net.d.ts
vendored
|
@ -161,6 +161,12 @@ declare namespace Deno {
|
||||||
keyFile?: string;
|
keyFile?: string;
|
||||||
|
|
||||||
transport?: "tcp";
|
transport?: "tcp";
|
||||||
|
|
||||||
|
/** Application-Layer Protocol Negotiation (ALPN) protocols to announce to
|
||||||
|
* the client. If not specified, no ALPN extension will be included in the
|
||||||
|
* TLS handshake.
|
||||||
|
*/
|
||||||
|
alpnProtocols?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Listen announces on the local transport address over TLS (transport layer
|
/** Listen announces on the local transport address over TLS (transport layer
|
||||||
|
@ -243,6 +249,11 @@ declare namespace Deno {
|
||||||
*
|
*
|
||||||
* Must be in PEM format. */
|
* Must be in PEM format. */
|
||||||
caCerts?: string[];
|
caCerts?: string[];
|
||||||
|
/** Application-Layer Protocol Negotiation (ALPN) protocols supported by
|
||||||
|
* the client. If not specified, no ALPN extension will be included in the
|
||||||
|
* TLS handshake.
|
||||||
|
*/
|
||||||
|
alpnProtocols?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Establishes a secure connection over TLS (transport layer security) using
|
/** Establishes a secure connection over TLS (transport layer security) using
|
||||||
|
@ -276,6 +287,11 @@ declare namespace Deno {
|
||||||
*
|
*
|
||||||
* Must be in PEM format. */
|
* Must be in PEM format. */
|
||||||
caCerts?: string[];
|
caCerts?: string[];
|
||||||
|
/** Application-Layer Protocol Negotiation (ALPN) protocols to announce to
|
||||||
|
* the client. If not specified, no ALPN extension will be included in the
|
||||||
|
* TLS handshake.
|
||||||
|
*/
|
||||||
|
alpnProtocols?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Start TLS handshake from an existing connection using an optional list of
|
/** Start TLS handshake from an existing connection using an optional list of
|
||||||
|
|
|
@ -841,7 +841,6 @@ where
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
if let Some(alpn_protocols) = args.alpn_protocols {
|
if let Some(alpn_protocols) = args.alpn_protocols {
|
||||||
super::check_unstable2(&state, "Deno.startTls#alpnProtocols");
|
|
||||||
tls_config.alpn_protocols =
|
tls_config.alpn_protocols =
|
||||||
alpn_protocols.into_iter().map(|s| s.into_bytes()).collect();
|
alpn_protocols.into_iter().map(|s| s.into_bytes()).collect();
|
||||||
}
|
}
|
||||||
|
@ -940,7 +939,6 @@ where
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
if let Some(alpn_protocols) = args.alpn_protocols {
|
if let Some(alpn_protocols) = args.alpn_protocols {
|
||||||
super::check_unstable2(&state, "Deno.connectTls#alpnProtocols");
|
|
||||||
tls_config.alpn_protocols =
|
tls_config.alpn_protocols =
|
||||||
alpn_protocols.into_iter().map(|s| s.into_bytes()).collect();
|
alpn_protocols.into_iter().map(|s| s.into_bytes()).collect();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue