From b5e0b5072317f11b27d2d813bd1c93788584a9f2 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sat, 11 Nov 2017 22:43:03 +0000 Subject: [http] Add support for NTLM authentication Signed-off-by: Michael Brown --- src/include/ipxe/errfile.h | 1 + src/include/ipxe/http.h | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) (limited to 'src/include') 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 #include #include +#include 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; }; }; -- cgit v1.2.3-55-g7522