mirror of
https://github.com/ipxe/ipxe
synced 2025-12-20 03:55:46 +03:00
[http] Add support for NTLM authentication
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -277,6 +277,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
#define ERRFILE_peermux ( ERRFILE_NET | 0x00470000 )
|
||||
#define ERRFILE_xsigo ( ERRFILE_NET | 0x00480000 )
|
||||
#define ERRFILE_ntp ( ERRFILE_NET | 0x00490000 )
|
||||
#define ERRFILE_httpntlm ( ERRFILE_NET | 0x004a0000 )
|
||||
|
||||
#define ERRFILE_image ( ERRFILE_IMAGE | 0x00000000 )
|
||||
#define ERRFILE_elf ( ERRFILE_IMAGE | 0x00010000 )
|
||||
|
||||
@@ -18,6 +18,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
#include <ipxe/linebuf.h>
|
||||
#include <ipxe/pool.h>
|
||||
#include <ipxe/tables.h>
|
||||
#include <ipxe/ntlm.h>
|
||||
|
||||
struct http_transaction;
|
||||
|
||||
@@ -172,6 +173,18 @@ struct http_request_auth_digest {
|
||||
char response[ HTTP_DIGEST_RESPONSE_LEN + 1 /* NUL */ ];
|
||||
};
|
||||
|
||||
/** HTTP request NTLM authentication descriptor */
|
||||
struct http_request_auth_ntlm {
|
||||
/** Username */
|
||||
const char *username;
|
||||
/** LAN Manager response */
|
||||
struct ntlm_lm_response lm;
|
||||
/** NT response */
|
||||
struct ntlm_nt_response nt;
|
||||
/** Authenticate message length */
|
||||
size_t len;
|
||||
};
|
||||
|
||||
/** HTTP request authentication descriptor */
|
||||
struct http_request_auth {
|
||||
/** Authentication scheme (if any) */
|
||||
@@ -182,6 +195,8 @@ struct http_request_auth {
|
||||
struct http_request_auth_basic basic;
|
||||
/** Digest authentication descriptor */
|
||||
struct http_request_auth_digest digest;
|
||||
/** NTLM authentication descriptor */
|
||||
struct http_request_auth_ntlm ntlm;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -270,6 +285,14 @@ struct http_response_auth_digest {
|
||||
const char *opaque;
|
||||
};
|
||||
|
||||
/** HTTP response NTLM authorization descriptor */
|
||||
struct http_response_auth_ntlm {
|
||||
/** Challenge message */
|
||||
struct ntlm_challenge *challenge;
|
||||
/** Challenge information */
|
||||
struct ntlm_challenge_info info;
|
||||
};
|
||||
|
||||
/** HTTP response authorization descriptor */
|
||||
struct http_response_auth {
|
||||
/** Authentication scheme (if any) */
|
||||
@@ -280,6 +303,8 @@ struct http_response_auth {
|
||||
struct http_response_auth_basic basic;
|
||||
/** Digest authorization descriptor */
|
||||
struct http_response_auth_digest digest;
|
||||
/** NTLM authorization descriptor */
|
||||
struct http_response_auth_ntlm ntlm;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user