76 references to SecurityStatusPalErrorCode
System.Net.Security (76)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (10)
696SecurityStatusPalErrorCode palErrorCode = (ex?.HResult & 0X7FFFFF) switch 699339 /*SSL_R_NO_RENEGOTIATION*/ => SecurityStatusPalErrorCode.NoRenegotiation, 700_ => SecurityStatusPalErrorCode.InternalError 705return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 708internal static unsafe SecurityStatusPalErrorCode DoSslHandshake(SafeSslHandle context, ReadOnlySpan<byte> input, out int consumed, ref ProtocolToken token) 756return SecurityStatusPalErrorCode.CredentialsNeeded; 765return SecurityStatusPalErrorCode.CertValidationNeeded; 809return SecurityStatusPalErrorCode.ContinueNeeded; 818return 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)
219if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 221if (token.Status.ErrorCode == SecurityStatusPalErrorCode.NoRenegotiation) 242while (token.Status.ErrorCode == SecurityStatusPalErrorCode.ContinueNeeded); 349else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 394token.Status.ErrorCode == SecurityStatusPalErrorCode.IllegalMessage) 400if (token.Status.ErrorCode == SecurityStatusPalErrorCode.CertValidationFailed && token.GetException() is Exception certException) 410else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 730if (token.Status.ErrorCode != SecurityStatusPalErrorCode.TryAgain) 751if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 777if (token.Status.ErrorCode == SecurityStatusPalErrorCode.TryAgain) 783else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 946if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 960if (status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate) 969else if (status.ErrorCode == SecurityStatusPalErrorCode.ContextExpired)
System\Net\Security\SslStream.Protocol.cs (14)
865if (token.Status.ErrorCode == SecurityStatusPalErrorCode.HandshakeStarted) 873if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 895if (token.Status.ErrorCode == SecurityStatusPalErrorCode.CredentialsNeeded) 1025waitToken.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.TryAgain); 1037if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 1072if (NetEventSource.Log.IsEnabled() && status.ErrorCode == SecurityStatusPalErrorCode.OK) 1085if (status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate) 1361if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 1391if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 1524return ((Status.ErrorCode != SecurityStatusPalErrorCode.OK) && (Status.ErrorCode != SecurityStatusPalErrorCode.ContinueNeeded)); 1532return (Status.ErrorCode == SecurityStatusPalErrorCode.OK); 1540return (Status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate); 1548return (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) 201SecurityStatusPalErrorCode errorCode = Interop.OpenSsl.DoSslHandshake((SafeSslHandle)context, inputBuffer, out consumed, ref token); 203if (errorCode == SecurityStatusPalErrorCode.CredentialsNeeded) 214token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.CredentialsNeeded); 236token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, exc); 251return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 268return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 274return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 279return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, Interop.Crypto.CreateOpenSslCryptographicException()); 283return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, new Interop.OpenSsl.SslException((int)code));
System\Net\Security\TlsSession.cs (15)
1002if (token.Status.ErrorCode == SecurityStatusPalErrorCode.HandshakeStarted) 1019if (selStatus.ErrorCode != SecurityStatusPalErrorCode.OK) 1055token.Status.ErrorCode != SecurityStatusPalErrorCode.CredentialsNeeded && 1056token.Status.ErrorCode != SecurityStatusPalErrorCode.CertValidationNeeded) 1078bool done = token.Status.ErrorCode == SecurityStatusPalErrorCode.OK; 1079bool needsCredentials = token.Status.ErrorCode == SecurityStatusPalErrorCode.CredentialsNeeded; 1080bool needsCertValidation = token.Status.ErrorCode == SecurityStatusPalErrorCode.CertValidationNeeded; 1182if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 1271case SecurityStatusPalErrorCode.OK: 1293case SecurityStatusPalErrorCode.ContextExpired: 1294case SecurityStatusPalErrorCode.ContextExpiredError: 1298case SecurityStatusPalErrorCode.Renegotiate: 1348if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 1480if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 1729if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK)
System\Net\SecurityStatusPal.cs (2)
8public readonly SecurityStatusPalErrorCode ErrorCode; 11public SecurityStatusPal(SecurityStatusPalErrorCode errorCode, Exception? exception = null)