158 references to SecurityStatus
System (158)
net\System\Net\_AuthenticationManagerBase.cs (1)
129
SecurityStatus
status;
net\System\Net\_DigestClient.cs (2)
360
SecurityStatus
statusCode;
443
SecurityStatus
statusCode;
net\System\Net\_NativeSSPI.cs (7)
99
int status = (int)
SecurityStatus
.InvalidHandle;
127
int status = (int)
SecurityStatus
.InvalidHandle;
261
int status = (int)
SecurityStatus
.InvalidHandle;
289
int status = (int)
SecurityStatus
.InvalidHandle;
327
int status = (int)
SecurityStatus
.InvalidHandle;
356
int status = (int)
SecurityStatus
.InvalidHandle;
432
int status = (int)
SecurityStatus
.InvalidHandle;
net\System\Net\_NTAuthentication.cs (25)
184
throw new Win32Exception((int)
SecurityStatus
.InvalidHandle);
247
return ((
SecurityStatus
)errorCode !=
SecurityStatus
.Unsupported);
514
SecurityStatus
result = UnsafeNclNativeMethods.SspiHelper.SspiEncodeStringsAsAuthIdentity(
518
if (result !=
SecurityStatus
.OK)
575
internal SafeCloseHandle GetContextToken(out
SecurityStatus
status)
581
throw new Win32Exception((int)
SecurityStatus
.InvalidHandle);
586
status = (
SecurityStatus
) SSPIWrapper.QuerySecurityContextToken(
596
SecurityStatus
status;
598
if (status !=
SecurityStatus
.OK) {
633
SecurityStatus
statusCode;
668
internal byte[] GetOutgoingBlob(byte[] incomingBlob, bool throwOnError, out
SecurityStatus
statusCode)
693
statusCode = (
SecurityStatus
)SSPIWrapper.InitializeSecurityContext(
706
if (statusCode ==
SecurityStatus
.CompleteNeeded)
711
statusCode = (
SecurityStatus
) SSPIWrapper.CompleteAuthToken(
722
statusCode = (
SecurityStatus
)SSPIWrapper.AcceptSecurityContext(
768
if (statusCode ==
SecurityStatus
.OK)
771
GlobalLog.Assert(statusCode ==
SecurityStatus
.OK, "NTAuthentication#{0}::GetOutgoingBlob()|statusCode:[0x{1:x8}] ({2}) m_SecurityContext#{3}::Handle:[{4}] [STATUS != OK]", ValidationHelper.HashString(this), (int)statusCode, statusCode, ValidationHelper.HashString(m_SecurityContext), ValidationHelper.ToString(m_SecurityContext));
786
internal string GetOutgoingDigestBlob(string incomingBlob, string requestMethod, string requestedUri, string realm, bool isClientPreAuth, bool throwOnError, out
SecurityStatus
statusCode)
818
statusCode = (
SecurityStatus
) SSPIWrapper.InitializeSecurityContext(
845
statusCode =
SecurityStatus
.OK;
866
statusCode = (
SecurityStatus
) SSPIWrapper.AcceptSecurityContext(
878
if (statusCode ==
SecurityStatus
.CompleteNeeded)
882
statusCode = (
SecurityStatus
) SSPIWrapper.CompleteAuthToken(
925
if (statusCode ==
SecurityStatus
.OK)
net\System\Net\_SafeNetHandles.cs (8)
447
return UnsafeNclNativeMethods.SspiHelper.SspiFreeAuthIdentity(handle) ==
SecurityStatus
.OK;
533
int status = (int)
SecurityStatus
.InvalidHandle;
594
int status = (int)
SecurityStatus
.InvalidHandle;
1658
int errorCode = (int)
SecurityStatus
.InvalidHandle;
1976
int errorCode = (int)
SecurityStatus
.InvalidHandle;
2094
int errorCode = (int)
SecurityStatus
.InvalidHandle;
2205
int errorCode = (int)
SecurityStatus
.InvalidHandle;
2886
int status = (int)
SecurityStatus
.InvalidHandle;
net\System\Net\_SecureChannel.cs (28)
894
SecurityStatus
errorCode = GenerateToken(incoming, offset, count, ref nextmsg);
896
if (!m_ServerMode && errorCode ==
SecurityStatus
.CredentialsNeeded)
923
private
SecurityStatus
GenerateToken(byte[] input, int offset, int count, ref byte[] output)
1006
if ((errorCode == (int)
SecurityStatus
.OK || errorCode == (int)
SecurityStatus
.ContinueNeeded)
1065
return (
SecurityStatus
) errorCode;
1114
internal
SecurityStatus
Encrypt(byte[] buffer, int offset, int size, ref byte[] output, out int resultSize) {
1165
return (
SecurityStatus
)errorCode;
1172
return
SecurityStatus
.OK;
1177
internal
SecurityStatus
Decrypt(byte[] payload, ref int offset, ref int count) {
1198
SecurityStatus
errorCode = (
SecurityStatus
)SSPIWrapper.DecryptMessage(GlobalSSPI.SSPISecureChannel, m_SecurityContext, decspc, 0);
1203
if ((errorCode ==
SecurityStatus
.OK && decspc[i].type == BufferType.Data)
1205
|| (errorCode !=
SecurityStatus
.OK && decspc[i].type == BufferType.Extra)) {
1357
var
status = (
SecurityStatus
)SSPIWrapper.ApplyAlertToken(GlobalSSPI.SSPISecureChannel, ref m_CredentialsHandle, m_SecurityContext, TlsAlertType.Fatal, alertMessage);
1359
if (status !=
SecurityStatus
.OK)
1373
var
status = (
SecurityStatus
)SSPIWrapper.ApplyShutdownToken(GlobalSSPI.SSPISecureChannel, ref m_CredentialsHandle, m_SecurityContext);
1375
if (status !=
SecurityStatus
.OK)
1389
SecurityStatus
status = GenerateToken(null, 0, 0, ref nextmsg);
1952
internal
SecurityStatus
Status;
1958
return ((Status !=
SecurityStatus
.OK) && (Status !=
SecurityStatus
.ContinueNeeded));
1964
return (Status ==
SecurityStatus
.OK);
1970
return (Status ==
SecurityStatus
.Renegotiate);
1976
return (Status ==
SecurityStatus
.ContextExpired);
1980
internal ProtocolToken(byte[] data,
SecurityStatus
errorCode) {
net\System\Net\_SSPIWrapper.cs (17)
238
if (Logging.On) Logging.PrintInfo(Logging.Web, SR.GetString(SR.net_log_sspi_security_context_input_buffer, "InitializeSecurityContext", (inputBuffer == null ? 0 : inputBuffer.size), outputBuffer.size, (
SecurityStatus
) errorCode));
253
if (Logging.On) Logging.PrintInfo(Logging.Web, SR.GetString(SR.net_log_sspi_security_context_input_buffers, "InitializeSecurityContext", (inputBuffers == null ? 0 : inputBuffers.Length), outputBuffer.size, (
SecurityStatus
) errorCode));
269
if (Logging.On) Logging.PrintInfo(Logging.Web, SR.GetString(SR.net_log_sspi_security_context_input_buffer, "AcceptSecurityContext", (inputBuffer == null ? 0 : inputBuffer.size), outputBuffer.size, (
SecurityStatus
) errorCode));
284
if (Logging.On) Logging.PrintInfo(Logging.Web, SR.GetString(SR.net_log_sspi_security_context_input_buffers, "AcceptSecurityContext", (inputBuffers == null ? 0 : inputBuffers.Length), outputBuffer.size, (
SecurityStatus
) errorCode));
292
if (Logging.On) Logging.PrintInfo(Logging.Web, SR.GetString(SR.net_log_operation_returned_something, "CompleteAuthToken()", (
SecurityStatus
) errorCode));
301
if (Logging.On) Logging.PrintInfo(Logging.Web, SR.GetString(SR.net_log_operation_returned_something, "ApplyControlToken()", (
SecurityStatus
)errorCode));
683
switch ((
SecurityStatus
)errorCode) {
684
case
SecurityStatus
.InvalidHandle:
686
case
SecurityStatus
.InvalidToken:
688
case
SecurityStatus
.ContinueNeeded:
690
case
SecurityStatus
.IncompleteMessage:
692
case
SecurityStatus
.WrongPrincipal:
694
case
SecurityStatus
.TargetUnknown:
696
case
SecurityStatus
.PackageNotFound:
698
case
SecurityStatus
.BufferNotEnough:
700
case
SecurityStatus
.MessageAltered:
702
case
SecurityStatus
.UntrustedRoot:
net\System\Net\_TLSstream.cs (10)
149
else if (m_Worker.LastSecurityStatus !=
SecurityStatus
.OK) {
178
else if (m_Worker.LastSecurityStatus !=
SecurityStatus
.OK) {
216
else if (m_Worker.LastSecurityStatus !=
SecurityStatus
.OK) {
245
else if (m_Worker.LastSecurityStatus !=
SecurityStatus
.OK) {
285
else if (m_Worker.LastSecurityStatus !=
SecurityStatus
.OK) {
332
else if (m_Worker.LastSecurityStatus !=
SecurityStatus
.OK) {
362
else if (m_Worker.LastSecurityStatus !=
SecurityStatus
.OK) {
388
else if (m_Worker.LastSecurityStatus !=
SecurityStatus
.OK) {
534
else if (m_Worker.LastSecurityStatus !=
SecurityStatus
.OK) {
579
else if (m_Worker.LastSecurityStatus !=
SecurityStatus
.OK) {
net\System\Net\HttpListener.cs (8)
1534
SecurityStatus
statusCodeNew;
1568
if (statusCodeNew ==
SecurityStatus
.OK)
1586
if (statusCodeNew !=
SecurityStatus
.OK)
1659
if (statusCodeNew ==
SecurityStatus
.InvalidHandle && oldContext == null && bytes != null && bytes.Length > 0)
1661
statusCodeNew =
SecurityStatus
.InvalidToken;
1685
if (statusCodeNew !=
SecurityStatus
.OK)
2255
SecurityStatus
statusCode;
2518
private HttpStatusCode HttpStatusFromSecurityStatus(
SecurityStatus
status)
net\System\Net\Internal.cs (26)
95
internal static bool IsCredentialFailure(
SecurityStatus
error)
97
return error ==
SecurityStatus
.LogonDenied ||
98
error ==
SecurityStatus
.UnknownCredentials ||
99
error ==
SecurityStatus
.NoImpersonation ||
100
error ==
SecurityStatus
.NoAuthenticatingAuthority ||
101
error ==
SecurityStatus
.UntrustedRoot ||
102
error ==
SecurityStatus
.CertExpired ||
103
error ==
SecurityStatus
.SmartcardLogonRequired ||
104
error ==
SecurityStatus
.BadBinding;
108
internal static bool IsClientFault(
SecurityStatus
error)
110
return error ==
SecurityStatus
.InvalidToken ||
111
error ==
SecurityStatus
.CannotPack ||
112
error ==
SecurityStatus
.QopNotSupported ||
113
error ==
SecurityStatus
.NoCredentials ||
114
error ==
SecurityStatus
.MessageAltered ||
115
error ==
SecurityStatus
.OutOfSequence ||
116
error ==
SecurityStatus
.IncompleteMessage ||
117
error ==
SecurityStatus
.IncompleteCredentials ||
118
error ==
SecurityStatus
.WrongPrincipal ||
119
error ==
SecurityStatus
.TimeSkew ||
120
error ==
SecurityStatus
.IllegalMessage ||
121
error ==
SecurityStatus
.CertUnknown ||
122
error ==
SecurityStatus
.AlgorithmMismatch ||
123
error ==
SecurityStatus
.SecurityQosFailed ||
124
error ==
SecurityStatus
.UnsupportedPreauth;
2134
Accept(certificate, (int)
SecurityStatus
.InternalError);
net\System\Net\mail\SmtpNegotiateAuthenticationModule.cs (1)
58
SecurityStatus
statusCode;
net\System\Net\SecureProtocols\_NegoState.cs (4)
655
if (e.NativeErrorCode == (int)
SecurityStatus
.LogonDenied)
707
if (win32exception != null && win32exception.NativeErrorCode == (int)
SecurityStatus
.LogonDenied)
805
SecurityStatus
statusCode;
816
statusCode = (
SecurityStatus
) ((uint) statusCode >> 8);
net\System\Net\SecureProtocols\_SslState.cs (8)
62
private
SecurityStatus
_SecurityStatus;
257
internal
SecurityStatus
LastSecurityStatus {
486
internal
SecurityStatus
EncryptData(byte[] buffer, int offset, int count, ref byte[] outBuffer, out int outSize)
494
internal
SecurityStatus
DecryptData(byte[] buffer, ref int offset, ref int count)
501
private
SecurityStatus
PrivateDecryptData(byte[] buffer, ref int offset, ref int count)
927
SecurityStatus
status = PrivateDecryptData(buffer, ref offset, ref count);
929
if (status ==
SecurityStatus
.OK)
942
else if (status !=
SecurityStatus
.Renegotiate)
net\System\Net\SecureProtocols\_SslStream.cs (11)
471
SecurityStatus
status =
SecurityStatus
.OK;
481
if (status !=
SecurityStatus
.OK)
506
if (status !=
SecurityStatus
.OK)
517
if (status !=
SecurityStatus
.OK)
521
if (status !=
SecurityStatus
.OK)
585
SecurityStatus
errorCode = _SslState.EncryptData(buffer, offset, chunkBytes, ref outBuffer, out encryptedBytes);
586
if (errorCode !=
SecurityStatus
.OK)
822
SecurityStatus
errorCode = _SslState.DecryptData(InternalBuffer, ref data_offset, ref readBytes);
824
if (errorCode !=
SecurityStatus
.OK)
871
private int ProcessReadErrorCode(
SecurityStatus
errorCode, byte[] buffer, int offset, int count, AsyncProtocolRequest asyncRequest, byte[] extraBuffer)
net\System\Net\UnsafeNativeMethods.cs (2)
2119
internal unsafe static extern
SecurityStatus
SspiFreeAuthIdentity(
2124
internal unsafe static extern
SecurityStatus
SspiEncodeStringsAsAuthIdentity(