小编Zeu*_*eus的帖子

使用 phantomjs 时出现 SSL 证书错误

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

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/"
Run Code Online (Sandbox Code Playgroud)

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

知道如何解决这个问题吗?

ssl ssl-certificate phantomjs

5
推荐指数
0
解决办法
751
查看次数

标签 统计

phantomjs ×1

ssl ×1

ssl-certificate ×1