tags:

views:

1161

answers:

4

I am setting up support for users to sign in with client certificates. Unfortunately IIS refuses to acknowledge any certificate not chained to an installed CA (see this article).

As the feature is implemented only for users´ convenience, it would be great to allow any client certificate. Is there any way to accomplish this?

My server is running Windows Server 2003 and IIS 6, but the behaviour is no different on my IIS 7 running locally. If IIS 7 could be customized to support any client certificate, I would be able to change though (given no solution for IIS 6 is available).

+1  A: 

I think the normal way is for you to issue the certificates to them, and then for you to set up IIS to accept your cert as a root.

Lou Franco
This is what many sites are doing, but I don't think it should be necessary (it might be possible it is).
troethom
A: 

I think you can add a new root CA cert via the certmgr command

certmgr --add -c -m Trust <CA_cert_DER_fmt>

Note: Unlike UNIXes, Windows manages certs for all applications simultaneously, which can have security implications, so beware of that

Purfideas
With regard to my response to your comment and the possible security implications, I don't think this is a valid answer.
troethom
Actually our comments above have nothing to do with the security implications I'm referring to in the Note. There I'm simply warning that if you trust a new root CA for IIS, then by default your local IE will also trust that CA for outbound traffic to say https://yourbank.com, not always good.
Purfideas
While I do want to accept any certificate (by customizing the handshake), I have no intention of letting the server decide which to trust. This is a matter of my own and I will evaluate the certificates in my software.
troethom
A: 

WCF allows you to write a custom X.509 certificate handler. In the code you can do some check like comparing the thumbprint against know value in the database.

eed3si9n
+1  A: 

Implement this class:

    public class TrustAllCertificatePolicy : System.Net.ICertificatePolicy
    {
        public TrustAllCertificatePolicy() {}

        public bool CheckValidationResult(ServicePoint sp, X509Certificate cert,WebRequest req, int problem)
     {
      return true;
     }
    }

Set it using the following line of code. Afterward any certificates, whether expired, name mismatch, etc. will be accepted.

 System.Net.ServicePointManager.CertificatePolicy = new TrustAllCertificatePolicy();
Chris Ballance
The main issue is that IIS send a list of known CAs in the SSL handshake. This code doesn't change that. I need some way to override the IIS behaviour or configure it to send a wild card.
troethom