2 writes to _context
System.Net.Security (2)
System\Net\Security\NegotiateStream.cs (2)
672_context = new NegotiateAuthentication( 687_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); 395if (isNtlm && !_context.IsEncrypted) 401!_context.VerifyIntegrityCheck(_readBuffer.AsSpan(NtlmSignatureLength, readBytes - NtlmSignatureLength), _readBuffer.AsSpan(0, NtlmSignatureLength))) 414statusCode = _context.UnwrapInPlace(_readBuffer.AsSpan(0, readBytes), out _readBufferOffset, out _readBufferCount, out _); 506Debug.Assert(_context is not null); 522bool isEncrypted = _context.IsEncrypted; 529_context.ComputeIntegrityCheck(bufferToWrap.Span, _writeBuffer); 535statusCode = _context.Wrap(bufferToWrap.Span, _writeBuffer, isEncrypted, out _); 635if (_context != null) 650if (_context is not null && IsServer != isServer) 708_context?.Dispose(); 724Debug.Assert(_context != null); 734await (_context.IsServer ? 753Debug.Assert(_context != null); 758message = _context.GetOutgoingBlob(message, out statusCode); 775new AuthenticationException(SR.Format(SR.net_auth_context_expectation, _context.ProtectionLevel.ToString(), _expectedProtectionLevel.ToString())), 788isNtlm = string.Equals(_context.Package, NegotiationInfoClass.NTLM); 792if (_context.IsServer) 888Debug.Assert(_context != null); 889_context.GetOutgoingBlob(message, out NegotiateAuthenticationStatusCode statusCode);