System.Net.Security.Tests.SslStreamAllowedProtocolsTest.SslStreamAllowedProtocolsTest_BeginEnd.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)
            {
                IAsyncResult iar = stream.BeginAuthenticateAsClient(targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation, null, null);
                if (waitForCompletion)
                {
                    stream.EndAuthenticateAsClient(iar);
                }
            }
        }
SslStreamAllowedProtocolsTest.SslStreamAllowedProtocolsTest_BeginEnd