From 5995d1d3a7b995681953cd20003f943dee146d4b Mon Sep 17 00:00:00 2001 From: Matt Broadstone Date: Thu, 16 Jan 2020 11:55:54 -0500 Subject: [PATCH] fix(cmap): accept all node TLS options as pool options NODE-2424 --- lib/cmap/connection_pool.js | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/lib/cmap/connection_pool.js b/lib/cmap/connection_pool.js index 829075aca6..f070cc71f7 100644 --- a/lib/cmap/connection_pool.js +++ b/lib/cmap/connection_pool.js @@ -36,8 +36,7 @@ const kCancelled = Symbol('cancelled'); const VALID_POOL_OPTIONS = new Set([ // `connect` options - 'host', - 'port', + 'ssl', 'bson', 'connectionType', 'monitorCommands', @@ -46,14 +45,38 @@ const VALID_POOL_OPTIONS = new Set([ 'compression', // node Net options - 'ssl', + 'host', + 'port', 'localAddress', 'localPort', 'family', 'hints', 'lookup', - 'checkServerIdentity', + 'path', + + // node TLS options + 'ca', + 'cert', + 'sigalgs', + 'ciphers', + 'clientCertEngine', + 'crl', + 'dhparam', + 'ecdhCurve', + 'honorCipherOrder', + 'key', + 'privateKeyEngine', + 'privateKeyIdentifier', + 'maxVersion', + 'minVersion', + 'passphrase', + 'pfx', + 'secureOptions', + 'secureProtocol', + 'sessionIdContext', + 'allowHalfOpen', 'rejectUnauthorized', + 'pskCallback', 'ALPNProtocols', 'servername', 'checkServerIdentity',