System.Net.Security.Tests.SslStreamAllowedProtocolsTest.SslStreamAllowedProtocolsTest_Async.AuthenticateAsClient C# (CSharp) Method

AuthenticateAsClient() protected method

protected AuthenticateAsClient ( SslStream stream, bool waitForCompletion, string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation ) : void
stream SslStream
waitForCompletion bool
targetHost string
clientCertificates System.Security.Cryptography.X509Certificates.X509CertificateCollection
enabledSslProtocols SslProtocols
checkCertificateRevocation bool
return void
            protected override void AuthenticateAsClient(
                SslStream stream, bool waitForCompletion,
                string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
            {
                Task t = stream.AuthenticateAsClientAsync(targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation);
                if (waitForCompletion)
                {
                    t.GetAwaiter().GetResult();
                }
            }
        }
SslStreamAllowedProtocolsTest.SslStreamAllowedProtocolsTest_Async