summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe
diff options
context:
space:
mode:
authorMichael Brown2017-11-11 23:43:03 +0100
committerMichael Brown2017-11-12 19:52:04 +0100
commitb5e0b5072317f11b27d2d813bd1c93788584a9f2 (patch)
treedad3a65ce4850ca6226cbb234a7fd2f0fd072e5a /src/include/ipxe
parent[http] Handle parsing of WWW-Authenticate header within authentication scheme (diff)
downloadipxe-b5e0b5072317f11b27d2d813bd1c93788584a9f2.tar.gz
ipxe-b5e0b5072317f11b27d2d813bd1c93788584a9f2.tar.xz
ipxe-b5e0b5072317f11b27d2d813bd1c93788584a9f2.zip
[http] Add support for NTLM authentication
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
-rw-r--r--src/include/ipxe/errfile.h1
-rw-r--r--src/include/ipxe/http.h25
2 files changed, 26 insertions, 0 deletions
diff --git a/src/include/ipxe/errfile.h b/src/include/ipxe/errfile.h
index e0d0dbc8..1a98599e 100644
--- a/src/include/ipxe/errfile.h
+++ b/src/include/ipxe/errfile.h
@@ -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 )
diff --git a/src/include/ipxe/http.h b/src/include/ipxe/http.h
index 0f42a22e..0893c953 100644
--- a/src/include/ipxe/http.h
+++ b/src/include/ipxe/http.h
@@ -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;
};
};