使用phantomjs的SSL证书错误

时间:2017-10-04 10:03:46

标签: ssl phantomjs ssl-certificate

我在使用rasterize.js的phantomjs时遇到问题。当我执行以下命令时:

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

我收到以下错误:

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/"

我可以使用--ignore--ssl-errrors=true标志来解决它,但我不想忽略所有SSL错误。

我知道怎么解决这个问题吗?

0 个答案:

没有答案