title: Error when starting HTTPS on Node.js on Mac OSX using StartSSL cert
body: <p>I am splitting hairs trying to get HTTPS server running using StartSSL cert. I got all the necessary files from them and I use them by passing them in the <code>createServer</code> arguments:</p>
  
  <pre><code>var options =
  {
      ca:     FS.readFileSync('sub.class1.server.ca.pem'),
      key:    FS.readFileSync('ssl.key'),
      cert:   FS.readFileSync('ssl.crt')
  };
  </code></pre>
  
  <p>And this is the error I got.</p>
  
  <pre><code>Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
      at Object.createCredentials (crypto.js:87:31)
      at HTTPSServer.Server (tls.js:914:28)
      at HTTPSServer.Server (https.js:33:14)
      at HTTPSServer.HTTPSServer (/Users/myUserName/node_modules/connect/lib/https.js:34:16)
      at new HTTPSServer (/Users/myUserName/node_modules/express/lib/https.js:38:23)
      at Object.createServer (/Users/myUserName/node_modules/express/lib/express.js:43:12)
      at Object.&lt;anonymous&gt; (/Users/myUserName/Sites/node.js/https/app.js:12:36)
      at Module._compile (module.js:441:26)
      at Object..js (module.js:459:10)
      at Module.load (module.js:348:31)
  </code></pre>
  
  <p>I thought maybe I should convert the cert to PEM. But running:</p>
  
  <pre><code>openssl x509 -in ssl.crt -out ssl.der -outform DER
  </code></pre>
  
  <p>...gives me similar error</p>
  
  <pre><code>unable to load certificate
  67304:error:0906D06C:PEM routines:PEM_read_bio:no start line:/SourceCache/OpenSSL098/OpenSSL098-44/src/crypto/pem/pem_lib.c:648:Expecting: TRUSTED CERTIFICATE
  </code></pre>
  
  <p>Any idea why?</p>
  
  <p><strong>UPDATE:</strong> This only happens on OSX. I tried running the same thing on a Ubuntu server and it works.</p>