0
0
mirror of https://github.com/OpenVPN/openvpn.git synced 2024-09-20 12:02:28 +02:00
Commit Graph

42 Commits

Author SHA1 Message Date
Greg Cox
fdfbd4441c Explain structver usage in sample defer plugin.
sample-plugins/defer/simple.c uses OPENVPN_PLUGINv3_STRUCTVER settings
that may not be obvious to a new author.  Add a comment to reduce
possible confusion.
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <1612163389-16421-1-git-send-email-gcox@mozilla.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21540.html

Signed-off-by: Gert Doering <gert@greenie.muc.de>
2021-02-03 11:25:07 +01:00
Arne Schwabe
ce652e7d38 Remove inetd support from OpenVPN
This code is from another time and has almost no relevance today.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20201214172407.30451-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21360.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2021-01-30 11:03:40 +01:00
Greg Cox
a385a3e8a2 More explicit versioning compatibility in sample-plugins/defer/simple.c
While not required, adding openvpn_plugin_min_version_required_v1 helps
by making an example for others to copy, and helps to explicitly call
attention to the difference between the API version number and the
struct version number in v3 calls.
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <1611778909-20630-2-git-send-email-gcox@mozilla.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21508.html

Signed-off-by: Gert Doering <gert@greenie.muc.de>
2021-01-30 10:44:58 +01:00
Greg Cox
7d1361c18f Update openvpn_plugin_func_v2 to _v3 in sample-plugins/defer/simple.c
This isn't strictly required, but it modernizes the functions used.
This change makes _open the same parameter form as _func (for better
parallelism in function writing) and includes a check for the correct
struct version, as recommended by openvpn-plugin.h
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <1611778909-20630-1-git-send-email-gcox@mozilla.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21507.html

Signed-off-by: Gert Doering <gert@greenie.muc.de>
2021-01-30 10:29:53 +01:00
Greg Cox
2d7e1954ca Fix naming error in sample-plugins/defer/simple.c
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1611558957-2958-1-git-send-email-gcox@mozilla.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21482.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2021-01-25 08:20:40 +01:00
Gert Doering
452e016cba clean up / rewrite sample-plugins/defer/simple.c
If we ship something that we consider a form of documentation
"this is how to write an OpenVPN plugin" it should meet our standards
for secure and modern code.  This plugin did neither.

  - get rid of system() calls, especially those that enabled a
    remote-root exploit if this code was used "as is"

  - change logging from printf() to OpenVPN's plugin_log()

  - this requires changing to openvpn_plugin_open_v3() to get
    to the function pointers

  - change wacky "background and sleep in the shell call" to the
    double-fork/waitpid model we use in plugins/auth-pam
    (copy-paste code reuse)

  - OpenVPN 2.5 and later react badly to OPENVPN_PLUGIN_FUNC_ERROR
    returns to OPENVPN_PLUGIN_ENABLE_PF calls (SIGSEGV crash), so
    always return SUCCESS.  Only hook ENABLE_PF if that functionality
    is actually requested ("setenv test_packet_filter NN").

  - change deeply-nested functions auth_user_pass_verify() and
    tls_final() to use early-return style

  - actually make defered PF setup *work* with recent OpenVPNs
    (pre-creating temp files broke this, so unlink() the pre-created
    file in the ENABLE_PF hook, and re-create asyncronously later)

  - add lots of comments explaining why we do things this way

Security issue reported by "oxr463" on HackerOne.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20210121172536.32500-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21466.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2021-01-23 14:28:43 +01:00
Arne Schwabe
cb70cf5188 Remove NULL checks before calling free
We (and OpenSSL) already use calling free on null pointers in a number
of places and also C99 standards says free(NULL) does nothing.

The if (x) free(x) calls more often make code harder to read, instead
of easier, remove these NULL checks in favour of directly calling
free(x).

The OpenSSL *_free methods are also safe to call with NULL and
pkcs11h_certificate_freeCertificateIdList is also safe to be called with
NULL.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20201023113431.26691-5-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21216.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2020-10-24 21:49:40 +02:00
Gert Doering
94cebf8261 Add demo plugin that excercises "CLIENT_CONNECT" and "CLIENT_CONNECT_V2" paths
This is a new "samples" plugin which does not do many useful things,
besides
 - show how a plugin is programmed
 - how the various messages get dispatched
 - how to pass back information from a client-connect/v2 plugin
 - how to do async-cc plugins  [not yet implemented]

