2 writes to _context
System.Net.Security (2)
System\Net\Security\NegotiateStream.cs (2)
680_context = new NegotiateAuthentication( 695_context = new NegotiateAuthentication(
36 references to _context
System.Net.Security (36)
System\Net\Security\NegotiateStream.cs (36)
81_context?.Dispose(); 94_context?.Dispose(); 221[MemberNotNullWhen(true, nameof(_context))] 222private bool IsAuthenticatedCore => _context != null && HandshakeComplete && _exception == null && _remoteOk; 226!string.Equals(_context.Package, NegotiationInfoClass.NTLM) && // suppressing for NTLM since SSPI does not return correct value in the context flags. 227_context.IsMutuallyAuthenticated; 229public override bool IsEncrypted => IsAuthenticatedCore && _context.IsEncrypted; 231public override bool IsSigned => IsAuthenticatedCore && (_context.IsSigned || _context.IsEncrypted); 233public override bool IsServer => _context != null && _context.IsServer; 244private TokenImpersonationLevel PrivateImpersonationLevel => _context!.ImpersonationLevel; 246private bool HandshakeComplete => _context!.IsAuthenticated; 248private bool CanGetSecureStream => _context!.IsEncrypted || _context.IsSigned; 255return _context!.RemoteIdentity; 341Debug.Assert(_context is not null); 400if (isNtlm && !_context.IsEncrypted) 406!_context.VerifyIntegrityCheck(_readBuffer.AsSpan(NtlmSignatureLength, readBytes - NtlmSignatureLength), _readBuffer.AsSpan(0, NtlmSignatureLength))) 419statusCode = _context.UnwrapInPlace(_readBuffer.AsSpan(0, readBytes), out decryptedOffset, out decryptedCount, out _); 514Debug.Assert(_context is not null); 530bool isEncrypted = _context.IsEncrypted; 537_context.ComputeIntegrityCheck(bufferToWrap.Span, _writeBuffer); 543statusCode = _context.Wrap(bufferToWrap.Span, _writeBuffer, isEncrypted, out _); 643if (_context != null) 658if (_context is not null && IsServer != isServer) 716_context?.Dispose(); 732Debug.Assert(_context != null); 742await (_context.IsServer ? 761Debug.Assert(_context != null); 766message = _context.GetOutgoingBlob(message, out statusCode); 783new AuthenticationException(SR.Format(SR.net_auth_context_expectation, _context.ProtectionLevel.ToString(), _expectedProtectionLevel.ToString())), 796isNtlm = string.Equals(_context.Package, NegotiationInfoClass.NTLM); 800if (_context.IsServer) 896Debug.Assert(_context != null); 897_context.GetOutgoingBlob(message, out NegotiateAuthenticationStatusCode statusCode);