nodejs version: 0.8.6
I created the ssl csr file using openssl with the following command: openssl req -nodes -newkey rsa: 2048 -keyout myserver.key -out myserver.csr
- The csr content was sent to my SSL provider, the certificate was sent back.
Now I wanted to create a secure SSL server:
var fs = require("fs");
var https = require('https');
var credentials = {
key: fs.readFileSync(options.base_project_folder + 'privatekey.pem'),
cert: fs.readFileSync(options.base_project_folder + 'certificate.pem')
};
var server = https.createServer(credentials, app);
server.listen(port, address, function() {
var addr = this.address();
console.log('listening on %s:%d', addr.address, addr.port);
});
the server is working, but I get: "SSL connection error"
trying to verify the problem I made: openssl s_client -connect my_dns: 443 // my_dns points to my server nodejs of the course
:
CONNECTED (00000003)
139813382997664: : 140790E5: SSL: SSL23_WRITE: ssl: s23_lib.c: 177:
CA
SSL- 0 226
, (NONE), Cipher (NONE)
Secure Renegotiation
:
: NONE
- ? SSL:(