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