中间人服务器 HTTPS/SSL
我正在开发一个使用 Microsoft .NET 服务器的项目,该服务器将对 HTTPS/SSL 数据执行更改。例如,使用浏览器的客户端计算机通过 HTTPS/SSL 调用服务器 B,服务器 B 又将请求转发到服务器 C(同样是 HTTPS/SSL)。响应将从服务器 C 通过服务器 B 发送回客户端计算机,但是服务器 B 在发送回之前将一些数据包装到响应中。
我假设响应是加密的,服务器 B 将必须解密响应、更改数据、加密数据并发送响应。
这听起来在 .NET 中间服务器上可行吗?钥匙会不会有问题?
I am working on a project that uses a Microsoft .NET server that is to perform changes to HTTPS/SSL data. For example, client machine using a browser calls server B via HTTPS/SSL that in turns forwards the request to server C, again HTTPS/SSL. The response is to be sent back to the client machine via server B from server C, however server B is to wrap some data into the response before sending it back.
I am assuming as the response is encrypted, server B will have to unencrypt the response, change the data, encrypt the data and send the response.
Does this sound possible on a .NET middle server? Will there be any issue with keys?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答案取决于您是否能让客户端信任您在中间服务器中使用的证书。如果可以(例如,您控制客户端),那么就没有问题 - 创建一个新的自签名证书,该证书将具有目标服务器的主机名和该目标主机的有效 SSL 证书的其他属性,将其放入受信任的根存储中客户端并使中间服务器拦截流量或仅通过中间服务器引导客户端的流量。
在其他情况下,这种改变是不可能的。即关键是使证书可信。
The answer depends whether you can make the client trust your certificate that you use in the middle server. If you can (eg. you control the clients), then there's no problem - create a new self-signed certificate that will have target server's host name and other attributes of valid SSL certificate for that target host, put it to trusted root storage on the client and make the middle server either intercept the traffic or just direct the client's traffic via your middle server.
In other cases such change is impossible. I.e. the key is making a certificate trusted.