Skip to content

Instantly share code, notes, and snippets.

@chad3814
Created June 17, 2016 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chad3814/d437457784894f1d04bb21f0fbd3362e to your computer and use it in GitHub Desktop.
Save chad3814/d437457784894f1d04bb21f0fbd3362e to your computer and use it in GitHub Desktop.
var key_file = fs.readFileSync(path.resolve(__dirname, '..', 'ssl', 'non_ev_domains.key'));
var cert_file = fs.readFileSync(path.resolve(__dirname, '..', 'ssl', 'non_ev_domains.crt'));
var ca_files = [
fs.readFileSync(path.resolve(__dirname, '..', 'ssl', 'COMODORSADomainValidationSecureServerCA.crt')),
fs.readFileSync(path.resolve(__dirname, '..', 'ssl', 'COMODORSAAddTrustCA.crt'))
];
var credentials = {
key: key_file,
cert: cert_file,
ca: ca_files
};
server = https.createServer(credentials, (req, res) => {
// handle requests..
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment