Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Net.Security.NegotiateStream Class Reference

Public Member Functions

 NegotiateStream (Stream innerStream)
 
 NegotiateStream (Stream innerStream, bool leaveInnerStreamOpen)
 
override async ValueTask DisposeAsync ()
 
virtual IAsyncResult BeginAuthenticateAsClient (AsyncCallback? asyncCallback, object? asyncState)
 
virtual IAsyncResult BeginAuthenticateAsClient (NetworkCredential credential, string targetName, AsyncCallback? asyncCallback, object? asyncState)
 
virtual IAsyncResult BeginAuthenticateAsClient (NetworkCredential credential, ChannelBinding? binding, string targetName, AsyncCallback? asyncCallback, object? asyncState)
 
virtual IAsyncResult BeginAuthenticateAsClient (NetworkCredential credential, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel, AsyncCallback? asyncCallback, object? asyncState)
 
virtual IAsyncResult BeginAuthenticateAsClient (NetworkCredential credential, ChannelBinding? binding, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel, AsyncCallback? asyncCallback, object? asyncState)
 
virtual void EndAuthenticateAsClient (IAsyncResult asyncResult)
 
virtual void AuthenticateAsServer ()
 
virtual void AuthenticateAsServer (ExtendedProtectionPolicy? policy)
 
