SuperSocket Server Manager (ServerManager)

SuperSocket Server Manager documentation
Client security certificate validation
In the TLS / SSL secure communications, secure client certificate is not required, but some systems require a higher level of security. Therefore, some users put forward to verify the client certificate on the server side needs now SuperSocket 1.6, this new function has been added.
First of all, to enable client certificate authentication, you need the certificate node in the configuration added a new property "clientCertificateRequired":
<certificate storeName="My"
             storeLocation="LocalMachine"
             clientCertificateRequired="true"
             thumbprint="‎f42585bceed2cb049ef4a3c6d0ad572a6699f6f3"/>
Then you need to override the method AppServer "ValidateClientCertificate (...)" for achieving your validation logic:
protected override bool ValidateClientCertificate(YourSession session, object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
   //Check sslPolicyErrors
 
   //Check certificate
 
   //Return checking result
   return true;
}

Guess you like

Origin www.cnblogs.com/fanweisheng/p/11127635.html