summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* build: use stdbool.h if availableAlon Bar-Lev2012-04-285-14/+15
| | | | | | | | | | | | | | | | | If stdbool.h is available use it, otherwise create emulation. basic.h defines a type 'bool' that conflicts with the altivec keyword bool which has to be fixed upstream, see bugs[1][2]. [1] https://bugs.gentoo.org/show_bug.cgi?id=293840 [2] https://bugs.gentoo.org/show_bug.cgi?id=297854 Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1335528555-13225-1-git-send-email-alon.barlev@gmail.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6363 Signed-off-by: David Sommerseth <davids@redhat.com>
* Updated README.polarssl with build system changes.Adriaan de Jong2012-04-271-2/+2
| | | | | | | | Signed-off-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1333351687-3732-6-git-send-email-dejong@fox-it.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6209 Signed-off-by: David Sommerseth <davids@redhat.com>
* Removed support for PolarSSL < 1.1Adriaan de Jong2012-04-274-55/+1
| | | | | | | | | | | | | | | | | | PolarSSL 1.0 and earlier use only the Havege RNG. Havege is based on timing certain operations, using the RDTSC instruction. Although this is fine on bare metal PCs, the RDTSC instruction is virtualised on some virtual machine implementations. This can result in issues on those virtual machines. PolarSSL fixes this potential issue by also using platform entropy. To ensure that OpenVPN is always built against a decent RNG, PolarSSL <1.1 is therefore no longer supported. Signed-off-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1333351687-3732-4-git-send-email-dejong@fox-it.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6211 Signed-off-by: David Sommerseth <davids@redhat.com>
* Use POLARSSL_CFLAGS instead of POLARSSL_CRYPTO_CFLAGS in configure.acAdriaan de Jong2012-04-271-1/+1
| | | | | | | | | | Ensured that the used variable name actually matches the one advertised by configure. Signed-off-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: Alon Bar-Lev <alon.barlev@gmail.com> Message-Id: 1333351687-3732-3-git-send-email-dejong@fox-it.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6208 Signed-off-by: David Sommerseth <davids@redhat.com>
* Added a configuration option to enable prediction resistance in the PolarSSL ↵Adriaan de Jong2012-04-277-0/+69
| | | | | | | | | | | | | | | | | | random number generator. Signed-off-by: Eelse-jan Stutvoet <stutvoet@fox-it.com> Signed-off-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: James Yonan <james@openvpn.net> Message-Id: 1333351687-3732-2-git-send-email-dejong@fox-it.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6213 Signed-off-by: David Sommerseth <davids@redhat.com> Notes: This patch was ACKed by James Yonan in an IRC meeting March 29, 2012. Currently, the meeting minutes have not been made public. (David Sommerseth, Fri Apr 27 21:36:04 UTC 2012)
* Added support for new PolarSSL 1.1 RNGAdriaan de Jong2012-04-276-22/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch, while retaining PolarSSL 1.0 support, introduces the PolarSSL 1.1 DRBG. This RNG adds a number of features, including support for personalisation strings and multiple entropy sources. Personalisation strings have been implemented, based on PID, program name, place within memory, and a hash of the user's certificate. The entropy sources used are the platform default ones. Which ones these are depends on how PolarSSL was built, but usually this includes: - /dev/urandom or the Windows CryptoAPI RNG - the HAVEGE RNG - the output of PolarSSL's hardclock() call (usually RDTSC) Finally, this patch moves to only one instance of the RNG per OpenVPN instance, instead of one per keystate Signed-off-by: Adriaan de Jong <dejong@fox-it.com> Signed-off-by: Eelse-jan Stutvoet <stutvoet@fox-it.com> Acked-by: James Yonan <james@openvpn.net> Message-Id: 1333351687-3732-1-git-send-email-dejong@fox-it.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6210 Signed-off-by: David Sommerseth <davids@redhat.com> Notes: This patch was ACKed by James Yonan in an IRC meeting March 29, 2012 under the condition that PolarSSL 1.0 and havege support is removed later on. Currently, the meeting minutes have not been made public. (David Sommerseth, Fri Apr 27 21:31:03 UTC 2012)
* crash: packet_id_debug_print: sl may be nullAlon Bar-Lev2012-04-271-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | Program received signal SIGSEGV, Segmentation fault. packet_id_debug_print (msglevel=1174405255, p=0xa36bd0718, pin=0x3de5feec1b0, message=0xa330dde80 "PID_TEST", value=0) at ../../../src/openvpn/packet_id.c:504 504 for (i = 0; i < sl->x_size; ++i) (gdb) print sl $2 = (const struct seq_list *) 0x0 Reported in the past[1]. [1] http://thread.gmane.org/gmane.network.openvpn.devel/5466 Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: James Yonan <james@openvpn.net> Message-Id: 1333879485-2417-1-git-send-email-alon.barlev@gmail.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6259 Message-Id: 4F9A6B4B.7060502@openvpn.net URL: http://article.gmane.org/gmane.network.openvpn.devel/6350 Signed-off-by: David Sommerseth <davids@redhat.com>
* Clean-up: Presume that Linux is always IPv6 capable at build timeDavid Sommerseth2012-04-272-25/+0
| | | | | | | | | | | | | | | | | | | | | These days it is highly unlikely that OpenVPN will be built in a non-IPv6 capable Linux environment. So remove compile-time related macros identifying that. This also solves an issue which was introduced in commit 51bd56f46f55177cf0f8b where HAVE_TUN_PI is no longer detected. The tun_pi struct is defined in linux/if_tun.h, which will be checked for later on. As this struct has history in linux/if_tun.h all back to the beginning of the kernel git tree (2.6.12-rc2, April 2005), it is considered not needed to check for this struct explicit. [ v2: Commit 7c0a2b5f2b4409 modifies some of the checks this patch touches. This patch just adopts to those changes ] Signed-off-by: David Sommerseth <davids@redhat.com> Acked-by: Gert Doering <gert@greenie.muc.de> Acked-by: Alon Bar-Lev <alon.barlev@gmail.com> Message-Id: 1335521425-23391-1-git-send-email-davids@redhat.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6351
* cleanup: add .gitattributes to control eol style explicitlyAlon Bar-Lev2012-04-262-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Having the text auto detection is a risk, as the detection may detect text files that are not text and vise versa. Having global setting will create confusion and differentiate between users. So this patch also move this to local repository. Having git to check out files differently in different OS is also a not correct, as checkouts may be used in shares or in *NIX emulation environments, so it have no effect. Another issue is packaging, if we change out the tree differently in several OSes, we may have different package content, which is something that should be avoided. Currently any editor of MS supports LF end of lines, so there is no need to convert source files while checking out. The visual studio files should be stored as CRLF as they are generated by visual studio every save, in a way that CRLF are added. I handled only the files that may be touch by MS users. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Fabian Knittel <fabian.knittel@lettink.de> Signed-off-by: David Sommerseth <davids@redhat.com>
* Ensure sys/un.h autoconf detection includes sys/socket.hAdriaan de Jong2012-04-261-2/+2
| | | | | | | | This is required to build an Android binary. Signed-off-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: Alon Bar-Lev <alon.barlev@gmail.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* cleanup: remove C++ commentsAlon Bar-Lev2012-04-261-3/+3
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Fabian Knittel <fabian.knittel@lettink.de> Signed-off-by: David Sommerseth <davids@redhat.com>
* cleanup: plugin: support C++ pluginAlon Bar-Lev2012-04-261-0/+8
| | | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Fabian Knittel <fabian.knittel@lettink.de> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: properly detect TUNSETPERSISTAlon Bar-Lev2012-04-264-7/+17
| | | | | | | | | Do not rely on system symbol throught sources but on autoconf detection. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: properly detect netinet/ip.h structsAlon Bar-Lev2012-04-261-0/+3
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: fix some statement left from conversionAlon Bar-Lev2012-04-261-6/+6
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* cleanup: gc usageAlon Bar-Lev2012-04-025-44/+55
| | | | | | | | | | | | | | | | Cleanup of "Use the garbage collector when retrieving x509 fields" patch series. Discussed at [1]. There should be an effort to produce common function prologue and epilogue, so that cleanups will be done at single point. [1] http://comments.gmane.org/gmane.network.openvpn.devel/5401 Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Adriaan de Jong <dejong@fox-it.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* cleanup: avoid using ~0 - windowsAlon Bar-Lev2012-04-023-36/+42
| | | | | | | | | | | | Use the following constants: - METRIC_NOT_USED - TUN_ADAPTER_INDEX_INVALID Modified: Use MAXDWORD for route loop. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: David Sommerseth <davids@redhat.com>
* cleanup: avoid using ~0 - netmaskAlon Bar-Lev2012-04-026-10/+12
| | | | | | | | Use IPV4_NETMASK_HOST constant. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: David Sommerseth <davids@redhat.com>
* cleanup: avoid using ~0 - ipv6Alon Bar-Lev2012-04-021-1/+1
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: David Sommerseth <davids@redhat.com>
* cleanup: avoid using ~0 - genericAlon Bar-Lev2012-04-024-2/+7
| | | | | | | | Use limits.h for maximum value. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: David Sommerseth <davids@redhat.com>
* cleanup: flags should not be boolAlon Bar-Lev2012-03-302-6/+6
| | | | | | | | | | | | Discussed at [1][2][3]. [1] https://bugs.gentoo.org/show_bug.cgi?id=297854#c2 [2] https://297854.bugs.gentoo.org/attachment.cgi?id=214304 [3] http://sourceforge.net/mailarchive/forum.php?thread_name=20120325111517.GI1359%40greenie.muc.de&forum_name=openvpn-devel Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: David Sommerseth <davids@redhat.com>
* Migrated x509_get_sha1_hash to use the garbage collectorAdriaan de Jong2012-03-304-42/+11
| | | | | | | Signed-off-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: James Yonan <james@openvpn.net> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* Migrated x509_get_serial to use the garbage collectorAdriaan de Jong2012-03-304-47/+26
| | | | | | | Signed-off-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: James Yonan <james@openvpn.net> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* Migrated x509_get_subject to use of the garbage collectorAdriaan de Jong2012-03-308-75/+51
| | | | | | | | | This also cleans up a messy call in pkcs11.c to _openssl_get_subject, as discussed at FOSDEM. Signed-off-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: James Yonan <james@openvpn.net> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* Enable pedantic in windows compilationAlon Bar-Lev2012-03-301-1/+2
| | | | | | | | Apparently -ansi undef WIN32 macro. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* Fixed off-by-one in serial length calculationAdriaan de Jong2012-03-291-1/+1
| | | | | | | | | The serial length was one digit too short, resulting in missing digits at the end of the certificate's stringified serial number. Signed-off-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* Remove calls to OpenSSL when building with --disable-sslIgor Novgorodov2012-03-293-4/+19
| | | | | | | | | | | | | | Move OpenSSL calls out from the generic crypto layer and into the OpenSSL specific layer. Also don't load all algortihms if SSL isn't enabled. Error strings will also not be loaded into memory if ENABLE_SMALL is configured. Signed-off-by: Igor Novgorodov <igor@novg.net> Acked-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: msvc: upgrade to Visual Studio 2010 + fixupsAlon Bar-Lev2012-03-2920-1292/+1121
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Samuli Seppänen <samuli@openvpn.net> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: tap: search for tap headerAlon Bar-Lev2012-03-282-17/+17
| | | | | | | | | | | | Windows and solaris has something in common, in both the tap header is external. So make the Windows tap-windows.h search common to all platform. Display an error if we cannot find tap header. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: openbsd: detect netinet/ip.h correctlyAlon Bar-Lev2012-03-281-0/+3
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: assume dlfcn is available on all supported platformsAlon Bar-Lev2012-03-261-1/+0
| | | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Tested-by: Gert Doering <gert@greenie.muc.de> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: windows: set vendor to openvpn project + cleanupsAlon Bar-Lev2012-03-262-5/+5
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: enable lzo by defaultAlon Bar-Lev2012-03-261-2/+2
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: autoconf: misc sockets fixupsAlon Bar-Lev2012-03-261-25/+28
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: ax_varargs.m4: fixupsAlon Bar-Lev2012-03-261-4/+6
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: use tap-windows.h as external dependencyAlon Bar-Lev2012-03-246-72/+17
| | | | | | | | tap-windows.h is provided by the tap project Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Samuli Seppänen <samuli@openvpn.net> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: distribute samples in windowsAlon Bar-Lev2012-03-242-0/+17
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Samuli Seppänen <samuli@openvpn.net> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: windows: install version.sh to allow installer read versionAlon Bar-Lev2012-03-244-0/+11
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Samuli Seppänen <samuli@openvpn.net> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: move wrappers into platform moduleAlon Bar-Lev2012-03-2423-468/+584
| | | | | | | | | + Some fixups within the platform.c functions. - need to check environment set on Windows. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: David Sommerseth <davids@redhat.com>
* cleanup: move console related function into its own moduleAlon Bar-Lev2012-03-249-215/+286
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: move inet_ntop(), inet_pton() emulation into compatAlon Bar-Lev2012-03-228-64/+183
| | | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Samuli Seppänen <samuli@openvpn.net> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: move daemon() emulation into compatAlon Bar-Lev2012-03-227-38/+111
| | | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Samuli Seppänen <samuli@openvpn.net> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: move gettimeofday() emulation to compatAlon Bar-Lev2012-03-2217-119/+192
| | | | | | | | | | Remove all references to gettimeofday() from main project. SIDE EFFECT: mingw will use its own internal gettimeofday(). Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: split out compatAlon Bar-Lev2012-03-2211-38/+278
| | | | | | | | | | compat should not use any of the main project headers or conventions, it should be a standalone library that provides missing library functions. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: move out config.h include from sysheadAlon Bar-Lev2012-03-2268-9/+403
| | | | | | | | | | | Yet another step in reducing the syshead.h content. Conditional compilation of sources needs to be based on a minimum program prefix (config.h only). Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: win-msvc: msbuild formatAlon Bar-Lev2012-03-2229-21/+1527
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Samuli Seppänen <samuli@openvpn.net> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: autoconf: update defaults for optionsAlon Bar-Lev2012-03-221-28/+28
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Samuli Seppänen <samuli@openvpn.net> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: proper crypto detection and usageAlon Bar-Lev2012-03-2245-415/+412
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Adriaan de Jong <dejong@fox-it.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: proper lzo detection and usageAlon Bar-Lev2012-03-2212-81/+87
| | | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com>
* build: properly process lzo-stubAlon Bar-Lev2012-03-225-38/+28
| | | | | | Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: Samuli Seppänen <samuli@openvpn.net> Signed-off-by: David Sommerseth <davids@redhat.com>