Node.js not allowing CA cert from an api?

I keep getting UNABLE_TO_VERIFY_LEAF_SIGNATURE

When I set rejectUnauthorized: false, it connects and makes the request. Then it sends back the correct data.

I am using Node's https request function.

My CA is set up like so in side my options object:

ca: [fs.readFileSync('path/to/ca.pem')]

I am aware of the update to Node .10.10 that it doesn't not accept self signed certs. Is there away to force it to accept this ca that I have defined without setting rejectUnauthorized or export NODE_TLS_REJECT_UNAUTHORIZED="0" (second option didn't even work anyway).

What I did was to set the rejectUnauthorized option to be false. The default of this option was changed since Version 0.9.2

I assume you can create an agent with the ca specified.