0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 20:13:05 +02:00
Commit Graph

139 Commits

Author SHA1 Message Date
Arne Schwabe
452a353b2d Fix lzo build script to use it as dependency for the unit tests
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2019-04-15 17:23:37 +02:00
James Yonan
aebea64562 build script: minor changes to Cityhash inclusion
Don't include -I and -L compiler options for Cityhash pointing
to $DEP_DIR, unless the directories exist.

Signed-off-by: James Yonan <james@openvpn.net>
2018-12-12 23:26:12 -07:00
David Sommerseth
f241c4c5fa
scripts: Add tool to update copyright years
This is ported from the OpenVPN 2 project.  Since I wrote that script,
the relicensing from GPLv2 to AGPLv3 is fine.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2018-11-07 17:56:16 +01:00
Arne Schwabe
b107fd9946 Remove unsupported platforms from Android build
The newest Google Android NDK removes support for Android API 14 and 15
(Android 4.0) along with non v7a 32bit Android ABI. The new lowest
API is 16. OpenVPN Connect is already using minAPI=16 so this does
not have an effect on the main user of these build scripts.
2018-11-07 17:23:02 +01:00
Arne Schwabe
6a200f72e1 Ensure all Android components are always installed
Ensure that even if the Android SDK is already unpacked we install
and update all packages required. Otherwise if the sdk is we only
updated the available packages list and did not update the packages
themselves.
2018-11-07 17:23:02 +01:00
James Yonan
8f20f76936 build: use LZ4_SYS=1 default when target is Linux
Signed-off-by: James Yonan <james@openvpn.net>
2018-08-30 13:00:27 +03:00
Antonio Quartulli
115fab562d
scripts: generate version automatically from git branch/commit
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-06-25 16:37:50 +08:00
Arne Schwabe
dd47138adf Add script for building cityhash 2018-04-25 18:25:28 +02:00
Antonio Quartulli
e143bc0a7e [OVPN3-129] android: improve build system in order to perform full build
the scripts/android/build-all script is now in charge of
performing all the steps required to build a full android core.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
7299fefa77 [OC-42] Android: specify API level on command line
since the introduction of the unified headers, the API level
has to be specified on the command line, otherwise a development
API level (1000) will be used and will mess up older Android
releases.

On top of that, circumvent a bug in pthread.h by defining __LP32__.

This problem was causing crashes on Android 5 as it wasn't able to
provide libc functions expected by the precompiled ovpn3-core.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:38 +08:00
Antonio Quartulli
d3da3dfeb0 android: build client lib for x86 (for emulator)
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:38 +08:00
James Yonan
2b4c85091d Debugging: added header and build flag for valgrind run-time
extensions.

Signed-off-by: James Yonan <james@openvpn.net>
2017-12-22 17:59:38 +08:00
Antonio Quartulli
4926011513 Android: adapt toolchain scripts to new SDK and move to API 26
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:38 +08:00
David Nimon
4302651dd8 changes to support android building 2017-12-22 17:59:38 +08:00
Antonio Quartulli
7cbf539222 [OVPN3-5] build script: allow user to specify its own mbedTLS folder and LDFLAGS
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-09-27 16:16:18 +08:00
Lev Stipakov
8ae2a3f7cf Integrate Google Test framework
Implemented sample test for LogInfo class.

OVPN3-27
2017-09-27 16:16:18 +08:00
Lev Stipakov
7db95ccde6 Make build fail on compilation errors
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-09-27 16:16:18 +08:00
James Yonan
81cb887f67 build script: added DPROF=1 flag
When DPROF=1 and PROF is specified, build with
the debugging variant of the vars file.

Signed-off-by: James Yonan <james@openvpn.net>
2017-09-27 16:16:18 +08:00
James Yonan
ce0977b2ea Support Cityhash.
When running build script, add CITY=1 to build with Cityhash library.

Signed-off-by: James Yonan <james@openvpn.net>
2017-09-27 16:16:17 +08:00
James Yonan
916856d9b7 build script: updated Objective-C support when OBJC=1.
Signed-off-by: James Yonan <james@openvpn.net>
2017-04-12 11:42:41 -06:00
James Yonan
691a641a43 Added i/o abstraction layer.
Created a lightweight abstraction layer so that another i/o
reactor can be dropped in place of asio.

The basic approach is to rename all references to asio::xxx
types to openvpn_io::xxx and then make openvpn_io a
preprocessor variable that points to the top-level namespace
of the i/o reactor implementation.

