mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add tls.createSecureContext to node.js typing.
This commit is contained in:
Vendored
+16
@@ -1236,11 +1236,27 @@ declare module "tls" {
|
||||
cleartext: any;
|
||||
}
|
||||
|
||||
export interface SecureContextOptions {
|
||||
pfx?: any; //string | buffer
|
||||
key?: any; //string | buffer
|
||||
passphrase?: string;
|
||||
cert?: any; // string | buffer
|
||||
ca?: any; // string | buffer
|
||||
crl?: any; // string | string[]
|
||||
ciphers?: string;
|
||||
honorCipherOrder?: boolean;
|
||||
}
|
||||
|
||||
export interface SecureContext {
|
||||
context: any;
|
||||
}
|
||||
|
||||
export function createServer(options: TlsOptions, secureConnectionListener?: (cleartextStream: ClearTextStream) =>void ): Server;
|
||||
export function connect(options: TlsOptions, secureConnectionListener?: () =>void ): ClearTextStream;
|
||||
export function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () =>void ): ClearTextStream;
|
||||
export function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () =>void ): ClearTextStream;
|
||||
export function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
|
||||
export function createSecureContext(details: SecureContextOptions): SecureContext;
|
||||
}
|
||||
|
||||
declare module "crypto" {
|
||||
|
||||
Reference in New Issue
Block a user