2 // System.Net.Security.NegotiateStream.cs
5 // Tim Coleman (tim@timcoleman.com)
7 // Copyright (C) Tim Coleman, 2004
8 // (c) 2004 Novell, Inc. (http://www.novell.com)
12 // Permission is hereby granted, free of charge, to any person obtaining
13 // a copy of this software and associated documentation files (the
14 // "Software"), to deal in the Software without restriction, including
15 // without limitation the rights to use, copy, modify, merge, publish,
16 // distribute, sublicense, and/or sell copies of the Software, and to
17 // permit persons to whom the Software is furnished to do so, subject to
18 // the following conditions:
20 // The above copyright notice and this permission notice shall be
21 // included in all copies or substantial portions of the Software.
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37 using System
.Security
.Principal
;
39 namespace System
.Net
.Security
41 public class NegotiateStream
: AuthenticatedStream
53 public NegotiateStream (Stream innerStream
)
54 : base (innerStream
, false)
59 public NegotiateStream (Stream innerStream
, bool leaveStreamOpen
)
60 : base (innerStream
, leaveStreamOpen
)
64 #endregion // Constructors
68 public override bool CanRead
{
69 get { return InnerStream.CanRead; }
72 public override bool CanSeek
{
73 get { return InnerStream.CanSeek; }
77 public virtual bool CanTimeout
{
78 get { throw new NotImplementedException (); }
81 public override bool CanWrite
{
82 get { return InnerStream.CanWrite; }
86 public virtual TokenImpersonationLevel ImpersonationLevel
{
87 get { throw new NotImplementedException (); }
91 public override bool IsAuthenticated
{
92 get { throw new NotImplementedException (); }
96 public override bool IsEncrypted
{
97 get { throw new NotImplementedException (); }
101 public override bool IsMutuallyAuthenticated
{
102 get { throw new NotImplementedException (); }
106 public override bool IsServer
{
107 get { throw new NotImplementedException (); }
111 public override bool IsSigned
{
112 get { throw new NotImplementedException (); }
115 public override long Length
{
116 get { return InnerStream.Length; }
119 public override long Position
{
120 get { return InnerStream.Position; }
121 set { InnerStream.Position = value; }
124 public virtual int ReadTimeout
{
125 get { return readTimeout; }
126 set { readTimeout = value; }
130 public virtual IIdentity RemoteIdentity
{
131 get { throw new NotImplementedException (); }
134 public virtual int WriteTimeout
{
135 get { return writeTimeout; }
136 set { writeTimeout = value; }
139 #endregion // Properties
144 public virtual IAsyncResult
BeginClientAuthenticate (AsyncCallback callback
, object asyncState
)
146 throw new NotImplementedException ();
150 public virtual IAsyncResult
BeginClientAuthenticate (NetworkCredential credential
, string targetName
, AsyncCallback asyncCallback
, object asyncState
)
152 throw new NotImplementedException ();
156 public virtual IAsyncResult
BeginClientAuthenticate (NetworkCredential credential
, string targetName
, ProtectionLevel requiredProtectionLevel
, TokenImpersonationLevel allowedImpersonationLevel
, AsyncCallback asyncCallback
, object asyncState
)
158 throw new NotImplementedException ();
162 public override IAsyncResult
BeginRead (byte[] buffer
, int offset
, int count
, AsyncCallback asyncCallback
, object asyncState
)
164 throw new NotImplementedException ();
168 public virtual IAsyncResult
BeginServerAuthenticate (AsyncCallback callback
, object asyncState
)
170 throw new NotImplementedException ();
174 public virtual IAsyncResult
BeginServerAuthenticate (NetworkCredential credential
, ProtectionLevel requiredProtectionLevel
, TokenImpersonationLevel requiredImpersonationLevel
, AsyncCallback asyncCallback
, object asyncState
)
176 throw new NotImplementedException ();
180 public override IAsyncResult
BeginWrite (byte[] buffer
, int offset
, int count
, AsyncCallback asyncCallback
, object asyncState
)
182 throw new NotImplementedException ();
186 public virtual void ClientAuthenticate ()
188 throw new NotImplementedException ();
192 public virtual void ClientAuthenticate (NetworkCredential credential
, string targetName
)
194 throw new NotImplementedException ();
198 public virtual void ClientAuthenticate (NetworkCredential credential
, string targetName
, ProtectionLevel requiredProtectionLevel
, TokenImpersonationLevel requiredImpersonationLevel
)
200 throw new NotImplementedException ();
204 public override void Close ()
206 InnerStream
.Close ();
210 public virtual void EndClientAuthenticate (IAsyncResult asyncResult
)
212 throw new NotImplementedException ();
216 public override int EndRead (IAsyncResult asyncResult
)
218 throw new NotImplementedException ();
222 public virtual void EndServerAuthenticate (IAsyncResult asyncResult
)
224 throw new NotImplementedException ();
228 public override void EndWrite (IAsyncResult asyncResult
)
230 throw new NotImplementedException ();
234 public override void Flush ()
236 InnerStream
.Flush ();
240 public override int Read (byte[] buffer
, int offset
, int count
)
242 throw new NotImplementedException ();
246 public override long Seek (long offset
, SeekOrigin origin
)
248 throw new NotImplementedException ();
252 public virtual void ServerAuthenticate ()
254 throw new NotImplementedException ();
258 public virtual void ServerAuthenticate (NetworkCredential credential
, ProtectionLevel requiredProtectionLevel
, TokenImpersonationLevel requiredImpersonationLevel
)
260 throw new NotImplementedException ();
264 public override void SetLength (long value)
266 throw new NotImplementedException ();
270 public override void Write (byte[] buffer
, int offset
, int count
)
272 throw new NotImplementedException ();
275 #endregion // Methods