the operation of the plugin is controlled by UV_WANT_* environment
variables
controlled by the client ("--setenv UV_WANT_CC_FAIL 1 --push-peer-info"),
to "fail CLIENT_CONNECT" or "use async-cc for CLIENT_CONNECT_V2" or
"send 'disable' back from ...") - which is useful for automated testing
of server success/defer/fail code paths for the CLIENT_CONNECT_* functions.

See samples/sample-plugins/client-connect/README for details how to do
this.

v2:
  - implement async / deferred operation both for CLIENT_CONNECT and
    CLIENT_CONNECT_V2 plugin calls
  - implement returning openvpn-controlled (setenv) config snippets
    (so the client side can verify in automated testing that the plugin
    operated correctly, without hard-coding something in the plugin code)

v3:
  - remove -Wno-unused-variable from Makefile
  - remove unused "char ** argv" (commented out, but kept as reference)

v4:
  - upgrade to use the build infra brought by commit 0b5141d8f9
  - remove local Makefile
  - include "config.h" to get what is needed to get rid of the strdup()
    warning
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <20200917161909.11573-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21047.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2020-09-18 07:54:10 +02:00
David Sommerseth
6345cea86b build: Fix make distclean/distcheck
In commit 0b5141d8f9 the sample-plugins got partially migrated to
automake.  But since it was not fully integrated within the full
standard build, the sample/sample-plugins/Makefile was not removed
by 'make distclean', which annoys 'make distcheck'.

The simplest way is just to explicitly enlist this Makefile in the list
of files 'make distclean' should remove.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200916195616.30633-1-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21026.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2020-09-16 22:29:10 +02:00
David Sommerseth
0b5141d8f9 sample-plugins: Partially autotoolize the sample-plugins build
The sample-plugins have their own set of build/winbuild scripts in each
of these plugin directories.  This does not give a good way to reuse
various macros the autoconf/automake/configure process enables; which
can contain important macros to make some code build without errors or
warnings.

Normally we would embrace the full autoconf/automake approach. But this
is sample code which we only want to build per request and the built
code should not be installed anywhere via 'make install'.  But since we
do use libtool other plug-ins being installed and automake gets kind of
cranky when it comes to define certain build targets not following the
expected use cases, we try to only embrace just enough of automake to
get our main goals achieved.

This changeset kicks out the build scripts and replaces them with a
single Makefile.plugins file, which defines the plugins we want to build
by default when running 'make from the sample-plugins directory.
Neither of these plugins are otherwise built by default.  No sample-plugins
are being installed.  But we have enough strings attached to automake
to grab the CFLAGS and LDFLAGS used by the rest of the code.  This also
makes it easy to use #include "config.h" in sample code, to also get
various macros defined by the ./configure run.

This patch does not touch the winbuild scripts, as it seems building
these sample-plugins on Windows requires a bit different compile and
linking steps than *nix systems in general.

Signed-off-by: David Sommerseth <davids@openvpn.net>

Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200916141956.1277-1-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21020.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2020-09-16 16:22:44 +02:00
Gert Doering
a61c08a2c8 Handle NULL returns from calloc() in sample plugins.
This is basic housekeeping, adding NULL checks to context initialization
of the sample plugin collection which are missing it.  Realistically,
this can never happen, but since these are supposed to be "good examples",
not checking calloc() return isn't one.

Trac: #587

Reported-By: Dogbert (in Trac)
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <20200909104837.6123-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg20922.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2020-09-11 19:42:22 +02:00
Arne Schwabe
30d19c6ebe Rename ncp-ciphers to data-ciphers
The change in name signals that data-ciphers is the preferred way to
configure data channel (and not --cipher). The data prefix is chosen
to avoid ambiguity and make it distinct from tls-cipher for the TLS
ciphers.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Steffan Karger <steffan.karger@foxcrypto.com>
Message-Id: <20200717134739.21168-8-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg20444.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2020-07-27 10:02:54 +02:00
Gert Doering
6001784afd Change client side of t_lpback.sh configs to use inline material.
We have no real test rig for "inline" key material (key, cert, ca,
tls-auth, tls-crypt*) yet.   This change adds the "sample" key set
as inline config to the "loopback-client" config, while keeping
file-based configs for "loopback-server" - that way, testing both
methods of loading keys etc. in one go.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Antonio Quartulli <antonio@openvpn.net>
Message-Id: <20200513141147.17171-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19883.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2020-05-13 17:09:53 +02:00
Steffan Karger
ac10391f48 Update sample configs to use modern cipher, remove static key examples
Since these are examples, people might use them as a basis for their own
configs. In the non-push/pull configs, we should specify a decent cipher.

