80 references to SecurityStatusPalErrorCode
System.Net.Security (80)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (10)
702
SecurityStatusPalErrorCode
palErrorCode = reason switch
705
339 /*SSL_R_NO_RENEGOTIATION*/ =>
SecurityStatusPalErrorCode
.NoRenegotiation,
706
_ =>
SecurityStatusPalErrorCode
.InternalError
711
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.OK);
714
internal static unsafe
SecurityStatusPalErrorCode
DoSslHandshake(SafeSslHandle context, ReadOnlySpan<byte> input, out int consumed, ref ProtocolToken token)
762
return
SecurityStatusPalErrorCode
.CredentialsNeeded;
771
return
SecurityStatusPalErrorCode
.CertValidationNeeded;
815
return
SecurityStatusPalErrorCode
.ContinueNeeded;
824
return 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)
222
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
224
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.NoRenegotiation)
245
while (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.ContinueNeeded);
364
else if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
409
token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.IllegalMessage)
415
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CertValidationFailed && token.GetException() is Exception certException)
425
else if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
750
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.TryAgain)
771
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
797
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.TryAgain)
803
else if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
966
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
980
if (status.ErrorCode ==
SecurityStatusPalErrorCode
.Renegotiate)
989
else if (status.ErrorCode ==
SecurityStatusPalErrorCode
.ContextExpired)
System\Net\Security\SslStream.Protocol.cs (14)
883
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.HandshakeStarted)
891
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
913
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CredentialsNeeded)
1044
waitToken.Status = new SecurityStatusPal(
SecurityStatusPalErrorCode
.TryAgain);
1056
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1091
if (NetEventSource.Log.IsEnabled() && status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
1104
if (status.ErrorCode ==
SecurityStatusPalErrorCode
.Renegotiate)
1448
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1478
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1611
return ((Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK) && (Status.ErrorCode !=
SecurityStatusPalErrorCode
.ContinueNeeded));
1619
return (Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK);
1627
return (Status.ErrorCode ==
SecurityStatusPalErrorCode
.Renegotiate);
1635
return (Status.ErrorCode ==
SecurityStatusPalErrorCode
.ContextExpired);
System\Net\Security\SslStream.TlsSessionWedge.cs (3)
81
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.HandshakeStarted)
89
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
101
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CredentialsNeeded)
System\Net\Security\SslStreamPal.Unix.cs (17)
81
token.Status = new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, ex);
115
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, ex);
122
Interop.Ssl.SslErrorCode.SSL_ERROR_RENEGOTIATE => new SecurityStatusPal(
SecurityStatusPalErrorCode
.Renegotiate),
123
Interop.Ssl.SslErrorCode.SSL_ERROR_ZERO_RETURN => new SecurityStatusPal(
SecurityStatusPalErrorCode
.ContextExpired),
124
Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_X509_LOOKUP => new SecurityStatusPal(
SecurityStatusPalErrorCode
.CredentialsNeeded),
126
Interop.Ssl.SslErrorCode.SSL_ERROR_WANT_READ => new SecurityStatusPal(
SecurityStatusPalErrorCode
.OK),
127
_ => new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, new Interop.OpenSsl.SslException((int)errorCode))
160
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
205
SecurityStatusPalErrorCode
errorCode = Interop.OpenSsl.DoSslHandshake((SafeSslHandle)context, inputBuffer, out consumed, ref token);
207
if (errorCode ==
SecurityStatusPalErrorCode
.CredentialsNeeded)
218
token.Status = new SecurityStatusPal(
SecurityStatusPalErrorCode
.CredentialsNeeded);
240
token.Status = new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, exc);
255
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.OK);
272
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.OK);
278
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.OK);
283
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, Interop.Crypto.CreateOpenSslCryptographicException());
287
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, new Interop.OpenSsl.SslException((int)code));
System\Net\Security\TlsSession.cs (17)
1038
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CredentialsNeeded &&
1070
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.HandshakeStarted)
1087
if (selStatus.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1123
token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.CredentialsNeeded &&
1124
token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.CertValidationNeeded)
1146
bool done = token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK;
1147
bool needsCredentials = token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CredentialsNeeded;
1148
bool needsCertValidation = token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CertValidationNeeded;
1250
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1339
case
SecurityStatusPalErrorCode
.OK:
1361
case
SecurityStatusPalErrorCode
.ContextExpired:
1362
case
SecurityStatusPalErrorCode
.ContextExpiredError:
1366
case
SecurityStatusPalErrorCode
.Renegotiate:
1416
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1523
bool noRenegotiation = token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.NoRenegotiation;
1603
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1852
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
System\Net\Security\TlsSession.OpenSsl.cs (2)
369
if (status.ErrorCode ==
SecurityStatusPalErrorCode
.NoRenegotiation)
377
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
System\Net\SecurityStatusPal.cs (2)
8
public readonly
SecurityStatusPalErrorCode
ErrorCode;
11
public SecurityStatusPal(
SecurityStatusPalErrorCode
errorCode, Exception? exception = null)