diff --git a/README.md b/README.md index adfa3c259..1a897bf72 100644 --- a/README.md +++ b/README.md @@ -234,7 +234,13 @@ runner.run(collection, { // *note* Not implemented yet. // In the future, this will be used to read certificates from the OS keychain. - systemCertificate: function() {} + systemCertificate: function() {}, + + // Debug options + debug: { + // Enable logging SSL session keys (only supported on Node, ignored in the browser) + sslKeyLogFile: '/path/to/keylogfile', + } }, function (err, run) { console.log('Created a new Run!'); diff --git a/lib/requester/core.js b/lib/requester/core.js index b19a3235d..85848653b 100644 --- a/lib/requester/core.js +++ b/lib/requester/core.js @@ -512,6 +512,8 @@ module.exports = { options.ciphers = protocolProfileBehavior.tlsCipherSelection.join(':'); } + options.sslKeyLogFile = defaultOpts.sslKeyLogFile; + if (typeof defaultOpts.maxResponseSize === 'number') { options.maxResponseSize = defaultOpts.maxResponseSize; } diff --git a/lib/requester/requester-pool.js b/lib/requester/requester-pool.js index f4f403e08..326feb653 100644 --- a/lib/requester/requester-pool.js +++ b/lib/requester/requester-pool.js @@ -38,7 +38,8 @@ RequesterPool = function (options, callback) { removeRefererHeaderOnRedirect: _.get(options, 'requester.removeRefererHeaderOnRedirect'), ignoreProxyEnvironmentVariables: _.get(options, 'ignoreProxyEnvironmentVariables'), network: _.get(options, 'network', {}), - maxHeaderSize: _.get(options, 'requester.maxHeaderSize', 131072) // 128KB + maxHeaderSize: _.get(options, 'requester.maxHeaderSize', 131072), // 128KB + sslKeyLogFile: _.get(options, 'debug.sslKeyLogFile') }); // create a cookie jar if one is not provided diff --git a/lib/runner/index.js b/lib/runner/index.js index 6fcf7c77e..a99547538 100644 --- a/lib/runner/index.js +++ b/lib/runner/index.js @@ -147,7 +147,8 @@ _.assign(Runner.prototype, { collectionVariables: collection.variables, localVariables: options.localVariables, certificates: options.certificates, - proxies: options.proxies + proxies: options.proxies, + debug: options.debug }, runOptions))); }); } diff --git a/package-lock.json b/package-lock.json index e130a35c2..ad27f2fb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "node-oauth1": "1.3.0", "performance-now": "2.1.0", "postman-collection": "5.2.0", - "postman-request": "2.88.1-postman.43", + "postman-request": "github:postmanlabs/postman-request#feature/ssl-keylog", "postman-sandbox": "6.2.1", "postman-url-encoder": "3.0.8", "serialised-error": "1.1.3", @@ -7762,8 +7762,7 @@ }, "node_modules/postman-request": { "version": "2.88.1-postman.43", - "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.43.tgz", - "integrity": "sha512-5ivoZnMvnX47/HA7mk2GQubZsnXptlJGVyO0hLV3MTK/MDgJVnB/q3bUgzU4KhwG8OBxe2L8uqv3ZpK6mp+RdA==", + "resolved": "git+ssh://git@github.com/postmanlabs/postman-request.git#88356438201afcbdd3270ba87b2a3d32e5fa66b1", "license": "Apache-2.0", "dependencies": { "@postman/form-data": "~3.1.1", @@ -16102,9 +16101,8 @@ } }, "postman-request": { - "version": "2.88.1-postman.43", - "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.43.tgz", - "integrity": "sha512-5ivoZnMvnX47/HA7mk2GQubZsnXptlJGVyO0hLV3MTK/MDgJVnB/q3bUgzU4KhwG8OBxe2L8uqv3ZpK6mp+RdA==", + "version": "git+ssh://git@github.com/postmanlabs/postman-request.git#88356438201afcbdd3270ba87b2a3d32e5fa66b1", + "from": "postman-request@github:postmanlabs/postman-request#feature/ssl-keylog", "requires": { "@postman/form-data": "~3.1.1", "@postman/tough-cookie": "~4.1.3-postman.1", diff --git a/package.json b/package.json index 7117e2622..162e8629d 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "node-oauth1": "1.3.0", "performance-now": "2.1.0", "postman-collection": "5.2.0", - "postman-request": "2.88.1-postman.43", + "postman-request": "github:postmanlabs/postman-request#feature/ssl-keylog", "postman-sandbox": "6.2.1", "postman-url-encoder": "3.0.8", "serialised-error": "1.1.3",