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
))]
222
private 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;
229
public override bool IsEncrypted => IsAuthenticatedCore &&
_context
.IsEncrypted;
231
public override bool IsSigned => IsAuthenticatedCore && (
_context
.IsSigned ||
_context
.IsEncrypted);
233
public override bool IsServer =>
_context
!= null &&
_context
.IsServer;
244
private TokenImpersonationLevel PrivateImpersonationLevel =>
_context
!.ImpersonationLevel;
246
private bool HandshakeComplete =>
_context
!.IsAuthenticated;
248
private bool CanGetSecureStream =>
_context
!.IsEncrypted ||
_context
.IsSigned;
255
return
_context
!.RemoteIdentity;
341
Debug.Assert(
_context
is not null);
400
if (isNtlm && !
_context
.IsEncrypted)
406
!
_context
.VerifyIntegrityCheck(_readBuffer.AsSpan(NtlmSignatureLength, readBytes - NtlmSignatureLength), _readBuffer.AsSpan(0, NtlmSignatureLength)))
419
statusCode =
_context
.UnwrapInPlace(_readBuffer.AsSpan(0, readBytes), out decryptedOffset, out decryptedCount, out _);
514
Debug.Assert(
_context
is not null);
530
bool isEncrypted =
_context
.IsEncrypted;
537
_context
.ComputeIntegrityCheck(bufferToWrap.Span, _writeBuffer);
543
statusCode =
_context
.Wrap(bufferToWrap.Span, _writeBuffer, isEncrypted, out _);
643
if (
_context
!= null)
658
if (
_context
is not null && IsServer != isServer)
716
_context
?.Dispose();
732
Debug.Assert(
_context
!= null);
742
await (
_context
.IsServer ?
761
Debug.Assert(
_context
!= null);
766
message =
_context
.GetOutgoingBlob(message, out statusCode);
783
new AuthenticationException(SR.Format(SR.net_auth_context_expectation,
_context
.ProtectionLevel.ToString(), _expectedProtectionLevel.ToString())),
796
isNtlm = string.Equals(
_context
.Package, NegotiationInfoClass.NTLM);
800
if (
_context
.IsServer)
896
Debug.Assert(
_context
!= null);
897
_context
.GetOutgoingBlob(message, out NegotiateAuthenticationStatusCode statusCode);