scripts
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace System.Net.Security
|
||||
{
|
||||
/// <summary>Provides methods for passing credentials across a stream and requesting or performing authentication for client-server applications.</summary>
|
||||
// Token: 0x020001D2 RID: 466
|
||||
public abstract class AuthenticatedStream : Stream
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Security.AuthenticatedStream" /> class. </summary>
|
||||
/// <param name="innerStream">A <see cref="T:System.IO.Stream" /> object used by the <see cref="T:System.Net.Security.AuthenticatedStream" /> for sending and receiving data.</param>
|
||||
/// <param name="leaveInnerStreamOpen">A <see cref="T:System.Boolean" /> that indicates whether closing this <see cref="T:System.Net.Security.AuthenticatedStream" /> object also closes <paramref name="innerStream" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="innerStream" /> is null.-or-<paramref name="innerStream" /> is equal to <see cref="F:System.IO.Stream.Null" />.</exception>
|
||||
// Token: 0x06000EEA RID: 3818 RVA: 0x00029818 File Offset: 0x00027A18
|
||||
protected AuthenticatedStream(Stream innerStream, bool leaveInnerStreamOpen)
|
||||
{
|
||||
this.innerStream = innerStream;
|
||||
this.leaveStreamOpen = leaveInnerStreamOpen;
|
||||
}
|
||||
|
||||
/// <summary>Gets the stream used by this <see cref="T:System.Net.Security.AuthenticatedStream" /> for sending and receiving data.</summary>
|
||||
/// <returns>A <see cref="T:System.IO.Stream" /> object.</returns>
|
||||
// Token: 0x17000511 RID: 1297
|
||||
// (get) Token: 0x06000EEB RID: 3819 RVA: 0x00029830 File Offset: 0x00027A30
|
||||
protected Stream InnerStream
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.innerStream;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether authentication was successful.</summary>
|
||||
/// <returns>true if successful authentication occurred; otherwise, false. </returns>
|
||||
// Token: 0x17000512 RID: 1298
|
||||
// (get) Token: 0x06000EEC RID: 3820
|
||||
public abstract bool IsAuthenticated { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether data sent using this <see cref="T:System.Net.Security.AuthenticatedStream" /> is encrypted.</summary>
|
||||
/// <returns>true if data is encrypted before being transmitted over the network and decrypted when it reaches the remote endpoint; otherwise, false.</returns>
|
||||
// Token: 0x17000513 RID: 1299
|
||||
// (get) Token: 0x06000EED RID: 3821
|
||||
public abstract bool IsEncrypted { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether both server and client have been authenticated.</summary>
|
||||
/// <returns>true if the client and server have been authenticated; otherwise, false.</returns>
|
||||
// Token: 0x17000514 RID: 1300
|
||||
// (get) Token: 0x06000EEE RID: 3822
|
||||
public abstract bool IsMutuallyAuthenticated { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the local side of the connection was authenticated as the server.</summary>
|
||||
/// <returns>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.</returns>
|
||||
// Token: 0x17000515 RID: 1301
|
||||
// (get) Token: 0x06000EEF RID: 3823
|
||||
public abstract bool IsServer { get; }
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the data sent using this stream is signed.</summary>
|
||||
/// <returns>true if the data is signed before being transmitted; otherwise, false.</returns>
|
||||
// Token: 0x17000516 RID: 1302
|
||||
// (get) Token: 0x06000EF0 RID: 3824
|
||||
public abstract bool IsSigned { get; }
|
||||
|
||||
/// <summary>Gets whether the stream used by this <see cref="T:System.Net.Security.AuthenticatedStream" /> for sending and receiving data has been left open.</summary>
|
||||
/// <returns>true if the inner stream has been left open; otherwise, false.</returns>
|
||||
// Token: 0x17000517 RID: 1303
|
||||
// (get) Token: 0x06000EF1 RID: 3825 RVA: 0x00029838 File Offset: 0x00027A38
|
||||
public bool LeaveInnerStreamOpen
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.leaveStreamOpen;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Net.Security.AuthenticatedStream" /> and optionally releases the managed resources. </summary>
|
||||
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.Security
|
||||
{
|
||||
/// <summary>Specifies client requirements for authentication and impersonation when using the <see cref="T:System.Net.WebRequest" /> class and derived classes to request a resource.</summary>
|
||||
// Token: 0x020001D3 RID: 467
|
||||
public enum AuthenticationLevel
|
||||
{
|
||||
/// <summary>No authentication is required for the client and server.</summary>
|
||||
// Token: 0x04000DA0 RID: 3488
|
||||
None,
|
||||
/// <summary>The client and server should be authenticated. The request does not fail if the server is not authenticated. To determine whether mutual authentication occurred, check the value of the <see cref="P:System.Net.WebResponse.IsMutuallyAuthenticated" /> property.</summary>
|
||||
// Token: 0x04000DA1 RID: 3489
|
||||
MutualAuthRequested,
|
||||
/// <summary>The client and server should be authenticated. If the server is not authenticated, your application will receive an <see cref="T:System.IO.IOException" /> with a <see cref="T:System.Net.ProtocolViolationException" /> inner exception that indicates that mutual authentication failed</summary>
|
||||
// Token: 0x04000DA2 RID: 3490
|
||||
MutualAuthRequired
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace System.Net.Security
|
||||
{
|
||||
/// <summary>Selects the local Secure Sockets Layer (SSL) certificate used for authentication.</summary>
|
||||
/// <returns>An <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate" /> used for establishing an SSL connection.</returns>
|
||||
/// <param name="sender">An object that contains state information for this validation.</param>
|
||||
/// <param name="targetHost">The host server specified by the client.</param>
|
||||
/// <param name="localCertificates">An <see cref="T:System.Security.Cryptography.X509Certificates.X509CertificateCollection" /> containing local certificates.</param>
|
||||
/// <param name="remoteCertificate">The certificate used to authenticate the remote party.</param>
|
||||
/// <param name="acceptableIssuers">A <see cref="T:System.String" /> array of certificate issuers acceptable to the remote party.</param>
|
||||
// Token: 0x02000331 RID: 817
|
||||
// (Invoke) Token: 0x06001C9D RID: 7325
|
||||
public delegate X509Certificate LocalCertificateSelectionCallback(object sender, string targetHost, global::System.Security.Cryptography.X509Certificates.X509CertificateCollection localCertificates, X509Certificate remoteCertificate, string[] acceptableIssuers);
|
||||
}
|
||||
@@ -0,0 +1,599 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Principal;
|
||||
|
||||
namespace System.Net.Security
|
||||
{
|
||||
/// <summary>Provides a stream that uses the Negotiate security protocol to authenticate the client, and optionally the server, in client-server communication.</summary>
|
||||
// Token: 0x020001D4 RID: 468
|
||||
public class NegotiateStream : AuthenticatedStream
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Security.NegotiateStream" /> class using the specified <see cref="T:System.IO.Stream" />.</summary>
|
||||
/// <param name="innerStream">A <see cref="T:System.IO.Stream" /> object used by the <see cref="T:System.Net.Security.NegotiateStream" /> for sending and receiving data.</param>
|
||||
// Token: 0x06000EF3 RID: 3827 RVA: 0x0002987C File Offset: 0x00027A7C
|
||||
[global::System.MonoTODO]
|
||||
public NegotiateStream(Stream innerStream)
|
||||
: base(innerStream, false)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Security.NegotiateStream" /> class using the specified <see cref="T:System.IO.Stream" /> and stream closure behavior.</summary>
|
||||
/// <param name="innerStream">A <see cref="T:System.IO.Stream" /> object used by the <see cref="T:System.Net.Security.NegotiateStream" /> for sending and receiving data.</param>
|
||||
/// <param name="leaveInnerStreamOpen">true to indicate that closing this <see cref="T:System.Net.Security.NegotiateStream" /> has no effect on <paramref name="innerstream" />; false to indicate that closing this <see cref="T:System.Net.Security.NegotiateStream" /> also closes <paramref name="innerStream" />. See the Remarks section for more information.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="innerStream" /> is null.- or -<paramref name="innerStream" /> is equal to <see cref="F:System.IO.Stream.Null" />.</exception>
|
||||
// Token: 0x06000EF4 RID: 3828 RVA: 0x00029888 File Offset: 0x00027A88
|
||||
[global::System.MonoTODO]
|
||||
public NegotiateStream(Stream innerStream, bool leaveStreamOpen)
|
||||
: base(innerStream, leaveStreamOpen)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the underlying stream is readable.</summary>
|
||||
/// <returns>true if authentication has occurred and the underlying stream is readable; otherwise, false.</returns>
|
||||
// Token: 0x17000518 RID: 1304
|
||||
// (get) Token: 0x06000EF5 RID: 3829 RVA: 0x00029894 File Offset: 0x00027A94
|
||||
public override bool CanRead
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.InnerStream.CanRead;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the underlying stream is seekable.</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x17000519 RID: 1305
|
||||
// (get) Token: 0x06000EF6 RID: 3830 RVA: 0x000298A4 File Offset: 0x00027AA4
|
||||
public override bool CanSeek
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.InnerStream.CanSeek;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the underlying stream supports time-outs.</summary>
|
||||
/// <returns>true if the underlying stream supports time-outs; otherwise, false.</returns>
|
||||
// Token: 0x1700051A RID: 1306
|
||||
// (get) Token: 0x06000EF7 RID: 3831 RVA: 0x000298B4 File Offset: 0x00027AB4
|
||||
[global::System.MonoTODO]
|
||||
public override bool CanTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the underlying stream is writable.</summary>
|
||||
/// <returns>true if authentication has occurred and the underlying stream is writable; otherwise, false.</returns>
|
||||
// Token: 0x1700051B RID: 1307
|
||||
// (get) Token: 0x06000EF8 RID: 3832 RVA: 0x000298BC File Offset: 0x00027ABC
|
||||
public override bool CanWrite
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.InnerStream.CanWrite;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates how the server can use the client's credentials.</summary>
|
||||
/// <returns>One of the <see cref="T:System.Security.Principal.TokenImpersonationLevel" /> values.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication failed or has not occurred.</exception>
|
||||
// Token: 0x1700051C RID: 1308
|
||||
// (get) Token: 0x06000EF9 RID: 3833 RVA: 0x000298CC File Offset: 0x00027ACC
|
||||
[global::System.MonoTODO]
|
||||
public virtual TokenImpersonationLevel ImpersonationLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether authentication was successful.</summary>
|
||||
/// <returns>true if successful authentication occurred; otherwise, false. </returns>
|
||||
// Token: 0x1700051D RID: 1309
|
||||
// (get) Token: 0x06000EFA RID: 3834 RVA: 0x000298D4 File Offset: 0x00027AD4
|
||||
[global::System.MonoTODO]
|
||||
public override bool IsAuthenticated
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether this <see cref="T:System.Net.Security.NegotiateStream" /> uses data encryption.</summary>
|
||||
/// <returns>true if data is encrypted before being transmitted over the network and decrypted when it reaches the remote endpoint; otherwise, false.</returns>
|
||||
// Token: 0x1700051E RID: 1310
|
||||
// (get) Token: 0x06000EFB RID: 3835 RVA: 0x000298DC File Offset: 0x00027ADC
|
||||
[global::System.MonoTODO]
|
||||
public override bool IsEncrypted
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether both the server and the client have been authenticated.</summary>
|
||||
/// <returns>true if the server has been authenticated; otherwise, false.</returns>
|
||||
// Token: 0x1700051F RID: 1311
|
||||
// (get) Token: 0x06000EFC RID: 3836 RVA: 0x000298E4 File Offset: 0x00027AE4
|
||||
[global::System.MonoTODO]
|
||||
public override bool IsMutuallyAuthenticated
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the local side of the connection used by this <see cref="T:System.Net.Security.NegotiateStream" /> was authenticated as the server.</summary>
|
||||
/// <returns>true if the local endpoint was successfully authenticated as the server side of the authenticated connection; otherwise, false.</returns>
|
||||
// Token: 0x17000520 RID: 1312
|
||||
// (get) Token: 0x06000EFD RID: 3837 RVA: 0x000298EC File Offset: 0x00027AEC
|
||||
[global::System.MonoTODO]
|
||||
public override bool IsServer
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the data sent using this stream is signed.</summary>
|
||||
/// <returns>true if the data is signed before being transmitted; otherwise, false.</returns>
|
||||
// Token: 0x17000521 RID: 1313
|
||||
// (get) Token: 0x06000EFE RID: 3838 RVA: 0x000298F4 File Offset: 0x00027AF4
|
||||
[global::System.MonoTODO]
|
||||
public override bool IsSigned
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the length of the underlying stream.</summary>
|
||||
/// <returns>A <see cref="T:System.Int64" /> that specifies the length of the underlying stream.</returns>
|
||||
/// <exception cref="T:System.NotSupportedException">Getting the value of this property is not supported when the underlying stream is a <see cref="T:System.Net.Sockets.NetworkStream" />.</exception>
|
||||
// Token: 0x17000522 RID: 1314
|
||||
// (get) Token: 0x06000EFF RID: 3839 RVA: 0x000298FC File Offset: 0x00027AFC
|
||||
public override long Length
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.InnerStream.Length;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the current position in the underlying stream.</summary>
|
||||
/// <returns>A <see cref="T:System.Int64" /> that specifies the current position in the underlying stream.</returns>
|
||||
/// <exception cref="T:System.NotSupportedException">Setting this property is not supported.- or -Getting the value of this property is not supported when the underlying stream is a <see cref="T:System.Net.Sockets.NetworkStream" />.</exception>
|
||||
// Token: 0x17000523 RID: 1315
|
||||
// (get) Token: 0x06000F00 RID: 3840 RVA: 0x0002990C File Offset: 0x00027B0C
|
||||
// (set) Token: 0x06000F01 RID: 3841 RVA: 0x0002991C File Offset: 0x00027B1C
|
||||
public override long Position
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.InnerStream.Position;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.InnerStream.Position = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the amount of time a read operation blocks waiting for data.</summary>
|
||||
/// <returns>A <see cref="T:System.Int32" /> that specifies the amount of time that will elapse before a read operation fails. </returns>
|
||||
// Token: 0x17000524 RID: 1316
|
||||
// (get) Token: 0x06000F02 RID: 3842 RVA: 0x0002992C File Offset: 0x00027B2C
|
||||
// (set) Token: 0x06000F03 RID: 3843 RVA: 0x00029934 File Offset: 0x00027B34
|
||||
public override int ReadTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.readTimeout;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.readTimeout = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets information about the identity of the remote party sharing this authenticated stream.</summary>
|
||||
/// <returns>An <see cref="T:System.Security.Principal.IIdentity" /> object that describes the identity of the remote endpoint.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication failed or has not occurred.</exception>
|
||||
// Token: 0x17000525 RID: 1317
|
||||
// (get) Token: 0x06000F04 RID: 3844 RVA: 0x00029940 File Offset: 0x00027B40
|
||||
[global::System.MonoTODO]
|
||||
public virtual IIdentity RemoteIdentity
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the amount of time a write operation blocks waiting for data.</summary>
|
||||
/// <returns>A <see cref="T:System.Int32" /> that specifies the amount of time that will elapse before a write operation fails. </returns>
|
||||
// Token: 0x17000526 RID: 1318
|
||||
// (get) Token: 0x06000F05 RID: 3845 RVA: 0x00029948 File Offset: 0x00027B48
|
||||
// (set) Token: 0x06000F06 RID: 3846 RVA: 0x00029950 File Offset: 0x00027B50
|
||||
public override int WriteTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.writeTimeout;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.writeTimeout = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Called by clients to begin an asynchronous operation to authenticate the client, and optionally the server, in a client-server connection. This method does not block.</summary>
|
||||
/// <returns>An <see cref="T:System.IAsyncResult" /> object indicating the status of the asynchronous operation. </returns>
|
||||
/// <param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the authentication is complete.</param>
|
||||
/// <param name="asyncState">A user-defined object containing information about the operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.InvalidCredentialException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.- or -This stream was used previously to attempt authentication as the server. You cannot use the stream to retry authentication as the client.</exception>
|
||||
// Token: 0x06000F07 RID: 3847 RVA: 0x0002995C File Offset: 0x00027B5C
|
||||
[global::System.MonoTODO]
|
||||
public virtual IAsyncResult BeginAuthenticateAsClient(AsyncCallback callback, object asyncState)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Called by clients to begin an asynchronous operation to authenticate the client, and optionally the server, in a client-server connection. The authentication process uses the specified credentials. This method does not block.</summary>
|
||||
/// <returns>An <see cref="T:System.IAsyncResult" /> object indicating the status of the asynchronous operation. </returns>
|
||||
/// <param name="credential">The <see cref="T:System.Net.NetworkCredential" /> that is used to establish the identity of the client.</param>
|
||||
/// <param name="targetName">The Service Principal Name (SPN) that uniquely identifies the server to authenticate.</param>
|
||||
/// <param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the authentication is complete.</param>
|
||||
/// <param name="asyncState">A user-defined object containing information about the write operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="credential" /> is null.- or -<paramref name="targetName" /> is null.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.InvalidCredentialException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.- or -This stream was used previously to attempt authentication as the server. You cannot use the stream to retry authentication as the client.</exception>
|
||||
// Token: 0x06000F08 RID: 3848 RVA: 0x00029964 File Offset: 0x00027B64
|
||||
[global::System.MonoTODO]
|
||||
public virtual IAsyncResult BeginAuthenticateAsClient(NetworkCredential credential, string targetName, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Called by clients to begin an asynchronous operation to authenticate the client, and optionally the server, in a client-server connection. The authentication process uses the specified credentials and authentication options. This method does not block.</summary>
|
||||
/// <returns>An <see cref="T:System.IAsyncResult" /> object indicating the status of the asynchronous operation. </returns>
|
||||
/// <param name="credential">The <see cref="T:System.Net.NetworkCredential" /> that is used to establish the identity of the client.</param>
|
||||
/// <param name="targetName">The Service Principal Name (SPN) that uniquely identifies the server to authenticate.</param>
|
||||
/// <param name="requiredProtectionLevel">One of the <see cref="T:System.Net.Security.ProtectionLevel" /> values, indicating the security services for the stream.</param>
|
||||
/// <param name="allowedImpersonationLevel">One of the <see cref="T:System.Security.Principal.TokenImpersonationLevel" /> values, indicating how the server can use the client's credentials to access resources.</param>
|
||||
/// <param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the authentication is complete. </param>
|
||||
/// <param name="asyncState">A user-defined object containing information about the write operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="credential" /> is null.- or -<paramref name="targetName" /> is null.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.InvalidCredentialException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.- or -This stream was used previously to attempt authentication as the server. You cannot use the stream to retry authentication as the client.</exception>
|
||||
// Token: 0x06000F09 RID: 3849 RVA: 0x0002996C File Offset: 0x00027B6C
|
||||
[global::System.MonoTODO]
|
||||
public virtual IAsyncResult BeginAuthenticateAsClient(NetworkCredential credential, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Begins an asynchronous read operation that reads data from the stream and stores it in the specified array. </summary>
|
||||
/// <returns>An <see cref="T:System.IAsyncResult" /> object indicating the status of the asynchronous operation. </returns>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that receives the bytes read from the stream.</param>
|
||||
/// <param name="offset">The zero-based location in <paramref name="buffer" /> at which to begin storing the data read from this stream.</param>
|
||||
/// <param name="count">The maximum number of bytes to read from the stream.</param>
|
||||
/// <param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the read operation is complete. </param>
|
||||
/// <param name="asyncState">A user-defined object containing information about the read operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="buffer" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="offset" /> is less than 0.- or -<paramref name="offset" /> is greater than the length of <paramref name="buffer" />.- or -<paramref name="offset" /> plus <paramref name="count" /> is greater than the length of <paramref name="buffer" />.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">The read operation failed.- or -Encryption is in use, but the data could not be decrypted.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">There is already a read operation in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has not occurred.</exception>
|
||||
// Token: 0x06000F0A RID: 3850 RVA: 0x00029974 File Offset: 0x00027B74
|
||||
[global::System.MonoTODO]
|
||||
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Called by servers to begin an asynchronous operation to authenticate the client, and optionally the server, in a client-server connection. This method does not block.</summary>
|
||||
/// <returns>An <see cref="T:System.IAsyncResult" /> object indicating the status of the asynchronous operation. </returns>
|
||||
/// <param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the authentication is complete.</param>
|
||||
/// <param name="asyncState">A user-defined object containing information about the operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.InvalidCredentialException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">Windows 95 and Windows 98 are not supported.</exception>
|
||||
// Token: 0x06000F0B RID: 3851 RVA: 0x0002997C File Offset: 0x00027B7C
|
||||
[global::System.MonoTODO]
|
||||
public virtual IAsyncResult BeginAuthenticateAsServer(AsyncCallback callback, object asyncState)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Called by servers to begin an asynchronous operation to authenticate the client, and optionally the server, in a client-server connection. The authentication process uses the specified server credentials and authentication options. This method does not block.</summary>
|
||||
/// <returns>An <see cref="T:System.IAsyncResult" /> object indicating the status of the asynchronous operation. </returns>
|
||||
/// <param name="credential">The <see cref="T:System.Net.NetworkCredential" /> that is used to establish the identity of the client.</param>
|
||||
/// <param name="requiredProtectionLevel">One of the <see cref="T:System.Net.Security.ProtectionLevel" /> values, indicating the security services for the stream.</param>
|
||||
/// <param name="requiredImpersonationLevel">One of the <see cref="T:System.Security.Principal.TokenImpersonationLevel" /> values, indicating how the server can use the client's credentials to access resources.</param>
|
||||
/// <param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the authentication is complete.</param>
|
||||
/// <param name="asyncState">A user-defined object containing information about the operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="credential" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="requiredImpersonationLevel" /> must be <see cref="F:System.Security.Principal.TokenImpersonationLevel.Identification" />, <see cref="F:System.Security.Principal.TokenImpersonationLevel.Impersonation" />, or <see cref="F:System.Security.Principal.TokenImpersonationLevel.Delegation" />,</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.InvalidCredentialException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.- or -This stream was used previously to attempt authentication as the client. You cannot use the stream to retry authentication as the server.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">Windows 95 and Windows 98 are not supported.</exception>
|
||||
// Token: 0x06000F0C RID: 3852 RVA: 0x00029984 File Offset: 0x00027B84
|
||||
[global::System.MonoTODO]
|
||||
public virtual IAsyncResult BeginAuthenticateAsServer(NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Begins an asynchronous write operation that writes <see cref="T:System.Byte" />s from the specified buffer to the stream.</summary>
|
||||
/// <returns>An <see cref="T:System.IAsyncResult" /> object indicating the status of the asynchronous operation. </returns>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that supplies the bytes to be written to the stream.</param>
|
||||
/// <param name="offset">The zero-based location in<paramref name=" buffer" /> at which to begin reading bytes to be written to the stream.</param>
|
||||
/// <param name="count">An <see cref="T:System.Int32" /> value that specifies the number of bytes to read from <paramref name="buffer" />.</param>
|
||||
/// <param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the write operation is complete. </param>
|
||||
/// <param name="asyncState">A user-defined object containing information about the write operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="buffer" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="offset is less than 0" />.- or -<paramref name="offset" /> is greater than the length of <paramref name="buffer" />.- or -<paramref name="offset" /> plus count is greater than the length of <paramref name="buffer" />.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">The write operation failed.- or -Encryption is in use, but the data could not be encrypted.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">There is already a write operation in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has not occurred.</exception>
|
||||
// Token: 0x06000F0D RID: 3853 RVA: 0x0002998C File Offset: 0x00027B8C
|
||||
[global::System.MonoTODO]
|
||||
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Called by clients to authenticate the client, and optionally the server, in a client-server connection.</summary>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.InvalidCredentialException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.- or -This stream was used previously to attempt authentication as the server. You cannot use the stream to retry authentication as the client.</exception>
|
||||
// Token: 0x06000F0E RID: 3854 RVA: 0x00029994 File Offset: 0x00027B94
|
||||
[global::System.MonoTODO]
|
||||
public virtual void AuthenticateAsClient()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Called by clients to authenticate the client, and optionally the server, in a client-server connection. The authentication process uses the specified client credential. </summary>
|
||||
/// <param name="credential">The <see cref="T:System.Net.NetworkCredential" /> that is used to establish the identity of the client.</param>
|
||||
/// <param name="targetName">The Service Principal Name (SPN) that uniquely identifies the server to authenticate.</param>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.InvalidCredentialException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.- or -This stream was used previously to attempt authentication as the server. You cannot use the stream to retry authentication as the client.</exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="targetName" /> is null.</exception>
|
||||
// Token: 0x06000F0F RID: 3855 RVA: 0x0002999C File Offset: 0x00027B9C
|
||||
[global::System.MonoTODO]
|
||||
public virtual void AuthenticateAsClient(NetworkCredential credential, string targetName)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Called by clients to authenticate the client, and optionally the server, in a client-server connection. The authentication process uses the specified credentials and authentication options.</summary>
|
||||
/// <param name="credential">The <see cref="T:System.Net.NetworkCredential" /> that is used to establish the identity of the client.</param>
|
||||
/// <param name="targetName">The Service Principal Name (SPN) that uniquely identifies the server to authenticate.</param>
|
||||
/// <param name="requiredProtectionLevel">One of the <see cref="T:System.Net.Security.ProtectionLevel" /> values, indicating the security services for the stream.</param>
|
||||
/// <param name="allowedImpersonationLevel">One of the <see cref="T:System.Security.Principal.TokenImpersonationLevel" /> values, indicating how the server can use the client's credentials to access resources.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="allowedImpersonationLevel" /> is not a valid value.</exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="targetName" /> is null.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.InvalidCredentialException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.- or -This stream was used previously to attempt authentication as the server. You cannot use the stream to retry authentication as the client.</exception>
|
||||
// Token: 0x06000F10 RID: 3856 RVA: 0x000299A4 File Offset: 0x00027BA4
|
||||
[global::System.MonoTODO]
|
||||
public virtual void AuthenticateAsClient(NetworkCredential credential, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Called by servers to authenticate the client, and optionally the server, in a client-server connection.</summary>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.InvalidCredentialException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">Windows 95 and Windows 98 are not supported.</exception>
|
||||
// Token: 0x06000F11 RID: 3857 RVA: 0x000299AC File Offset: 0x00027BAC
|
||||
[global::System.MonoTODO]
|
||||
public virtual void AuthenticateAsServer()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Called by servers to authenticate the client, and optionally the server, in a client-server connection. The authentication process uses the specified server credentials and authentication options.</summary>
|
||||
/// <param name="credential">The <see cref="T:System.Net.NetworkCredential" /> that is used to establish the identity of the server.</param>
|
||||
/// <param name="requiredProtectionLevel">One of the <see cref="T:System.Net.Security.ProtectionLevel" /> values, indicating the security services for the stream.</param>
|
||||
/// <param name="requiredImpersonationLevel">One of the <see cref="T:System.Security.Principal.TokenImpersonationLevel" /> values, indicating how the server can use the client's credentials to access resources.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="credential " />is null.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed. You can use this object to try to r-authenticate.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.InvalidCredentialException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.- or -This stream was used previously to attempt authentication as the client. You cannot use the stream to retry authentication as the server.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">Windows 95 and Windows 98 are not supported.</exception>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">
|
||||
/// <paramref name="requiredImpersonationLevel" /> must be <see cref="F:System.Security.Principal.TokenImpersonationLevel.Identification" />, <see cref="F:System.Security.Principal.TokenImpersonationLevel.Impersonation" />, or <see cref="F:System.Security.Principal.TokenImpersonationLevel.Delegation" />,</exception>
|
||||
// Token: 0x06000F12 RID: 3858 RVA: 0x000299B4 File Offset: 0x00027BB4
|
||||
[global::System.MonoTODO]
|
||||
public virtual void AuthenticateAsServer(NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Net.Security.NegotiateStream" /> and optionally releases the managed resources. </summary>
|
||||
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
|
||||
// Token: 0x06000F13 RID: 3859 RVA: 0x000299BC File Offset: 0x00027BBC
|
||||
[global::System.MonoTODO]
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Ends a pending asynchronous client authentication operation that was started with a call to <see cref="Overload:System.Net.Security.NegotiateStream.BeginAuthenticateAsClient" />.</summary>
|
||||
/// <param name="asyncResult">An <see cref="T:System.IAsyncResult" /> instance returned by a call to <see cref="Overload:System.Net.Security.NegotiateStream.BeginAuthenticateAsClient" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="asyncResult" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="asyncResult" /> was not created by a call to <see cref="Overload:System.Net.Security.NegotiateStream.BeginAuthenticateAsClient" />.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.InvalidCredentialException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">There is no pending client authentication to complete.</exception>
|
||||
// Token: 0x06000F14 RID: 3860 RVA: 0x000299C4 File Offset: 0x00027BC4
|
||||
[global::System.MonoTODO]
|
||||
public virtual void EndAuthenticateAsClient(IAsyncResult asyncResult)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Ends an asynchronous read operation that was started with a call to <see cref="M:System.Net.Security.NegotiateStream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Int32" /> value that specifies the number of bytes read from the underlying stream.</returns>
|
||||
/// <param name="asyncResult">An <see cref="T:System.IAsyncResult" /> instance returned by a call to <see cref="M:System.Net.Security.NegotiateStream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" /></param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="asyncResult" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The asyncResult was not created by a call to <see cref="M:System.Net.Security.NegotiateStream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">There is no pending read operation to complete.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">The read operation failed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has not occurred.</exception>
|
||||
// Token: 0x06000F15 RID: 3861 RVA: 0x000299CC File Offset: 0x00027BCC
|
||||
[global::System.MonoTODO]
|
||||
public override int EndRead(IAsyncResult asyncResult)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Ends a pending asynchronous client authentication operation that was started with a call to <see cref="Overload:System.Net.Security.NegotiateStream.BeginAuthenticateAsServer" />.</summary>
|
||||
/// <param name="asyncResult">An <see cref="T:System.IAsyncResult" /> instance returned by a call to <see cref="Overload:System.Net.Security.NegotiateStream.BeginAuthenticateAsServer" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="asyncResult" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="asyncResult" /> was not created by a call to <see cref="Overload:System.Net.Security.NegotiateStream.BeginAuthenticateAsServer" />.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.InvalidCredentialException">The authentication failed. You can use this object to retry the authentication.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">There is no pending authentication to complete.</exception>
|
||||
// Token: 0x06000F16 RID: 3862 RVA: 0x000299D4 File Offset: 0x00027BD4
|
||||
[global::System.MonoTODO]
|
||||
public virtual void EndAuthenticateAsServer(IAsyncResult asyncResult)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Ends an asynchronous write operation that was started with a call to <see cref="M:System.Net.Security.NegotiateStream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" />.</summary>
|
||||
/// <param name="asyncResult">An <see cref="T:System.IAsyncResult" /> instance returned by a call to <see cref="M:System.Net.Security.NegotiateStream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" /></param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="asyncResult" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The asyncResult was not created by a call to <see cref="M:System.Net.Security.NegotiateStream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">There is no pending write operation to complete.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">The write operation failed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has not occurred.</exception>
|
||||
// Token: 0x06000F17 RID: 3863 RVA: 0x000299DC File Offset: 0x00027BDC
|
||||
[global::System.MonoTODO]
|
||||
public override void EndWrite(IAsyncResult asyncResult)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Causes any buffered data to be written to the underlying device.</summary>
|
||||
// Token: 0x06000F18 RID: 3864 RVA: 0x000299E4 File Offset: 0x00027BE4
|
||||
[global::System.MonoTODO]
|
||||
public override void Flush()
|
||||
{
|
||||
base.InnerStream.Flush();
|
||||
}
|
||||
|
||||
/// <summary>Reads data from this stream and stores it in the specified array.</summary>
|
||||
/// <returns>A <see cref="T:System.Int32" /> value that specifies the number of bytes read from the underlying stream. When there is no more data to be read, returns 0.</returns>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that receives the bytes read from the stream.</param>
|
||||
/// <param name="offset">A <see cref="T:System.Int32" /> containing the zero-based location in <paramref name="buffer" /> at which to begin storing the data read from this stream.</param>
|
||||
/// <param name="count">A <see cref="T:System.Int32" /> containing the maximum number of bytes to read from the stream.</param>
|
||||
/// <exception cref="T:System.IO.IOException">The read operation failed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has not occurred.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">A <see cref="M:System.Net.Security.NegotiateStream.Read(System.Byte[],System.Int32,System.Int32)" /> operation is already in progress.</exception>
|
||||
// Token: 0x06000F19 RID: 3865 RVA: 0x000299F4 File Offset: 0x00027BF4
|
||||
[global::System.MonoTODO]
|
||||
public override int Read(byte[] buffer, int offset, int count)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Throws <see cref="T:System.NotSupportedException" />.</summary>
|
||||
/// <returns>Always throws a <see cref="T:System.NotSupportedException" />.</returns>
|
||||
/// <param name="offset">This value is ignored.</param>
|
||||
/// <param name="origin">This value is ignored.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">Seeking is not supported on <see cref="T:System.Net.Security.NegotiateStream" />.</exception>
|
||||
// Token: 0x06000F1A RID: 3866 RVA: 0x000299FC File Offset: 0x00027BFC
|
||||
[global::System.MonoTODO]
|
||||
public override long Seek(long offset, SeekOrigin origin)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Sets the length of the underlying stream.</summary>
|
||||
/// <param name="value">An <see cref="T:System.Int64" /> value that specifies the length of the stream.</param>
|
||||
// Token: 0x06000F1B RID: 3867 RVA: 0x00029A04 File Offset: 0x00027C04
|
||||
[global::System.MonoTODO]
|
||||
public override void SetLength(long value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>Write the specified number of <see cref="T:System.Byte" />s to the underlying stream using the specified buffer and offset.</summary>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that supplies the bytes written to the stream.</param>
|
||||
/// <param name="offset">An <see cref="T:System.Int32" /> containing the zero-based location in<paramref name=" buffer" /> at which to begin reading bytes to be written to the stream.</param>
|
||||
/// <param name="count">A <see cref="T:System.Int32" /> containing the number of bytes to read from <paramref name="buffer" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="buffer" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="offset is less than 0" />.- or -<paramref name="offset" /> is greater than the length of <paramref name="buffer" />.- or -<paramref name="offset" /> plus count is greater than the length of <paramref name="buffer" />.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">The write operation failed.- or -Encryption is in use, but the data could not be encrypted.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">There is already a write operation in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has not occurred.</exception>
|
||||
// Token: 0x06000F1C RID: 3868 RVA: 0x00029A0C File Offset: 0x00027C0C
|
||||
[global::System.MonoTODO]
|
||||
public override void Write(byte[] buffer, int offset, int count)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Token: 0x04000DA3 RID: 3491
|
||||
private int readTimeout;
|
||||
|
||||
// Token: 0x04000DA4 RID: 3492
|
||||
private int writeTimeout;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.Security
|
||||
{
|
||||
/// <summary>Indicates the security services requested for an authenticated stream.</summary>
|
||||
// Token: 0x020001D5 RID: 469
|
||||
public enum ProtectionLevel
|
||||
{
|
||||
/// <summary>Authentication only.</summary>
|
||||
// Token: 0x04000DA6 RID: 3494
|
||||
None,
|
||||
/// <summary>Sign data to help ensure the integrity of transmitted data.</summary>
|
||||
// Token: 0x04000DA7 RID: 3495
|
||||
Sign,
|
||||
/// <summary>Encrypt and sign data to help ensure the confidentiality and integrity of transmitted data.</summary>
|
||||
// Token: 0x04000DA8 RID: 3496
|
||||
EncryptAndSign
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace System.Net.Security
|
||||
{
|
||||
/// <summary>Verifies the remote Secure Sockets Layer (SSL) certificate used for authentication.</summary>
|
||||
/// <returns>A <see cref="T:System.Boolean" /> value that determines whether the specified certificate is accepted for authentication.</returns>
|
||||
/// <param name="sender">An object that contains state information for this validation.</param>
|
||||
/// <param name="certificate">The certificate used to authenticate the remote party.</param>
|
||||
/// <param name="chain">The chain of certificate authorities associated with the remote certificate.</param>
|
||||
/// <param name="sslPolicyErrors">One or more errors associated with the remote certificate.</param>
|
||||
// Token: 0x02000332 RID: 818
|
||||
// (Invoke) Token: 0x06001CA1 RID: 7329
|
||||
public delegate bool RemoteCertificateValidationCallback(object sender, X509Certificate certificate, global::System.Security.Cryptography.X509Certificates.X509Chain chain, SslPolicyErrors sslPolicyErrors);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
|
||||
namespace System.Net.Security
|
||||
{
|
||||
/// <summary>Enumerates Secure Socket Layer (SSL) policy errors.</summary>
|
||||
// Token: 0x020001D6 RID: 470
|
||||
[Flags]
|
||||
public enum SslPolicyErrors
|
||||
{
|
||||
/// <summary>No SSL policy errors.</summary>
|
||||
// Token: 0x04000DAA RID: 3498
|
||||
None = 0,
|
||||
/// <summary>Certificate not available.</summary>
|
||||
// Token: 0x04000DAB RID: 3499
|
||||
RemoteCertificateNotAvailable = 1,
|
||||
/// <summary>Certificate name mismatch.</summary>
|
||||
// Token: 0x04000DAC RID: 3500
|
||||
RemoteCertificateNameMismatch = 2,
|
||||
/// <summary>
|
||||
/// <see cref="P:System.Security.Cryptography.X509Certificates.X509Chain.ChainStatus" /> has returned a non empty array.</summary>
|
||||
// Token: 0x04000DAD RID: 3501
|
||||
RemoteCertificateChainErrors = 4
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,952 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Authentication;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Mono.Security.Protocol.Tls;
|
||||
|
||||
namespace System.Net.Security
|
||||
{
|
||||
/// <summary>Provides a stream used for client-server communication that uses the Secure Socket Layer (SSL) security protocol to authenticate the server and optionally the client.</summary>
|
||||
// Token: 0x020001D7 RID: 471
|
||||
[global::System.MonoTODO("Non-X509Certificate2 certificate is not supported")]
|
||||
public class SslStream : AuthenticatedStream
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Security.SslStream" /> class using the specified <see cref="T:System.IO.Stream" />.</summary>
|
||||
/// <param name="innerStream">A <see cref="T:System.IO.Stream" /> object used by the <see cref="T:System.Net.Security.SslStream" /> for sending and receiving data.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="innerStream" /> is not readable.-or-<paramref name="innerStream" /> is not writable.</exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="innerStream" /> is null.-or-<paramref name="innerStream" /> is equal to <see cref="F:System.IO.Stream.Null" />.</exception>
|
||||
// Token: 0x06000F1D RID: 3869 RVA: 0x00029A14 File Offset: 0x00027C14
|
||||
public SslStream(Stream innerStream)
|
||||
: this(innerStream, false)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Security.SslStream" /> class using the specified <see cref="T:System.IO.Stream" /> and stream closure behavior.</summary>
|
||||
/// <param name="innerStream">Initializes a new instance of the <see cref="T:System.Net.Security.SslStream" /> class using the specified <see cref="T:System.IO.Stream" /> and stream closure behavior.</param>
|
||||
/// <param name="leaveInnerStreamOpen">Initializes a new instance of the <see cref="T:System.Net.Security.SslStream" /> class using the specified <see cref="T:System.IO.Stream" /> and stream closure behavior.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="innerStream" /> is not readable.-or-<paramref name="innerStream" /> is not writable.</exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="innerStream" /> is null.-or-<paramref name="innerStream" /> is equal to <see cref="F:System.IO.Stream.Null" />.</exception>
|
||||
// Token: 0x06000F1E RID: 3870 RVA: 0x00029A20 File Offset: 0x00027C20
|
||||
public SslStream(Stream innerStream, bool leaveStreamOpen)
|
||||
: base(innerStream, leaveStreamOpen)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Security.SslStream" /> class using the specified <see cref="T:System.IO.Stream" />, stream closure behavior and certificate validation delegate.</summary>
|
||||
/// <param name="innerStream">Initializes a new instance of the <see cref="T:System.Net.Security.SslStream" /> class using the specified <see cref="T:System.IO.Stream" /> and stream closure behavior.</param>
|
||||
/// <param name="leaveInnerStreamOpen">Initializes a new instance of the <see cref="T:System.Net.Security.SslStream" /> class using the specified <see cref="T:System.IO.Stream" /> and stream closure behavior.</param>
|
||||
/// <param name="userCertificateValidationCallback">A <see cref="T:System.Net.Security.RemoteCertificateValidationCallback" /> delegate responsible for validating the certificate supplied by the remote party.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="innerStream" /> is not readable.-or-<paramref name="innerStream" /> is not writable.</exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="innerStream" /> is null.-or-<paramref name="innerStream" /> is equal to <see cref="F:System.IO.Stream.Null" />.</exception>
|
||||
// Token: 0x06000F1F RID: 3871 RVA: 0x00029A2C File Offset: 0x00027C2C
|
||||
[global::System.MonoTODO("certValidationCallback is not passed X509Chain and SslPolicyErrors correctly")]
|
||||
public SslStream(Stream innerStream, bool leaveStreamOpen, RemoteCertificateValidationCallback certValidationCallback)
|
||||
: this(innerStream, leaveStreamOpen, certValidationCallback, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Net.Security.SslStream" /> class using the specified <see cref="T:System.IO.Stream" />, stream closure behavior, certificate validation delegate and certificate selection delegate.</summary>
|
||||
/// <param name="innerStream">Initializes a new instance of the <see cref="T:System.Net.Security.SslStream" /> class using the specified <see cref="T:System.IO.Stream" /> and stream closure behavior.</param>
|
||||
/// <param name="leaveInnerStreamOpen">Initializes a new instance of the <see cref="T:System.Net.Security.SslStream" /> class using the specified <see cref="T:System.IO.Stream" /> and stream closure behavior.</param>
|
||||
/// <param name="userCertificateValidationCallback">A <see cref="T:System.Net.Security.RemoteCertificateValidationCallback" /> delegate responsible for validating the certificate supplied by the remote party.</param>
|
||||
/// <param name="userCertificateSelectionCallback">A <see cref="T:System.Net.Security.LocalCertificateSelectionCallback" /> delegate responsible for selecting the certificate used for authentication.</param>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="innerStream" /> is not readable.-or-<paramref name="innerStream" /> is not writable.</exception>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="innerStream" /> is null.-or-<paramref name="innerStream" /> is equal to <see cref="F:System.IO.Stream.Null" />.</exception>
|
||||
// Token: 0x06000F20 RID: 3872 RVA: 0x00029A38 File Offset: 0x00027C38
|
||||
[global::System.MonoTODO("certValidationCallback is not passed X509Chain and SslPolicyErrors correctly")]
|
||||
public SslStream(Stream innerStream, bool leaveStreamOpen, RemoteCertificateValidationCallback certValidationCallback, LocalCertificateSelectionCallback certSelectionCallback)
|
||||
: base(innerStream, leaveStreamOpen)
|
||||
{
|
||||
this.validation_callback = certValidationCallback;
|
||||
this.selection_callback = certSelectionCallback;
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the underlying stream is readable.</summary>
|
||||
/// <returns>true if authentication has occurred and the underlying stream is readable; otherwise false.</returns>
|
||||
// Token: 0x17000527 RID: 1319
|
||||
// (get) Token: 0x06000F21 RID: 3873 RVA: 0x00029A54 File Offset: 0x00027C54
|
||||
public override bool CanRead
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.InnerStream.CanRead;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the underlying stream is seekable.</summary>
|
||||
/// <returns>This property always returns false.</returns>
|
||||
// Token: 0x17000528 RID: 1320
|
||||
// (get) Token: 0x06000F22 RID: 3874 RVA: 0x00029A64 File Offset: 0x00027C64
|
||||
public override bool CanSeek
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.InnerStream.CanSeek;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the underlying stream supports time-outs.</summary>
|
||||
/// <returns>true if the underlying stream supports time-outs; otherwise, false.</returns>
|
||||
// Token: 0x17000529 RID: 1321
|
||||
// (get) Token: 0x06000F23 RID: 3875 RVA: 0x00029A74 File Offset: 0x00027C74
|
||||
public override bool CanTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.InnerStream.CanTimeout;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the underlying stream is writable.</summary>
|
||||
/// <returns>true if authentication has occurred and the underlying stream is writable; otherwise false.</returns>
|
||||
// Token: 0x1700052A RID: 1322
|
||||
// (get) Token: 0x06000F24 RID: 3876 RVA: 0x00029A84 File Offset: 0x00027C84
|
||||
public override bool CanWrite
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.InnerStream.CanWrite;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the length of the underlying stream.</summary>
|
||||
/// <returns>A <see cref="T:System.Int64" />.</returns>
|
||||
/// <exception cref="T:System.NotSupportedException">Getting the value of this property is not supported when the underlying stream is a <see cref="T:System.Net.Sockets.NetworkStream" />.</exception>
|
||||
// Token: 0x1700052B RID: 1323
|
||||
// (get) Token: 0x06000F25 RID: 3877 RVA: 0x00029A94 File Offset: 0x00027C94
|
||||
public override long Length
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.InnerStream.Length;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the current position in the underlying stream.</summary>
|
||||
/// <returns>A <see cref="T:System.Int64" />.</returns>
|
||||
/// <exception cref="T:System.NotSupportedException">Setting this property is not supported.-or-Getting the value of this property is not supported when the underlying stream is a <see cref="T:System.Net.Sockets.NetworkStream" />.</exception>
|
||||
// Token: 0x1700052C RID: 1324
|
||||
// (get) Token: 0x06000F26 RID: 3878 RVA: 0x00029AA4 File Offset: 0x00027CA4
|
||||
// (set) Token: 0x06000F27 RID: 3879 RVA: 0x00029AB4 File Offset: 0x00027CB4
|
||||
public override long Position
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.InnerStream.Position;
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotSupportedException("This stream does not support seek operations");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether authentication was successful.</summary>
|
||||
/// <returns>true if successful authentication occurred; otherwise, false.</returns>
|
||||
// Token: 0x1700052D RID: 1325
|
||||
// (get) Token: 0x06000F28 RID: 3880 RVA: 0x00029AC0 File Offset: 0x00027CC0
|
||||
public override bool IsAuthenticated
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ssl_stream != null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether this <see cref="T:System.Net.Security.SslStream" /> uses data encryption.</summary>
|
||||
/// <returns>true if data is encrypted before being transmitted over the network and decrypted when it reaches the remote endpoint; otherwise false.</returns>
|
||||
// Token: 0x1700052E RID: 1326
|
||||
// (get) Token: 0x06000F29 RID: 3881 RVA: 0x00029AD0 File Offset: 0x00027CD0
|
||||
public override bool IsEncrypted
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.IsAuthenticated;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether both server and client have been authenticated.</summary>
|
||||
/// <returns>true if the server has been authenticated; otherwise false.</returns>
|
||||
// Token: 0x1700052F RID: 1327
|
||||
// (get) Token: 0x06000F2A RID: 3882 RVA: 0x00029AD8 File Offset: 0x00027CD8
|
||||
public override bool IsMutuallyAuthenticated
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.IsAuthenticated && ((!this.IsServer) ? (this.LocalCertificate != null) : (this.RemoteCertificate != null));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the local side of the connection used by this <see cref="T:System.Net.Security.SslStream" /> was authenticated as the server.</summary>
|
||||
/// <returns>true if the local endpoint was successfully authenticated as the server side of the authenticated connection; otherwise false.</returns>
|
||||
// Token: 0x17000530 RID: 1328
|
||||
// (get) Token: 0x06000F2B RID: 3883 RVA: 0x00029B1C File Offset: 0x00027D1C
|
||||
public override bool IsServer
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ssl_stream is SslServerStream;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the data sent using this stream is signed.</summary>
|
||||
/// <returns>true if the data is signed before being transmitted; otherwise false.</returns>
|
||||
// Token: 0x17000531 RID: 1329
|
||||
// (get) Token: 0x06000F2C RID: 3884 RVA: 0x00029B2C File Offset: 0x00027D2C
|
||||
public override bool IsSigned
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.IsAuthenticated;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the amount of time a read operation blocks waiting for data.</summary>
|
||||
/// <returns>A <see cref="T:System.Int32" /> that specifies the amount of time that elapses before a synchronous read operation fails.</returns>
|
||||
// Token: 0x17000532 RID: 1330
|
||||
// (get) Token: 0x06000F2D RID: 3885 RVA: 0x00029B34 File Offset: 0x00027D34
|
||||
// (set) Token: 0x06000F2E RID: 3886 RVA: 0x00029B44 File Offset: 0x00027D44
|
||||
public override int ReadTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.InnerStream.ReadTimeout;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.InnerStream.ReadTimeout = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets or sets the amount of time a write operation blocks waiting for data.</summary>
|
||||
/// <returns>A <see cref="T:System.Int32" /> that specifies the amount of time that elapses before a synchronous write operation fails. </returns>
|
||||
// Token: 0x17000533 RID: 1331
|
||||
// (get) Token: 0x06000F2F RID: 3887 RVA: 0x00029B54 File Offset: 0x00027D54
|
||||
// (set) Token: 0x06000F30 RID: 3888 RVA: 0x00029B64 File Offset: 0x00027D64
|
||||
public override int WriteTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.InnerStream.WriteTimeout;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.InnerStream.WriteTimeout = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether the certificate revocation list is checked during the certificate validation process.</summary>
|
||||
/// <returns>true if the certificate revocation list is checked; otherwise, false.</returns>
|
||||
// Token: 0x17000534 RID: 1332
|
||||
// (get) Token: 0x06000F31 RID: 3889 RVA: 0x00029B74 File Offset: 0x00027D74
|
||||
public virtual bool CheckCertRevocationStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.IsAuthenticated && this.ssl_stream.CheckCertRevocationStatus;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that identifies the bulk encryption algorithm used by this <see cref="T:System.Net.Security.SslStream" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Security.Authentication.CipherAlgorithmType" /> value.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Net.Security.SslStream.CipherAlgorithm" /> property was accessed before the completion of the authentication process or the authentication process failed.</exception>
|
||||
// Token: 0x17000535 RID: 1333
|
||||
// (get) Token: 0x06000F32 RID: 3890 RVA: 0x00029B90 File Offset: 0x00027D90
|
||||
public virtual global::System.Security.Authentication.CipherAlgorithmType CipherAlgorithm
|
||||
{
|
||||
get
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
switch (this.ssl_stream.CipherAlgorithm)
|
||||
{
|
||||
case Mono.Security.Protocol.Tls.CipherAlgorithmType.Des:
|
||||
return global::System.Security.Authentication.CipherAlgorithmType.Des;
|
||||
case Mono.Security.Protocol.Tls.CipherAlgorithmType.None:
|
||||
return global::System.Security.Authentication.CipherAlgorithmType.None;
|
||||
case Mono.Security.Protocol.Tls.CipherAlgorithmType.Rc2:
|
||||
return global::System.Security.Authentication.CipherAlgorithmType.Rc2;
|
||||
case Mono.Security.Protocol.Tls.CipherAlgorithmType.Rc4:
|
||||
return global::System.Security.Authentication.CipherAlgorithmType.Rc4;
|
||||
case Mono.Security.Protocol.Tls.CipherAlgorithmType.Rijndael:
|
||||
{
|
||||
int cipherStrength = this.ssl_stream.CipherStrength;
|
||||
if (cipherStrength == 128)
|
||||
{
|
||||
return global::System.Security.Authentication.CipherAlgorithmType.Aes128;
|
||||
}
|
||||
if (cipherStrength == 192)
|
||||
{
|
||||
return global::System.Security.Authentication.CipherAlgorithmType.Aes192;
|
||||
}
|
||||
if (cipherStrength == 256)
|
||||
{
|
||||
return global::System.Security.Authentication.CipherAlgorithmType.Aes256;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Mono.Security.Protocol.Tls.CipherAlgorithmType.TripleDes:
|
||||
return global::System.Security.Authentication.CipherAlgorithmType.TripleDes;
|
||||
}
|
||||
throw new InvalidOperationException("Not supported cipher algorithm is in use. It is likely a bug in SslStream.");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that identifies the strength of the cipher algorithm used by this <see cref="T:System.Net.Security.SslStream" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> value that specifies the strength of the algorithm, in bits.</returns>
|
||||
// Token: 0x17000536 RID: 1334
|
||||
// (get) Token: 0x06000F33 RID: 3891 RVA: 0x00029C48 File Offset: 0x00027E48
|
||||
public virtual int CipherStrength
|
||||
{
|
||||
get
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
return this.ssl_stream.CipherStrength;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the algorithm used for generating message authentication codes (MACs).</summary>
|
||||
/// <returns>A <see cref="T:System.Security.Authentication.HashAlgorithmType" /> value.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Net.Security.SslStream.HashAlgorithm" /> property was accessed before the completion of the authentication process or the authentication process failed.</exception>
|
||||
// Token: 0x17000537 RID: 1335
|
||||
// (get) Token: 0x06000F34 RID: 3892 RVA: 0x00029C5C File Offset: 0x00027E5C
|
||||
public virtual global::System.Security.Authentication.HashAlgorithmType HashAlgorithm
|
||||
{
|
||||
get
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
switch (this.ssl_stream.HashAlgorithm)
|
||||
{
|
||||
case Mono.Security.Protocol.Tls.HashAlgorithmType.Md5:
|
||||
return global::System.Security.Authentication.HashAlgorithmType.Md5;
|
||||
case Mono.Security.Protocol.Tls.HashAlgorithmType.None:
|
||||
return global::System.Security.Authentication.HashAlgorithmType.None;
|
||||
case Mono.Security.Protocol.Tls.HashAlgorithmType.Sha1:
|
||||
return global::System.Security.Authentication.HashAlgorithmType.Sha1;
|
||||
default:
|
||||
throw new InvalidOperationException("Not supported hash algorithm is in use. It is likely a bug in SslStream.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that identifies the strength of the hash algorithm used by this instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> value that specifies the strength of the <see cref="T:System.Security.Authentication.HashAlgorithmType" /> algorithm, in bits. Valid values are 128 or 160.</returns>
|
||||
// Token: 0x17000538 RID: 1336
|
||||
// (get) Token: 0x06000F35 RID: 3893 RVA: 0x00029CAC File Offset: 0x00027EAC
|
||||
public virtual int HashStrength
|
||||
{
|
||||
get
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
return this.ssl_stream.HashStrength;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the key exchange algorithm used by this <see cref="T:System.Net.Security.SslStream" />.</summary>
|
||||
/// <returns>An <see cref="T:System.Security.Authentication.ExchangeAlgorithmType" /> value.</returns>
|
||||
// Token: 0x17000539 RID: 1337
|
||||
// (get) Token: 0x06000F36 RID: 3894 RVA: 0x00029CC0 File Offset: 0x00027EC0
|
||||
public virtual global::System.Security.Authentication.ExchangeAlgorithmType KeyExchangeAlgorithm
|
||||
{
|
||||
get
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
switch (this.ssl_stream.KeyExchangeAlgorithm)
|
||||
{
|
||||
case Mono.Security.Protocol.Tls.ExchangeAlgorithmType.DiffieHellman:
|
||||
return global::System.Security.Authentication.ExchangeAlgorithmType.DiffieHellman;
|
||||
case Mono.Security.Protocol.Tls.ExchangeAlgorithmType.None:
|
||||
return global::System.Security.Authentication.ExchangeAlgorithmType.None;
|
||||
case Mono.Security.Protocol.Tls.ExchangeAlgorithmType.RsaKeyX:
|
||||
return global::System.Security.Authentication.ExchangeAlgorithmType.RsaKeyX;
|
||||
case Mono.Security.Protocol.Tls.ExchangeAlgorithmType.RsaSign:
|
||||
return global::System.Security.Authentication.ExchangeAlgorithmType.RsaSign;
|
||||
}
|
||||
throw new InvalidOperationException("Not supported exchange algorithm is in use. It is likely a bug in SslStream.");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that identifies the strength of the key exchange algorithm used by this instance.</summary>
|
||||
/// <returns>An <see cref="T:System.Int32" /> value that specifies the strength of the <see cref="T:System.Security.Authentication.ExchangeAlgorithmType" /> algorithm, in bits.</returns>
|
||||
// Token: 0x1700053A RID: 1338
|
||||
// (get) Token: 0x06000F37 RID: 3895 RVA: 0x00029D24 File Offset: 0x00027F24
|
||||
public virtual int KeyExchangeStrength
|
||||
{
|
||||
get
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
return this.ssl_stream.KeyExchangeStrength;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the certificate used to authenticate the local endpoint.</summary>
|
||||
/// <returns>An X509Certificate object that represents the certificate supplied for authentication or null if no certificate was supplied.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication failed or has not occurred.</exception>
|
||||
// Token: 0x1700053B RID: 1339
|
||||
// (get) Token: 0x06000F38 RID: 3896 RVA: 0x00029D38 File Offset: 0x00027F38
|
||||
public virtual X509Certificate LocalCertificate
|
||||
{
|
||||
get
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
return (!this.IsServer) ? ((SslClientStream)this.ssl_stream).SelectedClientCertificate : this.ssl_stream.ServerCertificate;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets the certificate used to authenticate the remote endpoint.</summary>
|
||||
/// <returns>An X509Certificate object that represents the certificate supplied for authentication or null if no certificate was supplied.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication failed or has not occurred.</exception>
|
||||
// Token: 0x1700053C RID: 1340
|
||||
// (get) Token: 0x06000F39 RID: 3897 RVA: 0x00029D78 File Offset: 0x00027F78
|
||||
public virtual X509Certificate RemoteCertificate
|
||||
{
|
||||
get
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
return this.IsServer ? ((SslServerStream)this.ssl_stream).ClientCertificate : this.ssl_stream.ServerCertificate;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates the security protocol used to authenticate this connection.</summary>
|
||||
/// <returns>The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents the protocol used for authentication.</returns>
|
||||
// Token: 0x1700053D RID: 1341
|
||||
// (get) Token: 0x06000F3A RID: 3898 RVA: 0x00029DB8 File Offset: 0x00027FB8
|
||||
public virtual global::System.Security.Authentication.SslProtocols SslProtocol
|
||||
{
|
||||
get
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
SecurityProtocolType securityProtocol = this.ssl_stream.SecurityProtocol;
|
||||
if (securityProtocol == SecurityProtocolType.Default)
|
||||
{
|
||||
return global::System.Security.Authentication.SslProtocols.Default;
|
||||
}
|
||||
if (securityProtocol == SecurityProtocolType.Ssl2)
|
||||
{
|
||||
return global::System.Security.Authentication.SslProtocols.Ssl2;
|
||||
}
|
||||
if (securityProtocol == SecurityProtocolType.Ssl3)
|
||||
{
|
||||
return global::System.Security.Authentication.SslProtocols.Ssl3;
|
||||
}
|
||||
if (securityProtocol != SecurityProtocolType.Tls)
|
||||
{
|
||||
throw new InvalidOperationException("Not supported SSL/TLS protocol is in use. It is likely a bug in SslStream.");
|
||||
}
|
||||
return global::System.Security.Authentication.SslProtocols.Tls;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06000F3B RID: 3899 RVA: 0x00029E20 File Offset: 0x00028020
|
||||
private X509Certificate OnCertificateSelection(global::System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCerts, X509Certificate serverCert, string targetHost, global::System.Security.Cryptography.X509Certificates.X509CertificateCollection serverRequestedCerts)
|
||||
{
|
||||
string[] array = new string[(serverRequestedCerts == null) ? 0 : serverRequestedCerts.Count];
|
||||
for (int i = 0; i < array.Length; i++)
|
||||
{
|
||||
array[i] = serverRequestedCerts[i].GetIssuerName();
|
||||
}
|
||||
return this.selection_callback(this, targetHost, clientCerts, serverCert, array);
|
||||
}
|
||||
|
||||
/// <summary>Called by clients to begin an asynchronous operation to authenticate the server and optionally the client.</summary>
|
||||
/// <returns>An <see cref="T:System.IAsyncResult" /> object that indicates the status of the asynchronous operation. </returns>
|
||||
/// <param name="targetHost">The name of the server that shares this <see cref="T:System.Net.Security.SslStream" />.</param>
|
||||
/// <param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the authentication is complete. </param>
|
||||
/// <param name="asyncState">A user-defined object that contains information about the operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="targetHost" /> is null.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed and left this object in an unusable state.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.-or-Server authentication using this <see cref="T:System.Net.Security.SslStream" /> was tried previously.-or- Authentication is already in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
// Token: 0x06000F3C RID: 3900 RVA: 0x00029E7C File Offset: 0x0002807C
|
||||
public virtual IAsyncResult BeginAuthenticateAsClient(string targetHost, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
return this.BeginAuthenticateAsClient(targetHost, new global::System.Security.Cryptography.X509Certificates.X509CertificateCollection(), global::System.Security.Authentication.SslProtocols.Tls, false, asyncCallback, asyncState);
|
||||
}
|
||||
|
||||
/// <summary>Called by clients to begin an asynchronous operation to authenticate the server and optionally the client using the specified certificates and security protocol.</summary>
|
||||
/// <returns>An <see cref="T:System.IAsyncResult" /> object that indicates the status of the asynchronous operation. </returns>
|
||||
/// <param name="targetHost">The name of the server that shares this <see cref="T:System.Net.Security.SslStream" />.</param>
|
||||
/// <param name="clientCertificates">The <see cref="T:System.Security.Cryptography.X509Certificates.X509CertificateCollection" /> containing client certificates.</param>
|
||||
/// <param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents the protocol used for authentication.</param>
|
||||
/// <param name="checkCertificateRevocation">A <see cref="T:System.Boolean" /> value that specifies whether the certificate revocation list is checked during authentication.</param>
|
||||
/// <param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the authentication is complete. </param>
|
||||
/// <param name="asyncState">A user-defined object that contains information about the operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="targetHost" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="enabledSslProtocols" /> is not a valid <see cref="T:System.Security.Authentication.SslProtocols" /> value.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed and left this object in an unusable state.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.-or-Server authentication using this <see cref="T:System.Net.Security.SslStream" /> was tried previously.-or- Authentication is already in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
// Token: 0x06000F3D RID: 3901 RVA: 0x00029E94 File Offset: 0x00028094
|
||||
public virtual IAsyncResult BeginAuthenticateAsClient(string targetHost, global::System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, global::System.Security.Authentication.SslProtocols sslProtocolType, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
if (this.IsAuthenticated)
|
||||
{
|
||||
throw new InvalidOperationException("This SslStream is already authenticated");
|
||||
}
|
||||
SslClientStream sslClientStream = new SslClientStream(base.InnerStream, targetHost, !base.LeaveInnerStreamOpen, this.GetMonoSslProtocol(sslProtocolType), clientCertificates);
|
||||
sslClientStream.CheckCertRevocationStatus = checkCertificateRevocation;
|
||||
sslClientStream.PrivateKeyCertSelectionDelegate = delegate(X509Certificate cert, string host)
|
||||
{
|
||||
string certHashString = cert.GetCertHashString();
|
||||
foreach (X509Certificate x509Certificate in clientCertificates)
|
||||
{
|
||||
if (!(x509Certificate.GetCertHashString() != certHashString))
|
||||
{
|
||||
global::System.Security.Cryptography.X509Certificates.X509Certificate2 x509Certificate2 = x509Certificate as global::System.Security.Cryptography.X509Certificates.X509Certificate2;
|
||||
x509Certificate2 = x509Certificate2 ?? new global::System.Security.Cryptography.X509Certificates.X509Certificate2(x509Certificate);
|
||||
return x509Certificate2.PrivateKey;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
if (this.validation_callback != null)
|
||||
{
|
||||
sslClientStream.ServerCertValidationDelegate = delegate(X509Certificate cert, int[] certErrors)
|
||||
{
|
||||
global::System.Security.Cryptography.X509Certificates.X509Chain x509Chain = new global::System.Security.Cryptography.X509Certificates.X509Chain();
|
||||
global::System.Security.Cryptography.X509Certificates.X509Certificate2 x509Certificate3 = cert as global::System.Security.Cryptography.X509Certificates.X509Certificate2;
|
||||
if (x509Certificate3 == null)
|
||||
{
|
||||
x509Certificate3 = new global::System.Security.Cryptography.X509Certificates.X509Certificate2(cert);
|
||||
}
|
||||
if (!ServicePointManager.CheckCertificateRevocationList)
|
||||
{
|
||||
x509Chain.ChainPolicy.RevocationMode = global::System.Security.Cryptography.X509Certificates.X509RevocationMode.NoCheck;
|
||||
}
|
||||
SslPolicyErrors sslPolicyErrors = SslPolicyErrors.None;
|
||||
foreach (int num in certErrors)
|
||||
{
|
||||
int num2 = num;
|
||||
if (num2 != -2146762490)
|
||||
{
|
||||
if (num2 != -2146762481)
|
||||
{
|
||||
sslPolicyErrors |= SslPolicyErrors.RemoteCertificateChainErrors;
|
||||
}
|
||||
else
|
||||
{
|
||||
sslPolicyErrors |= SslPolicyErrors.RemoteCertificateNameMismatch;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sslPolicyErrors |= SslPolicyErrors.RemoteCertificateNotAvailable;
|
||||
}
|
||||
}
|
||||
x509Chain.Build(x509Certificate3);
|
||||
foreach (global::System.Security.Cryptography.X509Certificates.X509ChainStatus x509ChainStatus in x509Chain.ChainStatus)
|
||||
{
|
||||
if (x509ChainStatus.Status != global::System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.NoError)
|
||||
{
|
||||
if ((x509ChainStatus.Status & global::System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.PartialChain) != global::System.Security.Cryptography.X509Certificates.X509ChainStatusFlags.NoError)
|
||||
{
|
||||
sslPolicyErrors |= SslPolicyErrors.RemoteCertificateNotAvailable;
|
||||
}
|
||||
else
|
||||
{
|
||||
sslPolicyErrors |= SslPolicyErrors.RemoteCertificateChainErrors;
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.validation_callback(this, cert, x509Chain, sslPolicyErrors);
|
||||
};
|
||||
}
|
||||
if (this.selection_callback != null)
|
||||
{
|
||||
sslClientStream.ClientCertSelectionDelegate = new CertificateSelectionCallback(this.OnCertificateSelection);
|
||||
}
|
||||
this.ssl_stream = sslClientStream;
|
||||
return this.BeginWrite(new byte[0], 0, 0, asyncCallback, asyncState);
|
||||
}
|
||||
|
||||
/// <summary>Begins an asynchronous read operation that reads data from the stream and stores it in the specified array.</summary>
|
||||
/// <returns>An <see cref="T:System.IAsyncResult" /> object that indicates the status of the asynchronous operation. </returns>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that receives the bytes read from the stream.</param>
|
||||
/// <param name="offset">The zero-based location in <paramref name="buffer" /> at which to begin storing the data read from this stream.</param>
|
||||
/// <param name="count">The maximum number of bytes to read from the stream.</param>
|
||||
/// <param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the read operation is complete. </param>
|
||||
/// <param name="asyncState">A user-defined object that contains information about the read operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="buffer" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="offset" />
|
||||
/// <paramref name="<" />
|
||||
/// <paramref name="0" />.<paramref name="-or-" /><paramref name="offset" /> > the length of <paramref name="buffer" />.-or-<paramref name="offset" /> + count > the length of <paramref name="buffer" />.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">The read operation failed.-or-Encryption is in use, but the data could not be decrypted.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">There is already a read operation in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has not occurred.</exception>
|
||||
// Token: 0x06000F3E RID: 3902 RVA: 0x00029F5C File Offset: 0x0002815C
|
||||
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
return this.ssl_stream.BeginRead(buffer, offset, count, asyncCallback, asyncState);
|
||||
}
|
||||
|
||||
/// <summary>Called by servers to begin an asynchronous operation to authenticate the client and optionally the server in a client-server connection.</summary>
|
||||
/// <returns>An <see cref="T:System.IAsyncResult" /> object indicating the status of the asynchronous operation. </returns>
|
||||
/// <param name="serverCertificate">The X509Certificate used to authenticate the server.</param>
|
||||
/// <param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the authentication is complete.</param>
|
||||
/// <param name="asyncState">A user-defined object that contains information about the operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="serverCertificate" /> is null.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed and left this object in an unusable state.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.-or-Client authentication using this <see cref="T:System.Net.Security.SslStream" /> was tried previously.-or- Authentication is already in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">The <see cref="Overload:System.Net.Security.SslStream.BeginAuthenticateAsServer" /> method is not supported on Windows 95, Windows 98, or Windows Millennium.</exception>
|
||||
// Token: 0x06000F3F RID: 3903 RVA: 0x00029F84 File Offset: 0x00028184
|
||||
public virtual IAsyncResult BeginAuthenticateAsServer(X509Certificate serverCertificate, AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginAuthenticateAsServer(serverCertificate, false, global::System.Security.Authentication.SslProtocols.Tls, false, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <summary>Called by servers to begin an asynchronous operation to authenticate the server and optionally the client using the specified certificates, requirements and security protocol.</summary>
|
||||
/// <returns>An <see cref="T:System.IAsyncResult" /> object that indicates the status of the asynchronous operation. </returns>
|
||||
/// <param name="serverCertificate">The X509Certificate used to authenticate the server.</param>
|
||||
/// <param name="clientCertificateRequired">A <see cref="T:System.Boolean" /> value that specifies whether the client must supply a certificate for authentication.</param>
|
||||
/// <param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents the protocol used for authentication.</param>
|
||||
/// <param name="checkCertificateRevocation">A <see cref="T:System.Boolean" /> value that specifies whether the certificate revocation list is checked during authentication.</param>
|
||||
/// <param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the authentication is complete. </param>
|
||||
/// <param name="asyncState">A user-defined object that contains information about the operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="serverCertificate" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="enabledSslProtocols" /> is not a valid <see cref="T:System.Security.Authentication.SslProtocols" /> value.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed and left this object in an unusable state.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.-or-Server authentication using this <see cref="T:System.Net.Security.SslStream" /> was tried previously.-or- Authentication is already in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">The <see cref="Overload:System.Net.Security.SslStream.BeginAuthenticateAsServer" /> method is not supported on Windows 95, Windows 98, or Windows Millennium.</exception>
|
||||
// Token: 0x06000F40 RID: 3904 RVA: 0x00029F98 File Offset: 0x00028198
|
||||
public virtual IAsyncResult BeginAuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, global::System.Security.Authentication.SslProtocols sslProtocolType, bool checkCertificateRevocation, AsyncCallback callback, object asyncState)
|
||||
{
|
||||
if (this.IsAuthenticated)
|
||||
{
|
||||
throw new InvalidOperationException("This SslStream is already authenticated");
|
||||
}
|
||||
SslServerStream sslServerStream = new SslServerStream(base.InnerStream, serverCertificate, clientCertificateRequired, !base.LeaveInnerStreamOpen, this.GetMonoSslProtocol(sslProtocolType));
|
||||
sslServerStream.CheckCertRevocationStatus = checkCertificateRevocation;
|
||||
sslServerStream.PrivateKeyCertSelectionDelegate = delegate(X509Certificate cert, string targetHost)
|
||||
{
|
||||
global::System.Security.Cryptography.X509Certificates.X509Certificate2 x509Certificate = (serverCertificate as global::System.Security.Cryptography.X509Certificates.X509Certificate2) ?? new global::System.Security.Cryptography.X509Certificates.X509Certificate2(serverCertificate);
|
||||
return (x509Certificate == null) ? null : x509Certificate.PrivateKey;
|
||||
};
|
||||
if (this.validation_callback != null)
|
||||
{
|
||||
sslServerStream.ClientCertValidationDelegate = delegate(X509Certificate cert, int[] certErrors)
|
||||
{
|
||||
global::System.Security.Cryptography.X509Certificates.X509Chain x509Chain = null;
|
||||
if (cert is global::System.Security.Cryptography.X509Certificates.X509Certificate2)
|
||||
{
|
||||
x509Chain = new global::System.Security.Cryptography.X509Certificates.X509Chain();
|
||||
x509Chain.Build((global::System.Security.Cryptography.X509Certificates.X509Certificate2)cert);
|
||||
}
|
||||
SslPolicyErrors sslPolicyErrors = ((certErrors.Length <= 0) ? SslPolicyErrors.None : SslPolicyErrors.RemoteCertificateChainErrors);
|
||||
return this.validation_callback(this, cert, x509Chain, sslPolicyErrors);
|
||||
};
|
||||
}
|
||||
this.ssl_stream = sslServerStream;
|
||||
return this.BeginRead(new byte[0], 0, 0, callback, asyncState);
|
||||
}
|
||||
|
||||
// Token: 0x06000F41 RID: 3905 RVA: 0x0002A044 File Offset: 0x00028244
|
||||
private SecurityProtocolType GetMonoSslProtocol(global::System.Security.Authentication.SslProtocols ms)
|
||||
{
|
||||
if (ms == global::System.Security.Authentication.SslProtocols.Ssl2)
|
||||
{
|
||||
return SecurityProtocolType.Ssl2;
|
||||
}
|
||||
if (ms == global::System.Security.Authentication.SslProtocols.Ssl3)
|
||||
{
|
||||
return SecurityProtocolType.Ssl3;
|
||||
}
|
||||
if (ms != global::System.Security.Authentication.SslProtocols.Tls)
|
||||
{
|
||||
return SecurityProtocolType.Default;
|
||||
}
|
||||
return SecurityProtocolType.Tls;
|
||||
}
|
||||
|
||||
/// <summary>Begins an asynchronous write operation that writes <see cref="T:System.Byte" />s from the specified buffer to the stream.</summary>
|
||||
/// <returns>An <see cref="T:System.IAsyncResult" /> object indicating the status of the asynchronous operation. </returns>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that supplies the bytes to be written to the stream.</param>
|
||||
/// <param name="offset">The zero-based location in <paramref name="buffer" /> at which to begin reading bytes to be written to the stream.</param>
|
||||
/// <param name="count">An <see cref="T:System.Int32" /> value that specifies the number of bytes to read from <paramref name="buffer" />.</param>
|
||||
/// <param name="asyncCallback">An <see cref="T:System.AsyncCallback" /> delegate that references the method to invoke when the write operation is complete. </param>
|
||||
/// <param name="asyncState">A user-defined object that contains information about the write operation. This object is passed to the <paramref name="asyncCallback" /> delegate when the operation completes.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="buffer" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="offset" />
|
||||
/// <paramref name="<" />
|
||||
/// <paramref name="0" />.<paramref name="-or-" /><paramref name="offset" /> > the length of <paramref name="buffer" />.-or-<paramref name="offset" /> + count > the length of <paramref name="buffer" />.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">The write operation failed.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">There is already a write operation in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has not occurred.</exception>
|
||||
// Token: 0x06000F42 RID: 3906 RVA: 0x0002A084 File Offset: 0x00028284
|
||||
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState)
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
return this.ssl_stream.BeginWrite(buffer, offset, count, asyncCallback, asyncState);
|
||||
}
|
||||
|
||||
/// <summary>Called by clients to authenticate the server and optionally the client in a client-server connection.</summary>
|
||||
/// <param name="targetHost">The name of the server that shares this <see cref="T:System.Net.Security.SslStream" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="targetHost" /> is null.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed and left this object in an unusable state.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.-or-Server authentication using this <see cref="T:System.Net.Security.SslStream" /> was tried previously.-or- Authentication is already in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
// Token: 0x06000F43 RID: 3907 RVA: 0x0002A0AC File Offset: 0x000282AC
|
||||
public virtual void AuthenticateAsClient(string targetHost)
|
||||
{
|
||||
this.AuthenticateAsClient(targetHost, new global::System.Security.Cryptography.X509Certificates.X509CertificateCollection(), global::System.Security.Authentication.SslProtocols.Tls, false);
|
||||
}
|
||||
|
||||
/// <summary>Called by clients to authenticate the server and optionally the client in a client-server connection. The authentication process uses the specified certificate collection and SSL protocol.</summary>
|
||||
/// <param name="targetHost">The name of the server that will share this <see cref="T:System.Net.Security.SslStream" />.</param>
|
||||
/// <param name="clientCertificates">The <see cref="T:System.Security.Cryptography.X509Certificates.X509CertificateCollection" /> that contains client certificates.</param>
|
||||
/// <param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents the protocol used for authentication.</param>
|
||||
/// <param name="checkCertificateRevocation">A <see cref="T:System.Boolean" /> value that specifies whether the certificate revocation list is checked during authentication.</param>
|
||||
// Token: 0x06000F44 RID: 3908 RVA: 0x0002A0C0 File Offset: 0x000282C0
|
||||
public virtual void AuthenticateAsClient(string targetHost, global::System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, global::System.Security.Authentication.SslProtocols sslProtocolType, bool checkCertificateRevocation)
|
||||
{
|
||||
this.EndAuthenticateAsClient(this.BeginAuthenticateAsClient(targetHost, clientCertificates, sslProtocolType, checkCertificateRevocation, null, null));
|
||||
}
|
||||
|
||||
/// <summary>Called by servers to authenticate the server and optionally the client in a client-server connection using the specified certificate.</summary>
|
||||
/// <param name="serverCertificate">The certificate used to authenticate the server.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="serverCertificate" /> is null.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed and left this object in an unusable state.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.-or-Client authentication using this <see cref="T:System.Net.Security.SslStream" /> was tried previously.-or- Authentication is already in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">The <see cref="Overload:System.Net.Security.SslStream.AuthenticateAsServer" /> method is not supported on Windows 95, Windows 98, or Windows Millennium.</exception>
|
||||
// Token: 0x06000F45 RID: 3909 RVA: 0x0002A0E0 File Offset: 0x000282E0
|
||||
public virtual void AuthenticateAsServer(X509Certificate serverCertificate)
|
||||
{
|
||||
this.AuthenticateAsServer(serverCertificate, false, global::System.Security.Authentication.SslProtocols.Tls, false);
|
||||
}
|
||||
|
||||
/// <summary>Called by servers to begin an asynchronous operation to authenticate the server and optionally the client using the specified certificates, requirements and security protocol.</summary>
|
||||
/// <param name="serverCertificate">The X509Certificate used to authenticate the server.</param>
|
||||
/// <param name="clientCertificateRequired">A <see cref="T:System.Boolean" /> value that specifies whether the client must supply a certificate for authentication.</param>
|
||||
/// <param name="enabledSslProtocols">The <see cref="T:System.Security.Authentication.SslProtocols" /> value that represents the protocol used for authentication.</param>
|
||||
/// <param name="checkCertificateRevocation">A <see cref="T:System.Boolean" /> value that specifies whether the certificate revocation list is checked during authentication.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="serverCertificate" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="enabledSslProtocols" /> is not a valid <see cref="T:System.Security.Authentication.SslProtocols" /> value.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed and left this object in an unusable state.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has already occurred.-or-Client authentication using this <see cref="T:System.Net.Security.SslStream" /> was tried previously.-or- Authentication is already in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.PlatformNotSupportedException">The <see cref="Overload:System.Net.Security.SslStream.AuthenticateAsServer" /> method is not supported on Windows 95, Windows 98, or Windows Millennium.</exception>
|
||||
// Token: 0x06000F46 RID: 3910 RVA: 0x0002A0F0 File Offset: 0x000282F0
|
||||
public virtual void AuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, global::System.Security.Authentication.SslProtocols sslProtocolType, bool checkCertificateRevocation)
|
||||
{
|
||||
this.EndAuthenticateAsServer(this.BeginAuthenticateAsServer(serverCertificate, clientCertificateRequired, sslProtocolType, checkCertificateRevocation, null, null));
|
||||
}
|
||||
|
||||
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Net.Security.SslStream" /> and optionally releases the managed resources. </summary>
|
||||
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
|
||||
// Token: 0x06000F47 RID: 3911 RVA: 0x0002A110 File Offset: 0x00028310
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
if (this.ssl_stream != null)
|
||||
{
|
||||
this.ssl_stream.Dispose();
|
||||
}
|
||||
this.ssl_stream = null;
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
/// <summary>Ends a pending asynchronous server authentication operation started with a previous call to <see cref="Overload:System.Net.Security.SslStream.BeginAuthenticateAsServer" />.</summary>
|
||||
/// <param name="asyncResult">An <see cref="T:System.IAsyncResult" /> instance returned by a call to <see cref="Overload:System.Net.Security.SslStream.BeginAuthenticateAsServer" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="asyncResult" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="asyncResult" /> was not created by a call to <see cref="Overload:System.Net.Security.SslStream.BeginAuthenticateAsServer" />.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed and left this object in an unusable state.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">There is no pending server authentication to complete.</exception>
|
||||
// Token: 0x06000F48 RID: 3912 RVA: 0x0002A148 File Offset: 0x00028348
|
||||
public virtual void EndAuthenticateAsClient(IAsyncResult asyncResult)
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
if (this.CanRead)
|
||||
{
|
||||
this.ssl_stream.EndRead(asyncResult);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ssl_stream.EndWrite(asyncResult);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Ends a pending asynchronous client authentication operation started with a previous call to <see cref="Overload:System.Net.Security.SslStream.BeginAuthenticateAsClient" />.</summary>
|
||||
/// <param name="asyncResult">An <see cref="T:System.IAsyncResult" /> instance returned by a call to <see cref="Overload:System.Net.Security.SslStream.BeginAuthenticateAsClient" />. </param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="asyncResult" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="asyncResult" /> was not created by a call to <see cref="Overload:System.Net.Security.SslStream.BeginAuthenticateAsClient" />.</exception>
|
||||
/// <exception cref="T:System.Security.Authentication.AuthenticationException">The authentication failed and left this object in an unusable state.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">There is no pending client authentication to complete.</exception>
|
||||
// Token: 0x06000F49 RID: 3913 RVA: 0x0002A184 File Offset: 0x00028384
|
||||
public virtual void EndAuthenticateAsServer(IAsyncResult asyncResult)
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
if (this.CanRead)
|
||||
{
|
||||
this.ssl_stream.EndRead(asyncResult);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.ssl_stream.EndWrite(asyncResult);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Ends an asynchronous read operation started with a previous call to <see cref="M:System.Net.Security.SslStream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" />.</summary>
|
||||
/// <returns>A <see cref="T:System.Int32" /> value that specifies the number of bytes read from the underlying stream.</returns>
|
||||
/// <param name="asyncResult">An <see cref="T:System.IAsyncResult" /> instance returned by a call to <see cref="M:System.Net.Security.SslStream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" /></param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="asyncResult" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="asyncResult" /> was not created by a call to <see cref="M:System.Net.Security.SslStream.BeginRead(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">There is no pending read operation to complete.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">The read operation failed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has not occurred.</exception>
|
||||
// Token: 0x06000F4A RID: 3914 RVA: 0x0002A1C0 File Offset: 0x000283C0
|
||||
public override int EndRead(IAsyncResult asyncResult)
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
return this.ssl_stream.EndRead(asyncResult);
|
||||
}
|
||||
|
||||
/// <summary>Ends an asynchronous write operation started with a previous call to <see cref="M:System.Net.Security.SslStream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" />.</summary>
|
||||
/// <param name="asyncResult">An <see cref="T:System.IAsyncResult" /> instance returned by a call to <see cref="M:System.Net.Security.SslStream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" /></param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="asyncResult" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="asyncResult" /> was not created by a call to <see cref="M:System.Net.Security.SslStream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">There is no pending write operation to complete.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">The write operation failed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has not occurred.</exception>
|
||||
// Token: 0x06000F4B RID: 3915 RVA: 0x0002A1D4 File Offset: 0x000283D4
|
||||
public override void EndWrite(IAsyncResult asyncResult)
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
this.ssl_stream.EndWrite(asyncResult);
|
||||
}
|
||||
|
||||
/// <summary>Causes any buffered data to be written to the underlying device.</summary>
|
||||
// Token: 0x06000F4C RID: 3916 RVA: 0x0002A1E8 File Offset: 0x000283E8
|
||||
public override void Flush()
|
||||
{
|
||||
this.CheckConnectionAuthenticated();
|
||||
base.InnerStream.Flush();
|
||||
}
|
||||
|
||||
/// <summary>Reads data from this stream and stores it in the specified array.</summary>
|
||||
/// <returns>A <see cref="T:System.Int32" /> value that specifies the number of bytes read. When there is no more data to be read, returns 0.</returns>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that receives the bytes read from this stream.</param>
|
||||
/// <param name="offset">A <see cref="T:System.Int32" /> that contains the zero-based location in <paramref name="buffer" /> at which to begin storing the data read from this stream.</param>
|
||||
/// <param name="count">A <see cref="T:System.Int32" /> that contains the maximum number of bytes to read from this stream.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="buffer" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="offset" />
|
||||
/// <paramref name="<" />
|
||||
/// <paramref name="0" />.<paramref name="-or-" /><paramref name="offset" /> > the length of <paramref name="buffer" />.-or-<paramref name="offset" /> + count > the length of <paramref name="buffer" />.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">The read operation failed. Check the inner exception, if present to determine the cause of the failure.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">There is already a read operation in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has not occurred.</exception>
|
||||
// Token: 0x06000F4D RID: 3917 RVA: 0x0002A1FC File Offset: 0x000283FC
|
||||
public override int Read(byte[] buffer, int offset, int count)
|
||||
{
|
||||
return this.EndRead(this.BeginRead(buffer, offset, count, null, null));
|
||||
}
|
||||
|
||||
/// <summary>Throws a <see cref="T:System.NotSupportedException" />.</summary>
|
||||
/// <returns>Always throws a <see cref="T:System.NotSupportedException" />.</returns>
|
||||
/// <param name="offset">This value is ignored.</param>
|
||||
/// <param name="origin">This value is ignored.</param>
|
||||
/// <exception cref="T:System.NotSupportedException">Seeking is not supported by <see cref="T:System.Net.Security.SslStream" /> objects.</exception>
|
||||
// Token: 0x06000F4E RID: 3918 RVA: 0x0002A210 File Offset: 0x00028410
|
||||
public override long Seek(long offset, SeekOrigin origin)
|
||||
{
|
||||
throw new NotSupportedException("This stream does not support seek operations");
|
||||
}
|
||||
|
||||
/// <summary>Sets the length of the underlying stream.</summary>
|
||||
/// <param name="value">An <see cref="T:System.Int64" /> value that specifies the length of the stream.</param>
|
||||
// Token: 0x06000F4F RID: 3919 RVA: 0x0002A21C File Offset: 0x0002841C
|
||||
public override void SetLength(long value)
|
||||
{
|
||||
base.InnerStream.SetLength(value);
|
||||
}
|
||||
|
||||
/// <summary>Write the specified number of <see cref="T:System.Byte" />s to the underlying stream using the specified buffer and offset.</summary>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that supplies the bytes written to the stream.</param>
|
||||
/// <param name="offset">A <see cref="T:System.Int32" /> that contains the zero-based location in <paramref name="buffer" /> at which to begin reading bytes to be written to the stream.</param>
|
||||
/// <param name="count">A <see cref="T:System.Int32" /> that contains the number of bytes to read from <paramref name="buffer" />.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="buffer" /> is null.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">
|
||||
/// <paramref name="offset" />
|
||||
/// <paramref name="<" />
|
||||
/// <paramref name="0" />.<paramref name="-or-" /><paramref name="offset" /> > the length of <paramref name="buffer" />.-or-<paramref name="offset" /> + count > the length of <paramref name="buffer" />.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">The write operation failed.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">There is already a write operation in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has not occurred.</exception>
|
||||
// Token: 0x06000F50 RID: 3920 RVA: 0x0002A22C File Offset: 0x0002842C
|
||||
public override void Write(byte[] buffer, int offset, int count)
|
||||
{
|
||||
this.EndWrite(this.BeginWrite(buffer, offset, count, null, null));
|
||||
}
|
||||
|
||||
/// <summary>Writes the specified data to this stream.</summary>
|
||||
/// <param name="buffer">A <see cref="T:System.Byte" /> array that supplies the bytes written to the stream.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">
|
||||
/// <paramref name="buffer" /> is null.</exception>
|
||||
/// <exception cref="T:System.IO.IOException">The write operation failed.</exception>
|
||||
/// <exception cref="T:System.NotSupportedException">There is already a write operation in progress.</exception>
|
||||
/// <exception cref="T:System.ObjectDisposedException">This object has been closed.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">Authentication has not occurred.</exception>
|
||||
// Token: 0x06000F51 RID: 3921 RVA: 0x0002A240 File Offset: 0x00028440
|
||||
public void Write(byte[] buffer)
|
||||
{
|
||||
this.Write(buffer, 0, buffer.Length);
|
||||
}
|
||||
|
||||
// Token: 0x06000F52 RID: 3922 RVA: 0x0002A250 File Offset: 0x00028450
|
||||
private void CheckConnectionAuthenticated()
|
||||
{
|
||||
if (!this.IsAuthenticated)
|
||||
{
|
||||
throw new InvalidOperationException("This operation is invalid until it is successfully authenticated");
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000DAE RID: 3502
|
||||
private SslStreamBase ssl_stream;
|
||||
|
||||
// Token: 0x04000DAF RID: 3503
|
||||
private RemoteCertificateValidationCallback validation_callback;
|
||||
|
||||
// Token: 0x04000DB0 RID: 3504
|
||||
private LocalCertificateSelectionCallback selection_callback;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user