using System;
using System.IO;
namespace System.Net.Security
{
/// Provides methods for passing credentials across a stream and requesting or performing authentication for client-server applications.
// Token: 0x020001D2 RID: 466
public abstract class AuthenticatedStream : Stream
{
/// Initializes a new instance of the class.
/// A object used by the for sending and receiving data.
/// A that indicates whether closing this object also closes .
///
/// is null.-or- is equal to .
// Token: 0x06000EEA RID: 3818 RVA: 0x00029818 File Offset: 0x00027A18
protected AuthenticatedStream(Stream innerStream, bool leaveInnerStreamOpen)
{
this.innerStream = innerStream;
this.leaveStreamOpen = leaveInnerStreamOpen;
}
/// Gets the stream used by this for sending and receiving data.
/// A object.
// Token: 0x17000511 RID: 1297
// (get) Token: 0x06000EEB RID: 3819 RVA: 0x00029830 File Offset: 0x00027A30
protected Stream InnerStream
{
get
{
return this.innerStream;
}
}
/// Gets a value that indicates whether authentication was successful.
/// true if successful authentication occurred; otherwise, false.
// Token: 0x17000512 RID: 1298
// (get) Token: 0x06000EEC RID: 3820
public abstract bool IsAuthenticated { get; }
/// Gets a value that indicates whether data sent using this is encrypted.
/// true if data is encrypted before being transmitted over the network and decrypted when it reaches the remote endpoint; otherwise, false.
// Token: 0x17000513 RID: 1299
// (get) Token: 0x06000EED RID: 3821
public abstract bool IsEncrypted { get; }
/// Gets a value that indicates whether both server and client have been authenticated.
/// true if the client and server have been authenticated; otherwise, false.
// Token: 0x17000514 RID: 1300
// (get) Token: 0x06000EEE RID: 3822
public abstract bool IsMutuallyAuthenticated { get; }
/// Gets a value that indicates whether the local side of the connection was authenticated as the server.
/// true if the local endpoint was authenticated as the server side of a client-server authenticated connection; false if the local endpoint was authenticated as the client.
// Token: 0x17000515 RID: 1301
// (get) Token: 0x06000EEF RID: 3823
public abstract bool IsServer { get; }
/// Gets a value that indicates whether the data sent using this stream is signed.
/// true if the data is signed before being transmitted; otherwise, false.
// Token: 0x17000516 RID: 1302
// (get) Token: 0x06000EF0 RID: 3824
public abstract bool IsSigned { get; }
/// Gets whether the stream used by this for sending and receiving data has been left open.
/// true if the inner stream has been left open; otherwise, false.
// Token: 0x17000517 RID: 1303
// (get) Token: 0x06000EF1 RID: 3825 RVA: 0x00029838 File Offset: 0x00027A38
public bool LeaveInnerStreamOpen
{
get
{
return this.leaveStreamOpen;
}
}
/// Releases the unmanaged resources used by the and optionally releases the managed resources.
/// true to release both managed and unmanaged resources; false to release only unmanaged resources.
// Token: 0x06000EF2 RID: 3826 RVA: 0x00029840 File Offset: 0x00027A40
protected override void Dispose(bool disposing)
{
if (disposing && this.innerStream != null)
{
if (!this.leaveStreamOpen)
{
this.innerStream.Close();
}
this.innerStream = null;
}
}
// Token: 0x04000D9D RID: 3485
private Stream innerStream;
// Token: 0x04000D9E RID: 3486
private bool leaveStreamOpen;
}
}