31 Commits

Author SHA1 Message Date
Arne Schwabe
664b3d6651 Remove several no longer used or supported build scripts
- the OpenSSL build script for all platform, was only
  used on macOS and better alternatives like homebrew exit there
- mac build scripts in general, cmake/homebrew is a better alternative
- vars for Android, Android uses CMake based build, see ics-openvpn for an example
- lzo build scripts. Core can do lzo decompress witout it and if used, system lzo can
  be used

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-08-24 17:09:13 +02:00
Frank Lichtenheld
7b2413eee2 scripts/{linux,mac}/build-all: cleanup
- remove commented out lines that are unlikely to be useful
- enable set -u
- allow to skip mbedtls build on linux
2022-01-28 12:20:02 +01:00
Frank Lichtenheld
e82303ad2a deps: remove unused dependencies
Most of these haven't been used in years and are
probably useless now. If required they can always
be recovered from the git history.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2022-01-28 12:18:39 +01:00
Arne Schwabe
d62bcb3283 Remove cityhash from buildall and add xxHash to mac buildall
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2021-01-20 18:25:44 +01:00
Arne Schwabe
af43bf0145 Add script for building xxHash
The code that requires xxHash requires a fairly new xxHash version, so
add a local copy of 0.8.0 to build with this header only library.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2021-01-20 17:02:30 +01:00
Arne Schwabe
e6d544b8a5 Add support building deps with clang/libc++
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2020-04-29 11:55:38 +02:00
Arne Schwabe
dd47138adf Add script for building cityhash 2018-04-25 18:25:28 +02: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
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
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
2856dc759a Build OpenSSL shared libraries on Linux. 2015-02-10 15:49:49 -07: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
James Yonan
302046c3ea Updated build scripts for repo reorganization. 2014-08-28 13:33:14 -06:00
James Yonan
df860644e8 Built ovpn3 cli tool on Linux (gcc 4.8.2) with some
minor edits:

* Don't build OpenSSL.
* Edited ovpncli/README.txt with updated build command.
* Enabled C++11 in compiler flags, and turned off
  some spurious warnings.
* Added CXX_COMPILER_FLAGS build flag to allow
  C++-only flags to be defined.

Changes to build script as well:

* Honor OTHER_COMPILER_FLAGS and CXX_COMPILER_FLAGS
  settings.
* For debug builds, DEBUG_BUILD=1 setting should be placed
  in vars-x.  Existing build DEBUG=1 setting now only
  sets -g.
* For clang builds, don't emit -fvisibility=hidden because
  that should be placed in OTHER_COMPILER_FLAGS in vars-x.
2014-07-28 12:08:49 -06:00
James Yonan
074dbafa27 Ported minicrypto lib to OS X for PolarSSL optimization.
These scripts

  scripts/mac/build-minicrypto
  scripts/mac/build-polarssl

will now build PolarSSL (on OSX) with libminicrypto linkage.
Currently, only SHA1/256/512 implementations from OpenSSL are
built in libminicrypto.  We leave the current PolarSSL AES
implementation as-is since it now implements AES-NI.

Also added portable openssl/build-openssl script.
2014-03-04 17:42:00 -07:00
James Yonan
5975b4b53c Core build script changes:
* Added new cross-platform boost/build-boost script.

* Added new LINK_MODE var (static|shared) that is
  used by Boost, PolarSSL, and OpenSSL (Linux) builds.

* More DEP_DIR flexibility:
  (a) DEP_DIR can be defined prior to call of build-all scripts.
  (b) On Linux, vars-linux script will not override DEP_DIR.
2014-03-03 14:34:39 -07:00
James Yonan
5cb4dd43bb Updated Linux build scripts including adding a new script
to build lz4.
2014-02-09 03:12:33 -07:00
James Yonan
f290f9feee Extended IP.Addr class to handle extents as IP.Addr objects. This
extends the IP.Addr class to act more-or-less as a generic 128-bit
unsigned integer class.
2013-07-29 05:48:03 +00:00
James Yonan
dc10d6f541 Added scripts/linux/build-polarssl-ovpn2 to build OpenVPN 2.x with
PolarSSL.
2013-06-11 05:46:58 +00:00
James Yonan
9f18b28f86 Misc build system changes to support OpenSSL. 2012-11-27 03:05:46 +00:00
James Yonan
5ea06010c5 Get PolarSSL-based client and test builds working on Linux again. 2012-11-26 18:53:12 +00:00
James Yonan
1e053189f8 Added build-all script for linux. 2012-09-26 01:34:07 +00:00
James Yonan
0df25d9f75 Minor changes to Linux build system to incorporate "linux"
subtarget in dependency build dir.
2012-09-12 00:14:07 +00:00
James Yonan
d50d359acb Added ARM compression benchmark results.
Added a platform argument to scripts/linux/build-openssl
2012-09-11 18:23:07 +00:00
James Yonan
638d6d6f06 For linux build scripts, don't explicitly use -g. 2012-09-09 23:47:21 +00:00
James Yonan
58efad3b74 Updated linux scripts to work with latest core and library
organization.

Added scripts under scripts/linux for building dependent
libraries.

Added test/ovpncli/cli.cpp to provide a command line client that
exercises ovpncli.hpp API and can be built via build script.
2012-09-09 23:10:20 +00:00
James Yonan
2206210562 Misc fixes to update PolarSSL support for 1.1.3. 2012-05-29 16:29:11 +00:00
James Yonan
8f65e98cb1 Added clilib scripts for linux.
Added build-boost for linux.
2012-05-23 14:22:13 +00:00
James Yonan
e7cc39a99f Change build script for java-wrapped core to use a two-step
build process, one for core and one for java wrapper.
This is so that different optimization flags can be applied
to each step.  In particular, the wrapper needs
-fno-strict-aliasing, but the core does not.
2012-03-24 20:22:24 +00:00