79 references to SecurityStatusPalErrorCode
System.Net.Security (79)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (10)
702SecurityStatusPalErrorCode palErrorCode = reason switch 705339 /*SSL_R_NO_RENEGOTIATION*/ => SecurityStatusPalErrorCode.NoRenegotiation, 706_ => SecurityStatusPalErrorCode.InternalError 711return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 714internal static unsafe SecurityStatusPalErrorCode DoSslHandshake(SafeSslHandle context, ReadOnlySpan<byte> input, out int consumed, ref ProtocolToken token) 762return SecurityStatusPalErrorCode.CredentialsNeeded; 771return SecurityStatusPalErrorCode.CertValidationNeeded; 815return SecurityStatusPalErrorCode.ContinueNeeded; 824return stateOk ? SecurityStatusPalErrorCode.OK : SecurityStatusPalErrorCode.ContinueNeeded;
System\Net\Security\NegotiateStream.cs (1)
942(int)SecurityStatusPalErrorCode.LogonDenied => new InvalidCredentialException(SR.net_auth_bad_client_creds, e),
System\Net\Security\SslStream.IO.cs (14)
222if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 224if (token.Status.ErrorCode == SecurityStatusPalErrorCode.NoRenegotiation) 245while (token.Status.ErrorCode == SecurityStatusPalErrorCode.ContinueNeeded); 364else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 409token.Status.ErrorCode == SecurityStatusPalErrorCode.IllegalMessage) 415if (token.Status.ErrorCode == SecurityStatusPalErrorCode.CertValidationFailed && token.GetException() is Exception certException) 425else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 750if (token.Status.ErrorCode != SecurityStatusPalErrorCode.TryAgain) 771if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 797if (token.Status.ErrorCode == SecurityStatusPalErrorCode.TryAgain) 803else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 966if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 980if (status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate) 989else if (status.ErrorCode == SecurityStatusPalErrorCode.ContextExpired)
System\Net\Security\SslStream.Protocol.cs (14)
883if (token.Status.ErrorCode == SecurityStatusPalErrorCode.HandshakeStarted) 891if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 913if (token.Status.ErrorCode == SecurityStatusPalErrorCode.CredentialsNeeded) 1044waitToken.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.TryAgain); 1056if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 1091if (NetEventSource.Log.IsEnabled() && status.ErrorCode == SecurityStatusPalErrorCode.OK) 1104if (status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate) 1444if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 1474if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 1607return ((Status.ErrorCode != SecurityStatusPalErrorCode.OK) && (Status.ErrorCode != SecurityStatusPalErrorCode.ContinueNeeded)); 1615return (Status.ErrorCode == SecurityStatusPalErrorCode.OK); 1623return (Status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate); 1631return (Status.ErrorCode == SecurityStatusPalErrorCode.ContextExpired);
System\Net\Security\SslStream.TlsSessionWedge.cs (3)
81if (token.Status.ErrorCode == SecurityStatusPalErrorCode.HandshakeStarted) 89if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 101if (token.Status.ErrorCode == SecurityStatusPalErrorCode.CredentialsNeeded)
System\Net\Security\SslStreamPal.Unix.cs (17)
81token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, ex); 115return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, ex); 122Interop.Ssl.SslErrorCode.SSL_ERROR_RENEGOTIATE => new SecurityStatusPal(SecurityStatusPalErrorCode.Renegotiate), 123Interop.Ssl.SslErrorCode.SSL_ERROR_ZERO_RETURN => new SecurityStatusPal(SecurityStatusPalErrorCode.ContextExpired), 124Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_X509_LOOKUP => new SecurityStatusPal(SecurityStatusPalErrorCode.CredentialsNeeded), 126Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_READ => new SecurityStatusPal(SecurityStatusPalErrorCode.OK), 127_ => new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, new Interop.OpenSsl.SslException((int)errorCode)) 160if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 205SecurityStatusPalErrorCode errorCode = Interop.OpenSsl.DoSslHandshake((SafeSslHandle)context, inputBuffer, out consumed, ref token); 207if (errorCode == SecurityStatusPalErrorCode.CredentialsNeeded) 218token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.CredentialsNeeded); 240token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, exc); 255return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 272return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 278return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 283return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, Interop.Crypto.CreateOpenSslCryptographicException()); 287return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, new Interop.OpenSsl.SslException((int)code));
System\Net\Security\TlsSession.cs (16)
1042if (token.Status.ErrorCode == SecurityStatusPalErrorCode.HandshakeStarted) 1059if (selStatus.ErrorCode != SecurityStatusPalErrorCode.OK) 1095token.Status.ErrorCode != SecurityStatusPalErrorCode.CredentialsNeeded && 1096token.Status.ErrorCode != SecurityStatusPalErrorCode.CertValidationNeeded) 1118bool done = token.Status.ErrorCode == SecurityStatusPalErrorCode.OK; 1119bool needsCredentials = token.Status.ErrorCode == SecurityStatusPalErrorCode.CredentialsNeeded; 1120bool needsCertValidation = token.Status.ErrorCode == SecurityStatusPalErrorCode.CertValidationNeeded; 1222if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 1311case SecurityStatusPalErrorCode.OK: 1333case SecurityStatusPalErrorCode.ContextExpired: 1334case SecurityStatusPalErrorCode.ContextExpiredError: 1338case SecurityStatusPalErrorCode.Renegotiate: 1388if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 1495bool noRenegotiation = token.Status.ErrorCode == SecurityStatusPalErrorCode.NoRenegotiation; 1575if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 1824if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK)
System\Net\Security\TlsSession.OpenSsl.cs (2)
366if (status.ErrorCode == SecurityStatusPalErrorCode.NoRenegotiation) 374if (status.ErrorCode != SecurityStatusPalErrorCode.OK)
System\Net\SecurityStatusPal.cs (2)
8public readonly SecurityStatusPalErrorCode ErrorCode; 11public SecurityStatusPal(SecurityStatusPalErrorCode errorCode, Exception? exception = null)