ProcessAuthentication() private méthode

private ProcessAuthentication ( LazyAsyncResult lazyResult ) : void
lazyResult LazyAsyncResult
Résultat void
Exemple #1
0
        public virtual void AuthenticateAsClient(string targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
        {
            SecurityProtocol.ThrowOnNotAllowed(enabledSslProtocols);

            _sslState.ValidateCreateContext(false, targetHost, enabledSslProtocols, null, clientCertificates, true, checkCertificateRevocation);
            _sslState.ProcessAuthentication(null);
        }
Exemple #2
0
        internal virtual IAsyncResult BeginAuthenticateAsClient(string targetHost, X509CertificateCollection clientCertificates,
                                                                SslProtocols enabledSslProtocols, bool checkCertificateRevocation,
                                                                AsyncCallback asyncCallback, object asyncState)
        {
            _sslState.ValidateCreateContext(false, targetHost, enabledSslProtocols, null, clientCertificates, true, checkCertificateRevocation);

            LazyAsyncResult result = new LazyAsyncResult(_sslState, asyncState, asyncCallback);

            _sslState.ProcessAuthentication(result);
            return(result);
        }
Exemple #3
0
        internal virtual IAsyncResult BeginAuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken, AsyncCallback asyncCallback, object asyncState)
        {
            SetAndVerifyValidationCallback(sslClientAuthenticationOptions.RemoteCertificateValidationCallback);
            SetAndVerifySelectionCallback(sslClientAuthenticationOptions.LocalCertificateSelectionCallback);

            _sslState.ValidateCreateContext(sslClientAuthenticationOptions, _certValidationDelegate, _certSelectionDelegate);

            LazyAsyncResult result = new LazyAsyncResult(_sslState, asyncState, asyncCallback);

            _sslState.ProcessAuthentication(result);
            return(result);
        }
Exemple #4
0
        internal virtual IAsyncResult BeginAuthenticateAsClient(SslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken, AsyncCallback asyncCallback, object asyncState)
        {
            SecurityProtocol.ThrowOnNotAllowed(sslClientAuthenticationOptions.EnabledSslProtocols);
            SetAndVerifyValidationCallback(sslClientAuthenticationOptions.RemoteCertificateValidationCallback);
            SetAndVerifySelectionCallback(sslClientAuthenticationOptions.LocalCertificateSelectionCallback);

            // Set the delegates on the options.
            sslClientAuthenticationOptions._certValidationDelegate = _certValidationDelegate;
            sslClientAuthenticationOptions._certSelectionDelegate  = _certSelectionDelegate;

            _sslState.ValidateCreateContext(sslClientAuthenticationOptions);

            LazyAsyncResult result = new LazyAsyncResult(_sslState, asyncState, asyncCallback);

            _sslState.ProcessAuthentication(result, cancellationToken);
            return(result);
        }