summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Completely remove ancient IANA port warning.Arne Schwabe2012-06-223-10/+0
| | | | | | | | Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: 1340044749-10694-3-git-send-email-arne@rfc2549.org URL: http://article.gmane.org/gmane.network.openvpn.devel/6742 Signed-off-by: David Sommerseth <davids@redhat.com>
* Only use tmpdir if tmp_dir is really used.Arne Schwabe2012-06-222-3/+8
| | | | | | | | | | | | This fixes starting openvpn compiled as client only version of systems that have no /tmp (Android). --tmp-dir could only be set if P2MP_SERVER has been enabled too. Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: 1340044749-10694-2-git-send-email-arne@rfc2549.org URL: http://article.gmane.org/gmane.network.openvpn.devel/6741 Signed-off-by: David Sommerseth <davids@redhat.com>
* cleanup: pkcs11.c: resolve waningsAlon Bar-Lev2012-06-221-1/+1
| | | | | | | | | | | src/openvpn/pkcs11.c:794:2: warning: passing argument 1 of ‘pkcs11h_setPINPromptHook’ from incompatible pointer type Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1340040904-23950-1-git-send-email-alon.barlev@gmail.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6738 Signed-off-by: David Sommerseth <davids@redhat.com>
* Remove #include "config.h" from ssl_polarssl.hGert Doering2012-06-151-1/+0
| | | | | | | | | | | This include is superfluous, as all callers already include config.h - and under certain combinations of configure options and syshead.h Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: Alon Bar-Lev <alon.barlev@gmail.com> Message-Id: 20120614144454.GX1059@greenie.muc.de URL: http://article.gmane.org/gmane.network.openvpn.devel/6723 Signed-off-by: David Sommerseth <davids@redhat.com>
* build: add --with-special-build to provide special build stringAlon Bar-Lev2012-06-131-0/+3
| | | | | | | | | | | | | | Special build string is printed when --version is specified. Empty = no special build. This is handy when building a snapshot or if not git repository. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1336204877-3564-1-git-send-email-alon.barlev@gmail.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6435 Signed-off-by: David Sommerseth <davids@redhat.com>
* Add missing pieces to IPv6 route gateway handling.Gert Doering2012-06-132-14/+64
| | | | | | | | | | | | | | | | | | | | | OpenVPN on Linux (iproute2+ifconfig), FreeBSD and MacOS X (Darwin) normally points routes directly towards the "tun" interface, obviating the need for a gateway. For "tap" interfaces, now add gateway spec to linux route command, and replace "-iface <dev>" with gateway spec (both together do not work) on FreeBSD and MacOS X. Also adapt "route delete" appropriately, otherwise route will not be found. All other platforms already use the gateway address for tun and tap, because there's no way to install a route "towards an interface" there. Remove warning about missing IPv6 route gateway handling. Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1339342891-28443-5-git-send-email-gert@greenie.muc.de URL: http://article.gmane.org/gmane.network.openvpn.devel/6712 Signed-off-by: David Sommerseth <davids@redhat.com>
* Remove warning about "explicit support for IPv6 tun devices is not provided ↵Gert Doering2012-06-131-1/+1
| | | | | | | | | | for this OS" for MacOS X (because it *is*). Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1339342891-28443-4-git-send-email-gert@greenie.muc.de URL: http://article.gmane.org/gmane.network.openvpn.devel/6716 Signed-off-by: David Sommerseth <davids@redhat.com>
* remove "*option" element in "struct route_ipv6"Gert Doering2012-06-131-1/+0
| | | | | | | | | | | this used to point to the "route_ipv6_option" that created this specific route entry, but nobody ever queried this field -> dead code. Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1339342891-28443-3-git-send-email-gert@greenie.muc.de URL: http://article.gmane.org/gmane.network.openvpn.devel/6714 Signed-off-by: David Sommerseth <davids@redhat.com>
* cleanup and redefine metric handling for IPv6 routesGert Doering2012-06-133-6/+9
| | | | | | | | | | | | "no metric set" is now stored as "-1" "metric 0" means "on-link route" (what the BSDs do) properly initialize metric value to "0" for on-link IPv6 net on BSDs Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1339342891-28443-2-git-send-email-gert@greenie.muc.de URL: http://article.gmane.org/gmane.network.openvpn.devel/6710 Signed-off-by: David Sommerseth <davids@redhat.com>
* Fix reported compile issues on OSX 10.6.8Frank de Brabander2012-06-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not the a problem when building using the latest Mac OS X SDK. I've did a quick search and it seems to be a more common issue on some (old) Darwin platforms. [ Additional review note from Gert Doering: IPV6_PKTINFO is part of the "extended socket API" defined in RFC2292. That RFC used IPV6_PKTINFO both for receiving the destination IPv6 address in UDP packets, and for setting the source address for outgoing packets. RFC2292 was updated by RFC3542, which renamed the "receive" function to IPV6_RECVPKTINFO, leaving the "sending" function as IPV6_PKTINFO - and, subsequently, in FreeBSD they have different "setsockopt()" opcodes. So, on a system that has *both*, we need to use IPV6_RECVPKTINFO for receving (turning it on with setsockopt) to make --multihome work, and IPV6_PKTINFO for sending (which we don't actually do). On a system that only has IPV6_PKTINFO, because it's API only implements 2292 (MacOS up until 10.6), use IPV6_PKTINFO for setsockopt(). Now, the interesting question is whether a 10.5-compiled openvpn.exe will behave correctly under 10.7 if --multihome is active... ] Signed-off-by: Frank de Brabander <debrabander@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: eb2837a3-ce55-4f52-b2fe-f822efc661f7@l14g2000vbe.googlegroups.com URL: http://article.gmane.org/gmane.network.openvpn.devel/5591 Signed-off-by: David Sommerseth <davids@redhat.com>
* Implement search for "first free" tun/tap device on SolarisGert Doering2012-06-131-8/+32
| | | | | | | | | | | | | Without this patch, Solaris will do "--dev tun3" just fine, but "--dev tun" will either use "tun0" if that is available, or fail. With the patch, the first available device is searched if "--dev tun" or "--dev tap" (without a number) is specified. Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 20120607174638.GW1059@greenie.muc.de URL: http://article.gmane.org/gmane.network.openvpn.devel/6705 Signed-off-by: David Sommerseth <davids@redhat.com>
* remove the --auto-proxy option from openvpnHeiko Hund2012-06-137-330/+11
| | | | | | | | | | | | | | During discussion on FOSDEM 2012 it was decided that proxy auto detection is best done in the GUI as it's highly platform specific and shouldn't be handled in openvpn itself for every supported platform in openvpn itself. This removes --auto-proxy from openvpn. Signed-off-by: Heiko Hund <heiko.hund@sophos.com> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1328446029-30523-1-git-send-email-heiko.hund@sophos.com URL: http://article.gmane.org/gmane.network.openvpn.devel/5333 Signed-off-by: David Sommerseth <davids@redhat.com>
* Add the name of the context where option is not allowed to the error message.Arne Schwabe2012-06-071-2/+3
| | | | | | | | | | | | | | | | | Changes Options error: option 'dhcp-option' cannot be used in this context to P:Options error: option 'dhcp-option' cannot be used in this context ([PUSH-OPTIONS]) Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1338642223-20324-6-git-send-email-arne@rfc2549.org URL: http://article.gmane.org/gmane.network.openvpn.devel/6646 Signed-off-by: David Sommerseth <davids@redhat.com>
* Explain that route-nopull also causes the client to ignore dhcp options.Arne Schwabe2012-06-071-1/+1
| | | | | | | | Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1338642223-20324-5-git-send-email-arne@rfc2549.org URL: http://article.gmane.org/gmane.network.openvpn.devel/6649 Signed-off-by: David Sommerseth <davids@redhat.com>
* Add the query to the error message. Makes the diagnose what went wrong from ↵Arne Schwabe2012-06-071-1/+1
| | | | | | | | | | logs easier. Signed-off-by: Arne Schwabe <arne@rfc2549.org> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1338642223-20324-3-git-send-email-arne@rfc2549.org URL: http://article.gmane.org/gmane.network.openvpn.devel/6645 Signed-off-by: David Sommerseth <davids@redhat.com>
* Remove two unused functionsDavid Sommerseth2012-06-012-19/+0
| | | | | | | | | | Both is_persist_option() and is_stateful_restart() functions where never used anywhere in the code. Remove them. Signed-off-by: David Sommerseth <davids@redhat.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: 1336036240-23838-1-git-send-email-dazo@users.sourceforge.net URL: http://article.gmane.org/gmane.network.openvpn.devel/6402
* build: add git revision to --version output if build from git repositoryAlon Bar-Lev2012-06-011-0/+6
| | | | | | | | | | | If source is located at git repository, acquire branch and revision of head to be printed at --version output. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1336199983-9916-1-git-send-email-alon.barlev@gmail.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6431 Signed-off-by: David Sommerseth <davids@redhat.com>
* Simplify check_cmd_access() functionDavid Sommerseth2012-05-031-22/+26
| | | | | | | | | | | | | | | | | | | To avoid confusion between check_file_access() and check_cmd_access() in the future, remove unneeded arguments from check_cmd_access() As a command will always be a file, it should always check for CHKACC_FILE and nothing else. And as the commands always will need X_OK, check only for that. One change from earlier behaviour is that R_OK is not checked for. The reason is that only scripts require R_OK to work. However, a system might be installed with binaries with only X_OK set. If a script is missing R_OK, then the execution will fail due to lacking permissions. Signed-off-by: David Sommerseth <davids@redhat.com> Acked-by: Alon Bar-Lev <alon.barlev@gmail.com> Message-Id: 1335981252-7390-1-git-send-email-davids@redhat.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6391
* build: windows: convert resources to UTF-8Alon Bar-Lev2012-05-032-2/+6
| | | | | | | | | | | Visual Studio 2010 editor supports UTF-8 files, we can store files in standard encoding. Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1335637741-15721-1-git-send-email-alon.barlev@gmail.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6380 Signed-off-by: David Sommerseth <davids@redhat.com>
* Clarified the docs and help screen about what a 'cmd' isJonathan K. Bullard2012-05-021-13/+13
| | | | | | | | | | | | | | | | | | This also changes the descriptions of several options to note that they accept a "command"; change the description of --client-connect and --client-disconnect indicate that the temporary file's path is passed as the last argument to the command, not the first argument; and Adds a description of --route-pre-down to the descriptions of the other --route options. [DS: This patch is based on parts of the options.c.diff and the complete openvpn.8.diff patch sent to the mailing list - where these docs changes are merged together into this patch] Signed-off-by: Jonathan K. Bullard <jkbullard@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: CAEsd45RkyJw6yUk1Jwkip70HkCjKYoU+V=do3N7SH7JOaHBZdw@mail.gmail.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6194 Signed-off-by: David Sommerseth <davids@redhat.com>
* Fix file access checks on commandsJonathan K. Bullard2012-05-021-21/+68
| | | | | | | | | | | | | | | | | | | | | The current implementation of check_file_access() does not consider that some options take scripts and executables as input. When some of these commands are given arguments in the OpenVPN configuration, check_file_access() would take those arguments as a part of the file name to the command. Thus the file check would fail. This patch improves that by introducing a check_cmd_access() function which first splits out the arguments to the command before checking if the file with the command is available. [DS: This patch is splitted out from the options.c.diff patch sent to the mailing list - where only the function changes is included here] Signed-off-by: Jonathan K. Bullard <jkbullard@gmail.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: CAEsd45RkyJw6yUk1Jwkip70HkCjKYoU+V=do3N7SH7JOaHBZdw@mail.gmail.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6194 Signed-off-by: David Sommerseth <davids@redhat.com>
* Removed stray "Fox-IT hardening" string.Adriaan de Jong2012-04-281-1/+1
| | | | | | | | Signed-off-by: Adriaan de Jong <dejong@fox-it.com> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 1333351687-3732-5-git-send-email-dejong@fox-it.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6212 Signed-off-by: David Sommerseth <davids@redhat.com>
* build: use stdbool.h if availableAlon Bar-Lev2012-04-284-13/+14
| | | | | | | | | | | | | | | | | 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>
* 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>
* Added a configuration option to enable prediction resistance in the PolarSSL ↵Adriaan de Jong2012-04-276-0/+55
| | | | | | | | | | | | | | | | | | 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-271-19/+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: 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>
* build: properly detect TUNSETPERSISTAlon Bar-Lev2012-04-263-7/+7
| | | | | | | | | 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>
* 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-022-1/+5
| | | | | | | | 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>
* 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-2912-1186/+1001
| | | | | | 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-281-1/+1
| | | | | | | | | | | | 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: 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: use tap-windows.h as external dependencyAlon Bar-Lev2012-03-242-2/+3
| | | | | | | | 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: 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-227-63/+182
| | | | | | | 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-2215-117/+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>