SSL Certificate error using phantomjs

Viewed 649

I'm having a problem using phantomjs with rasterize.js. When I execute the following command:

phantomjs --ssl-protocol=any /lib/rasterize.js 'https://www.google.com' 'test.png'

I get the following error:

2017-10-04T08:21:05 [DEBUG] Network - SSL Error: "The issuer certificate of a locally looked up certificate could not be found"
2017-10-04T08:21:05 [DEBUG] Network - SSL Error: "The root CA certificate is not trusted for this purpose"
2017-10-04T08:21:05 [DEBUG] Network - Resource request error: QNetworkReply::NetworkError(SslHandshakeFailedError) ( "SSL handshake failed" ) URL: "https://www.google.com/"

I can solve it using --ignore--ssl-errrors=true flag, but I don't want to ignore all the SSL errors.

Any idea of how I can solve this?

0 Answers
Related