summaryrefslogtreecommitdiff
path: root/cli/js/tls.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/tls.ts')
-rw-r--r--cli/js/tls.ts24
1 files changed, 12 insertions, 12 deletions
diff --git a/cli/js/tls.ts b/cli/js/tls.ts
index f60eb24cb..270d724bb 100644
--- a/cli/js/tls.ts
+++ b/cli/js/tls.ts
@@ -4,20 +4,20 @@ import { Listener, Conn, ConnImpl, ListenerImpl } from "./net.ts";
// TODO(ry) There are many configuration options to add...
// https://docs.rs/rustls/0.16.0/rustls/struct.ClientConfig.html
-interface ConnectTLSOptions {
+interface ConnectTlsOptions {
transport?: "tcp";
port: number;
hostname?: string;
certFile?: string;
}
-export async function connectTLS({
+export async function connectTls({
port,
hostname = "127.0.0.1",
transport = "tcp",
certFile = undefined,
-}: ConnectTLSOptions): Promise<Conn> {
- const res = await tlsOps.connectTLS({
+}: ConnectTlsOptions): Promise<Conn> {
+ const res = await tlsOps.connectTls({
port,
hostname,
transport,
@@ -33,7 +33,7 @@ class TLSListenerImpl extends ListenerImpl {
}
}
-export interface ListenTLSOptions {
+export interface ListenTlsOptions {
port: number;
hostname?: string;
transport?: "tcp";
@@ -41,14 +41,14 @@ export interface ListenTLSOptions {
keyFile: string;
}
-export function listenTLS({
+export function listenTls({
port,
certFile,
keyFile,
hostname = "0.0.0.0",
transport = "tcp",
-}: ListenTLSOptions): Listener {
- const res = tlsOps.listenTLS({
+}: ListenTlsOptions): Listener {
+ const res = tlsOps.listenTls({
port,
certFile,
keyFile,
@@ -58,16 +58,16 @@ export function listenTLS({
return new TLSListenerImpl(res.rid, res.localAddr);
}
-interface StartTLSOptions {
+interface StartTlsOptions {
hostname?: string;
certFile?: string;
}
-export async function startTLS(
+export async function startTls(
conn: Conn,
- { hostname = "127.0.0.1", certFile = undefined }: StartTLSOptions = {}
+ { hostname = "127.0.0.1", certFile = undefined }: StartTlsOptions = {}
): Promise<Conn> {
- const res = await tlsOps.startTLS({
+ const res = await tlsOps.startTls({
rid: conn.rid,
hostname,
certFile,