title: Can't set a signed SSL certificate on NodeJS/expressJS
body: <p>I'm trying to set a signed certificate to set an HTTPS sever on nodejs.
  But I keep getting the following error in chrome (and similar on other browsers).</p>
  
  <pre><code>"Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error."
  </code></pre>
  
  <p>When I ran the same code with self signed certificate and it worked OK.</p>
  
  <p>Then I ran openssl verify and seems like the certificate is OK.</p>
  
  <pre><code>$ openssl verify -CAfile ./ca.crt server.crt
  server.crt: OK
  </code></pre>
  
  <p>This is how I run it with the signed certificate:</p>
  
  <pre><code>    var privateKey  = fs.readFileSync('sslcert/server.key').toString();
      var certificate = fs.readFileSync('sslcert/server.crt').toString();
      var ca = fs.readFileSync('sslcert/ca.crt').toString();
      var credentials = {key: privateKey, cert: certificate, ca: ca};
  
      //Start Server
      https.createServer(credentials, app).listen(httpsPort, function () {
          console.log("Listening on port " + httpsPort + ' (https)');
      });
  </code></pre>