diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-12-12 19:46:10 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-12-12 19:46:10 +0000 |
commit | f214bb2115994cc6b4123f3d06db0452f17f2e99 (patch) | |
tree | 7a09094e169f4097ceb033204c171eba2a51ae59 /base64.c | |
parent | df5722cc68307206c5edcc94fd7ae333d3212b59 (diff) | |
download | openvpn-f214bb2115994cc6b4123f3d06db0452f17f2e99.tar.gz openvpn-f214bb2115994cc6b4123f3d06db0452f17f2e99.tar.xz openvpn-f214bb2115994cc6b4123f3d06db0452f17f2e99.zip |
Added --auto-proxy directive to auto-detect HTTP or SOCKS
proxy settings (currently Windows only).
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@850 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'base64.c')
-rw-r--r-- | base64.c | 26 |
1 files changed, 15 insertions, 11 deletions
@@ -39,7 +39,7 @@ #include "syshead.h" -#if NTLM +#ifdef ENABLE_HTTP_PROXY #include "base64.h" @@ -48,16 +48,6 @@ static char base64_chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -static int -pos(char c) -{ - char *p; - for (p = base64_chars; *p; p++) - if (*p == c) - return p - base64_chars; - return -1; -} - int base64_encode(const void *data, int size, char **str) { @@ -96,6 +86,18 @@ base64_encode(const void *data, int size, char **str) return strlen(s); } +#if NTLM + +static int +pos(char c) +{ + char *p; + for (p = base64_chars; *p; p++) + if (*p == c) + return p - base64_chars; + return -1; +} + #define DECODE_ERROR 0xffffffff static unsigned int @@ -141,6 +143,8 @@ base64_decode(const char *str, void *data) return q - (unsigned char *) data; } +#endif /* NTLM */ + #else static void dummy(void) {} #endif |