在初始握手期间使IIS需要SSL客户端证书 [英] Make IIS require SSL client certificate during initial handshake

查看:424
本文介绍了在初始握手期间使IIS需要SSL客户端证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将IIS网站配置为需要SSL客户端证书。该网站在IIS 6和7中都设置了,虽然我对使其适用于7更感兴趣。我在IIS中设置了require客户端证书属性,它通过Web浏览器访问网站时工作正常,但是Java-基于客户端无法访问它。

I am trying to configure an IIS website to require SSL client certificates. The website is set up in both IIS 6 and 7, though I am more interested in making it work for 7. I set the require client certificates property in IIS and it works fine when accessing the site through a web browser, but a Java-based client is having trouble accessing it.

我认为问题是IIS在初始SSL握手期间没有请求客户端证书。相反,它会协商正常的SSL连接,检查资源是否需要客户端证书,如果是,则启动请求客户端证书的新SSL握手。 IIS执行此操作以支持仅需要某些资源的客户端证书的站点。即使为整个网站指定了要求,IIS仍会启动两次SSL握手。我想强制IIS在第一次SSL握手时请求客户端证书,这有望使客户端正常工作。 (客户端由外部合作伙伴开发,我几乎不了解它是如何设置的,也无法访问其源代码)

I believe the problem is that IIS does not request a client certificate during the initial SSL handshake. Instead it negotiates a normal SSL connection, checks to see if the resource requires client certificates, and if it does it then initiates a new SSL handshake that requests a client certificate. IIS does this so support sites that only require the client certificates for certain resources. Even when the requirement is specified for the entire website, IIS still initiates two SSL handshakes. I want to force IIS to request the client certificate on the first SSL handshake, which will hopefully get things working for the client. (The client is developed by an external partner and I have virtually no knowledge of how it is set up and no access to its source code)

是否有人处理此问题在IIS之前?

Has anyone dealt with this problem in IIS before?

推荐答案

我花了一段时间才找到这个元数据库设置。我们的客户使用新的certicom库遇到了同样的问题。自从MITM攻击发现SSL重新协商以来,很多圈子的答案一直是重新协商请求。

It took me a while to find this metabase setting. We were having this same problem with our client using the new certicom libraries. Since the discovery of the MITM attack arround SSL Renegotiation, the answer in alot of circles has been to hangup on renegotitation requests.

从\inetpub \运行以下cmd adminscripts将强制IIS始终请求客户端证书。

running the following cmd from \inetpub\adminscripts will force IIS to always request a client certificate.

对于IIS 6:
cscript adsutil.vbs set \w3svc\siteID \SSLAlwaysNegoClientCert True

For IIS 6: cscript adsutil.vbs set \w3svc\siteID\SSLAlwaysNegoClientCert True

(因此对于默认网站,cscript adsutil.vbs设置\w3svc \1 \SSLAlwaysNegoClientCert True)

(So for the default website, cscript adsutil.vbs set \w3svc\1\SSLAlwaysNegoClientCert True)

请记住,某些客户端 Internet Explorer 会在收到客户端证书时收到客户端证书时提示客户端证书。

Keep in mind that some clients Internet Explorer prompt for client certificates when it recieves that packet wether the client certificate is needed or not.

对于IIS 7:

将以下文本保存到名为Enable_SSL_Renegotiate_Workaround.js的文件中

Save the following text to a file called "Enable_SSL_Renegotiate_Workaround.js"

var vdirObj=GetObject("IIS://localhost/W3svc/1"); 
// replace 1 on this line with the number of the web site you wish to configure 

WScript.Echo("Value of SSLAlwaysNegoClientCert Before: " + vdirObj.SSLAlwaysNegoClientCert); 
vdirObj.Put("SSLAlwaysNegoClientCert", true); 
vdirObj.SetInfo(); 
WScript.Echo("Value of SSLAlwaysNegoClientCert After: " + vdirObj.SSLAlwaysNegoClientCert);

从提升/管理员命令提示符运行以下命令:

Run the following command from an elevated / administrator command prompt:

cscript.exe enable_ssl_renegotiate_workaround.js

cscript.exe enable_ssl_renegotiate_workaround.js

(来自知识库文章977377)

(Jacked from the KB article for 977377)

这篇关于在初始握手期间使IIS需要SSL客户端证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