FreeRDP
|
#include <winpr/config.h>
#include <winpr/assert.h>
#include "ntlm.h"
#include "../sspi.h"
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/sysinfo.h>
#include <winpr/tchar.h>
#include <winpr/crypto.h>
#include "ntlm_compute.h"
#include "ntlm_av_pairs.h"
#include "../../log.h"
Macros | |
#define | TAG WINPR_TAG("sspi.NTLM") |
Functions | |
static BOOL | ntlm_av_pair_get_next_offset (const NTLM_AV_PAIR *pAvPair, size_t size, size_t *pOffset) |
static BOOL | ntlm_av_pair_check_data (const NTLM_AV_PAIR *pAvPair, size_t cbAvPair, size_t size) |
static const char * | get_av_pair_string (UINT16 pair) |
static BOOL | ntlm_av_pair_check (const NTLM_AV_PAIR *pAvPair, size_t cbAvPair) |
static NTLM_AV_PAIR * | ntlm_av_pair_next (NTLM_AV_PAIR *pAvPairList, size_t *pcbAvPairList) |
static INLINE void | ntlm_av_pair_set_id (NTLM_AV_PAIR *pAvPair, UINT16 id) |
static INLINE void | ntlm_av_pair_set_len (NTLM_AV_PAIR *pAvPair, UINT16 len) |
static BOOL | ntlm_av_pair_list_init (NTLM_AV_PAIR *pAvPairList, size_t cbAvPairList) |
static INLINE BOOL | ntlm_av_pair_get_id (const NTLM_AV_PAIR *pAvPair, size_t size, UINT16 *pair) |
ULONG | ntlm_av_pair_list_length (NTLM_AV_PAIR *pAvPairList, size_t cbAvPairList) |
static INLINE BOOL | ntlm_av_pair_get_len (const NTLM_AV_PAIR *pAvPair, size_t size, size_t *pAvLen) |
static ULONG | ntlm_av_pair_list_size (ULONG AvPairsCount, ULONG AvPairsValueLength) |
PBYTE | ntlm_av_pair_get_value_pointer (NTLM_AV_PAIR *pAvPair) |
NTLM_AV_PAIR * | ntlm_av_pair_get (NTLM_AV_PAIR *pAvPairList, size_t cbAvPairList, NTLM_AV_ID AvId, size_t *pcbAvPairListRemaining) |
static BOOL | ntlm_av_pair_add (NTLM_AV_PAIR *pAvPairList, size_t cbAvPairList, NTLM_AV_ID AvId, PBYTE Value, UINT16 AvLen) |
static BOOL | ntlm_av_pair_add_copy (NTLM_AV_PAIR *pAvPairList, size_t cbAvPairList, NTLM_AV_PAIR *pAvPair, size_t cbAvPair) |
static int | ntlm_get_target_computer_name (PUNICODE_STRING pName, COMPUTER_NAME_FORMAT type) |
static void | ntlm_free_unicode_string (PUNICODE_STRING string) |
static BOOL | ntlm_md5_update_uint32_be (WINPR_DIGEST_CTX *md5, UINT32 num) |
static void | ntlm_compute_channel_bindings (NTLM_CONTEXT *context) |
static void | ntlm_compute_single_host_data (NTLM_CONTEXT *context) |
BOOL | ntlm_construct_challenge_target_info (NTLM_CONTEXT *context) |
BOOL | ntlm_construct_authenticate_target_info (NTLM_CONTEXT *context) |
#define TAG WINPR_TAG("sspi.NTLM") |
WinPR: Windows Portable Runtime NTLM Security Package (AV_PAIRs)
Copyright 2011-2014 Marc-Andre Moreau marca ndre .more au@g mail. 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.
|
static |
|
static |
|
static |
|
static |
|
static |
NTLM_AV_PAIR* ntlm_av_pair_get | ( | NTLM_AV_PAIR * | pAvPairList, |
size_t | cbAvPairList, | ||
NTLM_AV_ID | AvId, | ||
size_t * | pcbAvPairListRemaining | ||
) |
|
static |
|
static |
|
static |
PBYTE ntlm_av_pair_get_value_pointer | ( | NTLM_AV_PAIR * | pAvPair | ) |
|
static |
ULONG ntlm_av_pair_list_length | ( | NTLM_AV_PAIR * | pAvPairList, |
size_t | cbAvPairList | ||
) |
WinPR: Windows Portable Runtime NTLM Security Package (AV_PAIRs)
Copyright 2011-2012 Marc-Andre Moreau marca ndre .more au@g mail. 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.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
The Single_Host_Data structure allows a client to send machine-specific information within an authentication exchange to services on the same machine. The client can produce additional information to be processed in an implementation-specific way when the client and server are on the same host. If the server and client platforms are different or if they are on different hosts, then the information MUST be ignored. Any fields after the MachineID field MUST be ignored on receipt.
BOOL ntlm_construct_authenticate_target_info | ( | NTLM_CONTEXT * | context | ) |
Extended Protection for Authentication: http://blogs.technet.com/b/srd/archive/2009/12/08/extended-protection-for-authentication.aspx
SEC_CHANNEL_BINDINGS structure http://msdn.microsoft.com/en-us/library/windows/desktop/dd919963/
BOOL ntlm_construct_challenge_target_info | ( | NTLM_CONTEXT * | context | ) |
|
static |
|
static |
|
static |
From http://www.ietf.org/proceedings/72/slides/sasl-2.pdf:
tls-server-end-point:
The hash of the TLS server's end entity certificate as it appears, octet for octet, in the server's Certificate message (note that the Certificate message contains a certificate_list, the first element of which is the server's end entity certificate.) The hash function to be selected is as follows: if the certificate's signature hash algorithm is either MD5 or SHA-1, then use SHA-256, otherwise use the certificate's signature hash algorithm. Channel Bindings sample usage: https://raw.github.com/mozilla/mozilla-central/master/extensions/auth/nsAuthSSPI.cpp