Moved WebSocket.ServerCertificateValidationCallback property to ClientSslAuthConfiguration class

This commit is contained in:
sta
2014-11-04 11:01:40 +09:00
parent c511f9d7ac
commit 5502e4bdda
3 changed files with 36 additions and 44 deletions

View File

@@ -66,15 +66,16 @@ namespace Example
//ws.Compression = CompressionMethod.Deflate;
/* To validate the server certificate.
ws.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => {
ws.Log.Debug (
String.Format (
"Certificate:\n- Issuer: {0}\n- Subject: {1}",
certificate.Issuer,
certificate.Subject));
ws.SslConfiguration.ServerCertificateValidationCallback =
(sender, certificate, chain, sslPolicyErrors) => {
ws.Log.Debug (
String.Format (
"Certificate:\n- Issuer: {0}\n- Subject: {1}",
certificate.Issuer,
certificate.Subject));
return true; // If the server certificate is valid.
};
return true; // If the server certificate is valid.
};
*/
// To set the credentials for the HTTP Authentication (Basic/Digest).