使用带有 keytool 的自签名证书进行开发
使用 keytool 生成自签名证书时,我可以使用 IP 地址作为公用名吗?
生成证书后,我将其导出,以便可以将其安装在我的客户端/浏览器中。在 Windows 中,我运行 mmc.exe 并将其添加为受信任的根证书颁发机构。
但是,当我在浏览器中导航到该 IP 地址时,它仍然是不受信任的连接。我确保 Tomcat 具有所有正确的连接器设置。
我这样做正确吗?我需要成为我自己的 CA 吗?如何使用 SSL 进行开发?我仍在尝试完全理解 SSL。
When generating a self-signed certificate using keytool, can I use an IP address for the Common Name?
Once I generated the certificate, I exported it so I can install it in my clients/browsers. In Windows, I ran mmc.exe and added it as a Trusted Root Certificate Authority.
However, when I navigate to the IP address in my browser, it is still an untrusted connection. I ensured Tomcat had all the correct Connector settings.
Am I doing this correctly? do I need to be my own CA? How can I use SSL for development purposes? I'm still trying to understand SSL completely.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一个问题:如果您将通过 IP 连接,那么可以。
第二个问题:不,您不会将自签名证书安装为 CA,只需在浏览器警告您它是自签名证书时添加例外即可。
您可以设置CA - 首先生成根证书,将其安装在客户端中,然后生成CSR,然后从中生成服务器证书(参见例如这个),但出于开发目的,这完全是浪费时间。
First question: if you'll be connecting by IP, then yes.
Second question: No, you don't install your self-signed certificate as CA, you just add exception when your browser warns you that it's self-signed.
You can set up CA — you generate root certificate first, install it in the client, and then generate CSR and then server certificate from it (see e.g. this), but for development purposes this is a complete waste of time.