58 references to SecurityStatusPalErrorCode
System.Net.Security (58)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (7)
509return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, GetSslError(ret, errorCode)); 511return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 514internal static SecurityStatusPalErrorCode DoSslHandshake(SafeSslHandle context, ReadOnlySpan<byte> input, ref ProtocolToken token) 533return SecurityStatusPalErrorCode.CredentialsNeeded; 583return SecurityStatusPalErrorCode.ContinueNeeded; 592return 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)
97token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.TryAgain); 236if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 238if (token.Status.ErrorCode == SecurityStatusPalErrorCode.NoRenegotiation) 259while (token.Status.ErrorCode == SecurityStatusPalErrorCode.ContinueNeeded); 319else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 364token.Status.ErrorCode == SecurityStatusPalErrorCode.IllegalMessage) 372else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 631if (token.Status.ErrorCode != SecurityStatusPalErrorCode.TryAgain) 652if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 678if (token.Status.ErrorCode == SecurityStatusPalErrorCode.TryAgain) 684else if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 791if (status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate) 871if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 885if (status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate) 894else if (status.ErrorCode == SecurityStatusPalErrorCode.ContextExpired)
System\Net\Security\SslStream.Protocol.cs (12)
883if (token.Status.ErrorCode == SecurityStatusPalErrorCode.HandshakeStarted) 891if (token.Status.ErrorCode == SecurityStatusPalErrorCode.OK) 913if (token.Status.ErrorCode == SecurityStatusPalErrorCode.CredentialsNeeded) 1011if (token.Status.ErrorCode != SecurityStatusPalErrorCode.OK) 1022if (NetEventSource.Log.IsEnabled() && status.ErrorCode == SecurityStatusPalErrorCode.OK) 1185if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 1204if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 1336return ((Status.ErrorCode != SecurityStatusPalErrorCode.OK) && (Status.ErrorCode != SecurityStatusPalErrorCode.ContinueNeeded)); 1344return (Status.ErrorCode == SecurityStatusPalErrorCode.OK); 1352return (Status.ErrorCode == SecurityStatusPalErrorCode.Renegotiate); 1360return (Status.ErrorCode == SecurityStatusPalErrorCode.ContextExpired);
System\Net\Security\SslStreamPal.Unix.cs (21)
74token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, ex); 91if (retVal.ErrorCode == SecurityStatusPalErrorCode.OK || 92retVal.ErrorCode == SecurityStatusPalErrorCode.Renegotiate) 101return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, ex); 108Interop.Ssl.SslErrorCode.SSL_ERROR_RENEGOTIATE => new SecurityStatusPal(SecurityStatusPalErrorCode.Renegotiate), 109Interop.Ssl.SslErrorCode.SSL_ERROR_ZERO_RETURN => new SecurityStatusPal(SecurityStatusPalErrorCode.ContextExpired), 110Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_X509_LOOKUP => new SecurityStatusPal(SecurityStatusPalErrorCode.CredentialsNeeded), 112Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_READ => new SecurityStatusPal(SecurityStatusPalErrorCode.OK), 113_ => new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, new Interop.OpenSsl.SslException((int)errorCode)) 146if (status.ErrorCode != SecurityStatusPalErrorCode.OK) 187SecurityStatusPalErrorCode errorCode = Interop.OpenSsl.DoSslHandshake((SafeSslHandle)context, inputBuffer, ref token); 190if (errorCode == SecurityStatusPalErrorCode.CredentialsNeeded) 201token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.CredentialsNeeded); 222if (errorCode == SecurityStatusPalErrorCode.OK && sslAuthenticationOptions.IsServer 226token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, Interop.OpenSsl.CreateSslException(SR.net_alpn_failed)); 234token.Status = new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, exc); 245return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 262return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 268return new SecurityStatusPal(SecurityStatusPalErrorCode.OK); 273return new SecurityStatusPal(SecurityStatusPalErrorCode.InternalError, Interop.Crypto.CreateOpenSslCryptographicException()); 277return 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)