{"_id":"ocsp","_rev":"9-cac55c75138c51c833edc816edb73fc5","name":"ocsp","description":"OCSP Stapling implementation","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"ocsp","version":"1.0.0","description":"OCSP Stapling implementation","main":"lib/ocsp.js","scripts":{"test":"mocha test/*-test.js"},"keywords":["OCSP","ASN.1","Stapling"],"author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"license":"MIT","devDependencies":{"mocha":"^2.2.5","selfsigned.js":"^1.2.0"},"dependencies":{"asn1.js":"^2.0.3","asn1.js-rfc2560":"^2.1.0","asn1.js-rfc3280":"^2.1.0","async":"^1.0.0","simple-lru-cache":"0.0.2"},"gitHead":"f631a1cfb0d9f4e789d28c47ff5838aa77250bfc","_id":"ocsp@1.0.0","_shasum":"f847a5dcb756116a9ff62f35bf73fab5e6351566","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.0","_npmUser":{"name":"indutny","email":"fedor@indutny.com"},"maintainers":[{"name":"indutny","email":"fedor@indutny.com"}],"dist":{"shasum":"f847a5dcb756116a9ff62f35bf73fab5e6351566","tarball":"https://registry.npmjs.org/ocsp/-/ocsp-1.0.0.tgz","integrity":"sha512-4a2X56+c8UZNFU/WfQAIVLhrxd7jEjtjaopu+BfqfVOtVYoC+8DFs/wigX2MxIAuaYYbWVoPNL3C2QWfP/pD0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGlCwZtBlgN2W2HeWpS+eid61VDMS0dfn/cbZG7y7K6aAiEAyLIwmb8ihVTZjYHCigt+WzKQK62/FE5KoMV6Ya+meMw="}]}},"1.0.1":{"name":"ocsp","version":"1.0.1","description":"OCSP Stapling implementation","main":"lib/ocsp.js","scripts":{"test":"mocha test/*-test.js"},"keywords":["OCSP","ASN.1","Stapling"],"author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"license":"MIT","devDependencies":{"mocha":"^2.2.5","selfsigned.js":"^1.2.0"},"dependencies":{"asn1.js":"^2.0.3","asn1.js-rfc2560":"^2.1.0","asn1.js-rfc3280":"^2.1.0","async":"^1.0.0","simple-lru-cache":"0.0.2"},"gitHead":"ff9abc1c349439bace112460f3fac76c93f0a496","_id":"ocsp@1.0.1","_shasum":"fd9706778a920ce6c80b44d5571b8ee5bf2646c6","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.0","_npmUser":{"name":"indutny","email":"fedor@indutny.com"},"maintainers":[{"name":"indutny","email":"fedor@indutny.com"}],"dist":{"shasum":"fd9706778a920ce6c80b44d5571b8ee5bf2646c6","tarball":"https://registry.npmjs.org/ocsp/-/ocsp-1.0.1.tgz","integrity":"sha512-+BZpfbpY2NFkHcQXOS98OmUxR0fsHH3D3KLbJ6NeidkEDmW/UlH35g5/nYpPz9UD8zlzHyCjSU8uuWxCivKbXg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC6O/JCjbfriLGqYlhLs+CDRbIyuur4iHtzotLs7716bgIhAJ38LXtJ315tbuz6HOOjzDFzX4Zgh+I1uYvzipZ4ujEt"}]}},"1.0.2":{"name":"ocsp","version":"1.0.2","description":"OCSP Stapling implementation","main":"lib/ocsp.js","scripts":{"test":"mocha test/*-test.js && jshint lib/*.js lib/**/*.js && jscs lib/*.js lib/**/*.js test/*.js test/**/*.js"},"keywords":["OCSP","ASN.1","Stapling"],"author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"license":"MIT","devDependencies":{"jscs":"^2.4.0","jshint":"^2.8.0","mocha":"^2.2.5","selfsigned.js":"^1.2.0"},"dependencies":{"asn1.js":"^2.0.3","asn1.js-rfc2560":"^2.1.0","asn1.js-rfc3280":"^2.1.0","async":"^1.0.0","simple-lru-cache":"0.0.2"},"gitHead":"9a7d5a9b010265cd2413e12ba394f0e06f937f8d","_id":"ocsp@1.0.2","_shasum":"6abb3f5f9aaadbe23062b4573dba270f00de1c88","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"indutny","email":"fedor@indutny.com"},"dist":{"shasum":"6abb3f5f9aaadbe23062b4573dba270f00de1c88","tarball":"https://registry.npmjs.org/ocsp/-/ocsp-1.0.2.tgz","integrity":"sha512-ScEJz8mS8fo19So/w2Gm1ds6kduW5fxrZHKhu248Dp7yDxyRTDS7VSoyV2gA81HtODjajHEO+ZUFaUR4cwokXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIChlKwbXnc+xaeYxWAldd+q4Ko+ierINi10Uww74/opCAiB0zu4if/Ut973Dts8788iRyGJ93GfcgTm1b52Hppm6yA=="}]},"maintainers":[{"name":"indutny","email":"fedor@indutny.com"}]},"1.0.3":{"name":"ocsp","version":"1.0.3","description":"OCSP Stapling implementation","main":"lib/ocsp.js","scripts":{"test":"mocha test/*-test.js && jshint lib/*.js lib/**/*.js && jscs lib/*.js lib/**/*.js test/*.js test/**/*.js"},"keywords":["OCSP","ASN.1","Stapling"],"author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"license":"MIT","devDependencies":{"jscs":"^2.4.0","jshint":"^2.8.0","mocha":"^2.2.5","selfsigned.js":"^3.0.1"},"dependencies":{"asn1.js":"^4.5.2","asn1.js-rfc2560":"^4.0.0","asn1.js-rfc3280":"^4.0.0","async":"^1.5.2","simple-lru-cache":"0.0.2"},"gitHead":"1bfecd3c5c5b645156745c76f53c7f2433d9ebff","_id":"ocsp@1.0.3","_shasum":"9333cae07d7b2c7f3f5cfc4ba8df22518996a884","_from":".","_npmVersion":"3.8.5","_nodeVersion":"5.7.0","_npmUser":{"name":"indutny","email":"fedor@indutny.com"},"dist":{"shasum":"9333cae07d7b2c7f3f5cfc4ba8df22518996a884","tarball":"https://registry.npmjs.org/ocsp/-/ocsp-1.0.3.tgz","integrity":"sha512-+mzZObmhJll887jPdhKyTagRWYzClpdh8XMOY4HdD5kszuiosnB8VZJEVrhO0Rm0PjjzlYIUabYIMk1tntWpcQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICBWeRX23t6p+wLSKs8+gGYJI4VR5cWkDsZAXgtQ93GXAiAYILrkji3KpiLh0PfKliVJBTzmkqoJqC+YnBLT+r0yUg=="}]},"maintainers":[{"name":"indutny","email":"fedor@indutny.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ocsp-1.0.3.tgz_1459390763954_0.9944494417868555"}},"1.1.0":{"name":"ocsp","version":"1.1.0","description":"OCSP Stapling implementation","main":"lib/ocsp.js","scripts":{"test":"mocha test/*-test.js && jshint lib/*.js lib/**/*.js && jscs lib/*.js lib/**/*.js test/*.js test/**/*.js"},"keywords":["OCSP","ASN.1","Stapling"],"author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"license":"MIT","devDependencies":{"jscs":"^2.4.0","jshint":"^2.8.0","mocha":"^2.2.5","selfsigned.js":"^3.0.1"},"dependencies":{"asn1.js":"^4.8.0","asn1.js-rfc2560":"^4.0.0","asn1.js-rfc5280":"^1.0.0","async":"^1.5.2","simple-lru-cache":"0.0.2"},"gitHead":"273edc8c58f5ca1e596db7a90d32d9b0f95c4dfd","_id":"ocsp@1.1.0","_shasum":"15dfd1dfb851b92952f3c9f778a9cf8d0a725c63","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"indutny","email":"fedor@indutny.com"},"dist":{"shasum":"15dfd1dfb851b92952f3c9f778a9cf8d0a725c63","tarball":"https://registry.npmjs.org/ocsp/-/ocsp-1.1.0.tgz","integrity":"sha512-7vjHvUTpLi0EdcTeHVZv3QoQWdU3zECa1o7bedbvCmR6um6qofdf/dlQHJ0HgLLn6iI0Fbho0Ptbmw5UnqhzYQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE67YNSvt7I8RPsk6cZDT37YovWpiN0I9sgvY+pFUVJNAiApxEW0QUFw2AxojdF2UJnxPx+fME5QBvOCyfT0myHsxQ=="}]},"maintainers":[{"name":"indutny","email":"fedor@indutny.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/ocsp-1.1.0.tgz_1468211444507_0.03555512079037726"}},"1.2.0":{"name":"ocsp","version":"1.2.0","description":"OCSP Stapling implementation","main":"lib/ocsp.js","scripts":{"lint":"jshint lib/*.js lib/**/*.js && jscs lib/*.js lib/**/*.js test/*.js test/**/*.js","test":"mocha test/*-test.js"},"keywords":["OCSP","ASN.1","Stapling"],"author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"repository":{"type":"git","url":"git+https://github.com/indutny/ocsp.git"},"license":"MIT","devDependencies":{"jscs":"^2.4.0","jshint":"^2.8.0","mocha":"^2.2.5","selfsigned.js":"^3.0.1"},"dependencies":{"asn1.js":"^4.8.0","asn1.js-rfc2560":"^4.0.0","asn1.js-rfc5280":"^2.0.0","async":"^1.5.2","simple-lru-cache":"0.0.2"},"gitHead":"bb81a77643bfbe9da719b8364a3d45e9c5e36e7f","bugs":{"url":"https://github.com/indutny/ocsp/issues"},"homepage":"https://github.com/indutny/ocsp#readme","_id":"ocsp@1.2.0","_shasum":"469a1776b457dee67eb0201408c1946bac4076cc","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.1","_npmUser":{"name":"indutny","email":"fedor@indutny.com"},"dist":{"shasum":"469a1776b457dee67eb0201408c1946bac4076cc","tarball":"https://registry.npmjs.org/ocsp/-/ocsp-1.2.0.tgz","integrity":"sha512-r4Q3oYKU+3b6iD4bn+5O2dQqctu8pFrJfWouUiKjiNXXjdr99lN/EaTVkFQevGlV/lKsomgtt/XRGB8xV8rq3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFB9NBplzm6neeg6qfg+cKE10JCQXLz49+4GF7kuQ6lwAiEAiZC2vWFCwWPpIiP86om9QMjaZ7HffLgVRVAPLNcpo0g="}]},"maintainers":[{"name":"indutny","email":"fedor@indutny.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/ocsp-1.2.0.tgz_1491233244100_0.5537629628088325"}}},"readme":"# OCSP APIs for node.js [![Build Status](https://secure.travis-ci.org/indutny/ocsp.svg)](http://travis-ci.org/indutny/ocsp)\n\nVarious [OCSP][0]-related APIs to be used with node.js/io.js.\n\n## Installing\n\n```bash\n$ npm install ocsp\n```\n\n## Parts\n\n1. Agent\n2. Cache\n3. Server\n4. `check()`/`verify()`\n5. `request.generate()`\n6. `getOCSPURI()`\n\n## Agent\n\nUsage:\n\n```javascript\nvar agent = new ocsp.Agent();\n\nhttps.request({\n  method: ...,\n  host: ...,\n  port: ...,\n  path: ...,\n  // Other options\n\n  agent: agent\n}, function(res) {\n  // ...\n});\n```\n\nThe following code snippet will perform request to the specified server, and\nwill verify that the certificate of the server using OCSP (either stapling or\nresponse from the CA).\n\nNOTE: You may pass `options` object to `new ocsp.Agent(options)`, it may have\nfollowing properties:\n\n* `CACacheSize`: number of CA certificates to keep in the cache. (Default: 1024)\n\n## Cache\n\nUsage:\n\n```javascript\nvar cache = new ocsp.Cache();\n\nvar server = https.createServer({\n  cert: cert,\n  key: key\n}, function(req, res) {\n  res.end('hello world');\n});\n\nserver.on('OCSPRequest', function(cert, issuer, cb) {\n  ocsp.getOCSPURI(cert, function(err, uri) {\n    if (err)\n      return cb(err);\n\n    var req = ocsp.request.generate(cert, issuer);\n    var options = {\n      url: uri,\n      ocsp: req.data\n    };\n\n    cache.request(req.id, options, cb);\n  });\n});\n```\n\nCache should be used to provide [OCSP Stapling][1] responses to the client.\n\nNOTE: Constructor accepts `options` object with following properties:\n\n* `probe`: override `.probe()` method\n* `store`: override `.store()` method\n* `filter`: `filter(url, callback)` to white list CA urls to do requests\n\n## Server\n\nUsage:\n\n```javascript\nvar server = ocsp.Server.create({\n  cert: cert,\n  key: key\n});\n\nserver.addCert(43, 'good');\nserver.addCert(44, 'revoked', {\n  revocationTime: new Date(),\n  revocationReason: 'CACompromise'\n});\n\nserver.listen(8000);\n```\n\nOCSP Server, i.o.w. HTTP server providing OCSP responses for supplied OCSP\nrequests.\n\nHas following methods:\n\n* `.addCert(serialNumber, status, info)`, where:\n  * `serialNumber` could be either plain number, or instance of `bn.js`\n  * `status` is one of `good`, `revoked`\n  * `info` should be empty for `good` and should contain object for `revoked`\n    (see example above, `revocationReason` is one of: `unspecified`,\n     `keyCompromise`, `CACompromise`, `affiliationChanged`, `superseded`,\n     `cessationOfOperation`, `certificateHold`, `removeFromCRL`,\n     `privelegeWithdrawn`, `AACompromise`)\n* All of `http.Server` methods!\n\n## .check()\n\nUsage:\n\n```javascript\nocsp.check({\n  cert: cert,\n  issuer: issuerCert\n}, function(err, res) {\n  if (err)\n    throw err;\n\n  console.log(res);\n});\n```\n\nSend an OCSP request to the CA and ask if the cert is still valid. `res`\nconstains the info.\n\n## .verify()\n\nUsage:\n\n```javascript\nocsp.verify({\n  request: request,\n  // Optional, `issuer: issuerCert,`\n  response: response\n}, function(err, res) {\n});\n```\n\nVerify that `response` matches the `request` and is signed by the CA.\n\n## request.generate()\n\nUsage:\n\n```javascript\nvar req = ocsp.request.generate(cert, issuerCert);\n```\n\nGenerate OCSP request for `.verify()` or for sending it manually to OCSP server.\n\n## getOCSPURI()\n\nUsage:\n\n```javascript\nocsp.getOCSPURI(cert, function(err, uri) {\n});\n```\n\nGet URI of OCSP server.\n\n#### LICENSE\n\nThis software is licensed under the MIT License.\n\nCopyright Fedor Indutny, 2015.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the\nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[0]: http://en.wikipedia.org/wiki/Online_Certificate_Status_Protocol\n[1]: http://en.wikipedia.org/wiki/OCSP_stapling\n","maintainers":[{"name":"indutny","email":"fedor@indutny.com"}],"time":{"modified":"2022-06-22T18:29:56.246Z","created":"2015-05-22T18:33:42.072Z","1.0.0":"2015-05-22T18:33:42.072Z","1.0.1":"2015-05-29T18:51:38.475Z","1.0.2":"2015-10-24T16:37:01.135Z","1.0.3":"2016-03-31T02:19:26.535Z","1.1.0":"2016-07-11T04:30:45.944Z","1.2.0":"2017-04-03T15:27:24.881Z"},"keywords":["OCSP","ASN.1","Stapling"],"author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"license":"MIT","readmeFilename":"README.md","users":{"dkannan":true},"homepage":"https://github.com/indutny/ocsp#readme","repository":{"type":"git","url":"git+https://github.com/indutny/ocsp.git"},"bugs":{"url":"https://github.com/indutny/ocsp/issues"}}