Further, I don't think we should recommend anyone to still use a static key
configuration, so remove the static key config examples.

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20191109174235.20511-1-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg19081.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2019-11-10 13:41:05 +01:00
Arne Schwabe
0d80b562e4 Implement --genkey type keyfile syntax and migrate tls-crypt-v2
This unifies our key generation and also migrates the generation
of the tls-crypt-v2 keys. Since tls-crypt-v2 is not included in any
released version, we remove the the old syntax without compatibility.

PATCH V4: Introduce warning/error when using --secret with --genkey
          Update non code usages to use new --genkey syntax
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <20190613134834.5709-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18524.html

Signed-off-by: Gert Doering <gert@greenie.muc.de>
2019-07-05 12:32:49 +02:00
Jonathan Tooker
ccb636c751 Fix various spelling mistakes
New patch, omitted changes to copyrights/licenses & changelog.
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20190123201717.15048-1-jonathan@reliablehosting.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18177.html

Signed-off-by: Gert Doering <gert@greenie.muc.de>
2019-02-06 19:07:34 +01:00
Gert Doering
8e2ec9e0cf
Uncrustify sample-plugin sources according to code style
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <20181130135641.11533-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17969.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
2018-12-12 13:14:31 +01:00
David Sommerseth
6690769f78 plugin: Export base64 encode and decode functions
This patch builds on the "Export secure_memzero() to plug-ins" patch and
adds export of openvpn_base64_encode() and openvpn_base64_decode()

This also ships with a very simple plug-in which demonstrates how to use
the new exported functions.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Selva Nair <selva.nair@gmail.com>
Message-Id: <20170505214624.11675-1-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14558.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2018-08-05 22:23:58 +02:00
David Sommerseth
499794596d Update copyright to include 2018 plus company name change
The autumn of 2017, OpenVPN Technologies, Inc changed name to just
OpenVPN Inc.  Otherwise, extend the copyright to cover 2018 as well.

With the exception of the company name change, all changes have been
performed by the dev-tools/update-copyright.sh script.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20180131140314.11103-1-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg16418.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2018-02-01 08:29:21 +01:00
Antonio Quartulli
cf49ff5031 Remove option to disable crypto engine
With this patch we remove the possibility to disable the crypto engine
(ENABLE_CRYPTO define) at configuration time.

[--disable-crypto has been removed from .travis.yml too]

Signed-off-by: Antonio Quartulli <a@unstable.cc>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <20171203124952.15220-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15979.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2017-12-04 19:30:18 +01:00
David Sommerseth
500854c3fc
Use consistent version references
A simple clean-up where the version references have been unified
all those places I could find now.  The versioning scheme used is:

    * OpenVPN 2.x
    * v2.x

