mirror of
https://github.com/OpenVPN/openvpn.git
synced 2024-09-20 03:52:28 +02:00
0b5141d8f9
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> |
||
---|---|---|
.. | ||
defer | ||
keying-material-exporter-demo | ||
log | ||
simple | ||
Makefile.am | ||
Makefile.plugins | ||
README |
OpenVPN plug-in examples. Examples provided: * authentication and logging simple/simple.c -- using the --auth-user-pass-verify callback, verify that the username/password is "foo"/"bar". defer/simple.c -- using the --auth-user-pass-verify callback, test deferred authentication. log/log.c -- Extended variant of simple/simple.c which adds more logging of what is happening inside the plug-in log/log_v3.c -- A variant of log/log.c, which makes use of the OpenVPN plug-in v3 API. This will also log even more information related to certificates in use. * cryptography related simple/base64.c -- Example using the OpenVPN exported base64 encode/decode functions keying-material-exporter-demo/keyingmaterialexporter.c -- Example based on TLS Keying Material Exporters over HTTP [RFC-5705] (openvpn/doc/keying-material-exporter.txt). For more details, see keying-material-exporter-demo/README To build on *BSD/Linux platforms (requires GNU Make): gmake (builds a default set of plug-ins) gmake simple/simple.so To build on Windows platform (MinGW): cd simple; ./winbuild simple.so To use in OpenVPN, add to config file: plugin simple.so (Linux/BSD/etc.) plugin simple.dll