Comment out the line you are adding the ca package to. Copy all the text from ca.crt and paste them into cert.com.crt (do not replace the previous certificate, just paste it). Now it should work fine.
var sslOptions = { key: fs.readFileSync('/etc/ssl/private/private.key'), cert: fs.readFileSync('/etc/ssl/certs/cert.com.crt'), requestCert: true, //ca: fs.readFileSync('/etc/ssl/certs/ca.crt'), rejectUnauthorized: false }; var secureServer = https.createServer(sslOptions,app).listen(443, function(){ console.log("Express server listening on port "); });
source share