57 references to SecurityStatusPalErrorCode
System.Net.Security (57)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (9)
675SecurityStatusPalErrorCode palErrorCode = (ex?.HResult & 0X7FFFFF) switch 678339 /*SSL_R_NO_RENEGOTIATION*/ => SecurityStatusPalErrorCode.NoRenegotiation, 679_ => SecurityStatusPalErrorCode.InternalError 684return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 687internal static unsafe SecurityStatusPalErrorCode DoSslHandshake(SafeSslHandle context, ReadOnlySpan<byte> input, out int consumed, ref ProtocolToken token) 735return SecurityStatusPalErrorCode.CredentialsNeeded; 779return SecurityStatusPalErrorCode.ContinueNeeded; 788return stateOk ? SecurityStatusPalErrorCode.OK : SecurityStatusPalErrorCode.ContinueNeeded;
System\Net\Security\NegotiateStream.cs (1)
944(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); 326else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 371token.Status.ErrorCode == SecurityStatusPalErrorCode.IllegalMessage) 377if (token.Status.ErrorCode == SecurityStatusPalErrorCode.CertValidationFailed && token.GetException() is Exception certException) 387else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 701if (token.Status.ErrorCode != SecurityStatusPalErrorCode.TryAgain) 722if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 748if (token.Status.ErrorCode == SecurityStatusPalErrorCode.TryAgain) 754else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 917if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 931if (status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate) 940else if (status.ErrorCode == SecurityStatusPalErrorCode.ContextExpired)
System\Net\Security\SslStream.Protocol.cs (14)
854if (token.Status.ErrorCode == SecurityStatusPalErrorCode.HandshakeStarted) 862if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 884if (token.Status.ErrorCode == SecurityStatusPalErrorCode.CredentialsNeeded) 1013waitToken.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.TryAgain); 1025if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 1060if (NetEventSource.Log.IsEnabled() && status.ErrorCode == SecurityStatusPalErrorCode.OK) 1073if (status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate) 1319if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 1349if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 1482return ((Status.ErrorCode != SecurityStatusPalErrorCode.OK) && (Status.ErrorCode != SecurityStatusPalErrorCode.ContinueNeeded)); 1490return (Status.ErrorCode == SecurityStatusPalErrorCode.OK); 1498return (Status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate); 1506return (Status.ErrorCode == SecurityStatusPalErrorCode.ContextExpired);
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\SecurityStatusPal.cs (2)
8public readonly SecurityStatusPalErrorCode ErrorCode; 11public SecurityStatusPal(SecurityStatusPalErrorCode errorCode, Exception? exception = null)