All of the source files that currently include <asio.hpp> now
include <openvpn/io/io.hpp> instead:

This gives us a lightweight abstraction layer that allows us
to define openvpn_io to be something other than asio.

Other changes:

* Inclusion of asio by scripts/build is now optional, and is
  enabled by passing ASIO=1 or ASIO_DIR=<dir>.

* Refactored openvpn/common/socktypes.hpp to no longer
  require asio.

* Refactored openvpn/log/logthread.hpp to no longer require
  asio.

* Added openvpn::get_hostname() method as alternative to
  calling asio directly.

* openvpn/openssl/util/init.hpp will now #error
  if USE_ASIO is undefined.

Signed-off-by: James Yonan <james@openvpn.net>
2017-03-30 15:48:14 -06:00
James Yonan
f8876e5ef3 build script: added new parameters
PROF=<platform> -- source vars/vars-<platform> before running
ASIO_DIR=<dir> -- specify ASIO tree
MTLS_SYS=1 -- use system mbedTLS
LZ4_SYS=1 -- build with system LZ4 compression library
2017-03-18 12:24:54 -06:00
James Yonan
052f565ed7 build-mbedtls : simplify mbedTLS build script to no longer
depend on cmake.
2017-03-18 12:24:54 -06:00
James Yonan
f5f68bfcf4 android : build scripts now build mbedTLS instead of PolarSSL 2017-03-18 12:24:54 -06:00
James Yonan
fb5f494735 Mac build scripts : update for mbedTLS 2017-03-18 12:24:54 -06:00
James Yonan
ba47bd6f05 build script : OSSL=1 option on Linux will link
with system OpenSSL.
2017-03-18 12:24:54 -06:00
James Yonan
050e8717f1 mbedTLS: Port from polarssl-1.3 to mbedtls-2.3 (symbol renames)
This patch renames internal OpenVPN 3 symbols
from polarssl -> mbedtls.

Signed-off-by: James Yonan <james@openvpn.net>
2017-03-18 12:24:54 -06:00
James Yonan
a6b7cf458f mbedTLS: Port from polarssl-1.3 to mbedtls-2.3 (functional)
This patch builds on work by David Sommerseth <davids@openvpn.net>
to move the PolarSSL API from polarssl-1.3 to mbedtls-2.3, which
has significant differences in some areas.

- Strings containing keys, certificates, CRLs, and DH parameters
  need to be NULL-terminated and the length argument provided to
  the corresponding mbedtls parse function must be able to read
  the NULL-terminator.  These places have been modified with a
  '+1' to the length argument (x509cert.hpp, x509crl.hpp, dh.hpp,
  pkctx.hpp).

- The SSL context object has been split up in mbedtls-2.3
  Now many of the SSL configurations are done in a separate
  SSL config object, which is added to the SSL context once
  configured.  In addition private/public keys are now stored
  in a separate pk_context, which is later on attached to the
  SSL context.  Due to this, many of the calls setting either
  SSL configuration parameters or working with pk_contexts have
  been refactored.  (sslctx.hpp)

- The older API loading the CA chain took a hostname argument.
  The new API requires mbedtls_ssl_set_hostname() explicitly to
  be called setting hostname.  Some refactoring was needed here
  too (sslctx.hpp).

- x509_oid_get_description() is now replaced by
  mbedtls_oid_get_extended_key_usage().

- when mbedTLS renamed OID_CMP to MBEDTLS_OID_CMP, the return
  value was changed so that a return value of 0 now means equal
  rather than not-equal.

- mbedtls/platform.h must be loaded before any other mbedtls
  include files (sslchoose.hpp).

- All functions and macros related to mbedTLS are now prefixed
  with mbedtls_/MBEDTLS_

- Refactored External PKI and added some options to cli.cpp
  to make it easier to test that the feature still works
  correctly.  This included removing the sig_type var and
  standardizing on a PKCS#1 digest prefix per RFC 3447.

- Updated test keys to 2048 bits.

- Updated dependency build scripts to build mbedTLS.

- Enable MD4 in mbedTLS build script (needed for NTLM auth).

- Use an allow-all X509 cert profile to preserve compatibility
  with older configs.  Going forward, we will implement new
  options to increase strictness on minimum RSA key size and
  required cert signing algs.

- Added human-readable reason strings that explain why
  a given cert in the chain wasn't accepted.

