Windows 服务上托管的 WCF 服务的 SSL 证书
我的应用程序在安装时将创建并运行在目标计算机的 Windows 上托管的 wcf 服务。我决定通过 HTTPS 使用该服务。我已经用自签名证书对其进行了测试。但是当部署在不同的机器上时,服务的名称将与证书中的名称不同。我该如何处理这种情况?此外,在部署计算机中安装应用程序之前,我不知道 PC 名称(我可以将其用作服务端点)。
My Application while installing will create and run a wcf service hosted on windows in the target machine. I have decided to use the service over HTTPS. I have tested it with self signed certificate. But when it is deployed in a different machine, the name of the service will differ from the one which is in the certificate. How can I handle this situation ? Moreover I am unaware of the PC name (which I could use for service end point) before the installation of the application in the deployment machine.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了让客户端信任该证书,证书上的主题名称必须与运行服务的计算机的 DNS 名称相匹配 - 确实没有办法解决这个问题。这个想法是,客户端能够验证他们确实正在与他们认为的机器进行对话,并且没有人通过毒害本地 DNS 等方式将他们引导到另一台机器,
只有客户端可以决定通过放松来放松该限制验证服务器证书
For the client to trust the certificate the Subject name on the cert will have to match the DNS name of the machine on which the service is running - there really is no way round this. The idea is the client is able to verify they really are talking to the machine they think they are and someone hasn't directed them to a different machine by, say, poisoning the local DNS
Only the client can decide to relax that restriction by loosening validation of the server certificate