node-js-libs/curlrequest

Curl Options

tiagodexter opened this issue · 1 comments

I'm using request for a site without a valid SSL certificate, but I don't found options to curl accept this certificate.
In PHP I'm using this options and don't found in curlrequest:

curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($curl, CURLOPT_SSLVERSION, 3);

Try passing insecure: true as an option.

From man 1 curl

-k, --insecure
(SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the
CA certificate bundle installed by default. This makes all connections considered "insecure" fail unless -k, --insecure is used.
See this online resource for further details: http://curl.haxx.se/docs/sslcerts.html

Alternatively, you can specify a certificate or certificate directory to verify the peer with (via --cacert, --capath).