The nodejs module is missing the SSL parameter to set the intermediary CA certificate. This intermediary is required for many certs, including GoDaddy's, and should be mapped to the 'ca' option of express.createServer().
The attached patch adds a new parameter to nodejs.config.js.example called sslCAPath, which defaults to ''.
Then inside server.js, an extra if/else block checks for whether it's defined and if so passes it in with the 'ca' parameter.
// server.js line ~1017
var server;
if (settings.scheme == 'https') {
if (settings.sslCAPath == '') {
server = express.createServer({
key: fs.readFileSync(settings.sslKeyPath),
cert: fs.readFileSync(settings.sslCertPath)
});
}
else {
server = express.createServer({
key: fs.readFileSync(settings.sslKeyPath),
ca: fs.readFileSync(settings.sslCAPath),
cert: fs.readFileSync(settings.sslCertPath)
});
}
}
Using this patch I can use my GoDaddy SSL certificate with nodejs.module.
Comments
Comment #1
damien_vancouver commentedAttached has some fixed extra whitespace.
Comment #1.0
damien_vancouver commentedfix whitespace
Comment #2
Anonymous (not verified) commentedthanks! will review shortly.
Comment #3
Anonymous (not verified) commentedthanks, committed here:
http://drupalcode.org/project/nodejs.git/commit/0675db0
please reopen if you have any further issues with it.
Comment #4.0
(not verified) commentedadd line number