如何设置 HTTPS 进行本地测试?

发布于 2024-09-08 03:18:00 字数 93 浏览 3 评论 0原文

我需要了解 Web 应用程序如何与 HTTPS 配合使用。但我确实找不到太多有关它的信息。我尝试设置本地 Apache,但找不到 CA 权威来签署我的证书...提示?建议?

I need to see how a web application will work with HTTPS. But I can't really find much information around about it. I tried to set up my local Apache but I can't find a CA autorithy to sign my certificate... Hints? Suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

满栀 2024-09-15 03:18:00

需要考虑的可能性有:

  1. 生成您自己的证书(自签名证书)
  2. 获取由已知颁发者颁发的证书
  3. 获取由浏览器无法识别的颁发者颁发的证书

。 1 可能是使用最广泛的解决方案。您可以在此处找到说明。唯一的缺点是浏览器会抱怨未知的 CA。在 Firefox 中,您只需添加永久例外即可消除警告。 (Chrome 和 Internet Explorer 似乎都没有提供这样的选项。

) 2 通常需要花钱,因此它不是开发环境的热门选择。

编号。 3 可以免费获得(请参阅 https://www.cacert.org/),但它们也会触发浏览器警告。与 nr 的差异。 1是您可以将CA添加到您的浏览器的受信任机构中;然而,这是一个严肃的决定,需要认真考虑,因为它涉及安全问题。一般来说,我不会推荐它仅仅用于测试。

The possibilities to consider are:

  1. Generate your own certificate (self-signed certificate)
  2. Get a certificate issued by a known issuer
  3. Get a certificate issued by an issuer not recognised by the browser

Nr. 1 is probably the most widely used solution. You can find instructions here. The only disadvantage is that browsers will complaint about the unknown CA. In Firefox, you can just add a permanent exception and get rid of the warning. (Neither Chrome nor Internet Explorer seem to provide such option.)

Nr. 2 normally costs money so it isn't a popular choice for dev environments.

Nr. 3 can be obtained for free (see https://www.cacert.org/) but they also trigger a browser warning. A difference with nr. 1 is that you have the possibility of adding the CA to your browser's trusted authorities; however, that's a serious decision that requires serious consideration because of its security implications. In general, I would not recommend it for mere testing.

記憶穿過時間隧道 2024-09-15 03:18:00

自签名证书(如前所述)可能是单个主机最简单的选择。

如果有几个主机,您可以创建自己的迷你 CA。有一些工具可以实现此目的,例如:

  • CA.pl: OpenSSL 提供的脚本。
  • TinyCA:带有 GUI 的工具。

Self-signed certificates (as already mentioned) are probably the easiest option for a single host.

If there are a few hosts, you could create a mini CA of your own. There are tools for this, for example:

  • CA.pl: a script provided with OpenSSL.
  • TinyCA: a tool with a GUI.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文