title: SSL, Express, Nodejs: Error: error:0909006C:PEM routines:get_name:no start line
body: <p>i tried to add certificates to my nodeJs, Express server like this:</p>
  
  <pre><code>cert: fs.readFileSync('/path/to/private.key'),
  key: fs.readFileSync('/path/to/your_domain_name.crt'),
  ca: [
      fs.readFileSync('path/to/CA_root.crt'),
      fs.readFileSync('path/to/ca_bundle_certificate.crt')
  ]
  </code></pre>
  
  <p>and i got this error</p>
  
  <pre><code>      c.context.setKey(key, passphrase);
                  ^
  
  Error: error:0909006C:PEM routines:get_name:no start line
      at Object.createSecureContext (_tls_common.js:151:17)
      at Server.setSecureContext (_tls_wrap.js:1155:27)
      at Server (_tls_wrap.js:1033:8)
      at new Server (https.js:65:14)
      at Object.createServer (https.js:89:10)
      at Object.&lt;anonymous&gt; (********)
      at Module._compile (internal/modules/cjs/loader.js:955:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
      at Module.load (internal/modules/cjs/loader.js:811:32)
      at Function.Module._load (internal/modules/cjs/loader.js:723:14)
      at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10)
      at internal/main/run_main_module.js:17:11 {
    library: 'PEM routines',
    function: 'get_name',
    reason: 'no start line',
    code: 'ERR_OSSL_PEM_NO_START_LINE'
  }
  </code></pre>
  
  <p>does anyone faced this problem please?</p>
  
  <p>Thanks by advance</p>