ActiveX重用浏览器客户端证书
情况如下 - 客户端对服务器(实际上是 F5 服务器)使用智能卡身份验证。需要ActiveX组件,它会从客户端计算机收集一些数据,然后上传到服务器。问题是,该服务器受到严格保护,只允许那些具有有效客户端证书的连接。 ActiveX 组件有没有办法获取用于打开页面的证书,该证书位于哪个组件上?或者也许可以重用浏览器连接?
situation is as follows - client uses smart card authetication against server (F5 server actualy). There is need for ActiveX component, which would collect some data from client's computer and then upload to server. Problem is, that server is very protected and allows only those connection, which have valid client certificate. Is there a way for ActiveX component to get that certificate, which was used for opening page, on which component resides? Or maybe it is possible to reuse browser connection?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 IE 中运行的 ActiveX 控件可以使用 WinINET 建立 HTTPS 连接。这些连接将使用 IE 正在使用的客户端证书。或者,您可以简单地让 AX 控件向 HTML/脚本提供数据,并让该内容处理网络流量。
The ActiveX control, running in IE, can use WinINET to make its HTTPS connections. Those connections will use the client certificate that IE is using. Alternatively, you could simply have the AX control provide the data to HTML/script and have that content do the network traffic.
好的。我已经找到解决方案。它并不完美,但它有效。在服务器端,我读取客户端证书指纹并将其包含在网页上。 ActiveX 组件稍后从 html 中读取指纹,然后在用户证书存储中找到具有相同指纹的证书。也可与智能卡配合使用! :)
除了指纹之外,还可以使用其他东西,例如证书主题,但指纹是最独特的一种。
好一个!
Ok. I have found solution. It ain't perfect but it works. On server side I read client certificate thumbprint and include that on webpage. ActiveX component later on reads thumbprint from html and then locates certificate with same thumbprint in user certificate store. Works well with smart-card as well! :)
Instead of thumbprint one can use something else, like certificate subject, but thumbprint is most unique one.
nice one!