58 references to SecurityStatusPalErrorCode
System.Net.Security (58)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (7)
670return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, GetSslError(ret, errorCode)); 672return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 675internal static SecurityStatusPalErrorCode DoSslHandshake(SafeSslHandle context, ReadOnlySpan<byte> input, ref ProtocolToken token) 694return SecurityStatusPalErrorCode.CredentialsNeeded; 744return SecurityStatusPalErrorCode.ContinueNeeded; 753return stateOk ? SecurityStatusPalErrorCode.OK : SecurityStatusPalErrorCode.ContinueNeeded;
System\Net\Security\NegotiateStream.cs (1)
936(int)SecurityStatusPalErrorCode.LogonDenied => new InvalidCredentialException(SR.net_auth_bad_client_creds, e),
System\Net\Security\SslStream.IO.cs (15)
98token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.TryAgain); 237if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 239if (token.Status.ErrorCode == SecurityStatusPalErrorCode.NoRenegotiation) 260while (token.Status.ErrorCode == SecurityStatusPalErrorCode.ContinueNeeded); 344else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 389token.Status.ErrorCode == SecurityStatusPalErrorCode.IllegalMessage) 397else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 656if (token.Status.ErrorCode != SecurityStatusPalErrorCode.TryAgain) 677if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 703if (token.Status.ErrorCode == SecurityStatusPalErrorCode.TryAgain) 709else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 816if (status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate) 904if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 918if (status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate) 927else if (status.ErrorCode == SecurityStatusPalErrorCode.ContextExpired)
System\Net\Security\SslStream.Protocol.cs (12)
884if (token.Status.ErrorCode == SecurityStatusPalErrorCode.HandshakeStarted) 892if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 914if (token.Status.ErrorCode == SecurityStatusPalErrorCode.CredentialsNeeded) 1014if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 1025if (NetEventSource.Log.IsEnabled() && status.ErrorCode == SecurityStatusPalErrorCode.OK) 1210if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 1229if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 1361return ((Status.ErrorCode != SecurityStatusPalErrorCode.OK) && (Status.ErrorCode != SecurityStatusPalErrorCode.ContinueNeeded)); 1369return (Status.ErrorCode == SecurityStatusPalErrorCode.OK); 1377return (Status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate); 1385return (Status.ErrorCode == SecurityStatusPalErrorCode.ContextExpired);
System\Net\Security\SslStreamPal.Unix.cs (21)
75token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, ex); 92if (retVal.ErrorCode == SecurityStatusPalErrorCode.OK || 93retVal.ErrorCode == SecurityStatusPalErrorCode.Renegotiate) 102return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, ex); 109Interop.Ssl.SslErrorCode.SSL_ERROR_RENEGOTIATE => new SecurityStatusPal(SecurityStatusPalErrorCode.Renegotiate), 110Interop.Ssl.SslErrorCode.SSL_ERROR_ZERO_RETURN => new SecurityStatusPal(SecurityStatusPalErrorCode.ContextExpired), 111Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_X509_LOOKUP => new SecurityStatusPal(SecurityStatusPalErrorCode.CredentialsNeeded), 113Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_READ => new SecurityStatusPal(SecurityStatusPalErrorCode.OK), 114_ => new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, new Interop.OpenSsl.SslException((int)errorCode)) 147if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 188SecurityStatusPalErrorCode errorCode = Interop.OpenSsl.DoSslHandshake((SafeSslHandle)context, inputBuffer, ref token); 191if (errorCode == SecurityStatusPalErrorCode.CredentialsNeeded) 202token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.CredentialsNeeded); 223if (errorCode == SecurityStatusPalErrorCode.OK && sslAuthenticationOptions.IsServer 227token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, Interop.OpenSsl.CreateSslException(SR.net_alpn_failed)); 235token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, exc); 247return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 264return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 270return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 275return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, Interop.Crypto.CreateOpenSslCryptographicException()); 279return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, new Interop.OpenSsl.SslException((int)code));
System\Net\SecurityStatusPal.cs (2)
8public readonly SecurityStatusPalErrorCode ErrorCode; 11public SecurityStatusPal(SecurityStatusPalErrorCode errorCode, Exception? exception = null)