信任 Xulrunner 应用程序中 https url 的自签名证书
我开发了一个小型 xulrunner 应用程序,当我能够使用 http 请求时,它可以正常工作。
现在我希望我的 xulrunner 打开我的 https 远程网页(这有自签名证书)。 我想知道如何让我的应用程序接受此证书并使我的 https 证书正常工作。
如何使我的 xulrunner 应用程序信任我的 Web 服务器 (HTTPS) 的自签名证书。
I developed a small xulrunner application, which works fine when I am able to use http requests.
Now I want my xulrunner to open my https remote web page (This has self signed certificate).
I would like to how I can make my application accept this certificate and make my https certificate work.
How to make my xulrunner app trust the self signed certificate of my web server (HTTPS).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将
cert_override.txt
文件添加到应用程序的默认配置文件 (defaults/profile/cert_override.txt
) - 该文件将被复制到任何新的配置文件中,并使确保某些证书即使不受信任也会被接受。最简单的方法是在 Firefox 中为您的网站创建永久例外,然后您可以使用 Firefox 配置文件中的cert_override.txt
文件(这样您就不需要破译格式)。You can add a
cert_override.txt
file to the default profile of your application (defaults/profile/cert_override.txt
) - this file will be copied to any new profile and make sure that some certificates will be accepted despite not being trusted. It's easiest to create a permanent exception for your web site in Firefox, you can then use thecert_override.txt
file from your Firefox profile (that way you don't need to decipher the format).我会按照弗拉基米尔·帕兰特的回答做同样的事情。
但是,请确保主机名是完全限定的域名(例如,something.com,而不仅仅是 myserver)。
与 firefox cert_override.txt 文件中的 some.com 443 相比,myserver 443 会有不同的条目。由于这个问题,即使我有 myserver 443 的条目,我也无法获得 https://something/ 的豁免。我必须将其设置为 https://something.com/ ,并在 cert_override 中正确输入something.com 443。 txt 文件。
请将 .com 替换为您的域名/子域名。
I would do same as Wladimir Palant answer.
But, make sure, hostname is fully qualified domain name (e.g. something.com, instead of just myserver).
There would be different entry for myserver 443 as compared to something.com 443 in firefox cert_override.txt file. Due to this issue, even though I had entry for myserver 443 I was not able to get exemption for https:// something/. I had to set it up as https://something.com/ with right entry for something.com 443 in cert_override.txt file.
Please replace .com with your domain/sub-domain name.