54 references to SecurityStatusPalErrorCode
System.Net.Security (54)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (7)
673
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, GetSslError(ret, errorCode));
675
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.OK);
678
internal static unsafe
SecurityStatusPalErrorCode
DoSslHandshake(SafeSslHandle context, ReadOnlySpan<byte> input, out int consumed, ref ProtocolToken token)
726
return
SecurityStatusPalErrorCode
.CredentialsNeeded;
770
return
SecurityStatusPalErrorCode
.ContinueNeeded;
779
return 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 (13)
219
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
221
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.NoRenegotiation)
242
while (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.ContinueNeeded);
326
else if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
371
token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.IllegalMessage)
379
else if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
693
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.TryAgain)
714
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
740
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.TryAgain)
746
else if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
907
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
921
if (status.ErrorCode ==
SecurityStatusPalErrorCode
.Renegotiate)
930
else if (status.ErrorCode ==
SecurityStatusPalErrorCode
.ContextExpired)
System\Net\Security\SslStream.Protocol.cs (14)
854
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.HandshakeStarted)
862
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
884
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CredentialsNeeded)
984
waitToken.Status = new SecurityStatusPal(
SecurityStatusPalErrorCode
.TryAgain);
996
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1031
if (NetEventSource.Log.IsEnabled() && status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
1044
if (status.ErrorCode ==
SecurityStatusPalErrorCode
.Renegotiate)
1290
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1309
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1442
return ((Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK) && (Status.ErrorCode !=
SecurityStatusPalErrorCode
.ContinueNeeded));
1450
return (Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK);
1458
return (Status.ErrorCode ==
SecurityStatusPalErrorCode
.Renegotiate);
1466
return (Status.ErrorCode ==
SecurityStatusPalErrorCode
.ContextExpired);
System\Net\Security\SslStreamPal.Unix.cs (17)
76
token.Status = new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, ex);
110
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, ex);
117
Interop.Ssl.SslErrorCode.SSL_ERROR_RENEGOTIATE => new SecurityStatusPal(
SecurityStatusPalErrorCode
.Renegotiate),
118
Interop.Ssl.SslErrorCode.SSL_ERROR_ZERO_RETURN => new SecurityStatusPal(
SecurityStatusPalErrorCode
.ContextExpired),
119
Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_X509_LOOKUP => new SecurityStatusPal(
SecurityStatusPalErrorCode
.CredentialsNeeded),
121
Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_READ => new SecurityStatusPal(
SecurityStatusPalErrorCode
.OK),
122
_ => new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, new Interop.OpenSsl.SslException((int)errorCode))
155
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
196
SecurityStatusPalErrorCode
errorCode = Interop.OpenSsl.DoSslHandshake((SafeSslHandle)context, inputBuffer, out consumed, ref token);
198
if (errorCode ==
SecurityStatusPalErrorCode
.CredentialsNeeded)
209
token.Status = new SecurityStatusPal(
SecurityStatusPalErrorCode
.CredentialsNeeded);
231
token.Status = new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, exc);
246
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.OK);
263
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.OK);
269
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.OK);
274
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, Interop.Crypto.CreateOpenSslCryptographicException());
278
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, new Interop.OpenSsl.SslException((int)code));
System\Net\SecurityStatusPal.cs (2)
8
public readonly
SecurityStatusPalErrorCode
ErrorCode;
11
public SecurityStatusPal(
SecurityStatusPalErrorCode
errorCode, Exception? exception = null)