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

86 Commits

Author SHA1 Message Date
Antonio Quartulli
29acfd95f3
libs: update ASIO to 1.14.0
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2019-09-02 22:22:08 +02:00
Antonio Quartulli
ecebb40304
Merge remote-tracking branch 'origin/qa' 2019-08-28 10:57:54 +02:00
Lev Stipakov
728733aee7 deps/mbedtls: rebase "enable unsupported critical extensions" patch
This rebases "Enable allowing unsupported critical extensions in
 runtime" patch on top of 2.7.11.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-08-14 17:02:49 +03:00
Antonio Quartulli
43e36ca45a
lib-version: update to mbedtls-2.7.11 2019-08-14 14:44:15 +02:00
Lev Stipakov
89cc11b300 win: enable building Windows client with OpenSSL
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-06-05 13:54:12 +03:00
Arne Schwabe
6f0e9f6388 Fix Asio 0003 patch.
When porting this patch I accidentally got the conflict backwards and
the resulting patch is nonsense. I am not sure how this managed to
survive a full Jenkins run.
2019-05-02 20:06:53 +02:00
Arne Schwabe
74e40a8907 Upgrade ASIO to 0.13.0
Also regenerate the patches against ASIO and fix merge conflicts
2019-05-01 14:04:34 +02:00
Antonio Quartulli
19a44dbdda
Merge branch 'qa' 2019-04-30 09:01:05 +02:00
Lev Stipakov
16a4e3d4a7 [OVPN3-405] asio: A quick fix for incorrect error message encoding
ASIO's code for returning error messages doesn't play well with
non-ASCII chars. This quick fix makes ASIO use English.

A proper fix, which is more invasive (use FormatMessageW and
WideCharToMultiByte with UTF-8) will be provided separately.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-04-29 11:08:37 +03:00
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
Arne Schwabe
27beeb03db Update lz4 version to 1.8.3
The deprecated macro of LZ4 1.8.0 breaks in newer LLVM/Clang version:

include/lz4.h:446:12: error: an attribute list cannot appear here

LZ4LIB_API LZ4_DEPRECATED("use LZ4_decompress_safe() instead") int
LZ4_uncompress_unknownOutputSize (const char* source, char* dest,
int isize, int maxOutputSize);

Using -DLZ4_DISABLE_DEPRECATE_WARNINGS allows including these headers
with modern LLVM/Clang version

The new lz4 version (1.8.3) fixes this problem.
2018-11-07 17:23:02 +01:00
Arne Schwabe
5f1f8470bc Revert bugfix for not compiling IA32 ASM of 2.7.5
Mbedtls 2.7.5 included a bugfix (e08754762d) that ASM code in bn_mul.h
was only enabled with -O0 instead of not enabling it with -O0
unfortenately the old gcc version (4.9.x) we use for our Android
build does not handle this. Fall back to not using ASM code on the
gcc/Android combination.
2018-08-22 14:44:58 +02:00
Antonio Quartulli
bde2c41be0
dep: switch from mbeTLS 2.7.0 to 2.7.5
Update dep on mbedTLS to latest maintenance release
of the 2.7 branch.

Mst of our private patches are now upstream and can
be removed.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-08-21 21:37:05 +08:00
Arne Schwabe
d339b684ac Modify build script of lz4/mbedtls to allow src only builds
The modern cmake build for the Android core does build the library
during the build of the core. Prebudiling these libraries is not
necessary.
2018-05-22 19:57:43 +02:00
Arne Schwabe
f0198627b5 Merged in cityhash building fix
Add script for building cityhash

