I have created a certificate using IBM Certificate Manager which provides me with a cert.pem, cert.key and cert_intermediate.pem files. I'm including them in a NodeJS app using the request library. I take the files, convert them to a single string with \n after each line and include them in the headers "ca" (using the content of cert_intermediate.pem), "cert" (using the content of cert.pem) and "key" (using the content of cert.key).
When I make a request, I get the following error:
{ Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (_tls_wrap.js:1088:34)
at TLSSocket.emit (events.js:198:13)
at TLSSocket._finishInit (_tls_wrap.js:666:8) code: 'SELF_SIGNED_CERT_IN_CHAIN' }
What could I be doing wrong?
Thanks, Troy