Skip to content

Commit

Permalink
we shouldn't log to the console from a library
Browse files Browse the repository at this point in the history
  • Loading branch information
rdavisau committed Jan 10, 2016
1 parent 99bc1f1 commit 463bdaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,9 @@ ModelManifest.xml
# Unwanted items
nuget.exe
*.nupkg
*.DotSettings
*.DotSettings
/Sockets/Sockets.Plugin.Abstractions/Properties/Resources.resx
/Sockets/Sockets.Plugin.Abstractions/Properties/Resources.Designer.cs
/Sockets/Sockets.Plugin.Abstractions/Properties
/Sockets/Samples/SocketsSample.XF/SocketsSample.XF.Droid/SocketsSample.XF.Droid.csproj.bak
/Sockets/Samples/SocketsSample.XF/SocketsSample.XF.Droid
6 changes: 0 additions & 6 deletions Sockets/Sockets.Implementation.NET/TcpSocketClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,12 @@ private bool ServerValidationCallback (object sender, X509Certificate certificat
switch (sslPolicyErrors)
{
case SslPolicyErrors.RemoteCertificateNameMismatch:
Console.WriteLine("Server name mismatch. End communication ...\n");
return false;
case SslPolicyErrors.RemoteCertificateNotAvailable:
Console.WriteLine("Server's certificate not available. End communication ...\n");
return false;
case SslPolicyErrors.RemoteCertificateChainErrors:
Console.WriteLine("Server's certificate validation failed. End communication ...\n");
return false;
}
//TODO: Perform others checks using the "certificate" and "chain" objects ...

Console.WriteLine("Server's authentication succeeded ...\n");
return true;
}

Expand Down

0 comments on commit 463bdaf

Please sign in to comment.