node-http-server
/src/certs.js |
@@ -5,7 +5,7 @@ |
/*************************************************************************/ |
|
const forge = require('node-forge'); |
const moment = require('moment'); |
const tz = require('moment-timezone'); |
|
module.exports = { |
// Generate certificates on the fly using incremental serials. |
@@ -20,11 +20,11 @@ |
const cert = forge |
.pki |
.createCertificate(); |
cert.serialNumber = moment().format('x'); |
cert.serialNumber = tz().tz('UTC').format('x'); |
cert.publicKey = keys.publicKey; |
cert |
.validity |
.notBefore = moment().toDate(); |
.notBefore = tz().tz('UTC').toDate(); |
cert |
.validity |
.notAfter |