Approved-by: Antonio Quartulli <antonio@openvpn.net>
Approved-by: Lev Stipakov <lev@openvpn.net>
2018-05-09 10:01:56 +00:00
Arne Schwabe
dd47138adf Add script for building cityhash 2018-04-25 18:25:28 +02:00
Lev Stipakov
cfd6df5bc2 build system: fix 'git apply'
When 'git apply' is run inside repository folder, it ignores files
missing in index. To make it work, run 'git apply' outside of repository.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-04-19 11:11:39 +03:00
Lev Stipakov
40c70113d4 [OVPN3-184] Add mbedTLS patch
Add mbedTLS patch which enables to allow
unsupported critical extensions in runtime.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-04-19 10:59:35 +03:00
Antonio Quartulli
e6d68831a7
deps: update mbedTLS to 2.7.0
At the same time rebase patches on top of ne wversion
and get rid of fixes that have been merged upstream.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-03-26 23:58:35 +08:00
Antonio Quartulli
33dd2f29e8
mbedtls: backport fixes for CVE-2018-0487
Backport patches from mbedTLS-2.7.0 to address the CVE
in the subject:

28a0c727 RSA: Fix buffer overflow in PSS signature verification
6a54b024 RSA: Fix another buffer overflow in PSS signature verification
139108af RSA PSS: fix minimum length check for keys of size 8N+1
b00b0da4 RSA PSS: fix first byte check for keys of size 8N+1
91048a3a RSA PSS: remove redundant check; changelog

This bug can be exploited by sending a malicious certificate
chain signed using RSASSA-PSS.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-03-26 23:58:34 +08:00
Lev Stipakov
0912a9b629
[OVPN3-213] build system: mbedtls timing tests
Include patches from https://github.com/ARMmbed/mbedtls/pull/1136/commits

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-03-26 23:58:34 +08:00
Antonio Quartulli
98fa555764
deps: update asio to 1.12.0
At the same time rebase patches on top of latets version.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-03-26 23:58:34 +08:00
Antonio Quartulli
6205311014
[OVPN3-215] asio: apply external patches
we currently have some external patches that should be abbplied
on asio before using it in our projects.

However, these patches have always been applied manually in the
past and therefore they are not part of our automatic build
system.

Modify the buil-asio script so that it auto-applies our
patches everytime it is invoked. This change will ensure
that the same "asio version" is used when building the core or
other apps.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-03-26 23:58:34 +08:00
Antonio Quartulli
f4a73bde55
[OVPN3-215] asio: rebase external patches on top of our current commit ID
When we moved to asio-862aed305 we have not updated our external
patches acconrdingly.

This change takes care of rebasing our patches on top of 862aed305
so that they can cleanly apply again.

0001-Android-appears-to-not-support-pthread_condattr_setc.patch has
been dropped as this issue has been tackled upstream.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-03-26 23:58:34 +08:00
Lev Stipakov
a61cac9289
mbedtls: Patches from 2.7 to fix timing test failures
Changed to Changelog are removed to make patches apply on 2.6.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-03-26 23:58:34 +08:00
Lev Stipakov
8a394a37dd
[OVPN3-213] build system: mbedtls timing tests
Include patches from https://github.com/ARMmbed/mbedtls/pull/1136/commits

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-03-26 23:58:33 +08:00
Lev Stipakov
3d6fd62cb1
mac build: improve unittest stability
mbedTLS commit 8873bcc4def433aa0edfbe260083f32f04aa097e

Timing self test: increased duration

Increase the duration of the self test, otherwise it tends to fail on
a busy machine even with the recently upped tolerance. But run the
loop only once, it's enough for a simple smoke test.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-03-26 23:58:33 +08:00
Lev Stipakov
758ae98c67
[OVPN3-209] win: add dependencies checksum verification
Also reuse existing lib_version.sh as a source of versions and checksums.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-03-26 23:58:33 +08:00
Lev Stipakov
b713762ba4
mbedtls: Patches from 2.7 to fix timing test failures
Changed to Changelog are removed to make patches apply on 2.6.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-03-10 02:28:35 +08:00
Antonio Quartulli
33c16812e1
[OVPN3-144] mbedTLS: fix support for 4096bit encrypted keys
Backported from mbedTLS 2.7.0

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-03-10 02:28:33 +08:00
Antonio Quartulli
f249ab4bd3
[OVPN3-144] build-mbedtls: run make check before compiling
This will ensure that mbedtls is still passing all its
unit test before building it.

