{"name":"node-ssllabs","version":"0.4.2","description":"A node.js library for the SSL Labs API.","main":"","repository":{"type":"git","url":"https://github.com/keithws/node-ssllabs.git"},"directories":{"test":"test"},"scripts":{"lint":"jshint **/*.js","pretest":"npm run lint","test":"mocha"},"keywords":["ssllabs","api","ssl","scan"],"author":{"name":"Keith Shaw"},"license":"MIT","devDependencies":{"jshint":"^2.7.0","mocha":"^2.2.4","should":"^6.0.1"},"dependencies":{"async":"^0.9.0","underscore":"^1.8.3"},"gitHead":"474732f470849b80e88383296cdff77a11ac3617","bugs":{"url":"https://github.com/keithws/node-ssllabs/issues"},"homepage":"https://github.com/keithws/node-ssllabs","_id":"node-ssllabs@0.4.2","_shasum":"27347cebf5165b0b88e555516a5d952e220b1701","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.2","_npmUser":{"name":"keithws","email":"keith.w.shaw@gmail.com"},"dist":{"shasum":"27347cebf5165b0b88e555516a5d952e220b1701","tarball":"http://registry-npm.ywwl.com/node-ssllabs/download/node-ssllabs-0.4.2.tgz","integrity":"sha512-SWAn9uXjRF6jl4A2ysHsljw1g1RsJwgqHfVf9T7YVXb51v4DmNER/PC2v5cUtR988EjwI0pHQFoJBzyQctT2zw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqDE3qPZE8wsbBi385KTBPKda1JOFJMggUQRdKDRjn+AIgTs6vbPCpcDprVEYHlyBke+tRtYec1962awgmfrEdnJw="}],"size":5976,"noattachment":false,"key":"/node-ssllabs/-/node-ssllabs-0.4.2.tgz"},"maintainers":[{"name":"keithws","email":"keith.w.shaw@gmail.com"}],"readme":"# node-ssllabs\n\nA node.js library for the [SSL Labs API][1].\n\n[![npm version](https://img.shields.io/npm/v/node-ssllabs.svg)](https://www.npmjs.com/package/node-ssllabs)\n[![Build Status](https://travis-ci.com/keithws/node-ssllabs.svg?branch=master)](https://travis-ci.com/keithws/node-ssllabs)\n[![Coverage Status](https://coveralls.io/repos/github/keithws/node-ssllabs/badge.svg?branch=master)](https://coveralls.io/github/keithws/node-ssllabs?branch=master)\n[![dependencies](https://img.shields.io/david/keithws/node-ssllabs.svg)](https://david-dm.org/keithws/node-ssllabs)\n[![npm downloads per month](https://img.shields.io/npm/dm/node-ssllabs.svg)](https://www.npmjs.com/package/node-ssllabs)\n[![License](https://img.shields.io/npm/l/node-ssllabs.svg?color=blue)](https://github.com/keithws/node-ssllabs/blob/master/LICENSE)\n\n\n> SSL Labs APIs expose the complete SSL/TLS server testing functionality in a programmatic fashion, allowing for scheduled and bulk assessment. We are making the APIs available to encourage site operators to regularly test their server configuration.\n\n## Install\n\n\tnpm install node-ssllabs\n\n## Usage\n\n\tvar ssllabs = require(\"node-ssllabs\");\n\t\n\tssllabs.scan(\"www.ssllabs.com\", function (err, host) {\n\t\tconsole.dir(host);\n\t});\n\n## Test Usage\n\nTesting with [Mocha][5] and [Should.js][6].\n\n\tvar ssllabs = require(\"node-ssllabs\"),\n\t\tshould = require(\"should\");\n\t\n\tdescribe(\"www.ssllabs.com\", function () {\n\t\tit(\"should get an A+\", function (done) {\n\t\t\tssllabs.scan(\"www.ssllabs.com\", function (err, host) {\n\t\t\t\tif (err) {\n\t\t\t\t\tthrow err;\n\t\t\t\t}\n\t\t\t\thost.endpoints.forEach(function (endpoint) {\n\t\t\t\t\tendpoint.grade.should.equal(\"A+\");\n\t\t\t\t});\n\t\t\t\tdone();\n\t\t\t});\n\t\t});\n\t});\n\n## Advanced Usage\n\n\tvar ssllabs = require(\"node-ssllabs\");\n\t\n\tssllabs.scan({\n\t\t\"host\": \"www.ssllabs.com\",\n\t\t\"fromCache\": true,\n\t\t\"maxAge\": 24\n\t}, function (err, host) {\n\t\tconsole.dir(host);\n\t});\n\t\n\tssllabs.info(function (err, info) {\n\t\tconsole.dir(info);\n\t});\n\t\n\tssllabs.analyze({\n\t\t\"host\": \"www.ssllabs.com\",\n\t\t\"publish\": true,\n\t\t\"startNew\": true,\n\t\t\"all\": \"done\"\n\t}, function (err, host) {\n\t\tconsole.dir(host);\n\t});\n\t\n\tssllabs.analyze({\n\t\t\"host\": \"www.ssllabs.com\",\n\t\t\"fromCache\": true,\n\t\t\"maxAge\": 72,\n\t\t\"all\": \"on\",\n\t\t\"ignoreMismatch\": true\n\t}, function (err, host) {\n\t\tconsole.dir(host);\n\t});\n\t\n\tssllabs.getEndpointData({\n\t\t\"host\": \"www.ssllabs.com\",\n\t\t\"s\": \"64.41.200.100\",\n\t\t\"fromCache\": true\n\t}, function (err, endpointData) {\n\t\tconsole.dir(endpointData);\n\t});\n\t\n\tssllabs.getStatusCodes(function (err, statusCodes) {\n\t\tconsole.dir(statusCodes);\n\t});\n\t\n\tssllabs.getRootCertsRaw(function (err, rootCertsRaw) {\n\t\tconsole.dir(rootCertsRaw);\n\t});\n\n\tssllabs.getRootCertsRaw({\n\t\ttrustStore: 5\n\t}, function (err, rootCertsRaw) {\n\t\tconsole.dir(rootCertsRaw);\n\t});\n\n\tssllabs.getRootCerts(function (err, rootCerts) {\n\t\tconsole.dir(rootCerts);\n\t});\n\n\tssllabs.getRootCerts({\n\t\ttrustStore: 5\n\t}, function (err, rootCerts) {\n\t\tconsole.dir(rootCerts);\n\t});\n\n\n## Proxy all requests via a tunneling agent\n\nAs of version 1.1.0, this library will respect your `HTTPS_PROXY` environment variable and tunnel all requests to the specified URL. Compatible with all protocols supported by [proxy-agent](https://www.npmjs.com/package/proxy-agent).\n\nAs of version 2.1.0, this library will set the proxy agent on each request it makes and will not override the global HTTP agent.\n\n## License\n\nnode-ssllabs is available under the [MIT License][2].\n\n## Todo\n\n* add (more) support for [access rate and rate limiting][4]\n* incorporate new info field, newAssessmentCoolOff, to access rate and rate limiting\n* add option to specify an array of hosts to scan\n* figure out if the maxAge parameter is required with the fromCache parameter\n* make API version changeable (maybe?) with createClient()?\n\n## TODO for next minor release\n\n* have the `scan` function emit events for polling progress\n\n## TODO for next major release\n\n* promise-ify and modernize\n* refactor to be a Universal ES6 module that can be used client side and server side with the fetch and URL libraries\n* maintain support for using tunneling proxies (server side only?)\n\n## Change Log\n\n*2.1.0— April 16, 2020*\n\n* set proxy agent on each HTTP request instead\n\n*2.0.0— April 10, 2020*\n\n* dropping support for node 6 because eslint and nyc no longer support it\n\n*1.1.3— April 10, 2020*\n\n* added User Agent header to all requests\n* improved error handling\n\n*1.1.2— May 22, 2019*\n\n* refactored code to reduce cognitive complexity\n* increased test coverage\n\n*1.1.1— May 21, 2019*\n\n* refactored code to eliminate some duplicate code\n* added test coverage reporting\n\n*1.1.0— May 4, 2019*\n\n* added support for tunneling proxies via [proxy-agent](https://www.npmjs.com/package/proxy-agent)\n\n*1.0.2— May 3, 2019*\n\n* smaller install\n* better testing\n* faster builds\n\n*1.0.1— May 3, 2019*\n\n* call callback with error instead of throwing\n* normalized error handling code patterns\n* reordered tests so the fast tests run before the slow tests\n* added more tests for error handling in getEndpointData() and getRootCertsRaw()\n\n*1.0.0— May 3, 2019*\n\n* moved async to dev dependency (as it should have been)\n* removed underscore dependency (was very lightly used)\n* added dependency on node v4.0.0 for Object.assign\n\n*0.6.0— May 2, 2019*\n\n* updated API endpoint from v2 to v3\n* updated dependencies\n* switched from JSHint to eslint for syntax checking\n* fixed typos\n* added basic support for access rate and rate limiting to `scan()`\n* added support for the `trustStore` parameter to the `getRootCertsRaw()` call\n* added `getRootCerts()` call that returns the data as a plain-old object\n\n*0.5.0 — July 14, 2016*\n\n* added support for new API call, `getRootCertsRaw`\n* improved testing with Mocha\n* improved `normalizeOptions` function\n* updated documentation\n\n*0.4.3 — May 1, 2015*\n\n* removed requirement that maxAge must be set if fromCache is set\n* added check that fromCache is set if maxAge is set\n* fixed bug where NaN was accepted for the maxAge parameter\n\n*0.4.2 — April 27, 2015*\n\n* added call to `info` before calling `analyze` in the `scan` function\n\n*0.4.1 — April 27, 2015*\n\n* refactored `scan` function to use `analyze` function for dryness\n* improved test to ensure parallel scanning maintains context\n\n*0.4.0 — April 23, 2015*\n\n* added option to only specify a hostname for scanning\n* added test for lost context in parallel scans\n* added test if `startNew` and `fromCache` options are both true\n* added additional parameter tests and verification\n\n*0.3.0 — April 21, 2015*\n\n* added `scan` function to encapsulate [protocol usage][3]\n\n*0.2.0 — April 20, 2015*\n\n* updated to work properly in other packages.\n\n*0.1.0 — April 20, 2015*\n\n* added support for the `getEndpointData` api endpoint.\n* added support for the `getStatusCodes` api endpoint.\n* improved error handling and reporting.\n\n*0.0.1 — April 20, 2015*\n\n* Initial version\n* supports two api endpoints, `info` and `analyze`\n\n\n  [1]: https://www.ssllabs.com/projects/ssllabs-apis/\n  [2]: https://github.com/keithws/node-ssllabs/blob/master/LICENSE\n  [3]: https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md#protocol-usage\n  [4]: https://github.com/ssllabs/ssllabs-scan/blob/master/ssllabs-api-docs.md#access-rate-and-rate-limiting\n  [5]: http://mochajs.org\n  [6]: http://shouldjs.github.io\n","publish_time":1430156419869,"_cnpm_publish_time":1430156419869,"dist-tags":{"latest":"2.1.0"}}