// This code is derived from jcifs smb client library // Ported by J. Arturo // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA namespace SharpCifs.Ntlmssp { /// Flags used during negotiation of NTLMSSP authentication. /// Flags used during negotiation of NTLMSSP authentication. public abstract class NtlmFlags { /// Indicates whether Unicode strings are supported or used. /// Indicates whether Unicode strings are supported or used. public const int NtlmsspNegotiateUnicode = unchecked(0x00000001); /// Indicates whether OEM strings are supported or used. /// Indicates whether OEM strings are supported or used. public const int NtlmsspNegotiateOem = unchecked(0x00000002); /// /// Indicates whether the authentication target is requested from /// the server. /// /// /// Indicates whether the authentication target is requested from /// the server. /// public const int NtlmsspRequestTarget = unchecked(0x00000004); /// /// Specifies that communication across the authenticated channel /// should carry a digital signature (message integrity). /// /// /// Specifies that communication across the authenticated channel /// should carry a digital signature (message integrity). /// public const int NtlmsspNegotiateSign = unchecked(0x00000010); /// /// Specifies that communication across the authenticated channel /// should be encrypted (message confidentiality). /// /// /// Specifies that communication across the authenticated channel /// should be encrypted (message confidentiality). /// public const int NtlmsspNegotiateSeal = unchecked(0x00000020); /// Indicates datagram authentication. /// Indicates datagram authentication. public const int NtlmsspNegotiateDatagramStyle = unchecked(0x00000040); /// /// Indicates that the LAN Manager session key should be used for /// signing and sealing authenticated communication. /// /// /// Indicates that the LAN Manager session key should be used for /// signing and sealing authenticated communication. /// public const int NtlmsspNegotiateLmKey = unchecked(0x00000080); public const int NtlmsspNegotiateNetware = unchecked(0x00000100); /// Indicates support for NTLM authentication. /// Indicates support for NTLM authentication. public const int NtlmsspNegotiateNtlm = unchecked(0x00000200); /// /// Indicates whether the OEM-formatted domain name in which the /// client workstation has membership is supplied in the Type-1 message. /// /// /// Indicates whether the OEM-formatted domain name in which the /// client workstation has membership is supplied in the Type-1 message. /// This is used in the negotation of local authentication. /// public const int NtlmsspNegotiateOemDomainSupplied = unchecked(0x00001000); /// /// Indicates whether the OEM-formatted workstation name is supplied /// in the Type-1 message. /// /// /// Indicates whether the OEM-formatted workstation name is supplied /// in the Type-1 message. This is used in the negotiation of local /// authentication. /// public const int NtlmsspNegotiateOemWorkstationSupplied = unchecked(0x00002000); /// /// Sent by the server to indicate that the server and client are /// on the same machine. /// /// /// Sent by the server to indicate that the server and client are /// on the same machine. This implies that the server will include /// a local security context handle in the Type 2 message, for /// use in local authentication. /// public const int NtlmsspNegotiateLocalCall = unchecked(0x00004000); /// /// Indicates that authenticated communication between the client /// and server should carry a "dummy" digital signature. /// /// /// Indicates that authenticated communication between the client /// and server should carry a "dummy" digital signature. /// public const int NtlmsspNegotiateAlwaysSign = unchecked(0x00008000); /// /// Sent by the server in the Type 2 message to indicate that the /// target authentication realm is a domain. /// /// /// Sent by the server in the Type 2 message to indicate that the /// target authentication realm is a domain. /// public const int NtlmsspTargetTypeDomain = unchecked(0x00010000); /// /// Sent by the server in the Type 2 message to indicate that the /// target authentication realm is a server. /// /// /// Sent by the server in the Type 2 message to indicate that the /// target authentication realm is a server. /// public const int NtlmsspTargetTypeServer = unchecked(0x00020000); /// /// Sent by the server in the Type 2 message to indicate that the /// target authentication realm is a share (presumably for share-level /// authentication). /// /// /// Sent by the server in the Type 2 message to indicate that the /// target authentication realm is a share (presumably for share-level /// authentication). /// public const int NtlmsspTargetTypeShare = unchecked(0x00040000); /// /// Indicates that the NTLM2 signing and sealing scheme should be used /// for protecting authenticated communications. /// /// /// Indicates that the NTLM2 signing and sealing scheme should be used /// for protecting authenticated communications. This refers to a /// particular session security scheme, and is not related to the use /// of NTLMv2 authentication. /// public const int NtlmsspNegotiateNtlm2 = unchecked(0x00080000); public const int NtlmsspRequestInitResponse = unchecked(0x00100000); public const int NtlmsspRequestAcceptResponse = unchecked(0x00200000); public const int NtlmsspRequestNonNtSessionKey = unchecked(0x00400000 ); /// /// Sent by the server in the Type 2 message to indicate that it is /// including a Target Information block in the message. /// /// /// Sent by the server in the Type 2 message to indicate that it is /// including a Target Information block in the message. The Target /// Information block is used in the calculation of the NTLMv2 response. /// public const int NtlmsspNegotiateTargetInfo = unchecked(0x00800000); /// Indicates that 128-bit encryption is supported. /// Indicates that 128-bit encryption is supported. public const int NtlmsspNegotiate128 = unchecked(0x20000000); public const int NtlmsspNegotiateKeyExch = unchecked(0x40000000); /// Indicates that 56-bit encryption is supported. /// Indicates that 56-bit encryption is supported. public const int NtlmsspNegotiate56 = unchecked((int)(0x80000000)); } }