I have an SSL server in Express, which is not working on all browsers (unless the user manually trusts the website) since some browsers require the chain certificate (we hav
Does your intermediate certificate file contains multiple certificate blocks?
If that's the case you should split them into different files and read them one by one. You can pass them as an array to the ca
parameter.
I've got it working with the code below:
var https = require('https'),
read = require('fs').readFileSync,
httpsOptions = {
key: read('ssl/mycertificate.key', 'utf8'),
cert: read('ssl/mycertificate.crt', 'utf8'),
ca: [
read('ssl/rapidssl_1.pem', 'utf8'),
read('ssl/rapidssl_2.pem', 'utf8')
]
};
https.createServer(httpsOptions, function (req, res) {
// ...
});