Commit Graph

1118 Commits

Author SHA1 Message Date
Alon Bar-Lev
e4d6066229 build: update INSTALL to recent changes
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: 1338785107-592-1-git-send-email-alon.barlev@gmail.com
URL: http://article.gmane.org/gmane.network.openvpn.devel/6676
Signed-off-by: David Sommerseth <davids@redhat.com>
2012-06-04 13:28:05 +02:00
David Sommerseth
e829888535 Remove two unused functions
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
2012-06-01 23:25:57 +02:00
Alon Bar-Lev
6440083e2a build: cleanup: yet another forgotten brackets
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: David Sommerseth <davids@redhat.com>
Message-Id: 1336200540-10327-1-git-send-email-alon.barlev@gmail.com
URL: http://article.gmane.org/gmane.network.openvpn.devel/6434
Signed-off-by: David Sommerseth <davids@redhat.com>
2012-06-01 23:25:10 +02:00
Gert Doering
722027a279 t_client.sh iproute2 script fixes
Test for existance of "iproute2" with "-n" (Alon)

Work around "ip -6 route show" behaviour on FC14 where some parts of
the IPv6 route cache would be displayed, which has no relevance to
OpenVPN but breaks before/after comparison.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <davids@redhat.com>
Message-Id: 20120601151507.GE400@greenie.muc.de
URL: http://article.gmane.org/gmane.network.openvpn.devel/6637
Signed-off-by: David Sommerseth <davids@redhat.com>
2012-06-01 17:28:36 +02:00
Alon Bar-Lev
7046ff20f9 build: add git revision to --version output if build from git repository
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>
2012-06-01 15:34:49 +02:00
Alon Bar-Lev
f641637a73 build: detect sys/wait.h required for *bsd
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: 1336813338-9219-1-git-send-email-alon.barlev@gmail.com
URL: http://article.gmane.org/gmane.network.openvpn.devel/6532
Signed-off-by: David Sommerseth <davids@redhat.com>
2012-06-01 14:06:03 +02:00
Alon Bar-Lev
46977f2907 build: insall README* document using build system
Purpose: make distro packager task simpler, more flexible to provide
more documentation without changing the packaging script.

Remove installation related documents from rpm as package already
installed when viewed.

+Workaround rpm bug[1].

[1] http://rpm.org/ticket/836

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: David Sommerseth <davids@redhat.com>
Message-Id: 1336849433-23066-1-git-send-email-alon.barlev@gmail.com
URL: http://article.gmane.org/gmane.network.openvpn.devel/6536
Signed-off-by: David Sommerseth <davids@redhat.com>
2012-06-01 13:47:05 +02:00
Alon Bar-Lev
03d9cb1ec6 build: spec: we support openssl >= 0.9.7
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: David Sommerseth <davids@redhat.com>
Message-Id: 1337034580-26987-2-git-send-email-alon.barlev@gmail.com
URL: http://article.gmane.org/gmane.network.openvpn.devel/6589
Signed-off-by: David Sommerseth <davids@redhat.com>
2012-06-01 13:42:39 +02:00
Alon Bar-Lev
893f27b164 cleanup: spec: make space/tab consistent
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: David Sommerseth <davids@redhat.com>
Message-Id: 1337034580-26987-1-git-send-email-alon.barlev@gmail.com
URL: http://article.gmane.org/gmane.network.openvpn.devel/6590
Signed-off-by: David Sommerseth <davids@redhat.com>
2012-06-01 13:39:05 +02:00
Alon Bar-Lev
69c0db7c71 cleanup: update .gitignore
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: David Sommerseth <davids@redhat.com>
Message-Id: 1337120475-3959-1-git-send-email-alon.barlev@gmail.com
URL: http://article.gmane.org/gmane.network.openvpn.devel/6596
Signed-off-by: David Sommerseth <davids@redhat.com>
2012-06-01 13:32:32 +02:00
Alon Bar-Lev
13b38eb0a3 build: check minimum polarssl version
Pre 1.1 is unsupported, API was changed.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Reviewed-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: David Sommerseth <davids@redhat.com>
Message-Id: 1337598254-32641-1-git-send-email-alon.barlev@gmail.com
URL: http://article.gmane.org/gmane.network.openvpn.devel/6613
Signed-off-by: David Sommerseth <davids@redhat.com>
2012-06-01 12:52:29 +02:00
Gert Doering
47c990009c repair t_client.sh test after build system revolution
- run t_client.sh at "make check" time
- in t_client.sh, read t_client.rc from source *or* build dir (as before)
- @IP@ evaluates to "" now (not "ip") if iproute2 not found - adapt script
- introduce $SETUP_TIME_WAIT to delay "waiting for openvpn startup" longer
  than the default delay of 10 seconds - this is needed for test servers
  with a high network RTT

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <davids@redhat.com>
Message-Id: 20120527202737.GV1161@greenie.muc.de
URL: http://article.gmane.org/gmane.network.openvpn.devel/6616
Signed-off-by: David Sommerseth <davids@redhat.com>
2012-06-01 12:30:46 +02:00
David Sommerseth
4f6f17767d Some filesystems don't like ':', which is a path 'make dist' would use
In commit 7a84540104 the version.m4 was modified to remove the
alpha1 tag.  But then Alon Bar-Lev noticed that NTFS wasn't happy about
the ':' character.  So let's rather just skip the complete 'git:'
prefix and use just 'master' instead.

Reported-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
2012-05-04 16:37:00 +02:00
David Sommerseth
7a84540104 Change version to indicate the master branch is not a version
This also indicates that we're way past the released 2.3-alpha1

