76 references to SecurityStatusPalErrorCode
System.Net.Security (76)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (10)
696
SecurityStatusPalErrorCode
palErrorCode = (ex?.HResult & 0X7FFFFF) switch
699
339 /*SSL_R_NO_RENEGOTIATION*/ =>
SecurityStatusPalErrorCode
.NoRenegotiation,
700
_ =>
SecurityStatusPalErrorCode
.InternalError
705
return new SecurityStatusPal(
SecurityStatusPalErrorCode
.OK);
708
internal static unsafe
SecurityStatusPalErrorCode
DoSslHandshake(SafeSslHandle context, ReadOnlySpan<byte> input, out int consumed, ref ProtocolToken token)
756
return
SecurityStatusPalErrorCode
.CredentialsNeeded;
765
return
SecurityStatusPalErrorCode
.CertValidationNeeded;
809
return
SecurityStatusPalErrorCode
.ContinueNeeded;
818
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)
219
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
221
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.NoRenegotiation)
242
while (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.ContinueNeeded);
349
else if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
394
token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.IllegalMessage)
400
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CertValidationFailed && token.GetException() is Exception certException)
410
else if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
730
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.TryAgain)
751
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
777
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.TryAgain)
783
else if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
946
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
960
if (status.ErrorCode ==
SecurityStatusPalErrorCode
.Renegotiate)
969
else if (status.ErrorCode ==
SecurityStatusPalErrorCode
.ContextExpired)
System\Net\Security\SslStream.Protocol.cs (14)
865
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.HandshakeStarted)
873
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
895
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CredentialsNeeded)
1025
waitToken.Status = new SecurityStatusPal(
SecurityStatusPalErrorCode
.TryAgain);
1037
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1072
if (NetEventSource.Log.IsEnabled() && status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
1085
if (status.ErrorCode ==
SecurityStatusPalErrorCode
.Renegotiate)
1361
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1391
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1524
return ((Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK) && (Status.ErrorCode !=
SecurityStatusPalErrorCode
.ContinueNeeded));
1532
return (Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK);
1540
return (Status.ErrorCode ==
SecurityStatusPalErrorCode
.Renegotiate);
1548
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)
1002
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.HandshakeStarted)
1019
if (selStatus.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1055
token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.CredentialsNeeded &&
1056
token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.CertValidationNeeded)
1078
bool done = token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK;
1079
bool needsCredentials = token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CredentialsNeeded;
1080
bool needsCertValidation = token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.CertValidationNeeded;
1182
if (token.Status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1271
case
SecurityStatusPalErrorCode
.OK:
1293
case
SecurityStatusPalErrorCode
.ContextExpired:
1294
case
SecurityStatusPalErrorCode
.ContextExpiredError:
1298
case
SecurityStatusPalErrorCode
.Renegotiate:
1348
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1480
if (status.ErrorCode !=
SecurityStatusPalErrorCode
.OK)
1729
if (token.Status.ErrorCode ==
SecurityStatusPalErrorCode
.OK)
System\Net\SecurityStatusPal.cs (2)
8
public readonly
SecurityStatusPalErrorCode
ErrorCode;
11
public SecurityStatusPal(
SecurityStatusPalErrorCode
errorCode, Exception? exception = null)