Created
November 3, 2016 16:44
-
-
Save jrop/51ba4b0f65f116690969623e30c7da69 to your computer and use it in GitHub Desktop.
Generate a self-signed certificate using Node.JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const selfsigned = require('selfsigned') | |
const pems = selfsigned.generate(null, { | |
days: 365 * 10, | |
keySize: 2048, | |
algorithm: 'sha256', | |
}) | |
console.log(pems.private) | |
console.log(pems.public) | |
console.log(pems.cert) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment