From ea8b7af8c6b87f37396342ade7cfd4c5298ac6f6 Mon Sep 17 00:00:00 2001 From: kazuyamamoto Date: Tue, 17 Oct 2017 05:16:08 +0900 Subject: [PATCH] [node] Add tls.getCiphers() and tls.DEFAULT_ECDH_CURVE (#20482) https://nodejs.org/api/tls.html#tls_tls_getciphers https://nodejs.org/api/tls.html#tls_tls_default_ecdh_curve --- types/node/index.d.ts | 3 +++ types/node/node-tests.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index e259ae44e3..923a3802ae 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -4882,6 +4882,9 @@ declare module "tls" { export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket; export function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair; export function createSecureContext(details: SecureContextOptions): SecureContext; + export function getCiphers(): string[]; + + export var DEFAULT_ECDH_CURVE: string; } declare module "crypto" { diff --git a/types/node/node-tests.ts b/types/node/node-tests.ts index 6788b83ea6..50d9659744 100644 --- a/types/node/node-tests.ts +++ b/types/node/node-tests.ts @@ -979,6 +979,9 @@ namespace tls_tests { port: 55 }; var tlsSocket = tls.connect(connOpts); + + const ciphers: string[] = tls.getCiphers(); + const curve: string = tls.DEFAULT_ECDH_CURVE; } {