linux/fs/smb/client/ntlmssp.h

/* SPDX-License-Identifier: LGPL-2.1 */
/*
 *
 *   Copyright (c) International Business Machines  Corp., 2002,2007
 *   Author(s): Steve French ([email protected])
 *
 */

#define NTLMSSP_SIGNATURE
/* Message Types */
#define NtLmNegotiate
#define NtLmChallenge
#define NtLmAuthenticate
#define UnknownMessage

/* Negotiate Flags */
#define NTLMSSP_NEGOTIATE_UNICODE
#define NTLMSSP_NEGOTIATE_OEM
#define NTLMSSP_REQUEST_TARGET
/* define reserved9                       0x08 */
#define NTLMSSP_NEGOTIATE_SIGN
#define NTLMSSP_NEGOTIATE_SEAL
#define NTLMSSP_NEGOTIATE_DGRAM
#define NTLMSSP_NEGOTIATE_LM_KEY
/* defined reserved 8                   0x0100 */
#define NTLMSSP_NEGOTIATE_NTLM
#define NTLMSSP_NEGOTIATE_NT_ONLY
#define NTLMSSP_ANONYMOUS
#define NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED
#define NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED
#define NTLMSSP_NEGOTIATE_LOCAL_CALL
#define NTLMSSP_NEGOTIATE_ALWAYS_SIGN
#define NTLMSSP_TARGET_TYPE_DOMAIN
#define NTLMSSP_TARGET_TYPE_SERVER
#define NTLMSSP_TARGET_TYPE_SHARE
#define NTLMSSP_NEGOTIATE_EXTENDED_SEC
/* #define NTLMSSP_REQUEST_INIT_RESP     0x100000 */
#define NTLMSSP_NEGOTIATE_IDENTIFY
#define NTLMSSP_REQUEST_ACCEPT_RESP
#define NTLMSSP_REQUEST_NON_NT_KEY
#define NTLMSSP_NEGOTIATE_TARGET_INFO
/* #define reserved4                 0x1000000 */
#define NTLMSSP_NEGOTIATE_VERSION
/* #define reserved3                 0x4000000 */
/* #define reserved2                 0x8000000 */
/* #define reserved1                0x10000000 */
#define NTLMSSP_NEGOTIATE_128
#define NTLMSSP_NEGOTIATE_KEY_XCH
#define NTLMSSP_NEGOTIATE_56

/* Define AV Pair Field IDs */
enum av_field_type {};

/* Although typedefs are not commonly used for structure definitions */
/* in the Linux kernel, in this particular case they are useful      */
/* to more closely match the standards document for NTLMSSP from     */
/* OpenGroup and to make the code more closely match the standard in */
/* appearance */

SECURITY_BUFFER;

PNEGOTIATE_MESSAGE;

#define NTLMSSP_REVISION_W2K3

/* See MS-NLMP section 2.2.2.10 */
struct ntlmssp_version {} __packed;

/* see MS-NLMP section 2.2.1.1 */
struct negotiate_message {} __packed;

PCHALLENGE_MESSAGE;

PAUTHENTICATE_MESSAGE;

/*
 * Size of the session key (crypto key encrypted with the password
 */

int decode_ntlmssp_challenge(char *bcc_ptr, int blob_len, struct cifs_ses *ses);
int build_ntlmssp_negotiate_blob(unsigned char **pbuffer, u16 *buflen,
				 struct cifs_ses *ses,
				 struct TCP_Server_Info *server,
				 const struct nls_table *nls_cp);
int build_ntlmssp_smb3_negotiate_blob(unsigned char **pbuffer, u16 *buflen,
				 struct cifs_ses *ses,
				 struct TCP_Server_Info *server,
				 const struct nls_table *nls_cp);
int build_ntlmssp_auth_blob(unsigned char **pbuffer, u16 *buflen,
			struct cifs_ses *ses,
			struct TCP_Server_Info *server,
			const struct nls_table *nls_cp);