79 references to SecurityStatusPalErrorCode
System.Net.Security (79)
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)
1444
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1474
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1607
return ((Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK) && (Status.ErrorCode !=
SecurityStatusPalErrorCode
.ContinueNeeded));
1615
return (Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK);
1623
return (Status.ErrorCode ==
SecurityStatusPalErrorCode
.Renegotiate);
1631
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 (16)
1042
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.HandshakeStarted)
1059
if (selStatus.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1095
token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.CredentialsNeeded &&
1096
token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.CertValidationNeeded)
1118
bool done = token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK;
1119
bool needsCredentials = token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CredentialsNeeded;
1120
bool needsCertValidation = token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CertValidationNeeded;
1222
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1311
case
SecurityStatusPalErrorCode
.OK:
1333
case
SecurityStatusPalErrorCode
.ContextExpired:
1334
case
SecurityStatusPalErrorCode
.ContextExpiredError:
1338
case
SecurityStatusPalErrorCode
.Renegotiate:
1388
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1495
bool noRenegotiation = token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.NoRenegotiation;
1575
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1824
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
System\Net\Security\TlsSession.OpenSsl.cs (2)
366
if (status.ErrorCode ==
SecurityStatusPalErrorCode
.NoRenegotiation)
374
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
System\Net\SecurityStatusPal.cs (2)
8
public readonly
SecurityStatusPalErrorCode
ErrorCode;
11
public SecurityStatusPal(
SecurityStatusPalErrorCode
errorCode, Exception? exception = null)