OpenVPN
Macros | Functions
ntlm.c File Reference
#include "syshead.h"
#include "common.h"
#include "buffer.h"
#include "misc.h"
#include "socket.h"
#include "fdmisc.h"
#include "proxy.h"
#include "ntlm.h"
#include "base64.h"
#include "crypto.h"
#include "memdbg.h"
Include dependency graph for ntlm.c:

Go to the source code of this file.

Macros

#define UINTEGER64   unsigned long long
 
#define UINT64(c)   c ## LL
 

Functions

static void create_des_keys (const unsigned char *hash, unsigned char *key)
 
static void gen_md4_hash (const uint8_t *data, int data_len, uint8_t *result)
 
static void gen_hmac_md5 (const uint8_t *data, int data_len, const uint8_t *key, int key_len, uint8_t *result)
 
static void gen_timestamp (uint8_t *timestamp)
 
static void gen_nonce (unsigned char *nonce)
 
static void my_strupr (char *str)
 
static int unicodize (char *dst, const char *src)
 
static void add_security_buffer (int sb_offset, void *data, int length, unsigned char *msg_buf, int *msg_bufpos)
 
const char * ntlm_phase_1 (const struct http_proxy_info *p, struct gc_arena *gc)
 
const char * ntlm_phase_3 (const struct http_proxy_info *p, const char *phase_2, struct gc_arena *gc)
 

Macro Definition Documentation

◆ UINT64

#define UINT64 (   c)    c ## LL

Definition at line 54 of file ntlm.c.

Referenced by add_block_dns_filters(), and gen_timestamp().

◆ UINTEGER64

#define UINTEGER64   unsigned long long

Definition at line 53 of file ntlm.c.

Referenced by gen_timestamp().

Function Documentation

◆ add_security_buffer()

static void add_security_buffer ( int  sb_offset,
void *  data,
int  length,
unsigned char *  msg_buf,
int *  msg_bufpos 
)
static

Definition at line 161 of file ntlm.c.

Referenced by ntlm_phase_3().

◆ create_des_keys()

static void create_des_keys ( const unsigned char *  hash,
unsigned char *  key 
)
static

Definition at line 60 of file ntlm.c.

References key_des_fixup().

Referenced by ntlm_phase_3().

◆ gen_hmac_md5()

static void gen_hmac_md5 ( const uint8_t data,
int  data_len,
const uint8_t key,
int  key_len,
uint8_t result 
)
static

◆ gen_md4_hash()

static void gen_md4_hash ( const uint8_t data,
int  data_len,
uint8_t result 
)
static

Definition at line 74 of file ntlm.c.

References MD4_DIGEST_LENGTH, md_full(), and md_kt_get().

Referenced by ntlm_phase_3().

◆ gen_nonce()

static void gen_nonce ( unsigned char *  nonce)
static

Definition at line 123 of file ntlm.c.

References get_random().

Referenced by ntlm_phase_3().

◆ gen_timestamp()

static void gen_timestamp ( uint8_t timestamp)
static

Definition at line 99 of file ntlm.c.

References openvpn_time(), UINT64, and UINTEGER64.

Referenced by ntlm_phase_3().

◆ my_strupr()

static void my_strupr ( char *  str)
static

Definition at line 135 of file ntlm.c.

Referenced by ntlm_phase_3().

◆ ntlm_phase_1()

const char* ntlm_phase_1 ( const struct http_proxy_info p,
struct gc_arena gc 
)

Definition at line 175 of file ntlm.c.

References alloc_buf_gc(), BSTR, and buf_printf().

Referenced by establish_http_proxy_passthru().

◆ ntlm_phase_3()

const char* ntlm_phase_3 ( const struct http_proxy_info p,
const char *  phase_2,
struct gc_arena gc 
)

◆ unicodize()

static int unicodize ( char *  dst,
const char *  src 
)
static

Definition at line 147 of file ntlm.c.

Referenced by ntlm_phase_3().