78 references to SecurityStatusPalErrorCode
System.Net.Security (78)
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);
352
else if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
397
token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.IllegalMessage)
403
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CertValidationFailed && token.GetException() is Exception certException)
413
else if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
733
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.TryAgain)
754
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
780
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.TryAgain)
786
else if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
949
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
963
if (status.ErrorCode ==
SecurityStatusPalErrorCode
.Renegotiate)
972
else if (status.ErrorCode ==
SecurityStatusPalErrorCode
.ContextExpired)
System\Net\Security\SslStream.Protocol.cs (14)
874
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.HandshakeStarted)
882
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
904
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CredentialsNeeded)
1034
waitToken.Status = new SecurityStatusPal(
SecurityStatusPalErrorCode
.TryAgain);
1046
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1081
if (NetEventSource.Log.IsEnabled() && status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
1094
if (status.ErrorCode ==
SecurityStatusPalErrorCode
.Renegotiate)
1434
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1464
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1597
return ((Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK) && (Status.ErrorCode !=
SecurityStatusPalErrorCode
.ContinueNeeded));
1605
return (Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK);
1613
return (Status.ErrorCode ==
SecurityStatusPalErrorCode
.Renegotiate);
1621
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)
201
SecurityStatusPalErrorCode
errorCode = Interop.OpenSsl.DoSslHandshake((SafeSslHandle)context, inputBuffer, out consumed, ref token);
203
if (errorCode ==
SecurityStatusPalErrorCode
.CredentialsNeeded)
214
token.Status = new SecurityStatusPal(
SecurityStatusPalErrorCode
.CredentialsNeeded);
236
token.Status = new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, exc);
251
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.OK);
268
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.OK);
274
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.OK);
279
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, Interop.Crypto.CreateOpenSslCryptographicException());
283
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.InternalError, new Interop.OpenSsl.SslException((int)code));
System\Net\Security\TlsSession.cs (15)
1034
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.HandshakeStarted)
1051
if (selStatus.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1087
token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.CredentialsNeeded &&
1088
token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.CertValidationNeeded)
1110
bool done = token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK;
1111
bool needsCredentials = token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CredentialsNeeded;
1112
bool needsCertValidation = token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CertValidationNeeded;
1214
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1303
case
SecurityStatusPalErrorCode
.OK:
1325
case
SecurityStatusPalErrorCode
.ContextExpired:
1326
case
SecurityStatusPalErrorCode
.ContextExpiredError:
1330
case
SecurityStatusPalErrorCode
.Renegotiate:
1380
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1563
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1812
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
System\Net\Security\TlsSession.OpenSsl.cs (2)
364
if (status.ErrorCode ==
SecurityStatusPalErrorCode
.NoRenegotiation)
372
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
System\Net\SecurityStatusPal.cs (2)
8
public readonly
SecurityStatusPalErrorCode
ErrorCode;
11
public SecurityStatusPal(
SecurityStatusPalErrorCode
errorCode, Exception? exception = null)