Version 2.1.1e
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5516 e7ae566f-a301-0410-adde-c780ea21d3b5
| ... | ... |
@@ -12,9 +12,13 @@ QUICK START: |
| 12 | 12 |
Unix: |
| 13 | 13 |
./configure && make && make-install |
| 14 | 14 |
|
| 15 |
- Windows: |
|
| 15 |
+ Windows MinGW, using MSYS bash shell: |
|
| 16 | 16 |
./domake-win (see comments in the script for more info) |
| 17 | 17 |
|
| 18 |
+ Windows MSVC using Visual Studio 2008 Command Prompt window: |
|
| 19 |
+ python msvc\config.py |
|
| 20 |
+ nmake /f msvc\msvc.mak |
|
| 21 |
+ |
|
| 18 | 22 |
************************************************************************* |
| 19 | 23 |
|
| 20 | 24 |
To download OpenVPN, go to: |
| ... | ... |
@@ -36,7 +36,7 @@ MAINTAINERCLEANFILES = \ |
| 36 | 36 |
$(srcdir)/install-sh $(srcdir)/ltmain.sh $(srcdir)/missing \ |
| 37 | 37 |
$(srcdir)/depcomp $(srcdir)/aclocal.m4 \ |
| 38 | 38 |
$(srcdir)/config.guess $(srcdir)/config.sub \ |
| 39 |
- $(srcdir)/config-win32.h $(srcdir)/openvpn.spec |
|
| 39 |
+ $(srcdir)/openvpn.spec |
|
| 40 | 40 |
CLEANFILES = openvpn.8.html |
| 41 | 41 |
|
| 42 | 42 |
EXTRA_DIST = \ |
| ... | ... |
@@ -58,8 +58,7 @@ SUBDIRS = \ |
| 58 | 58 |
TESTS = t_lpback.sh t_cltsrv.sh |
| 59 | 59 |
sbin_PROGRAMS = openvpn |
| 60 | 60 |
|
| 61 |
-dist_noinst_HEADERS = \ |
|
| 62 |
- config-win32.h |
|
| 61 |
+dist_noinst_HEADERS = |
|
| 63 | 62 |
|
| 64 | 63 |
dist_noinst_SCRIPTS = \ |
| 65 | 64 |
$(TESTS) \ |
| 50 | 50 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,304 @@ |
| 0 |
+/* |
|
| 1 |
+ * OpenVPN -- An application to securely tunnel IP networks |
|
| 2 |
+ * over a single UDP port, with support for SSL/TLS-based |
|
| 3 |
+ * session authentication and key exchange, |
|
| 4 |
+ * packet encryption, packet authentication, and |
|
| 5 |
+ * packet compression. |
|
| 6 |
+ * |
|
| 7 |
+ * Copyright (C) 2002-2009 OpenVPN Technologies, Inc. <sales@openvpn.net> |
|
| 8 |
+ * |
|
| 9 |
+ * This program is free software; you can redistribute it and/or modify |
|
| 10 |
+ * it under the terms of the GNU General Public License version 2 |
|
| 11 |
+ * as published by the Free Software Foundation. |
|
| 12 |
+ * |
|
| 13 |
+ * This program is distributed in the hope that it will be useful, |
|
| 14 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 15 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 16 |
+ * GNU General Public License for more details. |
|
| 17 |
+ * |
|
| 18 |
+ * You should have received a copy of the GNU General Public License |
|
| 19 |
+ * along with this program (see the file COPYING included with this |
|
| 20 |
+ * distribution); if not, write to the Free Software Foundation, Inc., |
|
| 21 |
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 22 |
+ */ |
|
| 23 |
+ |
|
| 24 |
+/* |
|
| 25 |
+ * Configuration header for Win32 using the MSVC environment. |
|
| 26 |
+ */ |
|
| 27 |
+ |
|
| 28 |
+#include <windows.h> |
|
| 29 |
+#include <winsock2.h> |
|
| 30 |
+#include "autodefs.h" /* machine generated */ |
|
| 31 |
+ |
|
| 32 |
+//#define sleep(x) Sleep((x)*1000) |
|
| 33 |
+ |
|
| 34 |
+//#define random rand |
|
| 35 |
+//#define srandom srand |
|
| 36 |
+ |
|
| 37 |
+typedef unsigned long in_addr_t; |
|
| 38 |
+ |
|
| 39 |
+#ifndef _SSIZE_T_ |
|
| 40 |
+#define _SSIZE_T_ |
|
| 41 |
+ typedef unsigned int ssize_t; |
|
| 42 |
+#endif |
|
| 43 |
+ |
|
| 44 |
+/* Append a label to program startup title */ |
|
| 45 |
+/*#define DEBUG_LABEL "DEBUG1"*/ |
|
| 46 |
+ |
|
| 47 |
+/* Should we print debug info from driver? */ |
|
| 48 |
+#ifdef PRODUCT_TAP_DEBUG |
|
| 49 |
+#define TAP_WIN32_DEBUG |
|
| 50 |
+#endif |
|
| 51 |
+ |
|
| 52 |
+/* Enable client/server capability */ |
|
| 53 |
+#define ENABLE_CLIENT_SERVER 1 |
|
| 54 |
+ |
|
| 55 |
+/* Enable client capability only */ |
|
| 56 |
+#define ENABLE_CLIENT_ONLY |
|
| 57 |
+ |
|
| 58 |
+/* Enable management server capability */ |
|
| 59 |
+#define ENABLE_MANAGEMENT 1 |
|
| 60 |
+ |
|
| 61 |
+/* Enable PKCS#11 support */ |
|
| 62 |
+/* #define USE_PKCS11 1 */ |
|
| 63 |
+ |
|
| 64 |
+/* Enable HTTP proxy support */ |
|
| 65 |
+#define ENABLE_HTTP_PROXY 1 |
|
| 66 |
+ |
|
| 67 |
+/* Enable Socks proxy support */ |
|
| 68 |
+#define ENABLE_SOCKS 1 |
|
| 69 |
+ |
|
| 70 |
+/* Enable internal fragmentation support */ |
|
| 71 |
+#define ENABLE_FRAGMENT 1 |
|
| 72 |
+ |
|
| 73 |
+/* Enable smaller executable size */ |
|
| 74 |
+/* #undef ENABLE_SMALL */ |
|
| 75 |
+ |
|
| 76 |
+/* Enable debugging support */ |
|
| 77 |
+#define ENABLE_DEBUG 1 |
|
| 78 |
+ |
|
| 79 |
+/* if defined, will allow usage of the --plugin directive */ |
|
| 80 |
+#define USE_LOAD_LIBRARY |
|
| 81 |
+ |
|
| 82 |
+/* Dimension size to use for empty array declaration */ |
|
| 83 |
+#define EMPTY_ARRAY_SIZE 0 |
|
| 84 |
+ |
|
| 85 |
+/* Define to 1 if you have the `getsockname' function. */ |
|
| 86 |
+#define HAVE_GETSOCKNAME 1 |
|
| 87 |
+ |
|
| 88 |
+/* Define to 1 if you have the <openssl/engine.h> header file. */ |
|
| 89 |
+#define HAVE_OPENSSL_ENGINE_H 1 |
|
| 90 |
+ |
|
| 91 |
+/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */ |
|
| 92 |
+#define HAVE_ENGINE_LOAD_BUILTIN_ENGINES 1 |
|
| 93 |
+ |
|
| 94 |
+/* Define to 1 if you have the `ENGINE_register_all_complete' function. */ |
|
| 95 |
+#define HAVE_ENGINE_REGISTER_ALL_COMPLETE 1 |
|
| 96 |
+ |
|
| 97 |
+/* Define to 1 if you have the `ENGINE_cleanup' function. */ |
|
| 98 |
+#define HAVE_ENGINE_CLEANUP 1 |
|
| 99 |
+ |
|
| 100 |
+/* gettimeofday() is implemented in otime.c for Windows */ |
|
| 101 |
+#define HAVE_GETTIMEOFDAY 1 |
|
| 102 |
+ |
|
| 103 |
+/* Define to 1 if you have the 'chsize' function. */ |
|
| 104 |
+#define HAVE_CHSIZE 1 |
|
| 105 |
+ |
|
| 106 |
+/* Define to 1 if you have the `chdir' function. */ |
|
| 107 |
+#define HAVE_CHDIR 1 |
|
| 108 |
+ |
|
| 109 |
+/* Define to 1 if your compiler supports GNU GCC-style variadic macros */ |
|
| 110 |
+#ifndef _MSC_VER /* Defines MSFT compiler version. Defined as 1200 for MSVC++ 6.0. */ |
|
| 111 |
+#define HAVE_CPP_VARARG_MACRO_GCC 1 |
|
| 112 |
+#endif |
|
| 113 |
+ |
|
| 114 |
+/* Define to 1 if you have the <ctype.h> header file. */ |
|
| 115 |
+#define HAVE_CTYPE_H 1 |
|
| 116 |
+ |
|
| 117 |
+/* Define to 1 if you have the <errno.h> header file. */ |
|
| 118 |
+#define HAVE_ERRNO_H 1 |
|
| 119 |
+ |
|
| 120 |
+/* Define to 1 if you have the `EVP_CIPHER_CTX_set_key_length' function. */ |
|
| 121 |
+#define HAVE_EVP_CIPHER_CTX_SET_KEY_LENGTH 1 |
|
| 122 |
+ |
|
| 123 |
+/* Define to 1 if you have the <fcntl.h> header file. */ |
|
| 124 |
+#define HAVE_FCNTL_H 1 |
|
| 125 |
+ |
|
| 126 |
+/* Define to 1 if you have the `getsockopt' function. */ |
|
| 127 |
+#define HAVE_GETSOCKOPT 1 |
|
| 128 |
+ |
|
| 129 |
+/* Define to 1 if you have the `inet_ntoa' function. */ |
|
| 130 |
+#define HAVE_INET_NTOA 1 |
|
| 131 |
+ |
|
| 132 |
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and |
|
| 133 |
+ to 0 otherwise. */ |
|
| 134 |
+#define HAVE_MALLOC 1 |
|
| 135 |
+ |
|
| 136 |
+/* Define to 1 if you have the `memset' function. */ |
|
| 137 |
+#define HAVE_MEMSET 1 |
|
| 138 |
+ |
|
| 139 |
+/* Define to 1 if you have the `setsockopt' function. */ |
|
| 140 |
+#define HAVE_SETSOCKOPT 1 |
|
| 141 |
+ |
|
| 142 |
+/* Define to 1 if you have the `socket' function. */ |
|
| 143 |
+#define HAVE_SOCKET 1 |
|
| 144 |
+ |
|
| 145 |
+/* Define to 1 if you have the <stdarg.h> header file. */ |
|
| 146 |
+#define HAVE_STDARG_H 1 |
|
| 147 |
+ |
|
| 148 |
+/* Define to 1 if you have the <stdint.h> header file. */ |
|
| 149 |
+#ifndef _MSC_VER |
|
| 150 |
+#define HAVE_STDINT_H 1 |
|
| 151 |
+#endif |
|
| 152 |
+ |
|
| 153 |
+/* Define to 1 if you have the <stdio.h> header file. */ |
|
| 154 |
+#define HAVE_STDIO_H 1 |
|
| 155 |
+ |
|
| 156 |
+/* Define to 1 if you have the <stdlib.h> header file. */ |
|
| 157 |
+#define HAVE_STDLIB_H 1 |
|
| 158 |
+ |
|
| 159 |
+/* Define to 1 if you have the `strerror' function. */ |
|
| 160 |
+#define HAVE_STRERROR 1 |
|
| 161 |
+ |
|
| 162 |
+/* Define to 1 if you have the <strings.h> header file. */ |
|
| 163 |
+#define HAVE_STRINGS_H 1 |
|
| 164 |
+ |
|
| 165 |
+/* Define to 1 if you have the <string.h> header file. */ |
|
| 166 |
+#define HAVE_STRING_H 1 |
|
| 167 |
+ |
|
| 168 |
+/* Define to 1 if you have the `system' function. */ |
|
| 169 |
+#define HAVE_SYSTEM 1 |
|
| 170 |
+ |
|
| 171 |
+/* Define to 1 if you have the <sys/file.h> header file. */ |
|
| 172 |
+#ifndef _MSC_VER |
|
| 173 |
+#define HAVE_SYS_FILE_H 1 |
|
| 174 |
+#endif |
|
| 175 |
+ |
|
| 176 |
+/* Define to 1 if you have the <sys/stat.h> header file. */ |
|
| 177 |
+#define HAVE_SYS_STAT_H 1 |
|
| 178 |
+ |
|
| 179 |
+/* Define to 1 if you have the <sys/time.h> header file. */ |
|
| 180 |
+#ifndef _MSC_VER |
|
| 181 |
+#define HAVE_SYS_TIME_H 1 |
|
| 182 |
+#endif |
|
| 183 |
+ |
|
| 184 |
+/* Define to 1 if you have the <sys/types.h> header file. */ |
|
| 185 |
+#define HAVE_SYS_TYPES_H 1 |
|
| 186 |
+ |
|
| 187 |
+/* Define to 1 if you have the `time' function. */ |
|
| 188 |
+#define HAVE_TIME 1 |
|
| 189 |
+ |
|
| 190 |
+/* Define to 1 if you have the <unistd.h> header file. */ |
|
| 191 |
+#ifndef _MSC_VER |
|
| 192 |
+#define HAVE_UNISTD_H 1 |
|
| 193 |
+#endif |
|
| 194 |
+ |
|
| 195 |
+/* Define to 1 if you have the `vsnprintf' function. */ |
|
| 196 |
+#define HAVE_VSNPRINTF 1 |
|
| 197 |
+ |
|
| 198 |
+/* Special Windows version of getpass() defined in io.c */ |
|
| 199 |
+#define HAVE_GETPASS 1 |
|
| 200 |
+ |
|
| 201 |
+/* Define to the address where bug reports for this package should be sent. */ |
|
| 202 |
+//#define PACKAGE_BUGREPORT "openvpn-users@lists.sourceforge.net" |
|
| 203 |
+ |
|
| 204 |
+/* Define to the full name and version of this package. */ |
|
| 205 |
+#ifdef DEBUG_LABEL |
|
| 206 |
+#define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION " " DEBUG_LABEL |
|
| 207 |
+#else |
|
| 208 |
+#define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION |
|
| 209 |
+#endif |
|
| 210 |
+ |
|
| 211 |
+/* Define as the return type of signal handlers (`int' or `void'). */ |
|
| 212 |
+#define RETSIGTYPE void |
|
| 213 |
+ |
|
| 214 |
+/* The size of a `unsigned int', as computed by sizeof. */ |
|
| 215 |
+#define SIZEOF_UNSIGNED_INT 4 |
|
| 216 |
+ |
|
| 217 |
+/* The size of a `unsigned long', as computed by sizeof. */ |
|
| 218 |
+#define SIZEOF_UNSIGNED_LONG 4 |
|
| 219 |
+ |
|
| 220 |
+/* Define to 1 if you have the ANSI C header files. */ |
|
| 221 |
+#define STDC_HEADERS 1 |
|
| 222 |
+ |
|
| 223 |
+/* A string representing our target */ |
|
| 224 |
+#ifdef _MSC_VER |
|
| 225 |
+#define TARGET_ALIAS "Win32-MSVC++" |
|
| 226 |
+#else |
|
| 227 |
+#define TARGET_ALIAS "Win32-MinGW" |
|
| 228 |
+#endif |
|
| 229 |
+ |
|
| 230 |
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ |
|
| 231 |
+#ifndef _MSC_VER |
|
| 232 |
+#define TIME_WITH_SYS_TIME 1 |
|
| 233 |
+#endif |
|
| 234 |
+ |
|
| 235 |
+/* Use OpenSSL crypto library */ |
|
| 236 |
+#define USE_CRYPTO 1 |
|
| 237 |
+ |
|
| 238 |
+/* Use LZO compression library */ |
|
| 239 |
+#define USE_LZO 1 |
|
| 240 |
+ |
|
| 241 |
+/* LZO version number */ |
|
| 242 |
+#define LZO_VERSION_NUM "2" |
|
| 243 |
+ |
|
| 244 |
+/* Use lzo/ directory prefix for LZO header files (for LZO 2.0) */ |
|
| 245 |
+#define LZO_HEADER_DIR 1 |
|
| 246 |
+ |
|
| 247 |
+/* Use OpenSSL SSL library */ |
|
| 248 |
+#define USE_SSL 1 |
|
| 249 |
+ |
|
| 250 |
+/* Version number of package */ |
|
| 251 |
+#define VERSION PACKAGE_VERSION |
|
| 252 |
+ |
|
| 253 |
+/* Define as `__inline' if that's what the C compiler calls it, or to nothing |
|
| 254 |
+ if it is not supported. */ |
|
| 255 |
+#define inline __inline |
|
| 256 |
+ |
|
| 257 |
+/* type to use in place of socklen_t if not defined */ |
|
| 258 |
+#define socklen_t unsigned int |
|
| 259 |
+ |
|
| 260 |
+/* 32-bit unsigned type */ |
|
| 261 |
+#define uint32_t unsigned int |
|
| 262 |
+ |
|
| 263 |
+/* 16-bit unsigned type */ |
|
| 264 |
+#define uint16_t unsigned short |
|
| 265 |
+ |
|
| 266 |
+/* 8-bit unsigned type */ |
|
| 267 |
+#define uint8_t unsigned char |
|
| 268 |
+ |
|
| 269 |
+/* Route command */ |
|
| 270 |
+#define ROUTE_PATH "route" |
|
| 271 |
+ |
|
| 272 |
+/* Windows doesn't support PTHREAD yet */ |
|
| 273 |
+#ifdef USE_PTHREAD |
|
| 274 |
+#error The Windows version of OpenVPN does not support PTHREAD yet |
|
| 275 |
+#endif |
|
| 276 |
+ |
|
| 277 |
+#ifdef _MSC_VER |
|
| 278 |
+/* MSVC++ hacks */ |
|
| 279 |
+#pragma warning(disable:4244) // conversion from 'foo' to 'bar', possible loss of data |
|
| 280 |
+#pragma warning(disable:4018) // signed/unsigned mismatch |
|
| 281 |
+#include <io.h> |
|
| 282 |
+#include <direct.h> |
|
| 283 |
+//#define vsnprintf _vsnprintf |
|
| 284 |
+//#define vsnwprintf _vsnwprintf |
|
| 285 |
+#define snwprintf _snwprintf |
|
| 286 |
+#define write _write |
|
| 287 |
+#define open _open |
|
| 288 |
+#define read _read |
|
| 289 |
+#define close _close |
|
| 290 |
+#define lseek _lseek |
|
| 291 |
+#define chdir _chdir |
|
| 292 |
+#define strdup _strdup |
|
| 293 |
+#define chsize _chsize |
|
| 294 |
+#define S_IRUSR 0 |
|
| 295 |
+#define S_IWUSR 0 |
|
| 296 |
+#define TV_SEC_CAST (long) |
|
| 297 |
+#define TV_USEC_CAST (long) |
|
| 298 |
+typedef int intptr_t; |
|
| 299 |
+/* Visual Studio 2005 supports vararg macros */ |
|
| 300 |
+#if _MSC_VER >= 1400 |
|
| 301 |
+#define HAVE_CPP_VARARG_MACRO_ISO 1 |
|
| 302 |
+#endif |
|
| 303 |
+#endif |
| 0 | 304 |
deleted file mode 100644 |
| ... | ... |
@@ -1,325 +0,0 @@ |
| 1 |
-/* |
|
| 2 |
- * OpenVPN -- An application to securely tunnel IP networks |
|
| 3 |
- * over a single UDP port, with support for SSL/TLS-based |
|
| 4 |
- * session authentication and key exchange, |
|
| 5 |
- * packet encryption, packet authentication, and |
|
| 6 |
- * packet compression. |
|
| 7 |
- * |
|
| 8 |
- * Copyright (C) 2002-2009 OpenVPN Technologies, Inc. <sales@openvpn.net> |
|
| 9 |
- * |
|
| 10 |
- * This program is free software; you can redistribute it and/or modify |
|
| 11 |
- * it under the terms of the GNU General Public License version 2 |
|
| 12 |
- * as published by the Free Software Foundation. |
|
| 13 |
- * |
|
| 14 |
- * This program is distributed in the hope that it will be useful, |
|
| 15 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 16 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 17 |
- * GNU General Public License for more details. |
|
| 18 |
- * |
|
| 19 |
- * You should have received a copy of the GNU General Public License |
|
| 20 |
- * along with this program (see the file COPYING included with this |
|
| 21 |
- * distribution); if not, write to the Free Software Foundation, Inc., |
|
| 22 |
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 23 |
- */ |
|
| 24 |
- |
|
| 25 |
-/* |
|
| 26 |
- * Configuration header for Win32 using the mingw environment. |
|
| 27 |
- * Manually edited based on linux version as generated by autoconf. |
|
| 28 |
- * |
|
| 29 |
- * config-win32.h is normally generated by copying |
|
| 30 |
- * config-win32.h.in -> config-win32.h and replacing |
|
| 31 |
- * [ampersand] VERSION [ampersand] |
|
| 32 |
- * with the appropriate version #. This is normally |
|
| 33 |
- * done automatically by configure.ac |
|
| 34 |
- */ |
|
| 35 |
- |
|
| 36 |
-#include <windows.h> |
|
| 37 |
-#include <winsock2.h> |
|
| 38 |
-#include "autodefs/defs.h" |
|
| 39 |
- |
|
| 40 |
-#define sleep(x) Sleep((x)*1000) |
|
| 41 |
- |
|
| 42 |
-#define random rand |
|
| 43 |
-#define srandom srand |
|
| 44 |
- |
|
| 45 |
-typedef unsigned long in_addr_t; |
|
| 46 |
- |
|
| 47 |
-#ifndef _SSIZE_T_ |
|
| 48 |
-#define _SSIZE_T_ |
|
| 49 |
- typedef unsigned int ssize_t; |
|
| 50 |
-#endif |
|
| 51 |
- |
|
| 52 |
-/* Append a label to program startup title */ |
|
| 53 |
-/*#define DEBUG_LABEL "DEBUG1"*/ |
|
| 54 |
- |
|
| 55 |
-/* Should we print debug info from driver? */ |
|
| 56 |
-#ifdef PRODUCT_TAP_DEBUG |
|
| 57 |
-#define TAP_WIN32_DEBUG |
|
| 58 |
-#endif |
|
| 59 |
- |
|
| 60 |
-/* |
|
| 61 |
- * Minimum TAP-Win32 version number expected by userspace |
|
| 62 |
- * |
|
| 63 |
- * The TAP-Win32 version number is defined in tap-win32/SOURCES |
|
| 64 |
- */ |
|
| 65 |
-#define TAP_ID @TAP_ID@ |
|
| 66 |
-#define TAP_WIN32_MIN_MAJOR @TAP_WIN32_MIN_MAJOR@ |
|
| 67 |
-#define TAP_WIN32_MIN_MINOR @TAP_WIN32_MIN_MINOR@ |
|
| 68 |
- |
|
| 69 |
-/* Enable client/server capability */ |
|
| 70 |
-#define ENABLE_CLIENT_SERVER 1 |
|
| 71 |
- |
|
| 72 |
-/* Enable client capability only */ |
|
| 73 |
-/* #undef ENABLE_CLIENT_ONLY */ |
|
| 74 |
- |
|
| 75 |
-/* Enable management server capability */ |
|
| 76 |
-#define ENABLE_MANAGEMENT 1 |
|
| 77 |
- |
|
| 78 |
-/* Enable PKCS#11 support */ |
|
| 79 |
-#define USE_PKCS11 1 |
|
| 80 |
- |
|
| 81 |
-/* Enable HTTP proxy support */ |
|
| 82 |
-#define ENABLE_HTTP_PROXY 1 |
|
| 83 |
- |
|
| 84 |
-/* Enable Socks proxy support */ |
|
| 85 |
-#define ENABLE_SOCKS 1 |
|
| 86 |
- |
|
| 87 |
-/* Enable internal fragmentation support */ |
|
| 88 |
-#define ENABLE_FRAGMENT 1 |
|
| 89 |
- |
|
| 90 |
-/* Enable smaller executable size */ |
|
| 91 |
-/* #undef ENABLE_SMALL */ |
|
| 92 |
- |
|
| 93 |
-/* Enable debugging support */ |
|
| 94 |
-#define ENABLE_DEBUG 1 |
|
| 95 |
- |
|
| 96 |
-/* if defined, will allow usage of the --plugin directive */ |
|
| 97 |
-#define USE_LOAD_LIBRARY |
|
| 98 |
- |
|
| 99 |
-/* Dimension size to use for empty array declaration */ |
|
| 100 |
-#define EMPTY_ARRAY_SIZE 0 |
|
| 101 |
- |
|
| 102 |
-/* Define to 1 if you have the `getsockname' function. */ |
|
| 103 |
-#define HAVE_GETSOCKNAME 1 |
|
| 104 |
- |
|
| 105 |
-/* Define to 1 if you have the <openssl/engine.h> header file. */ |
|
| 106 |
-#define HAVE_OPENSSL_ENGINE_H 1 |
|
| 107 |
- |
|
| 108 |
-/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */ |
|
| 109 |
-#define HAVE_ENGINE_LOAD_BUILTIN_ENGINES 1 |
|
| 110 |
- |
|
| 111 |
-/* Define to 1 if you have the `ENGINE_register_all_complete' function. */ |
|
| 112 |
-#define HAVE_ENGINE_REGISTER_ALL_COMPLETE 1 |
|
| 113 |
- |
|
| 114 |
-/* Define to 1 if you have the `ENGINE_cleanup' function. */ |
|
| 115 |
-#define HAVE_ENGINE_CLEANUP 1 |
|
| 116 |
- |
|
| 117 |
-/* gettimeofday() is implemented in otime.c for Windows */ |
|
| 118 |
-#define HAVE_GETTIMEOFDAY 1 |
|
| 119 |
- |
|
| 120 |
-/* Define to 1 if you have the 'chsize' function. */ |
|
| 121 |
-#define HAVE_CHSIZE 1 |
|
| 122 |
- |
|
| 123 |
-/* Define to 1 if you have the `chdir' function. */ |
|
| 124 |
-#define HAVE_CHDIR 1 |
|
| 125 |
- |
|
| 126 |
-/* Define to 1 if your compiler supports GNU GCC-style variadic macros */ |
|
| 127 |
-#ifndef _MSC_VER /* Defines MSFT compiler version. Defined as 1200 for MSVC++ 6.0. */ |
|
| 128 |
-#define HAVE_CPP_VARARG_MACRO_GCC 1 |
|
| 129 |
-#endif |
|
| 130 |
- |
|
| 131 |
-/* Define to 1 if you have the <ctype.h> header file. */ |
|
| 132 |
-#define HAVE_CTYPE_H 1 |
|
| 133 |
- |
|
| 134 |
-/* Define to 1 if you have the <errno.h> header file. */ |
|
| 135 |
-#define HAVE_ERRNO_H 1 |
|
| 136 |
- |
|
| 137 |
-/* Define to 1 if you have the `EVP_CIPHER_CTX_set_key_length' function. */ |
|
| 138 |
-#define HAVE_EVP_CIPHER_CTX_SET_KEY_LENGTH 1 |
|
| 139 |
- |
|
| 140 |
-/* Define to 1 if you have the <fcntl.h> header file. */ |
|
| 141 |
-#define HAVE_FCNTL_H 1 |
|
| 142 |
- |
|
| 143 |
-/* Define to 1 if you have the `getsockopt' function. */ |
|
| 144 |
-#define HAVE_GETSOCKOPT 1 |
|
| 145 |
- |
|
| 146 |
-/* Define to 1 if you have the `inet_ntoa' function. */ |
|
| 147 |
-#define HAVE_INET_NTOA 1 |
|
| 148 |
- |
|
| 149 |
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and |
|
| 150 |
- to 0 otherwise. */ |
|
| 151 |
-#define HAVE_MALLOC 1 |
|
| 152 |
- |
|
| 153 |
-/* Define to 1 if you have the `memset' function. */ |
|
| 154 |
-#define HAVE_MEMSET 1 |
|
| 155 |
- |
|
| 156 |
-/* Define to 1 if you have the `setsockopt' function. */ |
|
| 157 |
-#define HAVE_SETSOCKOPT 1 |
|
| 158 |
- |
|
| 159 |
-/* Define to 1 if you have the `socket' function. */ |
|
| 160 |
-#define HAVE_SOCKET 1 |
|
| 161 |
- |
|
| 162 |
-/* Define to 1 if you have the <stdarg.h> header file. */ |
|
| 163 |
-#define HAVE_STDARG_H 1 |
|
| 164 |
- |
|
| 165 |
-/* Define to 1 if you have the <stdint.h> header file. */ |
|
| 166 |
-#ifndef _MSC_VER |
|
| 167 |
-#define HAVE_STDINT_H 1 |
|
| 168 |
-#endif |
|
| 169 |
- |
|
| 170 |
-/* Define to 1 if you have the <stdio.h> header file. */ |
|
| 171 |
-#define HAVE_STDIO_H 1 |
|
| 172 |
- |
|
| 173 |
-/* Define to 1 if you have the <stdlib.h> header file. */ |
|
| 174 |
-#define HAVE_STDLIB_H 1 |
|
| 175 |
- |
|
| 176 |
-/* Define to 1 if you have the `strerror' function. */ |
|
| 177 |
-#define HAVE_STRERROR 1 |
|
| 178 |
- |
|
| 179 |
-/* Define to 1 if you have the <strings.h> header file. */ |
|
| 180 |
-#define HAVE_STRINGS_H 1 |
|
| 181 |
- |
|
| 182 |
-/* Define to 1 if you have the <string.h> header file. */ |
|
| 183 |
-#define HAVE_STRING_H 1 |
|
| 184 |
- |
|
| 185 |
-/* Define to 1 if you have the `system' function. */ |
|
| 186 |
-#define HAVE_SYSTEM 1 |
|
| 187 |
- |
|
| 188 |
-/* Define to 1 if you have the <sys/file.h> header file. */ |
|
| 189 |
-#ifndef _MSC_VER |
|
| 190 |
-#define HAVE_SYS_FILE_H 1 |
|
| 191 |
-#endif |
|
| 192 |
- |
|
| 193 |
-/* Define to 1 if you have the <sys/stat.h> header file. */ |
|
| 194 |
-#define HAVE_SYS_STAT_H 1 |
|
| 195 |
- |
|
| 196 |
-/* Define to 1 if you have the <sys/time.h> header file. */ |
|
| 197 |
-#ifndef _MSC_VER |
|
| 198 |
-#define HAVE_SYS_TIME_H 1 |
|
| 199 |
-#endif |
|
| 200 |
- |
|
| 201 |
-/* Define to 1 if you have the <sys/types.h> header file. */ |
|
| 202 |
-#define HAVE_SYS_TYPES_H 1 |
|
| 203 |
- |
|
| 204 |
-/* Define to 1 if you have the `time' function. */ |
|
| 205 |
-#define HAVE_TIME 1 |
|
| 206 |
- |
|
| 207 |
-/* Define to 1 if you have the <unistd.h> header file. */ |
|
| 208 |
-#ifndef _MSC_VER |
|
| 209 |
-#define HAVE_UNISTD_H 1 |
|
| 210 |
-#endif |
|
| 211 |
- |
|
| 212 |
-/* Define to 1 if you have the `vsnprintf' function. */ |
|
| 213 |
-#define HAVE_VSNPRINTF 1 |
|
| 214 |
- |
|
| 215 |
-/* Special Windows version of getpass() defined in io.c */ |
|
| 216 |
-#define HAVE_GETPASS 1 |
|
| 217 |
- |
|
| 218 |
-/* Name of package */ |
|
| 219 |
-#define PACKAGE @PACKAGE@ |
|
| 220 |
- |
|
| 221 |
-/* Define to the address where bug reports for this package should be sent. */ |
|
| 222 |
-//#define PACKAGE_BUGREPORT "openvpn-users@lists.sourceforge.net" |
|
| 223 |
- |
|
| 224 |
-/* Define to the full name of this package. */ |
|
| 225 |
-#define PACKAGE_NAME @PACKAGE_NAME@ |
|
| 226 |
- |
|
| 227 |
-/* Define to the one symbol short name of this package. */ |
|
| 228 |
-#define PACKAGE_TARNAME @PACKAGE_TARNAME@ |
|
| 229 |
- |
|
| 230 |
-/* Define to the version of this package. */ |
|
| 231 |
-#define PACKAGE_VERSION @PACKAGE_VERSION@ |
|
| 232 |
- |
|
| 233 |
-/* Define to the full name and version of this package. */ |
|
| 234 |
-#ifdef DEBUG_LABEL |
|
| 235 |
-#define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION " " DEBUG_LABEL |
|
| 236 |
-#else |
|
| 237 |
-#define PACKAGE_STRING PACKAGE_NAME " " PACKAGE_VERSION |
|
| 238 |
-#endif |
|
| 239 |
- |
|
| 240 |
-/* Define as the return type of signal handlers (`int' or `void'). */ |
|
| 241 |
-#define RETSIGTYPE void |
|
| 242 |
- |
|
| 243 |
-/* The size of a `unsigned int', as computed by sizeof. */ |
|
| 244 |
-#define SIZEOF_UNSIGNED_INT 4 |
|
| 245 |
- |
|
| 246 |
-/* The size of a `unsigned long', as computed by sizeof. */ |
|
| 247 |
-#define SIZEOF_UNSIGNED_LONG 4 |
|
| 248 |
- |
|
| 249 |
-/* Define to 1 if you have the ANSI C header files. */ |
|
| 250 |
-#define STDC_HEADERS 1 |
|
| 251 |
- |
|
| 252 |
-/* A string representing our target */ |
|
| 253 |
-#ifdef _MSC_VER |
|
| 254 |
-#define TARGET_ALIAS "Win32-MSVC++" |
|
| 255 |
-#else |
|
| 256 |
-#define TARGET_ALIAS "Win32-MinGW" |
|
| 257 |
-#endif |
|
| 258 |
- |
|
| 259 |
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ |
|
| 260 |
-#ifndef _MSC_VER |
|
| 261 |
-#define TIME_WITH_SYS_TIME 1 |
|
| 262 |
-#endif |
|
| 263 |
- |
|
| 264 |
-/* Use OpenSSL crypto library */ |
|
| 265 |
-#define USE_CRYPTO 1 |
|
| 266 |
- |
|
| 267 |
-/* Use LZO compression library */ |
|
| 268 |
-#define USE_LZO 1 |
|
| 269 |
- |
|
| 270 |
-/* LZO version number */ |
|
| 271 |
-#define LZO_VERSION_NUM "2" |
|
| 272 |
- |
|
| 273 |
-/* Use lzo/ directory prefix for LZO header files (for LZO 2.0) */ |
|
| 274 |
-#define LZO_HEADER_DIR 1 |
|
| 275 |
- |
|
| 276 |
-/* Use OpenSSL SSL library */ |
|
| 277 |
-#define USE_SSL 1 |
|
| 278 |
- |
|
| 279 |
-/* Version number of package */ |
|
| 280 |
-#define VERSION PACKAGE_VERSION |
|
| 281 |
- |
|
| 282 |
-/* Define as `__inline' if that's what the C compiler calls it, or to nothing |
|
| 283 |
- if it is not supported. */ |
|
| 284 |
-#define inline __inline |
|
| 285 |
- |
|
| 286 |
-/* type to use in place of socklen_t if not defined */ |
|
| 287 |
-#define socklen_t unsigned int |
|
| 288 |
- |
|
| 289 |
-/* 32-bit unsigned type */ |
|
| 290 |
-#define uint32_t unsigned int |
|
| 291 |
- |
|
| 292 |
-/* 16-bit unsigned type */ |
|
| 293 |
-#define uint16_t unsigned short |
|
| 294 |
- |
|
| 295 |
-/* 8-bit unsigned type */ |
|
| 296 |
-#define uint8_t unsigned char |
|
| 297 |
- |
|
| 298 |
-/* Route command */ |
|
| 299 |
-#define ROUTE_PATH "route" |
|
| 300 |
- |
|
| 301 |
-/* Windows doesn't support PTHREAD yet */ |
|
| 302 |
-#ifdef USE_PTHREAD |
|
| 303 |
-#error The Windows version of OpenVPN does not support PTHREAD yet |
|
| 304 |
-#endif |
|
| 305 |
- |
|
| 306 |
-#ifdef _MSC_VER |
|
| 307 |
-/* MSVC++ hacks */ |
|
| 308 |
-#include <io.h> |
|
| 309 |
-#include <direct.h> |
|
| 310 |
-#define vsnprintf _vsnprintf |
|
| 311 |
-#define vsnwprintf _vsnwprintf |
|
| 312 |
-#define snwprintf _snwprintf |
|
| 313 |
-#define write _write |
|
| 314 |
-#define open _open |
|
| 315 |
-#define read _read |
|
| 316 |
-#define close _close |
|
| 317 |
-#define chdir _chdir |
|
| 318 |
-#define S_IRUSR 0 |
|
| 319 |
-#define S_IWUSR 0 |
|
| 320 |
-typedef int intptr_t; |
|
| 321 |
-/* Visual Studio 2005 supports vararg macros */ |
|
| 322 |
-#if _MSC_VER >= 1400 |
|
| 323 |
-#define HAVE_CPP_VARARG_MACRO_ISO 1 |
|
| 324 |
-#endif |
|
| 325 |
-#endif |
| ... | ... |
@@ -985,8 +985,8 @@ get_tls_handshake_key (const struct key_type *key_type, |
| 985 | 985 |
#endif |
| 986 | 986 |
|
| 987 | 987 |
/* header and footer for static key file */ |
| 988 |
-static const char static_key_head[] = "-----BEGIN " PACKAGE_NAME " Static key V1-----"; |
|
| 989 |
-static const char static_key_foot[] = "-----END " PACKAGE_NAME " Static key V1-----"; |
|
| 988 |
+static const char static_key_head[] = "-----BEGIN OpenVPN Static key V1-----"; |
|
| 989 |
+static const char static_key_foot[] = "-----END OpenVPN Static key V1-----"; |
|
| 990 | 990 |
|
| 991 | 991 |
static const char printable_char_fmt[] = |
| 992 | 992 |
"Non-Hex character ('%c') found at line %d in key file '%s' (%d/%d/%d bytes found/min/max)";
|
| ... | ... |
@@ -1065,8 +1065,8 @@ read_key_file (struct key2 *key2, const char *file, const unsigned int flags) |
| 1065 | 1065 |
const unsigned char c = *cp; |
| 1066 | 1066 |
|
| 1067 | 1067 |
#if 0 |
| 1068 |
- msg (M_INFO, "char='%c' s=%d ln=%d li=%d m=%d c=%d", |
|
| 1069 |
- c, state, line_num, line_index, match, count); |
|
| 1068 |
+ msg (M_INFO, "char='%c'[%d] s=%d ln=%d li=%d m=%d c=%d", |
|
| 1069 |
+ c, (int)c, state, line_num, line_index, match, count); |
|
| 1070 | 1070 |
#endif |
| 1071 | 1071 |
|
| 1072 | 1072 |
if (c == '\n') |
| ... | ... |
@@ -1150,7 +1150,7 @@ read_key_file (struct key2 *key2, const char *file, const unsigned int flags) |
| 1150 | 1150 |
if (flags & RKF_MUST_SUCCEED) |
| 1151 | 1151 |
{
|
| 1152 | 1152 |
if (!key2->n) |
| 1153 |
- msg (M_FATAL, "Insufficient key material or header text not found found in file '%s' (%d/%d/%d bytes found/min/max)", |
|
| 1153 |
+ msg (M_FATAL, "Insufficient key material or header text not found in file '%s' (%d/%d/%d bytes found/min/max)", |
|
| 1154 | 1154 |
error_filename, count, onekeylen, keylen); |
| 1155 | 1155 |
|
| 1156 | 1156 |
if (state != PARSE_FINISHED) |
| ... | ... |
@@ -1297,7 +1297,7 @@ write_key_file (const int nkeys, const char *filename) |
| 1297 | 1297 |
buf_printf (&out, "%s\n", static_key_foot); |
| 1298 | 1298 |
|
| 1299 | 1299 |
/* write number of bits */ |
| 1300 |
- buf_printf (&nbits_head_text, "#\n# %d bit " PACKAGE_NAME " static key\n#\n", nbits); |
|
| 1300 |
+ buf_printf (&nbits_head_text, "#\n# %d bit OpenVPN static key\n#\n", nbits); |
|
| 1301 | 1301 |
buf_write_string_file (&nbits_head_text, filename, fd); |
| 1302 | 1302 |
|
| 1303 | 1303 |
/* write key file, now formatted in out, to file */ |
| 1304 | 1304 |
deleted file mode 100644 |
| ... | ... |
@@ -1,186 +0,0 @@ |
| 1 |
-# This makefile builds the user-mode component |
|
| 2 |
-# of OpenVPN for WIN32 in the MSVC++ environment. |
|
| 3 |
-# |
|
| 4 |
-# Build Dependencies: |
|
| 5 |
-# OpenSSL (SSL/TLS/crypto library) |
|
| 6 |
-# LZO (real-time compression library) |
|
| 7 |
-# |
|
| 8 |
-# Targets: |
|
| 9 |
-# static -- link statically with OpenSSL |
|
| 10 |
-# dynamic -- link dynamically with OpenSSL |
|
| 11 |
-# |
|
| 12 |
-# Note that LZO is always linked statically. |
|
| 13 |
- |
|
| 14 |
-# Change these to point to your OpenSSL and LZO top-level |
|
| 15 |
-# directories. |
|
| 16 |
- |
|
| 17 |
-OPENSSL = \src\openssl-0.9.7d |
|
| 18 |
-OPENSSL_STATIC = libeay32s.lib ssleay32s.lib |
|
| 19 |
-#OPENSSL_STATIC = libeay32sd.lib ssleay32sd.lib |
|
| 20 |
-OPENSSL_DYNAMIC = libeay32.lib ssleay32.lib |
|
| 21 |
-#OPENSSL_DYNAMIC = libeay32d.lib ssleay32d.lib |
|
| 22 |
- |
|
| 23 |
-LZO = \src\lzo-1.08.vc |
|
| 24 |
- |
|
| 25 |
-PKCS11_HELPER = \src\pkcs11-helper-1.02 |
|
| 26 |
- |
|
| 27 |
-INCLUDE_DIRS = -I$(OPENSSL)/include -I$(LZO)/include -I$(PKCS11_HELPER)/include |
|
| 28 |
- |
|
| 29 |
-LIBS = lzo.lib libpkcs11-helper-1.lib ws2_32.lib crypt32.lib iphlpapi.lib winmm.lib user32.lib gdi32.lib advapi32.lib wininet.lib |
|
| 30 |
- |
|
| 31 |
-LIB_DIRS = -LIBPATH:$(OPENSSL)\out -LIBPATH:$(LZO) -LIBPATH:$(PKCS11_HELPER)\lib |
|
| 32 |
- |
|
| 33 |
-EXE = openvpn.exe |
|
| 34 |
- |
|
| 35 |
-CPP=cl.exe |
|
| 36 |
-CPP_ARG_COMMON=/nologo /W3 /G5 /O2 -DWIN32 -DWIN32_LEAN_AND_MEAN -D_CONSOLE -D_MBCS -D_CRT_SECURE_NO_DEPRECATE $(INCLUDE_DIRS) /FD /c |
|
| 37 |
-# release: |
|
| 38 |
-CPP_PROJ=$(CPP_ARG_COMMON) /MD -DNDEBUG |
|
| 39 |
-# debug: |
|
| 40 |
-#CPP_PROJ=$(CPP_ARG_COMMON) /MDd /Zi /Od -D_DEBUG |
|
| 41 |
- |
|
| 42 |
-LINK32=link.exe |
|
| 43 |
-# release: |
|
| 44 |
-LINK32_FLAGS=/nologo /subsystem:console /incremental:no /out:"$(EXE)" |
|
| 45 |
-# debug: |
|
| 46 |
-#LINK32_FLAGS=/nologo /subsystem:console /incremental:no /debug /out:"$(EXE)" |
|
| 47 |
- |
|
| 48 |
-# Make sure the HEADERS and OBJS definitions below match the same |
|
| 49 |
-# definitions in makefile.w32. |
|
| 50 |
- |
|
| 51 |
-HEADERS = \ |
|
| 52 |
- base64.h \ |
|
| 53 |
- basic.h \ |
|
| 54 |
- buffer.h \ |
|
| 55 |
- circ_list.h common.h \ |
|
| 56 |
- tap-win32/common.h \ |
|
| 57 |
- config-win32.h \ |
|
| 58 |
- crypto.h \ |
|
| 59 |
- cryptoapi.h \ |
|
| 60 |
- errlevel.h \ |
|
| 61 |
- error.h \ |
|
| 62 |
- event.h \ |
|
| 63 |
- fdmisc.h \ |
|
| 64 |
- forward-inline.h \ |
|
| 65 |
- forward.h \ |
|
| 66 |
- fragment.h \ |
|
| 67 |
- gremlin.h \ |
|
| 68 |
- helper.h \ |
|
| 69 |
- init.h \ |
|
| 70 |
- integer.h \ |
|
| 71 |
- interval.h \ |
|
| 72 |
- list.h \ |
|
| 73 |
- lzo.h \ |
|
| 74 |
- manage.h \ |
|
| 75 |
- mbuf.h \ |
|
| 76 |
- memdbg.h \ |
|
| 77 |
- misc.h \ |
|
| 78 |
- mroute.h \ |
|
| 79 |
- mss.h \ |
|
| 80 |
- mtcp.h \ |
|
| 81 |
- mtu.h \ |
|
| 82 |
- mudp.h \ |
|
| 83 |
- multi.h \ |
|
| 84 |
- ntlm.h \ |
|
| 85 |
- occ-inline.h \ |
|
| 86 |
- occ.h \ |
|
| 87 |
- pkcs11.h \ |
|
| 88 |
- openvpn.h \ |
|
| 89 |
- openvpn-plugin.h \ |
|
| 90 |
- options.h \ |
|
| 91 |
- otime.h \ |
|
| 92 |
- packet_id.h \ |
|
| 93 |
- perf.h \ |
|
| 94 |
- ping-inline.h \ |
|
| 95 |
- ping.h \ |
|
| 96 |
- plugin.h \ |
|
| 97 |
- pool.h \ |
|
| 98 |
- proto.h \ |
|
| 99 |
- proxy.h \ |
|
| 100 |
- push.h \ |
|
| 101 |
- reliable.h \ |
|
| 102 |
- route.h \ |
|
| 103 |
- schedule.h \ |
|
| 104 |
- session_id.h \ |
|
| 105 |
- shaper.h \ |
|
| 106 |
- sig.h \ |
|
| 107 |
- socket.h \ |
|
| 108 |
- socks.h \ |
|
| 109 |
- ssl.h \ |
|
| 110 |
- status.h \ |
|
| 111 |
- syshead.h \ |
|
| 112 |
- thread.h \ |
|
| 113 |
- tun.h \ |
|
| 114 |
- lladdr.h \ |
|
| 115 |
- win32.h |
|
| 116 |
- |
|
| 117 |
-OBJS = base64.obj \ |
|
| 118 |
- buffer.obj \ |
|
| 119 |
- crypto.obj \ |
|
| 120 |
- cryptoapi.obj \ |
|
| 121 |
- error.obj \ |
|
| 122 |
- event.obj \ |
|
| 123 |
- fdmisc.obj \ |
|
| 124 |
- forward.obj \ |
|
| 125 |
- fragment.obj \ |
|
| 126 |
- gremlin.obj \ |
|
| 127 |
- helper.obj \ |
|
| 128 |
- init.obj \ |
|
| 129 |
- interval.obj \ |
|
| 130 |
- list.obj \ |
|
| 131 |
- lzo.obj \ |
|
| 132 |
- manage.obj \ |
|
| 133 |
- mbuf.obj \ |
|
| 134 |
- misc.obj \ |
|
| 135 |
- mroute.obj \ |
|
| 136 |
- mss.obj \ |
|
| 137 |
- mtcp.obj \ |
|
| 138 |
- mtu.obj \ |
|
| 139 |
- mudp.obj \ |
|
| 140 |
- multi.obj \ |
|
| 141 |
- ntlm.obj \ |
|
| 142 |
- occ.obj \ |
|
| 143 |
- pkcs11.obj \ |
|
| 144 |
- openvpn.obj \ |
|
| 145 |
- options.obj \ |
|
| 146 |
- otime.obj \ |
|
| 147 |
- packet_id.obj \ |
|
| 148 |
- perf.obj \ |
|
| 149 |
- ping.obj \ |
|
| 150 |
- plugin.obj \ |
|
| 151 |
- pool.obj \ |
|
| 152 |
- proto.obj \ |
|
| 153 |
- proxy.obj \ |
|
| 154 |
- push.obj \ |
|
| 155 |
- reliable.obj \ |
|
| 156 |
- route.obj \ |
|
| 157 |
- schedule.obj \ |
|
| 158 |
- session_id.obj \ |
|
| 159 |
- shaper.obj \ |
|
| 160 |
- sig.obj \ |
|
| 161 |
- socket.obj \ |
|
| 162 |
- socks.obj \ |
|
| 163 |
- ssl.obj \ |
|
| 164 |
- status.obj \ |
|
| 165 |
- thread.obj \ |
|
| 166 |
- tun.obj \ |
|
| 167 |
- lladdr.obj \ |
|
| 168 |
- win32.obj |
|
| 169 |
- |
|
| 170 |
-dynamic : $(OBJS) |
|
| 171 |
- $(LINK32) @<< |
|
| 172 |
- $(LINK32_FLAGS) $(LIB_DIRS) $(LIBS) $(OPENSSL_DYNAMIC) $(OBJS) |
|
| 173 |
-<< |
|
| 174 |
- |
|
| 175 |
-static : $(OBJS) |
|
| 176 |
- $(LINK32) @<< |
|
| 177 |
- $(LINK32_FLAGS) $(LIB_DIRS) $(LIBS) $(OPENSSL_STATIC) $(OBJS) |
|
| 178 |
-<< |
|
| 179 |
- |
|
| 180 |
-clean : |
|
| 181 |
- del /Q $(OBJS) $(EXE) *.idb *.pdb |
|
| 182 |
- |
|
| 183 |
-.c.obj:: |
|
| 184 |
- $(CPP) @<< |
|
| 185 |
- $(CPP_PROJ) $< |
|
| 186 |
-<< |
| ... | ... |
@@ -1194,7 +1194,7 @@ create_temp_filename (const char *directory, const char *prefix, struct gc_arena |
| 1194 | 1194 |
const char * |
| 1195 | 1195 |
hostname_randomize(const char *hostname, struct gc_arena *gc) |
| 1196 | 1196 |
{
|
| 1197 |
- const int n_rnd_bytes = 6; |
|
| 1197 |
+# define n_rnd_bytes 6 |
|
| 1198 | 1198 |
|
| 1199 | 1199 |
char *hst = string_alloc(hostname, gc); |
| 1200 | 1200 |
char *dot = strchr(hst, '.'); |
| ... | ... |
@@ -1213,6 +1213,7 @@ hostname_randomize(const char *hostname, struct gc_arena *gc) |
| 1213 | 1213 |
} |
| 1214 | 1214 |
else |
| 1215 | 1215 |
return hostname; |
| 1216 |
+# undef n_rnd_bytes |
|
| 1216 | 1217 |
} |
| 1217 | 1218 |
|
| 1218 | 1219 |
#else |
| 1219 | 1220 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,20 @@ |
| 0 |
+/* |
|
| 1 |
+ * Minimum TAP-Win32 version number expected by userspace |
|
| 2 |
+ * |
|
| 3 |
+ * The TAP-Win32 version number is defined in tap-win32/SOURCES |
|
| 4 |
+ */ |
|
| 5 |
+#define TAP_ID "@PRODUCT_TAP_ID@" |
|
| 6 |
+#define TAP_WIN32_MIN_MAJOR @PRODUCT_TAP_WIN32_MIN_MAJOR@ |
|
| 7 |
+#define TAP_WIN32_MIN_MINOR @PRODUCT_TAP_WIN32_MIN_MINOR@ |
|
| 8 |
+ |
|
| 9 |
+/* Name of package */ |
|
| 10 |
+#define PACKAGE "@PRODUCT_UNIX_NAME@" |
|
| 11 |
+ |
|
| 12 |
+/* Define to the full name of this package. */ |
|
| 13 |
+#define PACKAGE_NAME "@PRODUCT_NAME@" |
|
| 14 |
+ |
|
| 15 |
+/* Define to the one symbol short name of this package. */ |
|
| 16 |
+#define PACKAGE_TARNAME "@PRODUCT_UNIX_NAME@" |
|
| 17 |
+ |
|
| 18 |
+/* Define to the version of this package. */ |
|
| 19 |
+#define PACKAGE_VERSION "@PRODUCT_VERSION@" |
| 0 | 20 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,93 @@ |
| 0 |
+# build autodefs.h and |
|
| 1 |
+ |
|
| 2 |
+import re |
|
| 3 |
+ |
|
| 4 |
+autogen = "Automatically generated by config.py" |
|
| 5 |
+ |
|
| 6 |
+def parse_version_m4(kv, version_m4): |
|
| 7 |
+ r = re.compile(r'^define\((\w+),\[(.*)\]\)$') |
|
| 8 |
+ f = open(version_m4) |
|
| 9 |
+ for line in f: |
|
| 10 |
+ line = line.rstrip() |
|
| 11 |
+ m = re.match(r, line) |
|
| 12 |
+ if m: |
|
| 13 |
+ g = m.groups() |
|
| 14 |
+ kv[g[0]] = g[1] |
|
| 15 |
+ f.close() |
|
| 16 |
+ |
|
| 17 |
+def parse_settings_in(kv, settings_in): |
|
| 18 |
+ r = re.compile(r'^!define\s+(\w+)(?:\s+"?(.*?)"?)$') |
|
| 19 |
+ f = open(settings_in) |
|
| 20 |
+ for line in f: |
|
| 21 |
+ line = line.rstrip() |
|
| 22 |
+ m = re.match(r, line) |
|
| 23 |
+ if m: |
|
| 24 |
+ g = m.groups() |
|
| 25 |
+ kv[g[0]] = g[1] or '' |
|
| 26 |
+ f.close() |
|
| 27 |
+ |
|
| 28 |
+def build_autodefs(kv, autodefs_in, autodefs_out): |
|
| 29 |
+ def repfn(m): |
|
| 30 |
+ var, = m.groups() |
|
| 31 |
+ return kv.get(var, '') |
|
| 32 |
+ |
|
| 33 |
+ r = re.compile(r'@(\w+)@') |
|
| 34 |
+ fin = open(autodefs_in) |
|
| 35 |
+ fout = open(autodefs_out, 'w') |
|
| 36 |
+ fout.write("/* %s */\n\n" % autogen)
|
|
| 37 |
+ for line in fin: |
|
| 38 |
+ newline = re.sub(r, repfn, line) |
|
| 39 |
+ fout.write(newline) |
|
| 40 |
+ fin.close() |
|
| 41 |
+ fout.close() |
|
| 42 |
+ |
|
| 43 |
+def print_key_values(kv): |
|
| 44 |
+ for k, v in sorted(kv.items()): |
|
| 45 |
+ print "%s%s%s" % (k, ' '*(32-len(k)), repr(v)) |
|
| 46 |
+ |
|
| 47 |
+def get_sources(makefile_am): |
|
| 48 |
+ c = set() |
|
| 49 |
+ h = set() |
|
| 50 |
+ f = open(makefile_am) |
|
| 51 |
+ state = False |
|
| 52 |
+ for line in f: |
|
| 53 |
+ line = line.rstrip() |
|
| 54 |
+ if line == 'openvpn_SOURCES = \\': |
|
| 55 |
+ state = True |
|
| 56 |
+ elif not line: |
|
| 57 |
+ state = False |
|
| 58 |
+ elif state: |
|
| 59 |
+ for sf in line.split(): |
|
| 60 |
+ if sf.endswith('.c'):
|
|
| 61 |
+ c.add(sf[:-2]) |
|
| 62 |
+ elif sf.endswith('.h'):
|
|
| 63 |
+ h.add(sf[:-2]) |
|
| 64 |
+ elif sf == '\\': |
|
| 65 |
+ pass |
|
| 66 |
+ else: |
|
| 67 |
+ print >>sys.stderr, "Unrecognized filename:", sf |
|
| 68 |
+ f.close() |
|
| 69 |
+ return [ sorted(list(s)) for s in (c, h) ] |
|
| 70 |
+ |
|
| 71 |
+def output_mak_list(out, title, srclist, ext): |
|
| 72 |
+ out.write("%s =" % (title,))
|
|
| 73 |
+ for x in srclist: |
|
| 74 |
+ out.write(" \\\n\t%s.%s" % (x, ext))
|
|
| 75 |
+ out.write('\n\n')
|
|
| 76 |
+ |
|
| 77 |
+def output_mak(makefile_am, outfile): |
|
| 78 |
+ c, h = get_sources(makefile_am) |
|
| 79 |
+ out = open(outfile, 'w') |
|
| 80 |
+ out.write("# %s\n\n" % autogen)
|
|
| 81 |
+ output_mak_list(out, 'HEADERS', h, 'h') |
|
| 82 |
+ output_mak_list(out, 'OBJS', c, 'obj') |
|
| 83 |
+ out.close() |
|
| 84 |
+ |
|
| 85 |
+def main(): |
|
| 86 |
+ kv = {}
|
|
| 87 |
+ parse_version_m4(kv, 'version.m4') |
|
| 88 |
+ parse_settings_in(kv, 'install-win32/settings.in') |
|
| 89 |
+ build_autodefs(kv, 'msvc/autodefs.h.in', 'autodefs.h') |
|
| 90 |
+ output_mak('Makefile.am', 'head_obj.mak')
|
|
| 91 |
+ |
|
| 92 |
+main() |
| 0 | 93 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,52 @@ |
| 0 |
+# This makefile builds the user-mode component |
|
| 1 |
+# of OpenVPN for Windows in the Visual Studio 2008 environment. |
|
| 2 |
+ |
|
| 3 |
+# To build: |
|
| 4 |
+# python msvc\config.py |
|
| 5 |
+# nmake /f msvc\msvc.mak |
|
| 6 |
+ |
|
| 7 |
+# Each of the OPENSSL and LZO dirs should have 'lib' and 'include' |
|
| 8 |
+# directories under them. |
|
| 9 |
+ |
|
| 10 |
+OPENSSL = \src\openssl |
|
| 11 |
+OPENSSL_DYNAMIC = libeay32.lib ssleay32.lib |
|
| 12 |
+ |
|
| 13 |
+LZO = \src\lzo |
|
| 14 |
+LZO_DYNAMIC = lzo2.lib |
|
| 15 |
+ |
|
| 16 |
+INCLUDE_DIRS = -I$(OPENSSL)/include -I$(LZO)/include |
|
| 17 |
+ |
|
| 18 |
+LIBS = $(OPENSSL_DYNAMIC) $(LZO_DYNAMIC) ws2_32.lib crypt32.lib iphlpapi.lib winmm.lib user32.lib gdi32.lib advapi32.lib wininet.lib |
|
| 19 |
+ |
|
| 20 |
+LIB_DIRS = -LIBPATH:$(OPENSSL)\lib -LIBPATH:$(LZO)\lib |
|
| 21 |
+ |
|
| 22 |
+EXE = openvpn.exe |
|
| 23 |
+ |
|
| 24 |
+CPP=cl.exe |
|
| 25 |
+CPP_ARG_COMMON=/nologo /W3 /O2 -DWIN32 -DWIN32_LEAN_AND_MEAN -D_CONSOLE -D_MBCS -D_CRT_SECURE_NO_DEPRECATE $(INCLUDE_DIRS) /FD /c |
|
| 26 |
+# release: |
|
| 27 |
+CPP_PROJ=$(CPP_ARG_COMMON) /MD -DNDEBUG |
|
| 28 |
+# debug: |
|
| 29 |
+#CPP_PROJ=$(CPP_ARG_COMMON) /MDd /Zi /Od -D_DEBUG |
|
| 30 |
+ |
|
| 31 |
+LINK32=link.exe |
|
| 32 |
+# release: |
|
| 33 |
+LINK32_FLAGS=/nologo /subsystem:console /incremental:no /out:"$(EXE)" |
|
| 34 |
+# debug: |
|
| 35 |
+#LINK32_FLAGS=/nologo /subsystem:console /incremental:no /debug /out:"$(EXE)" |
|
| 36 |
+ |
|
| 37 |
+# HEADERS and OBJS definitions, automatically generated |
|
| 38 |
+!INCLUDE head_obj.mak |
|
| 39 |
+ |
|
| 40 |
+openvpn : $(OBJS) |
|
| 41 |
+ $(LINK32) @<< |
|
| 42 |
+ $(LINK32_FLAGS) $(LIB_DIRS) $(LIBS) $(OBJS) |
|
| 43 |
+<< |
|
| 44 |
+ |
|
| 45 |
+clean : |
|
| 46 |
+ del /Q $(OBJS) $(EXE) *.idb *.pdb |
|
| 47 |
+ |
|
| 48 |
+.c.obj:: |
|
| 49 |
+ $(CPP) @<< |
|
| 50 |
+ $(CPP_PROJ) $< |
|
| 51 |
+<< |
| ... | ... |
@@ -721,7 +721,7 @@ multi_print_status (struct multi_context *m, struct status_output *so, const int |
| 721 | 721 |
/* |
| 722 | 722 |
* Status file version 1 |
| 723 | 723 |
*/ |
| 724 |
- status_printf (so, PACKAGE_NAME " CLIENT LIST"); |
|
| 724 |
+ status_printf (so, "OpenVPN CLIENT LIST"); |
|
| 725 | 725 |
status_printf (so, "Updated,%s", time_string (0, 0, false, &gc_top)); |
| 726 | 726 |
status_printf (so, "Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since"); |
| 727 | 727 |
hash_iterator_init (m->hash, &hi, true); |
| ... | ... |
@@ -257,7 +257,7 @@ print_status (const struct context *c, struct status_output *so) |
| 257 | 257 |
|
| 258 | 258 |
status_reset (so); |
| 259 | 259 |
|
| 260 |
- status_printf (so, PACKAGE_NAME " STATISTICS"); |
|
| 260 |
+ status_printf (so, "OpenVPN STATISTICS"); |
|
| 261 | 261 |
status_printf (so, "Updated,%s", time_string (0, 0, false, &gc)); |
| 262 | 262 |
status_printf (so, "TUN/TAP read bytes," counter_format, c->c2.tun_read_bytes); |
| 263 | 263 |
status_printf (so, "TUN/TAP write bytes," counter_format, c->c2.tun_write_bytes); |
| ... | ... |
@@ -55,7 +55,7 @@ static void netsh_ifconfig (const struct tuntap_options *to, |
| 55 | 55 |
const char *flex_name, |
| 56 | 56 |
const in_addr_t ip, |
| 57 | 57 |
const in_addr_t netmask, |
| 58 |
- unsigned int flags); |
|
| 58 |
+ const unsigned int flags); |
|
| 59 | 59 |
|
| 60 | 60 |
static const char *netsh_get_id (const char *dev_node, struct gc_arena *gc); |
| 61 | 61 |
|