1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

chore: cleanup ext/net/02_tls.js (#22032)

`certFile` was being passed to `op_tls_start()` when it's unused and
undocumented.

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
This commit is contained in:
Asher Gomez 2024-02-14 07:34:36 +11:00 committed by GitHub
parent b651990684
commit 365d788648
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,14 +17,6 @@ const {
import { Conn, Listener } from "ext:deno_net/01_net.js";
function opStartTls(args) {
return op_tls_start(args);
}
function opTlsHandshake(rid) {
return op_tls_handshake(rid);
}
class TlsConn extends Conn {
#rid = 0;
@ -47,7 +39,7 @@ class TlsConn extends Conn {
}
handshake() {
return opTlsHandshake(this.#rid);
return op_tls_handshake(this.#rid);
}
}
@ -150,15 +142,13 @@ async function startTls(
conn,
{
hostname = "127.0.0.1",
certFile = undefined,
caCerts = [],
alpnProtocols = undefined,
} = {},
) {
const { 0: rid, 1: localAddr, 2: remoteAddr } = await opStartTls({
const { 0: rid, 1: localAddr, 2: remoteAddr } = await op_tls_start({
rid: conn[internalRidSymbol],
hostname,
certFile,
caCerts,
alpnProtocols,
});