async public Task SecureSslAsync(string Domain)
{
//var SslStream = new NegotiateStream(Stream);
//await SslStream.AuthenticateAsClientAsync();
var SslStream = new SslStream(Stream, false, (sender, certificate, chain, sslPolicyErrors) =>
{
//Console.WriteLine(certificate);
return true;
}, null);
System.Net.WebRequest.DefaultWebProxy = null;
await SslStream.AuthenticateAsClientAsync(Domain, null, SslProtocols.Default, false);
//await SslStream.AuthenticateAsClientAsync(Domain);
Stream = SslStream;
}
}