|
FreeRDP
|
#include <winpr/crt.h>#include <winpr/assert.h>#include <winpr/sspi.h>#include <winpr/print.h>#include <winpr/wlog.h>Macros | |
| #define | TEST_SSPI_INTERFACE SSPI_INTERFACE_WINPR |
| #define | NTLM_PACKAGE_NAME NTLM_SSP_NAME |
Functions | |
| static int | test_ntlm_client_init (TEST_NTLM_CLIENT *ntlm, const char *user, const char *domain, const char *password) |
| static void | test_ntlm_client_uninit (TEST_NTLM_CLIENT *ntlm) |
| static int | test_ntlm_client_authenticate (TEST_NTLM_CLIENT *ntlm) |
| static TEST_NTLM_CLIENT * | test_ntlm_client_new (void) |
| static void | test_ntlm_client_free (TEST_NTLM_CLIENT *ntlm) |
| static int | test_ntlm_server_init (TEST_NTLM_SERVER *ntlm) |
| static void | test_ntlm_server_uninit (TEST_NTLM_SERVER *ntlm) |
| static int | test_ntlm_server_authenticate (TEST_NTLM_SERVER *ntlm) |
| static TEST_NTLM_SERVER * | test_ntlm_server_new (void) |
| static void | test_ntlm_server_free (TEST_NTLM_SERVER *ntlm) |
| static BOOL | test_default (void) |
| int | TestNTLM (int argc, char *argv[]) |
Variables | |
| static BYTE | TEST_NTLM_TIMESTAMP [8] = { 0x33, 0x57, 0xbd, 0xb1, 0x07, 0x8b, 0xcf, 0x01 } |
| static BYTE | TEST_NTLM_CLIENT_CHALLENGE [8] = { 0x20, 0xc0, 0x2b, 0x3d, 0xc0, 0x61, 0xa7, 0x73 } |
| static BYTE | TEST_NTLM_SERVER_CHALLENGE [8] = { 0xa4, 0xf1, 0xba, 0xa6, 0x7c, 0xdc, 0x1a, 0x12 } |
| static BYTE | TEST_NTLM_NEGOTIATE [] |
| static BYTE | TEST_NTLM_CHALLENGE [] |
| static BYTE | TEST_NTLM_AUTHENTICATE [] |
| static const char * | TEST_NTLM_USER = "Username" |
| static const char * | TEST_NTLM_DOMAIN = "Domain" |
| static const char * | TEST_NTLM_PASSWORD = "P4ss123!" |
| static const BYTE | TEST_NTLM_HASH [16] |
| static const BYTE | TEST_NTLM_V2_HASH [16] |
| #define NTLM_PACKAGE_NAME NTLM_SSP_NAME |
| #define TEST_SSPI_INTERFACE SSPI_INTERFACE_WINPR |
|
static |
Client Initialization
Server Initialization
Client -> Negotiate Message
Server <- Negotiate Message Server -> Challenge Message
Client <- Challenge Message Client -> Authenticate Message
Server <- Authenticate Message
Cleanup & Termination


|
static |
SSPI Client Ceremony
--------------
( Client Begin )
--------------
|
|
\|/
-----------+--------------
| AcquireCredentialsHandle |
--------------------------
|
|
\|/
-------------+--------------
+---------------> / InitializeSecurityContext /
| ----------------------------
| |
| |
| \|/
------------------------— ------—+----------— -------------------— / Receive blob from server / < Received security blob? > –Yes-> / Send blob to server / ----------—+----------— --------------------— -------------------— /|\ | | | No | Yes |/ | | ---------—+--------— |
| No |/ ---—+----—

|
static |


|
static |


|
static |

|
static |

|
static |


|
static |


|
static |


|
static |

|
static |

| int TestNTLM | ( | int | argc, |
| char * | argv[] | ||
| ) |

|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |