Bearer authentication and ssl/tsl authentication

Hello community,
I have been trying to make a http request (POST request) to an API and I have a bearer token and the URL for it as well. The first error on deploying it is that self signed certificate is required. On then enabling secure (ssl/tls) configuration, I provided a certificate, private key and CA certificate. However, the error it throws is, "RequestError: error:0909006C:PEM routines:get_name:no start line : "
Any idea on the issue? I have just started working on Node-RED so any help would be greatly appreciated. Thanks in advance!