We want to avoid:
    * 2.x  (2.4 can be just an ordindary decimal number,
            OID reference, a version number or anything else)
    * OpenVPN v2.x (OpenVPN indicates we're talking about a version)

In addition, several places where it made sense I tried to ensure
the first version reference uses "OpenVPN 2.x" and the following
references in the same section/paragraph uses "v2.x", to set the
context for the version reference.

In Changes.rst modified paragraphs exceeding 80 chars lines where
reformatted as well.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Steffan Karger <steffan@karger.me>
Message-Id: <20170815205301.14542-1-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15260.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
2017-08-17 16:06:06 +02:00
Steffan Karger
c43045ca05
sample-plugins: fix ASN1_STRING_to_UTF8 return value checks
As we did in 2d032c7f for the ASN1_STRING_to_UTF8() calls in the core code,
we should also free(buf) if the function returns 0.

Signed-off-by: Steffan Karger <steffan.karger@fox-it.com>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <1501238302-16714-1-git-send-email-steffan.karger@fox-it.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15161.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
2017-08-14 15:10:52 +02:00
Steffan Karger
3d215d4c9d Add a DSA test key/cert pair to sample-keys
Makes it easier to test changes to DSA-related code.

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20170618105740.10090-1-steffan@karger.me>
URL: https://www.mail-archive.com/search?l=mid&q=20170618105740.10090-1-steffan@karger.me
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2017-06-18 13:47:42 +02:00
David Sommerseth
caa54ac398 copyright: Update GPLv2 license texts
The COPYRIGHT.GPL file was slightly out-of-sync with the last GPLv2
license from Free Software Foundation, Inc.

The changes are primarily a new address, which required touching almost
all the project files.

Except of that, it is just minor adjustments to formatting, removal of
form-feed characters and referencing "GNU Lesser General Public License"
instead of "GNU Library General Public License".

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20170329093648.10156-1-davids@openvpn.net>
URL: https://www.mail-archive.com/search?l=mid&q=20170329093648.10156-1-davids@openvpn.net
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2017-06-16 10:38:03 +02:00
David Sommerseth
039a89c331
Require minimum OpenSSL 1.0.1
As RHEL 5 has reached EOL, we no longer need to support OpenSSL v0.9.8.
This also makes it possible to remove a few workaronds which was
needed earlier, as well as some left overs from v0.9.6.

This also makes ./configure really stop running unless a new enough
OpenSSL library is found.

Compile tested on RHEL7.3 and RHEL6.7 (mock chroot build), both shipping
openssl-1.0.1e.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <20170411173133.18060-1-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14441.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
2017-04-11 23:42:02 +02:00
David Sommerseth
d14b3c60c7
git: Merge .gitignore files into a single file
We already track a lot of files over the whole directory structure
in the main .gitignore file.  But a few additional ones had been
added into some of the subdirectories.

This unifies all these files into a master file for the whole project,
making it easier to know where to look at and edit if changes needs
to be done.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Steffan Karger <steffan@karger.me>
Message-Id: <20170120210457.3383-1-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13916.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
2017-01-23 00:51:34 +01:00
David Sommerseth
5871697964 Update copyrights
Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Steffan Karger <steffan@karger.me>
Message-Id: <1482350454-27280-2-git-send-email-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13653.html
2016-12-21 21:57:58 +01:00
David Sommerseth
81d882d530
The Great Reformatting - first phase
This is the first commit of the big reformatting task.  This
is performed by running the ./dev-tools/reformat-all.sh script.

This is based upon the v3 reformat-all.sh/uncrustify.conf version
which is now applied to git master.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2016-12-14 22:33:49 +01:00
Steffan Karger
a64d76e246 Add a revoked cert to the sample keys
Allows for easier testing of the revocation functionality.

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <1477510159-5067-1-git-send-email-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg12784.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
2016-10-28 14:42:46 +02:00
Arne Schwabe
bde1b90da0 Use AES ciphers in our sample configuration files and add a few modern 2.4 examples
[ DS: Fixed typos and removed added extra blank line, all commented by Steffan ]

Acked-by: Steffan Karger <steffan@karger.me>
Message-Id: 1468314848-11820-1-git-send-email-arne@rfc2549.org
URL: http://www.mail-archive.com/search?l=mid&q=1468314848-11820-1-git-send-email-arne@rfc2549.org
Signed-off-by: David Sommerseth <davids@openvpn.net>
2016-08-25 20:23:24 +02:00
Daniel Kubec
f7ef7522f5 sample-plugin: TLS Keying Material Exporter [RFC-5705] demonstration plug-in
A simple plug-in with a corresponding HTTP server and client which can authenticate
an HTTP user based on the authentication already done via an established OpenVPN
connection

[DS: Renamed the module at commit time from sso to keyingmaterialexporter to
     avoid confusion with other Single-Sign-On solutions.  Updated documentation
     and commits accordingly.  Added --pull to the client config]

Signed-off-by: Daniel Kubec <niel@rtfm.cz>
Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: David Sommerseth <davids@redhat.com>
2015-10-10 00:03:07 +02:00
David Sommerseth
6a40276c75 Provide OpenVPN runtime version information to plug-ins
Also updated the log_v3 sample-plugin to demonstrate how this
works.

  $ openvpn --plugin log_v3.so --dev tun
  Fri Jul 10 15:17:28 2015 OpenVPN 2.3_git
[git:dev/plugin-version/f05d8623a29078bf+].....
  ...more.openvpn.logging...
  log_v3: OpenVPN 2.3_git  (Major: 2, Minor: 3, Patch:
git:dev/plugin-version/f05d8623a29078bf+)
  ...more.openvpn.logging...
  $

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1436534548-21507-3-git-send-email-openvpn.list@topphemmelig.net>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9904
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2015-07-27 21:02:02 +02:00
Steffan Karger
513eef4884 Use tls-auth in sample config files
For two reasons:
1) May motivate people to use tls-auth in their setups
2) Verify tls-auth functionality when running 'make check'

Signed-off-by: Steffan Karger <steffan.karger@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1424614268-5078-1-git-send-email-steffan.karger@fox-it.com>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9467
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2015-02-22 17:19:23 +01:00
Steffan Karger
ec828db63f Remove ENABLE_SSL define (and --disable-ssl configure option)
Remove the --disable-ssl configure option and accompanying ENABLE_SSL
defines in the master/2.4 branch, to reduce the code and testing
complexity a bit.

This does not remove to runtime option to run without SSL, just the compile
time option to not include any SSL-related code.

