summaryrefslogtreecommitdiff
path: root/cli/js/ops
diff options
context:
space:
mode:
authorEnokMan <416828041@qq.com>2020-04-18 10:21:20 -0500
committerGitHub <noreply@github.com>2020-04-18 11:21:20 -0400
commit47617e60d551665ec509e013cfcae30987cb3b2b (patch)
tree5717061b7fd567b5fb8508f565993062f8014722 /cli/js/ops
parent10469ec2798a7f02a6d9371207cc984502039bfa (diff)
feat: startTLS (#4773)
Diffstat (limited to 'cli/js/ops')
-rw-r--r--cli/js/ops/tls.ts14
1 files changed, 12 insertions, 2 deletions
diff --git a/cli/js/ops/tls.ts b/cli/js/ops/tls.ts
index 234e569dd..3964c44bb 100644
--- a/cli/js/ops/tls.ts
+++ b/cli/js/ops/tls.ts
@@ -8,7 +8,7 @@ export interface ConnectTLSRequest {
certFile?: string;
}
-interface ConnectTLSResponse {
+interface EstablishTLSResponse {
rid: number;
localAddr: {
hostname: string;
@@ -24,7 +24,7 @@ interface ConnectTLSResponse {
export function connectTLS(
args: ConnectTLSRequest
-): Promise<ConnectTLSResponse> {
+): Promise<EstablishTLSResponse> {
return sendAsync("op_connect_tls", args);
}
@@ -66,3 +66,13 @@ interface ListenTLSResponse {
export function listenTLS(args: ListenTLSRequest): ListenTLSResponse {
return sendSync("op_listen_tls", args);
}
+
+export interface StartTLSRequest {
+ rid: number;
+ hostname: string;
+ certFile?: string;
+}
+
+export function startTLS(args: StartTLSRequest): Promise<EstablishTLSResponse> {
+ return sendAsync("op_start_tls", args);
+}