OpenVPN
|
#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"
Go to the source code of this file.
Macros | |
#define | UINTEGER64 unsigned long long |
#define | UINT64(c) c##LL |
Functions | |
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, 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) |
This function expects a null-terminated string in src and will copy it (including the terminating NUL byte), alternating it with 0 to dst. | |
static void | add_security_buffer (int sb_offset, void *data, int length, unsigned char *msg_buf, int *msg_bufpos, size_t msg_bufsize) |
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) |
|
static |
|
static |
Definition at line 66 of file ntlm.c.
References hmac_ctx_cleanup(), hmac_ctx_final(), hmac_ctx_free(), hmac_ctx_init(), hmac_ctx_new(), and hmac_ctx_update().
Referenced by ntlm_phase_3().
|
static |
Definition at line 56 of file ntlm.c.
References MD4_DIGEST_LENGTH, and md_full().
Referenced by ntlm_phase_3().
|
static |
Definition at line 102 of file ntlm.c.
References get_random(), and i.
Referenced by ntlm_phase_3().
|
static |
Definition at line 78 of file ntlm.c.
References openvpn_time(), UINT64, and UINTEGER64.
Referenced by ntlm_phase_3().
|
static |
Definition at line 114 of file ntlm.c.
Referenced by ntlm_phase_3().
const char * ntlm_phase_1 | ( | const struct http_proxy_info * | p, |
struct gc_arena * | gc | ||
) |
Definition at line 172 of file ntlm.c.
References alloc_buf_gc(), BSTR, buf_printf(), and gc.
Referenced by establish_http_proxy_passthru().
const char * ntlm_phase_3 | ( | const struct http_proxy_info * | p, |
const char * | phase_2, | ||
struct gc_arena * | gc | ||
) |
Definition at line 189 of file ntlm.c.
References add_security_buffer(), ASSERT, CLEAR, gc, gen_hmac_md5(), gen_md4_hash(), gen_nonce(), gen_timestamp(), i, buffer::len, M_ERR, M_INFO, M_WARN, make_base64_string2(), MD4_DIGEST_LENGTH, MD5_DIGEST_LENGTH, msg, my_strupr(), openvpn_base64_decode(), and unicodize().
Referenced by establish_http_proxy_passthru().
|
static |
This function expects a null-terminated string in src and will copy it (including the terminating NUL byte), alternating it with 0 to dst.
This basically will transform a ASCII string into valid UTF-16. Characters that are 8bit in src, will get the same treatment, resulting in invalid or wrong unicode code points.
Definition at line 139 of file ntlm.c.
References i.
Referenced by ntlm_phase_3().