Disable SSL Certificate Negotiation Validation

16 בנובמבר 2011

no comments

SSL is required for a growing number of scenarios yet a public certificate which is produced by a trusted certificate authority is not always available. In such scenarios we use self signed certificates. The problems with these certificates is that all certificate validation mechanisms will fail. To overcome that we need to do the following:

1. Disable WCF certificate validation

        <behavior name="clientBehavior">
              <authentication certificateValidationMode="None"/>

2. Disable Http certificate validation

 ServicePointManager.ServerCertificateValidationCallback =
     new RemoteCertificateValidationCallback(delegate  { return true;  });

3. Make sure that the domain name (of the site or service we call) and the certificate name that power the SSL channel must match.

Hope this helps


Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>