{"_id":"devcert-san","_rev":"291946","name":"devcert-san","description":"Generate trusted local SSL/TLS certificates for local SSL development","dist-tags":{"latest":"0.3.3"},"maintainers":[{"name":"developit","email":"jason@developit.ca"}],"time":{"modified":"2021-06-03T18:52:15.000Z","created":"2017-06-15T12:30:08.385Z","0.3.3":"2017-06-15T12:30:08.385Z"},"users":{},"author":{"name":"Dave Wasmer"},"repository":{"type":"git","url":"git+https://github.com/davewasmer/devcert.git"},"versions":{"0.3.3":{"name":"devcert-san","version":"0.3.3","description":"Generate trusted local SSL/TLS certificates for local SSL development","main":"dist/index.js","scripts":{"test":"echo \"Ha.\" && exit 1","prepublish":"tsc"},"repository":{"type":"git","url":"git+https://github.com/davewasmer/devcert.git"},"keywords":["ssl","certificate","openssl","trust"],"author":{"name":"Dave Wasmer"},"license":"MIT","bugs":{"url":"https://github.com/davewasmer/devcert/issues"},"homepage":"https://github.com/davewasmer/devcert#readme","devDependencies":{"standard-version":"^4.0.0","typescript":"^2.2.2"},"dependencies":{"@types/configstore":"^2.1.1","@types/debug":"^0.0.29","@types/get-port":"^0.0.4","@types/glob":"^5.0.30","@types/mkdirp":"^0.3.29","@types/node":"^7.0.11","@types/tmp":"^0.0.32","command-exists":"^1.2.2","configstore":"^3.0.0","debug":"^2.6.3","eol":"^0.8.1","get-port":"^3.0.0","glob":"^7.1.1","mkdirp":"^0.5.1","tmp":"^0.0.31","tslib":"^1.6.0"},"gitHead":"fd98a9579815cc8a5598ca0e030ee85c5809105e","_id":"devcert-san@0.3.3","_shasum":"aa77244741b2d831771c011f22ee25e396ad4ba9","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.4","_npmUser":{"name":"developit","email":"jason@developit.ca"},"dist":{"shasum":"aa77244741b2d831771c011f22ee25e396ad4ba9","size":43015,"noattachment":false,"key":"/devcert-san/-/devcert-san-0.3.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/devcert-san/download/devcert-san-0.3.3.tgz"},"maintainers":[{"name":"developit","email":"jason@developit.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/devcert-san-0.3.3.tgz_1497529808233_0.2181472524534911"},"directories":{},"publish_time":1497529808385,"_hasShrinkwrap":false,"_cnpm_publish_time":1497529808385}},"readme":"# devcert - Development SSL made easy\n\nSo, running a local HTTPS server usually sucks. There's a range of approaches,\neach with their own tradeoff. The common one, using self-signed certificates,\nmeans having to ignore scary browser warnings for each project.\n\ndevcert makes the process easy. Want a private key and certificate file to use\nwith your server? Just ask:\n\n```js\nimport { createServer } from 'https';\nimport * as express from 'express';\nimport getDevelopmentCertificate from 'devcert';\n\nasync function buildMyApp() {\n  let app = express();\n\n  app.get('/', function (req, res) {\n    res.send('Hello Secure World!');\n  });\n\n  let ssl;\n  if (process.env.NODE_ENV === 'development') {\n    ssl = await getDevelopmentCertificate('my-app', { installCertutil: true });\n  } else {\n    ssl = // load production ssl ...\n  }\n\n  return createServer(ssl, app).listen(3000);\n}\n```\n\nNow open https://localhost:3000 and voila - your page loads with no scary\nwarnings or hoops to jump through.\n\n> Certificates are cached by name, so two calls for\n`getDevelopmentCertificate('foo')` will return the same key and certificate.\n\n### installCertutil option\n\ndevcert currently takes a single option: `installCertutil`. If true, devcert\nwill attempt to install some software necessary to tell Firefox (and Chrome on\nLinux) to trust your development certificates. This is not required, but without\nit, you'll need to tell Firefox to trust these certificates manually:\n\nFirefox provides a point-and-click wizard for importing and trusting a\ncertificate, so if you don't provide `installCertutil: true` to devcert, we'll\ninstead open Firefox and kick off this wizard for you. Simply follow the prompts\nto trust the certificate. **Reminder: you'll only need to do this once per\nmachine**\n\n**Note:** Chrome on Linux **requires** `installCertutil: true`, or else you'll\nface the scary browser warnings every time. Unfortunately, there's no way to\ntell Chrome on Linux to trust a certificate without install certutil.\n\nThe software installed varies by OS:\n\n* Mac: `brew install nss`\n* Linux: `apt install libnss3-tools`\n* Windows: N/A\n\n## How it works\n\nWhen you ask for a development certificate, devcert will first check to see if\nit has run on this machine before. If not, it will create a root certificate\nauthority and add it to your OS and various browser trust stores. You'll likely\nsee password prompts from your OS at this point to authorize the new root CA.\nThis is the only time you'll see these prompts.\n\nThis root certificate authority allows devcert to create a new SSL certificate\nwhenever you want without needing to ask for elevated permissions again. It also\nensures that browsers won't show scary warnings about untrusted certificates,\nsince your OS and browsers will now trust devcert's certificates. The root CA\ncertificate is unique to your machine only, and is generated on-the-fly when it\nis installed.\n\n## License\n\nMIT © [Dave Wasmer](http://davewasmer.com)\n","_attachments":{},"homepage":"https://github.com/davewasmer/devcert#readme","bugs":{"url":"https://github.com/davewasmer/devcert/issues"},"license":"MIT"}