9#ifndef SQUID_LIB_NTLMAUTH_NTLMAUTH_H
10#define SQUID_LIB_NTLMAUTH_NTLMAUTH_H
18#define NTLM_MAX_FIELD_LENGTH 300
21#define NTLM_BLOB_BUFFER_SIZE 10240
26#define NTLM_REQUEST_INIT_RESPONSE 0x100000
27#define NTLM_REQUEST_ACCEPT_RESPONSE 0x200000
28#define NTLM_REQUEST_NON_NT_SESSION_KEY 0x400000
69#define NTLM_NEGOTIATE 1
70#define NTLM_CHALLENGE 2
71#define NTLM_AUTHENTICATE 3
86 const int32_t packet_length,
88 const uint32_t flags);
96 const uint16_t toadd_length);
103#define NTLM_NEGOTIATE_UNICODE 0x0001
104#define NTLM_NEGOTIATE_ASCII 0x0002
105#define NTLM_NEGOTIATE_REQUEST_TARGET 0x0004
106#define NTLM_NEGOTIATE_REQUEST_SIGN 0x0010
107#define NTLM_NEGOTIATE_REQUEST_SEAL 0x0020
108#define NTLM_NEGOTIATE_DATAGRAM_STYLE 0x0040
109#define NTLM_NEGOTIATE_USE_LM 0x0080
110#define NTLM_NEGOTIATE_USE_NETWARE 0x0100
111#define NTLM_NEGOTIATE_USE_NTLM 0x0200
112#define NTLM_NEGOTIATE_DOMAIN_SUPPLIED 0x1000
113#define NTLM_NEGOTIATE_WORKSTATION_SUPPLIED 0x2000
114#define NTLM_NEGOTIATE_THIS_IS_LOCAL_CALL 0x4000
115#define NTLM_NEGOTIATE_ALWAYS_SIGN 0x8000
130#define NTLM_NONCE_LEN 8
133#define NTLM_CHALLENGE_TARGET_IS_DOMAIN 0x10000
134#define NTLM_CHALLENGE_TARGET_IS_SERVER 0x20000
135#define NTLM_CHALLENGE_TARGET_IS_SHARE 0x40000
149#define NTLM_CHALLENGE_HEADER_OFFSET (sizeof(ntlm_challenge)-256)
159 const char *domain_controller,
160 const char *challenge_nonce,
161 const int challenge_nonce_len,
162 const uint32_t flags);
NtlmError ntlm_unpack_auth(const ntlm_authenticate *auth, char *user, char *domain, const int32_t size)
struct _ntlm_authenticate ntlm_authenticate
struct _ntlm_challenge ntlm_challenge
void ntlm_make_challenge(ntlm_challenge *ch, const char *domain, const char *domain_controller, const char *challenge_nonce, const int challenge_nonce_len, const uint32_t flags)
lstring ntlm_fetch_string(const ntlmhdr *packet, const int32_t packet_length, const strhdr *str, const uint32_t flags)
void ntlm_dump_ntlmssp_flags(const uint32_t flags)
struct _ntlm_negotiate ntlm_negotiate
void ntlm_add_to_payload(const ntlmhdr *packet_hdr, char *payload, int *payload_length, strhdr *hdr, const char *toadd, const uint16_t toadd_length)
void ntlm_make_nonce(char *nonce)
NtlmError ntlm_validate_packet(const ntlmhdr *packet, const int32_t type)
u_char challenge[NTLM_NONCE_LEN]