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 override 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 override int ReadTimeout {
125 get { return readTimeout; }
126 set { readTimeout = value; }
130 public virtual IIdentity RemoteIdentity {
131 get { throw new NotImplementedException (); }
134 public override int WriteTimeout {
135 get { return writeTimeout; }
136 set { writeTimeout = value; }
139 #endregion // Properties
144 public virtual IAsyncResult BeginAuthenticateAsClient (AsyncCallback callback, object asyncState)
146 throw new NotImplementedException ();
150 public virtual IAsyncResult BeginAuthenticateAsClient (NetworkCredential credential, string targetName, AsyncCallback asyncCallback, object asyncState)
152 throw new NotImplementedException ();
156 public virtual IAsyncResult BeginAuthenticateAsClient (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 BeginAuthenticateAsServer (AsyncCallback callback, object asyncState)
170 throw new NotImplementedException ();
174 public virtual IAsyncResult BeginAuthenticateAsServer (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 AuthenticateAsClient ()
188 throw new NotImplementedException ();
192 public virtual void AuthenticateAsClient (NetworkCredential credential, string targetName)
194 throw new NotImplementedException ();
198 public virtual void AuthenticateAsClient (NetworkCredential credential, string targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
200 throw new NotImplementedException ();
204 public virtual void AuthenticateAsServer ()
206 throw new NotImplementedException ();
210 public virtual void AuthenticateAsServer (NetworkCredential credential, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel requiredImpersonationLevel)
212 throw new NotImplementedException ();
216 protected override void Dispose (bool disposing)
224 public virtual void EndAuthenticateAsClient (IAsyncResult asyncResult)
226 throw new NotImplementedException ();
230 public override int EndRead (IAsyncResult asyncResult)
232 throw new NotImplementedException ();
236 public virtual void EndAuthenticateAsServer (IAsyncResult asyncResult)
238 throw new NotImplementedException ();
242 public override void EndWrite (IAsyncResult asyncResult)
244 throw new NotImplementedException ();
248 public override void Flush ()
250 InnerStream.Flush ();
254 public override int Read (byte[] buffer, int offset, int count)
256 throw new NotImplementedException ();
260 public override long Seek (long offset, SeekOrigin origin)
262 throw new NotImplementedException ();
266 public override void SetLength (long value)
268 throw new NotImplementedException ();
272 public override void Write (byte[] buffer, int offset, int count)
274 throw new NotImplementedException ();
277 #endregion // Methods