During the community meeting in November 2014 there were no objections
amongst he developers present. Also, this has been announced on the -users
and -devel mailing lists two weeks ago, without any response whatsoever.

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <54A4248A.1090501@karger.me>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9371
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2014-12-31 17:36:54 +01:00
Steffan Karger
13b2313ace Modernize sample keys and sample configs
I kept most of the certificate properties equal to the old
certs, since some people's test scripts might rely on them (and
it does not require any creativity from my part).

Changes:
 * Add script to generate fresh test/sample keys
   (but keep sample keys in git for simple testing)
 * Switch from 1024 to 4096 bits RSA CA
 * Switch from 1024 to 2048 bits client/server RSA keys
 * Switch from 1024 to 2048 bits Diffie-Hellman parameters
 * Generate EC client and server cert, but sign with RSA CA
   (lets us test EC <-> RSA interoperability)
 * Remove 3DES cipher from 'sample' config
 * Add 'remote-cert-tls server' to client config
 * Update config files to deprecate nsCertType in favour of the
   keyUsage and extendedKeyUsage extensions.
 * Make naming more consistent

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Samuli Seppänen <samuli@openvpn.net>
Message-Id: <CAA1AbxKZr_E6Wk9GBbB3xpLyJzyBxSa1k21UDXnC90d8refUzw@mail.gmail.com>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9226
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2014-11-15 17:45:10 +01:00
Philipp Hagemeister
c277757fcf Add topology in sample server configuration file
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
On modern systems, topology subnet should always be set, but it's
missing in the configuration file.
Add it with a short explanation.

Signed-off-by: Philipp Hagemeister <phihag@phihag.de>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <53BF9998.5020906@phihag.de>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8878
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2014-07-13 15:56:21 +02:00
Steffan Karger
cdbd56ceea Add an elliptic curve testing cert chain to the sample keys
Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <1398293018-8581-3-git-send-email-steffan@karger.me>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8601
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2014-04-25 19:39:40 +02:00
kangsterizer
a95358af54 Fix typo in sample build script to use LDFLAGS
Came in as github pull request #15

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-By: Arne Schwabe <arne@rfc2549.org>
2014-04-13 13:26:55 +02:00
David Sommerseth
587df08abd plugin: Extend the plug-in v3 API to identify the SSL implementation used
OpenVPN would segfault unexpectedly if it would be compiled against
PolarSSL
and the plug-in would expect OpenSSL, or vice-versa.  This segfault would
not appear before the plug-in would try to access functions which would
be available if the plug-in and OpenVPN uses the same SSL implementation.

This patch adds a member to the plug-in initialisation function, which
identifies the SSL implementation.

The log_v3 plug-in is updated accordingly + a simple fix to make it
buildable again using the ./build script.

A minor documentation error in the openvpn-plugin.h was also
corrected, where it mentioned OPENVPN_PLUGIN_VERSION instead of
OPENVPN_PLUGINv3_STRUCTVER.

 v2 - add const ovpnSSLAPI ssl_api at the end of
      struct openvpn_plugin_args_open_in and not in the "middle"

 v3 - fix bug in plug-in init, as the SSLAPI was located wrong in the
      args struct sent to the openvpn_plugin_open_v3() function.

 v4 - Ensure SSLAPI got a sane/known value if SSL is disabled or unknown

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1372879030-10576-1-git-send-email-dazo@users.sourceforge.net>
URL: http://article.gmane.org/gmane.network.openvpn.devel/7754
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2013-07-03 21:20:59 +02:00
Alon Bar-Lev
ce8271f5d4 build: integrate plugins build into core build
As disucssed[1], keep plugins in repository.

1, Proper automake/libtool build.

2. Move example plugins to samples/sample-plugins.

3. Plugins are installed at LIBDIR/openvpn/plugins.

[1] http://comments.gmane.org/gmane.network.openvpn.devel/6436

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: David Sommerseth <davids@redhat.com>
Message-Id: 1337035323-27465-1-git-send-email-alon.barlev@gmail.com
URL: http://article.gmane.org/gmane.network.openvpn.devel/6591
Signed-off-by: David Sommerseth <davids@redhat.com>
2012-06-26 11:29:02 +02:00
Alon Bar-Lev
880a2ae97c build: distribute samples in windows
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-24 00:14:23 +01:00
Alon Bar-Lev
34cb9132ef build: standard directory layout
Suitable for mature project.

root   - administrative stuff
doc    - documents
src    - sources
tests  - tests
distro - distro specific files
sample - samples

SIDE EFFECT: many changes to rpm spec.

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-03-22 22:07:08 +01:00