diff options
author | Yury Selivanov <yury@edgedb.com> | 2021-11-26 10:59:53 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-26 19:59:53 +0100 |
commit | 1d3f734e1815bf1649e0cac445be9eacb4cd296d (patch) | |
tree | f0178e951f3f44313def5d7ea8e2e391219f7791 /cli/dts/lib.deno.unstable.d.ts | |
parent | d763633781be484bb19b458208dd7c11efb83228 (diff) |
feat(ext/net): ALPN support in `Deno.connectTls()` (#12786)
Diffstat (limited to 'cli/dts/lib.deno.unstable.d.ts')
-rw-r--r-- | cli/dts/lib.deno.unstable.d.ts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.unstable.d.ts b/cli/dts/lib.deno.unstable.d.ts index ddf597a0a..fd62a9486 100644 --- a/cli/dts/lib.deno.unstable.d.ts +++ b/cli/dts/lib.deno.unstable.d.ts @@ -935,6 +935,29 @@ declare namespace Deno { certChain?: string; /** PEM formatted (RSA or PKCS8) private key of client certificate. */ 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[]; + } + + export interface TlsHandshakeInfo { + /** **UNSTABLE**: new API, yet to be vetted. + * + * Contains the ALPN protocol selected during negotiation with the server. + * If no ALPN protocol selected, returns `null`. + */ + alpnProtocol: string | null; + } + + export interface TlsConn extends Conn { + /** Runs the client or server handshake protocol to completion if that has + * not happened yet. Calling this method is optional; the TLS handshake + * will be completed automatically as soon as data is sent or received. */ + handshake(): Promise<TlsHandshakeInfo>; } /** **UNSTABLE** New API, yet to be vetted. @@ -964,6 +987,16 @@ declare namespace Deno { alpnProtocols?: string[]; } + 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 should be tested first. * * Acquire an advisory file-system lock for the provided file. `exclusive` |