70 DBGC ( http,
"HTTP %p could not decode NTLM challenge " 77 rsp->challenge = ( (
void * ) line );
79 &
rsp->info ) ) != 0 ) {
80 DBGC ( http,
"HTTP %p could not parse NTLM challenge: " 122 if ( !
rsp->challenge ) {
123 DBGC ( http,
"HTTP %p sending NTLM Negotiate\n", http );
129 DBGC ( http,
"HTTP %p has no username for NTLM " 130 "authentication\n", http );
165 char *buf,
size_t len ) {
174 if ( !
rsp->challenge ) {
struct arbelprm_rc_send_wqe rc
static void netbios_domain_undo(const char *domain, char *username)
Restore NetBIOS [domain]username.
void ntlm_response(struct ntlm_challenge_info *info, struct ntlm_key *key, struct ntlm_nonce *nonce, struct ntlm_lm_response *lm, struct ntlm_nt_response *nt)
Construct NTLM responses.
HTTP response NTLM authorization descriptor.
struct uri * uri
Request URI.
static int http_format_ntlm_auth(struct http_transaction *http, char *buf, size_t len)
Construct HTTP "Authorization" header for NTLM authentication.
An HTTP authentication scheme.
#define EACCES
Permission denied.
int base64_decode(const char *encoded, void *data, size_t len)
Base64-decode string.
Uniform Resource Identifiers.
struct http_response_auth auth
Authorization descriptor.
struct ntlm_nt_response nt
NT response.
struct http_request request
Request.
size_t ntlm_authenticate(struct ntlm_challenge_info *info, const char *domain, const char *username, const char *workstation, struct ntlm_lm_response *lm, struct ntlm_nt_response *nt, struct ntlm_authenticate *auth)
Construct NTLM Authenticate message.
static size_t base64_encoded_len(size_t raw_len)
Calculate length of base64-encoded data.
#define ENOMEM
Not enough space.
size_t len
Authenticate message length.
struct http_response response
Response.
const char * netbios_domain(char **username)
Split NetBIOS [domain]username into separate domain and username fields.
Hyper Text Transport Protocol.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
struct http_request_auth auth
Authentication descriptor.
An NTLM verification key.
char * strerror(int errno)
Retrieve string representation of error number.
struct http_authentication * auth
Authentication scheme (if any)
static void(* free)(struct refcnt *refcnt))
char * strdup(const char *src)
Duplicate string.
struct ntlm_data domain
Domain name.
size_t strlen(const char *src)
Get length of string.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
void * malloc(size_t size)
Allocate memory.
static struct dynamic_item password
struct http_response_auth_ntlm ntlm
NTLM authorization descriptor.
static const char http_ntlm_workstation[]
Workstation name used for NTLM authentication.
static int http_ntlm_authenticate(struct http_transaction *http)
Perform HTTP NTLM authentication.
HTTP request NTLM authentication descriptor.
size_t ntlm_authenticate_len(struct ntlm_challenge_info *info, const char *domain, const char *username, const char *workstation)
Calculate NTLM Authenticate message length.
const char * username
Username.
struct http_request_auth_ntlm ntlm
NTLM authentication descriptor.
const char * name
Name (e.g.
const char * password
Password.
static struct dynamic_item username
const char * user
User name.
void ntlm_key(const char *domain, const char *username, const char *password, struct ntlm_key *key)
Calculate NTLM verification key.
Transaction may be retried on failure.
NT LAN Manager (NTLM) authentication.
REQUIRING_SYMBOL(http_ntlm_auth)
struct ntlm_lm_response lm
LAN Manager response.
struct http_authentication http_ntlm_auth __http_authentication
HTTP NTLM authentication scheme.
#define NULL
NULL pointer (VOID *)
size_t base64_encode(const void *raw, size_t raw_len, char *data, size_t len)
Base64-encode data.
static int http_parse_ntlm_auth(struct http_transaction *http, char *line)
Parse HTTP "WWW-Authenticate" header for NTLM authentication.