Search code examples
node.jstypescriptsslca

NodeJS 14: Using a SSL CA Bundle


I'm currently trying to use a CA Bundle with NodeJS 14.0. I've been using Namecheap's article as a guide the implement this feature. I'm currently stuck on a few things:

  1. For the ca parameter for https.createServer(), what file formats are allowed to be passed in?
  2. How do I check that a CA bundle is actually being used?

Solution

  • For the ca parameter for https.createServer(), what file formats are allowed to be passed in?

    From NodeJS tls.createSecureContext:

    Any string or Buffer can contain multiple PEM CAs concatenated together

    Though, in general NodeJS uses PEM format.

    How do I check that a CA bundle is actually being used?

    You can use a certificate not signed by your CA, e.g. a self-signed certificate.