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