virtual void AuthenticateAsServer (NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
 
virtual void AuthenticateAsServer (NetworkCredential credential, ExtendedProtectionPolicy? policy, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
 
virtual IAsyncResult BeginAuthenticateAsServer (AsyncCallback? asyncCallback, object? asyncState)
 
virtual IAsyncResult BeginAuthenticateAsServer (ExtendedProtectionPolicy? policy, AsyncCallback? asyncCallback, object? asyncState)
 
virtual IAsyncResult BeginAuthenticateAsServer (NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel, AsyncCallback? asyncCallback, object? asyncState)
 
virtual IAsyncResult BeginAuthenticateAsServer (NetworkCredential credential, ExtendedProtectionPolicy? policy, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel, AsyncCallback? asyncCallback, object? asyncState)
 
virtual void EndAuthenticateAsServer (IAsyncResult asyncResult)
 
virtual void AuthenticateAsClient ()
 
virtual void AuthenticateAsClient (NetworkCredential credential, string targetName)
 
virtual void AuthenticateAsClient (NetworkCredential credential, ChannelBinding? binding, string targetName)
 
virtual void AuthenticateAsClient (NetworkCredential credential, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
 
virtual void AuthenticateAsClient (NetworkCredential credential, ChannelBinding? binding, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
 
virtual Task AuthenticateAsClientAsync ()
 
virtual Task AuthenticateAsClientAsync (NetworkCredential credential, string targetName)
 
virtual Task AuthenticateAsClientAsync (NetworkCredential credential, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
 
virtual Task AuthenticateAsClientAsync (NetworkCredential credential, ChannelBinding? binding, string targetName)
 
virtual Task AuthenticateAsClientAsync (NetworkCredential credential, ChannelBinding? binding, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
 
virtual Task AuthenticateAsServerAsync ()
 
virtual Task AuthenticateAsServerAsync (ExtendedProtectionPolicy? policy)
 
virtual Task AuthenticateAsServerAsync (NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
 
virtual Task AuthenticateAsServerAsync (NetworkCredential credential, ExtendedProtectionPolicy? policy, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
 
override void SetLength (long value)
 
override long Seek (long offset, SeekOrigin origin)
 
override void Flush ()
 
override Task FlushAsync (CancellationToken cancellationToken)
 
override int Read (byte[] buffer, int offset, int count)
 
override Task< int > ReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override ValueTask< int > ReadAsync (Memory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
override void Write (byte[] buffer, int offset, int count)
 
override Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
 
override ValueTask WriteAsync (ReadOnlyMemory< byte > buffer, CancellationToken cancellationToken=default(CancellationToken))
 
override IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback? asyncCallback, object? asyncState)
 
override int EndRead (IAsyncResult asyncResult)
 
override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback? asyncCallback, object? asyncState)
 
override void EndWrite (IAsyncResult asyncResult)
 
void Dispose ()
 
void CopyTo (Stream destination)
 
virtual void CopyTo (Stream destination, int bufferSize)
 
Task CopyToAsync (Stream destination)
 
Task CopyToAsync (Stream destination, int bufferSize)
 
Task CopyToAsync (Stream destination, CancellationToken cancellationToken)
 
virtual Task CopyToAsync (Stream destination, int bufferSize, CancellationToken cancellationToken)
 
virtual void Close ()
 
Task FlushAsync ()
 
Task< int > ReadAsync (byte[] buffer, int offset, int count)
 
Task WriteAsync (byte[] buffer, int offset, int count)
 
virtual int Read (Span< byte > buffer)
 
virtual int ReadByte ()
 
virtual void Write (ReadOnlySpan< byte > buffer)
 
virtual void WriteByte (byte value)
 
object GetLifetimeService ()
 
virtual object InitializeLifetimeService ()
 

Static Public Member Functions

static Stream Synchronized (Stream stream)
 

Static Public Attributes

static readonly Stream Null = new NullStream()
 

Protected Member Functions

override void Dispose (bool disposing)
 
SemaphoreSlim EnsureAsyncActiveSemaphoreInitialized ()
 
virtual WaitHandle CreateWaitHandle ()
 
virtual void ObjectInvariant ()
 
MarshalByRefObject MemberwiseClone (bool cloneIdentity)
 

Static Protected Member Functions

static void ValidateBufferArguments (byte[] buffer, int offset, int count)
 
static void ValidateCopyToArguments (Stream destination, int bufferSize)
 

Protected Attributes

SemaphoreSlim _asyncActiveSemaphore
 

Package Functions

Task< int > BeginReadInternal (byte[] buffer, int offset, int count, AsyncCallback callback, object state, bool serializeAsynchronously, bool apm)
 
Task BeginWriteInternal (byte[] buffer, int offset, int count, AsyncCallback callback, object state, bool serializeAsynchronously, bool apm)
 

Properties

override bool IsAuthenticated [get]
 
bool IsAuthenticatedCore [get]
 
override bool IsMutuallyAuthenticated [get]
 
override bool IsEncrypted [get]
 
override bool IsSigned [get]
 
override bool IsServer [get]
 
virtual TokenImpersonationLevel ImpersonationLevel [get]
 
TokenImpersonationLevel PrivateImpersonationLevel [get]
 
bool HandshakeComplete [get]
 
bool CanGetSecureStream [get]
 
virtual IIdentity RemoteIdentity [get]
 
override bool CanSeek [get]
 
override bool CanRead [get]
 
override bool CanTimeout [get]
 
override bool CanWrite [get]
 
override int ReadTimeout [get, set]
 
override int WriteTimeout [get, set]
 
override long Length [get]
 
override long Position [get, set]
 
bool LeaveInnerStreamOpen [get]
 
Stream InnerStream [get]
 

Private Member Functions

async ValueTask< int > ReadAsync< TAdapter > (TAdapter adapter, Memory< byte > buffer, [CallerMemberName] string callerName=null)
 
async Task WriteAsync< TAdapter > (TAdapter adapter, ReadOnlyMemory< byte > buffer)
 
void ThrowIfExceptional ()
 
void ValidateCreateContext (string package, NetworkCredential credential, string servicePrincipalName, ExtendedProtectionPolicy policy, ProtectionLevel protectionLevel, TokenImpersonationLevel impersonationLevel)
 
void ValidateCreateContext (string package, bool isServer, NetworkCredential credential, string servicePrincipalName, ChannelBinding channelBinding, ProtectionLevel protectionLevel, TokenImpersonationLevel impersonationLevel)
 
void SetFailed (Exception e)
 
void ThrowIfFailed (bool authSuccessCheck)
 
async Task AuthenticateAsync< TAdapter > (TAdapter adapter, [CallerMemberName] string callerName=null)
 
bool CheckSpn ()
 
async Task SendBlobAsync< TAdapter > (TAdapter adapter, byte[] message)
 
async Task ReceiveBlobAsync< TAdapter > (TAdapter adapter)
 
async Task SendAuthResetSignalAndThrowAsync< TAdapter > (TAdapter adapter, byte[] message, Exception exception)
 
byte[] GetOutgoingBlob (byte[] incomingBlob, ref Exception e)
 
int EncryptData (ReadOnlySpan< byte > buffer, [NotNull] ref byte[] outBuffer)
 
int DecryptData (byte[] buffer, int offset, int count, out int newOffset)
 
bool HasOverriddenBeginEndRead ()
 
bool HasOverriddenBeginEndWrite ()
 
int GetCopyBufferSize ()
 
Task< int > BeginEndReadAsync (byte[] buffer, int offset, int count)
 
void FinishTrackingAsyncOperation (ReadWriteTask task)
 
Task BeginEndWriteAsync (byte[] buffer, int offset, int count)
 

Static Private Member Functions

static bool IsError (SecurityStatusPal status)
 
static void ThrowCredentialException (long error)
 
static bool IsLogonDeniedException (Exception exception)
 
static void RunReadWriteTaskWhenReady (Task asyncWaiter, ReadWriteTask readWriteTask)
 
static void RunReadWriteTask (ReadWriteTask readWriteTask)
 
static async Task FinishWriteAsync (Task writeTask, byte[] localBuffer)
 

Private Attributes

readonly byte[] _readHeader
 
IIdentity _remoteIdentity
 
byte[] _readBuffer
 
int _readBufferOffset
 
int _readBufferCount
 
byte[] _writeBuffer
 
volatile int _writeInProgress
 
volatile int _readInProgress
 
volatile int _authInProgress
 
ExceptionDispatchInfo _exception
 
StreamFramer _framer
 
NTAuthentication _context
 
bool _canRetryAuthentication
 
ProtectionLevel _expectedProtectionLevel
 
TokenImpersonationLevel _expectedImpersonationLevel
 
uint _writeSequenceNumber
 
uint _readSequenceNumber
 
ExtendedProtectionPolicy _extendedProtectionPolicy
 
bool _remoteOk
 
readonly Stream _innerStream
 
readonly bool _leaveStreamOpen
 

Static Private Attributes

static readonly ExceptionDispatchInfo s_disposedSentinel = ExceptionDispatchInfo.Capture(new ObjectDisposedException("NegotiateStream", (string?)null))
 
static readonly byte[] s_emptyMessage = new byte[0]
 

Detailed Description

Definition at line 16 of file NegotiateStream.cs.


The documentation for this class was generated from the following file: