001: /* jcifs smb client library in Java
002: * Copyright (C) 2002 "Michael B. Allen" <jcifs at samba dot org>
003: * "Eric Glass" <jcifs at samba dot org>
004: *
005: * This library is free software; you can redistribute it and/or
006: * modify it under the terms of the GNU Lesser General Public
007: * License as published by the Free Software Foundation; either
008: * version 2.1 of the License, or (at your option) any later version.
009: *
010: * This library is distributed in the hope that it will be useful,
011: * but WITHOUT ANY WARRANTY; without even the implied warranty of
012: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
013: * Lesser General Public License for more details.
014: *
015: * You should have received a copy of the GNU Lesser General Public
016: * License along with this library; if not, write to the Free Software
017: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
018: */
019:
020: package jcifs.ntlmssp;
021:
022: /**
023: * Flags used during negotiation of NTLMSSP authentication.
024: */
025: public interface NtlmFlags {
026:
027: /**
028: * Indicates whether Unicode strings are supported or used.
029: */
030: public static final int NTLMSSP_NEGOTIATE_UNICODE = 0x00000001;
031:
032: /**
033: * Indicates whether OEM strings are supported or used.
034: */
035: public static final int NTLMSSP_NEGOTIATE_OEM = 0x00000002;
036:
037: /**
038: * Indicates whether the authentication target is requested from
039: * the server.
040: */
041: public static final int NTLMSSP_REQUEST_TARGET = 0x00000004;
042:
043: /**
044: * Specifies that communication across the authenticated channel
045: * should carry a digital signature (message integrity).
046: */
047: public static final int NTLMSSP_NEGOTIATE_SIGN = 0x00000010;
048:
049: /**
050: * Specifies that communication across the authenticated channel
051: * should be encrypted (message confidentiality).
052: */
053: public static final int NTLMSSP_NEGOTIATE_SEAL = 0x00000020;
054:
055: /**
056: * Indicates datagram authentication.
057: */
058: public static final int NTLMSSP_NEGOTIATE_DATAGRAM_STYLE = 0x00000040;
059:
060: /**
061: * Indicates that the LAN Manager session key should be used for
062: * signing and sealing authenticated communication.
063: */
064: public static final int NTLMSSP_NEGOTIATE_LM_KEY = 0x00000080;
065:
066: public static final int NTLMSSP_NEGOTIATE_NETWARE = 0x00000100;
067:
068: /**
069: * Indicates support for NTLM authentication.
070: */
071: public static final int NTLMSSP_NEGOTIATE_NTLM = 0x00000200;
072:
073: /**
074: * Indicates whether the OEM-formatted domain name in which the
075: * client workstation has membership is supplied in the Type-1 message.
076: * This is used in the negotation of local authentication.
077: */
078: public static final int NTLMSSP_NEGOTIATE_OEM_DOMAIN_SUPPLIED = 0x00001000;
079:
080: /**
081: * Indicates whether the OEM-formatted workstation name is supplied
082: * in the Type-1 message. This is used in the negotiation of local
083: * authentication.
084: */
085: public static final int NTLMSSP_NEGOTIATE_OEM_WORKSTATION_SUPPLIED = 0x00002000;
086:
087: /**
088: * Sent by the server to indicate that the server and client are
089: * on the same machine. This implies that the server will include
090: * a local security context handle in the Type 2 message, for
091: * use in local authentication.
092: */
093: public static final int NTLMSSP_NEGOTIATE_LOCAL_CALL = 0x00004000;
094:
095: /**
096: * Indicates that authenticated communication between the client
097: * and server should carry a "dummy" digital signature.
098: */
099: public static final int NTLMSSP_NEGOTIATE_ALWAYS_SIGN = 0x00008000;
100:
101: /**
102: * Sent by the server in the Type 2 message to indicate that the
103: * target authentication realm is a domain.
104: */
105: public static final int NTLMSSP_TARGET_TYPE_DOMAIN = 0x00010000;
106:
107: /**
108: * Sent by the server in the Type 2 message to indicate that the
109: * target authentication realm is a server.
110: */
111: public static final int NTLMSSP_TARGET_TYPE_SERVER = 0x00020000;
112:
113: /**
114: * Sent by the server in the Type 2 message to indicate that the
115: * target authentication realm is a share (presumably for share-level
116: * authentication).
117: */
118: public static final int NTLMSSP_TARGET_TYPE_SHARE = 0x00040000;
119:
120: /**
121: * Indicates that the NTLM2 signing and sealing scheme should be used
122: * for protecting authenticated communications. This refers to a
123: * particular session security scheme, and is not related to the use
124: * of NTLMv2 authentication.
125: */
126: public static final int NTLMSSP_NEGOTIATE_NTLM2 = 0x00080000;
127:
128: public static final int NTLMSSP_REQUEST_INIT_RESPONSE = 0x00100000;
129:
130: public static final int NTLMSSP_REQUEST_ACCEPT_RESPONSE = 0x00200000;
131:
132: public static final int NTLMSSP_REQUEST_NON_NT_SESSION_KEY = 0x00400000;
133:
134: /**
135: * Sent by the server in the Type 2 message to indicate that it is
136: * including a Target Information block in the message. The Target
137: * Information block is used in the calculation of the NTLMv2 response.
138: */
139: public static final int NTLMSSP_NEGOTIATE_TARGET_INFO = 0x00800000;
140:
141: /**
142: * Indicates that 128-bit encryption is supported.
143: */
144: public static final int NTLMSSP_NEGOTIATE_128 = 0x20000000;
145:
146: public static final int NTLMSSP_NEGOTIATE_KEY_EXCH = 0x40000000;
147:
148: /**
149: * Indicates that 56-bit encryption is supported.
150: */
151: public static final int NTLMSSP_NEGOTIATE_56 = 0x80000000;
152:
153: }
|