diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/net/lib.deno_net.d.ts | 13 | ||||
-rw-r--r-- | ext/net/ops_tls.rs | 7 |
2 files changed, 11 insertions, 9 deletions
diff --git a/ext/net/lib.deno_net.d.ts b/ext/net/lib.deno_net.d.ts index 180d8897d..64744b19e 100644 --- a/ext/net/lib.deno_net.d.ts +++ b/ext/net/lib.deno_net.d.ts @@ -84,8 +84,13 @@ declare namespace Deno { } /** @category Network */ - // deno-lint-ignore no-empty-interface - export interface TlsHandshakeInfo {} + export interface TlsHandshakeInfo { + /** + * Contains the ALPN protocol selected during negotiation with the server. + * If no ALPN protocol selected, returns `null`. + */ + alpnProtocol: string | null; + } /** @category Network */ export interface TlsConn extends Conn { @@ -247,6 +252,10 @@ declare namespace Deno { * TLS handshake. */ alpnProtocols?: string[]; + /** PEM formatted client certificate chain. */ + certChain?: string; + /** PEM formatted (RSA or PKCS8) private key of client certificate. */ + privateKey?: string; } /** Establishes a secure connection over TLS (transport layer security) using diff --git a/ext/net/ops_tls.rs b/ext/net/ops_tls.rs index a36443977..d16bface4 100644 --- a/ext/net/ops_tls.rs +++ b/ext/net/ops_tls.rs @@ -261,13 +261,6 @@ where .try_borrow::<UnsafelyIgnoreCertificateErrors>() .and_then(|it| it.0.clone()); - if args.cert_chain.is_some() { - super::check_unstable(&state.borrow(), "ConnectTlsOptions.certChain"); - } - if args.private_key.is_some() { - super::check_unstable(&state.borrow(), "ConnectTlsOptions.privateKey"); - } - { let mut s = state.borrow_mut(); let permissions = s.borrow_mut::<NP>(); |