Reputation: 2322
I'm implementing a WCF client that will use certificates for secure communication. The server will also present a certificate and I would like to implement the ServicePointManager.ServerCertificateValidationCallback
simply to log the certificate from the server. Here's an example:
using System.Net;
ServicePointManager.ServerCertificateValidationCallback += RemoteCertificateValidate;
private bool RemoteCertificateValidate(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error)
{
// certificate logging goes here
}
My question is this, will the default certificate validation that is done by the .Net framwork still happen? Or will my implementation of the ServerCertificateValidationCallback
overwrite the .Net certificate validation?
Upvotes: 0
Views: 185