It is important to run the checks because we backport patches
on our own and they may break during the process.

Checks are perfomed only when building for linux or for osx.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-03-10 02:28:33 +08:00
Antonio Quartulli
5040aef4c1
[OVPN3-144] build-mbedtls: apply patches using git-apply instead of patch
This is required to allow git patches with binary content
to be properly applied.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-03-10 02:28:33 +08:00
Antonio Quartulli
8a5e838ab7
[OVPN3-144] mbedTLS: fix incompatibility with PKI created by OpenSSL 1.1
Please check the commit messages of the new patches for a better
description.

In a nutshell, this change allows mbedTLS to properly decrypt
keys created by OpenSSL using PKCS#5v2 with PRF different from
SHA1.

This change also add their related unit-tests.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-03-10 02:28:33 +08:00
Antonio Quartulli
fa872c4ffa
[OVPN3-146] build: switch from sha256sum to shasum -a 256
Apparently sha256sum is not available on macOS.
To allow users to properly use our build system on this platform
we need to migrate to something available on macOS too.

Change the sha256sum invocation to shasum -a 256.

The output of both commands is the same.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-02-04 16:55:12 +08:00
Antonio Quartulli
06d23eccc2 [OVPN3-129] build-system: let scripts download dependencies
With this change a dep build script will now download
the related tarball automatically if not already present.

This way, we ensure that the core is built with the dep
package version specified in lib-versions.

After finding or downloading a tarball, its checksum is
computed and compared with the one in lib-versions to
ensure that the file is the expected one.

This logic has been applied to asio, mbedtls and lz4.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
19e33c4ebe [OA-14] mbedTLS: relax x509 date/time format check
some CA provides certificates that do not fully follow
the RFC in terms of date format.
This patch relaxes the constrains in mbedTLS so that also
not sully compliant certificates can be accepted.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:38 +08:00
Antonio Quartulli
8e501c5373 Update version for mbedTLS and lz4
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:38 +08:00
Antonio Quartulli
1b5a78439e asio: make sure to switch to DEP_DIR before building
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:38 +08:00
James Yonan
14e2bb4c4a asio : added another patch (Android appears to not
support pthread_condattr_setclock).
2017-03-18 12:24:54 -06:00
James Yonan
b5b4e3a48f asio : added patches 2017-03-18 12:24:54 -06:00
James Yonan
f685303f6b asio : version update 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
627e46e71e build-lz4 : removed some unused code 2017-03-18 12:24:54 -06:00
James Yonan
c51eb86b39 dependencies : updated dependency versions. 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
85b893cf8a PolarSSL : Added relaxed-x509-date.patch patch to PolarSSL
which relaxes X509 date validity checks:

* Allow dates to omit the seconds field.
* Allow dates to specify a timezone (but ignore the
  timezone field).
2016-08-04 17:52:07 -06:00
James Yonan
6bc604e0a6 PolarSSL : minor change to build-polarssl to correctly
comment generating script in openvpn-polarssl.h
2016-08-04 17:49:17 -06:00
James Yonan
2b2fa0c0b1 PolarSSL : Added deps/polarssl/build-detail-patch to
generate a patch to stdout based on changes to the
source directory $DEP_DIR/$POLARSSL_VERSION
2016-08-04 17:41:59 -06:00
James Yonan
83a25a4b1d lib-versions : updated asio to asio-20160803 2016-08-03 13:58:29 -06:00
James Yonan
286ea35bbd polarssl build : in cmake build script, clear
CMAKE_OSX_ARCHITECTURES, CMAKE_OSX_DEPLOYMENT_TARGET,
and CMAKE_OSX_SYSROOT since their default settings
interfere with our own targeting.
2016-08-03 13:04:41 -06:00