2 writes to _context
System.Net.Security (2)
System\Net\Security\NegotiateStream.cs (2)
677_context = new NegotiateAuthentication( 692_context = new NegotiateAuthentication(
35 references to _context
System.Net.Security (35)
System\Net\Security\NegotiateStream.cs (35)
81_context?.Dispose(); 94_context?.Dispose(); 221[MemberNotNullWhen(true, nameof(_context))] 222private bool IsAuthenticatedCore => _context != null && HandshakeComplete && _exception == null && _remoteOk; 224public override bool IsMutuallyAuthenticated => IsAuthenticatedCore && _context.IsMutuallyAuthenticated; 226public override bool IsEncrypted => IsAuthenticatedCore && _context.IsEncrypted; 228public override bool IsSigned => IsAuthenticatedCore && (_context.IsSigned || _context.IsEncrypted); 230public override bool IsServer => _context != null && _context.IsServer; 241private TokenImpersonationLevel PrivateImpersonationLevel => _context!.ImpersonationLevel; 243private bool HandshakeComplete => _context!.IsAuthenticated; 245private bool CanGetSecureStream => _context!.IsEncrypted || _context.IsSigned; 252return _context!.RemoteIdentity; 338Debug.Assert(_context is not null); 397if (isNtlm && !_context.IsEncrypted) 403!_context.VerifyIntegrityCheck(_readBuffer.AsSpan(NtlmSignatureLength, readBytes - NtlmSignatureLength), _readBuffer.AsSpan(0, NtlmSignatureLength))) 416statusCode = _context.UnwrapInPlace(_readBuffer.AsSpan(0, readBytes), out decryptedOffset, out decryptedCount, out _); 511Debug.Assert(_context is not null); 527bool isEncrypted = _context.IsEncrypted; 534_context.ComputeIntegrityCheck(bufferToWrap.Span, _writeBuffer); 540statusCode = _context.Wrap(bufferToWrap.Span, _writeBuffer, isEncrypted, out _); 640if (_context != null) 655if (_context is not null && IsServer != isServer) 714_context?.Dispose(); 730Debug.Assert(_context != null); 740await (_context.IsServer ? 759Debug.Assert(_context != null); 764message = _context.GetOutgoingBlob(message, out statusCode); 781new AuthenticationException(SR.Format(SR.net_auth_context_expectation, _context.ProtectionLevel.ToString(), _expectedProtectionLevel.ToString())), 794isNtlm = string.Equals(_context.Package, NegotiationInfoClass.NTLM); 798if (_context.IsServer) 894Debug.Assert(_context != null); 895_context.GetOutgoingBlob(message, out NegotiateAuthenticationStatusCode statusCode);