diff --git a/src/classes/Agent.js b/src/classes/Agent.js index faff0f26..70f8bbfb 100644 --- a/src/classes/Agent.js +++ b/src/classes/Agent.js @@ -120,6 +120,7 @@ class Agent { host: configuration.hostname || configuration.host, port: configuration.port || 80, proxy, + tls: {}, }; // add optional tls options for https requests. diff --git a/src/types.js b/src/types.js index c012a74c..e2f1a993 100644 --- a/src/types.js +++ b/src/types.js @@ -19,9 +19,29 @@ export type ProxyConfigurationType = {| +port: number, |}; +export type TlsConfigurationType = {| + +ca?: string, + +cert?: string, + +ciphers?: string, + +clientCertEngine?: string, + +crl?: string, + +dhparam?: string, + +ecdhCurve?: string, + +honorCipherOrder?: boolean, + +key?: string, + +passphrase?: string, + +pfx?: string, + +rejectUnauthorized?: boolean, + +secureOptions?: number, + +secureProtocol?: string, + +servername?: string, + +sessionIdContext?: string, +|}; + export type ConnectionConfigurationType = {| +host: string, +port: number, + +tls?: TlsConfigurationType, +proxy: ProxyConfigurationType, |};