Signed-off-by: David Sommerseth <davids@redhat.com>
2012-05-03 09:14:03 +02:00
David Sommerseth
0576a9f2f8 Simplify check_cmd_access() function
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
2012-05-03 09:14:03 +02:00
Alon Bar-Lev
a0e8911bf3 build: windows: convert resources to UTF-8
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>
2012-05-03 08:51:32 +02:00
Jonathan K. Bullard
d62859980c Clarified the docs and help screen about what a 'cmd' is
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>
2012-05-02 19:33:50 +02:00
Jonathan K. Bullard
a050bcef9c Fix file access checks on commands
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>
2012-05-02 19:25:08 +02:00
Adriaan de Jong
4b87c86833 Removed stray "Fox-IT hardening" string.
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>
2012-04-28 00:19:52 +02:00
Alon Bar-Lev
8993847de7 build: fix typo in --enable-save-password
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: David Sommerseth <davids@redhat.com>
Message-Id: 1335534054-14895-1-git-send-email-alon.barlev@gmail.com
URL: http://article.gmane.org/gmane.network.openvpn.devel/6371
Signed-off-by: David Sommerseth <davids@redhat.com>
2012-04-28 00:13:40 +02:00
Alon Bar-Lev
4029971240 build: use stdbool.h if available
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>
2012-04-28 00:09:46 +02:00
Adriaan de Jong
34091048af Updated README.polarssl with build system changes.
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>
2012-04-27 23:56:55 +02:00
Adriaan de Jong
1d92d06dca Removed support for PolarSSL < 1.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>
2012-04-27 23:48:49 +02:00
Adriaan de Jong
21fdfb73d5 Use POLARSSL_CFLAGS instead of POLARSSL_CRYPTO_CFLAGS in configure.ac
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>
2012-04-27 23:37:22 +02:00
Adriaan de Jong
0f25d2969f Added a configuration option to enable prediction resistance in the PolarSSL 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>
2012-04-27 23:33:27 +02:00
Adriaan de Jong
6efeaa2e44 Added support for new PolarSSL 1.1 RNG
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>
2012-04-27 23:31:44 +02:00
Alon Bar-Lev
4e846b39a3 crash: packet_id_debug_print: sl may be null
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>
2012-04-27 13:08:18 +02:00
David Sommerseth
bff413d5c4 Clean-up: Presume that Linux is always IPv6 capable at build time
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 51bd56f46f
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 7c0a2b5f2b 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
2012-04-27 13:00:12 +02:00
Alon Bar-Lev
f99d8fa79d cleanup: add .gitattributes to control eol style explicitly
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>
2012-04-26 20:54:26 +02:00
Adriaan de Jong
a2d747bb03 Ensure sys/un.h autoconf detection includes sys/socket.h
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>
2012-04-26 20:46:38 +02:00
Alon Bar-Lev
a9da960dc1 cleanup: remove C++ comments
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>
2012-04-26 20:31:30 +02:00
Alon Bar-Lev
13663f206d cleanup: plugin: support C++ plugin
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>
2012-04-26 20:17:32 +02:00
Alon Bar-Lev
88f3a4026c build: properly detect TUNSETPERSIST
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>
2012-04-26 20:04:55 +02:00
Alon Bar-Lev
4025a59575 build: properly detect netinet/ip.h structs
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>
2012-04-26 20:01:32 +02:00
Alon Bar-Lev
7c0a2b5f2b build: fix some statement left from conversion
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>
2012-04-26 19:59:32 +02:00
Alon Bar-Lev
75b49e4064 cleanup: gc usage
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>
2012-04-02 11:54:59 +02:00
Alon Bar-Lev
12e46092ba cleanup: avoid using ~0 - windows
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>
2012-04-02 11:54:12 +02:00
Alon Bar-Lev
32e576d270 cleanup: avoid using ~0 - netmask
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>
2012-04-02 11:54:09 +02:00
Alon Bar-Lev
ffa1184d7f cleanup: avoid using ~0 - ipv6
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>
2012-04-02 11:54:05 +02:00
Alon Bar-Lev
112731fcc3 cleanup: avoid using ~0 - generic
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>
2012-04-02 11:54:01 +02:00
Alon Bar-Lev
5cfe3d4c18 cleanup: flags should not be bool
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>
2012-03-30 23:19:11 +02:00
Adriaan de Jong
8e5613c2a8 Migrated x509_get_sha1_hash to use the garbage collector
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>
2012-03-30 22:56:47 +02:00
Adriaan de Jong
025f30d7c6 Migrated x509_get_serial to use the garbage collector
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>
2012-03-30 22:50:47 +02:00
Adriaan de Jong
00b973f8af Migrated x509_get_subject to use of the garbage collector
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>
2012-03-30 11:33:03 +02:00
Alon Bar-Lev
3144411183 Enable pedantic in windows compilation
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>
2012-03-30 11:22:57 +02:00
Adriaan de Jong
2e2939e8b2 Fixed off-by-one in serial length calculation
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>
2012-03-29 14:47:13 +02:00
Igor Novgorodov
39b54baa36 Remove calls to OpenSSL when building with --disable-ssl
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>
2012-03-29 14:36:48 +02:00
Alon Bar-Lev
3c1971de87 build: msvc: upgrade to Visual Studio 2010 + fixups
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>
2012-03-29 12:31:10 +02:00
Alon Bar-Lev
7cacdfd4b7 build: tap: search for tap header
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>
2012-03-28 10:50:52 +02:00
Alon Bar-Lev
2a7448912e build: openbsd: detect netinet/ip.h correctly
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>
2012-03-28 10:50:36 +02:00