IIS7 的 facebook API 问题
我在使用 facebook 示例代码时遇到问题。
<代码> 致命错误:未捕获的 CurlException:60:SSL 证书问题,请验证 CA 证书是否正常。详细信息:错误:14090086:SSL 例程:SSL3_GET_SERVER_CERTIFICATE:证书验证失败在第 616 行的 C:\inetpub\wwwroot\src\facebook.php 中抛出
我找到了一个我不知道如何处理的解决方案 here 。我正在运行 IIS7 并尝试在本地主机上测试它。该解决方案指定我应该添加
$opts[CURLOPT_CAINFO] = [PATH]/apache/conf/ssl.crt/ca-bundle.crt"; //或者你的“ca-bundle.crt”路径
到代码中。我找到了该信息应该存放的数组,但我完全不知道证书存储在哪里。我在我的机器上搜索了我的自签名证书(“myown”),但找不到它。我在 IIS7 上搜索了证书文件的位置,但意识到我在这里会更好,因为也许我什至不需要指定 SSL 证书。
有什么建议吗?我想做的只是能够运行代码,我现在对 SSL 没有任何要求。
I'm having problems with the facebook example code.
Fatal error: Uncaught CurlException: 60: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed thrown in C:\inetpub\wwwroot\src\facebook.php on line 616
I found a solution that I don't know what to do with here. I'm running IIS7 and trying to test this on localhost. The solution specified that I should add
$opts[CURLOPT_CAINFO] = [PATH]/apache/conf/ssl.crt/ca-bundle.crt"; //Or your path to "ca-bundle.crt"
to the code. I found the array where this info should go but I have absolutely no idea where the certificates are stored. I searched my machine for my self-signed cert ("myown") but couldn't find it. I googled for the location of cert files on IIS7 but realized I'd be better of here since maybe I don't even need to specify SSL certs.
Any suggestions? What I want to do is just to be able to run the code, I don't have any requirements of SSL right now.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为证书正在返回,但无法验证,在 C# 中,您通常可以执行类似这样的操作:
因此这是在证书验证之前执行的回调,并充当用户验证方法。
警告:这将验证所有证书,无论
从未使用过 IIS,但我确信它会是这样的。
i think that the certificate is being returned but can not be validated, within C# you can usually do something like so:
so this is a callback that's executed before the certificate is validate and acts as a user validation method.
WARNING: this will validate all certificates regardless
never used IIS but im sure it would be something along these lines.