FreeRDP
ntlm_message.c File Reference
#include <winpr/config.h>
#include "ntlm.h"
#include "../sspi.h"
#include <winpr/crt.h>
#include <winpr/assert.h>
#include <winpr/print.h>
#include <winpr/stream.h>
#include <winpr/sysinfo.h>
#include "ntlm_compute.h"
#include "ntlm_message.h"
#include "../../log.h"

Macros

#define TAG   WINPR_TAG("sspi.NTLM")
 

Functions

static void ntlm_free_message_fields_buffer (NTLM_MESSAGE_FIELDS *fields)
 
const char * ntlm_get_negotiate_string (UINT32 flag)
 
static BOOL ntlm_read_message_header (wStream *s, NTLM_MESSAGE_HEADER *header, UINT32 expected)
 
static BOOL ntlm_write_message_header (wStream *s, const NTLM_MESSAGE_HEADER *header)
 
static BOOL ntlm_populate_message_header (NTLM_MESSAGE_HEADER *header, UINT32 MessageType)
 
static BOOL ntlm_read_message_fields (wStream *s, NTLM_MESSAGE_FIELDS *fields)
 
static BOOL ntlm_write_message_fields (wStream *s, const NTLM_MESSAGE_FIELDS *fields)
 
static BOOL ntlm_read_message_fields_buffer (wStream *s, NTLM_MESSAGE_FIELDS *fields)
 
static BOOL ntlm_write_message_fields_buffer (wStream *s, const NTLM_MESSAGE_FIELDS *fields)
 
static BOOL ntlm_read_negotiate_flags (wStream *s, UINT32 *flags, UINT32 required, const char *name)
 
static BOOL ntlm_write_negotiate_flags (wStream *s, UINT32 flags, const char *name)
 
static BOOL ntlm_read_message_integrity_check (wStream *s, size_t *offset, BYTE *data, size_t size, const char *name)
 
static BOOL ntlm_write_message_integrity_check (wStream *s, size_t offset, const BYTE *data, size_t size, const char *name)
 
SECURITY_STATUS ntlm_read_NegotiateMessage (NTLM_CONTEXT *context, PSecBuffer buffer)
 
SECURITY_STATUS ntlm_write_NegotiateMessage (NTLM_CONTEXT *context, PSecBuffer buffer)
 
SECURITY_STATUS ntlm_read_ChallengeMessage (NTLM_CONTEXT *context, PSecBuffer buffer)
 
SECURITY_STATUS ntlm_write_ChallengeMessage (NTLM_CONTEXT *context, PSecBuffer buffer)
 
SECURITY_STATUS ntlm_read_AuthenticateMessage (NTLM_CONTEXT *context, PSecBuffer buffer)
 
SECURITY_STATUS ntlm_write_AuthenticateMessage (NTLM_CONTEXT *context, const PSecBuffer buffer)
 

Variables

static const char NTLM_SIGNATURE [8] = { 'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0' }
 

Macro Definition Documentation

◆ TAG

#define TAG   WINPR_TAG("sspi.NTLM")

WinPR: Windows Portable Runtime NTLM Security Package (Message)

Copyright 2011-2014 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ ntlm_free_message_fields_buffer()

void ntlm_free_message_fields_buffer ( NTLM_MESSAGE_FIELDS fields)
static
Here is the caller graph for this function:

◆ ntlm_get_negotiate_string()

const char* ntlm_get_negotiate_string ( UINT32  flag)
Here is the caller graph for this function:

◆ ntlm_populate_message_header()

static BOOL ntlm_populate_message_header ( NTLM_MESSAGE_HEADER header,
UINT32  MessageType 
)
static
Here is the caller graph for this function:

◆ ntlm_read_AuthenticateMessage()

SECURITY_STATUS ntlm_read_AuthenticateMessage ( NTLM_CONTEXT context,
PSecBuffer  buffer 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_read_ChallengeMessage()

SECURITY_STATUS ntlm_read_ChallengeMessage ( NTLM_CONTEXT context,
PSecBuffer  buffer 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_read_message_fields()

static BOOL ntlm_read_message_fields ( wStream s,
NTLM_MESSAGE_FIELDS fields 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_read_message_fields_buffer()

static BOOL ntlm_read_message_fields_buffer ( wStream s,
NTLM_MESSAGE_FIELDS fields 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_read_message_header()

static BOOL ntlm_read_message_header ( wStream s,
NTLM_MESSAGE_HEADER header,
UINT32  expected 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_read_message_integrity_check()

static BOOL ntlm_read_message_integrity_check ( wStream s,
size_t *  offset,
BYTE data,
size_t  size,
const char *  name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_read_negotiate_flags()

static BOOL ntlm_read_negotiate_flags ( wStream s,
UINT32 *  flags,
UINT32  required,
const char *  name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_read_NegotiateMessage()

SECURITY_STATUS ntlm_read_NegotiateMessage ( NTLM_CONTEXT context,
PSecBuffer  buffer 
)

WinPR: Windows Portable Runtime NTLM Security Package (Message)

Copyright 2011-2014 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_write_AuthenticateMessage()

SECURITY_STATUS ntlm_write_AuthenticateMessage ( NTLM_CONTEXT context,
const PSecBuffer  buffer 
)

Send NTLMSSP AUTHENTICATE_MESSAGE. msdn{cc236643}

Parameters
contextPointer to the NTLM context
bufferThe buffer to write
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_write_ChallengeMessage()

SECURITY_STATUS ntlm_write_ChallengeMessage ( NTLM_CONTEXT context,
PSecBuffer  buffer 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_write_message_fields()

static BOOL ntlm_write_message_fields ( wStream s,
const NTLM_MESSAGE_FIELDS fields 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_write_message_fields_buffer()

static BOOL ntlm_write_message_fields_buffer ( wStream s,
const NTLM_MESSAGE_FIELDS fields 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_write_message_header()

static BOOL ntlm_write_message_header ( wStream s,
const NTLM_MESSAGE_HEADER header 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_write_message_integrity_check()

static BOOL ntlm_write_message_integrity_check ( wStream s,
size_t  offset,
const BYTE data,
size_t  size,
const char *  name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_write_negotiate_flags()

static BOOL ntlm_write_negotiate_flags ( wStream s,
UINT32  flags,
const char *  name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ntlm_write_NegotiateMessage()

SECURITY_STATUS ntlm_write_NegotiateMessage ( NTLM_CONTEXT context,
PSecBuffer  buffer 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ NTLM_SIGNATURE

const char NTLM_SIGNATURE[8] = { 'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0' }
static