- This patch doesn't rename any files or rename internal
  OpenVPN 3 symbols such as PolarSSLContext.  This will
  be done in a separate commit.

Signed-off-by: James Yonan <james@openvpn.net>
2017-03-18 12:24:54 -06:00
James Yonan
b7759986cd Linux build : no longer build OpenSSL as a private
dependency, use distro version.
2017-03-18 12:24:54 -06:00
James Yonan
ba15049f18 Mac client : implemented INFO,OPEN_URL handler for Mac OS X
command line client.
2016-08-11 14:05:33 -06:00
James Yonan
fe6e8f7e7f scripts/snapshot : added comment about source
location selection.
2016-08-03 13:09:43 -06:00
James Yonan
18bf3158a5 Updated ovpn3 dependencies:
* Updated all libraries to latest versions
* PolarSSL -> mbedTLS renaming
2015-12-28 17:47:18 -07:00
James Yonan
2ee8bbde1e Added scripts/snapshot tool to make it easier
to build .tar.gz files from git checkouts.
2015-12-28 17:47:18 -07:00
James Yonan
420766503b Removed "exit 0" from scripts/mac/build-all, so the
script can be sourced.
2015-12-28 17:47:18 -07:00
James Yonan
6eaf1e324b Changes to build script:
* Added EXTRA_CPP var for specifying additional .cpp files
  to be built as separate compilation units.

* Don't emit -fwhole-program flag if compile-only flag
  (CO) is enabled or EXTRA_CPP is defined.

* Clear out EXTRA_SRC_OBJ if compile-only flag (CO) is
  enabled to avoid warnings.
2015-11-25 12:14:02 -07:00
James Yonan
7b14dae436 In zlib.hpp, don't compile zlib code unless
HAVE_ZLIB is defined.

In scripts/build-extras/zlib.sh, define
HAVE_ZLIB when running build script with
ZLIB=1.
2015-10-16 13:49:11 -06:00
James Yonan
3825535db2 Added "JAVA=1" option to build script to build with JVM. 2015-08-14 05:19:04 -07:00
James Yonan
16bde170c0 Don't use deprecated asio features. 2015-06-30 00:05:37 -06:00
James Yonan
04637e486a Started process of switching over from asiodispatch
to C++11 lambdas.
2015-06-24 16:16:57 -06:00
James Yonan
1563dca02f Added Asio to deps/lib-versions.
Removed Snappy dependency as ovpn3 clients now
standardize on LZ4 (with LZO-asym fallback).
2015-06-06 13:29:30 -06:00
James Yonan
c6a21c827b Boost dependency elimination -- final removal of Boost
dependency.  Asio is now included as a standalone,
header-only dependency.
2015-06-06 10:59:18 -06:00
James Yonan
4d660c0eca Added OUTBIN parm to build script. 2015-04-25 15:12:15 -06:00
James Yonan
a51c0bf0bf Mostly complete transition from boost::thread to std::thread. 2015-04-23 17:07:56 -06:00
James Yonan
d442e777de Updated Android build system to support ARM64:
* Updated SDK and NDK to Android 5:
    android-sdk_r24.0.2-macosx.zip
    android-ndk-r10d-darwin-x86_64.bin

* Updated build-toolchain to build both ARM
  and ARM64 toolchains.

* Added ARMv8-a architecture (64-bit) to all
  core builds.

* Patched "Page Size" issue in boost_1_57_0.
2015-02-27 09:20:35 -07:00
James Yonan
7b6533484e Added gzip compression support to ovpn3 library. 2015-02-13 14:29:09 -07:00
James Yonan
2856dc759a Build OpenSSL shared libraries on Linux. 2015-02-10 15:49:49 -07:00
James Yonan
c1c6bdb639 Don't build or include minicrypto for Android. 2015-02-05 10:22:39 -07:00
James Yonan
433f4e362d Minicrypto build fixes:
* Disable minicrypto for now in both Android and Apple builds.

* In deps/polarssl/build-polarssl, don't apply the minicrypto
  patch unless "$USE_MINICRYPTO" = "1".
2015-01-19 17:48:10 -07:00
James Yonan
031554e45a Comment out the "set -e" at the top of scripts/android/build-toolchain
as it appears to cause premature exit.
2014-10-16 11:45:28 -06:00
James Yonan
5539a22684 Repo reorganization: standardize on $O3 representing the top-level
directory that contains core and possibly other components as well.
2014-08-29 18:42:02 -06:00