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

1813 Commits

Author SHA1 Message Date
James Yonan
8cb8d52cda
string: added first_line() method
Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:31 +08:00
James Yonan
a26b1646b7
AsioPolySock: extend AltRouting support
Add alt_routing_enabled() method

Extend remote_endpoint_str() method

Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:31 +08:00
James Yonan
ef3a40c271
Listen::Item: added AltRouting mode
Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:31 +08:00
James Yonan
02e786bc92
write_binary_atomic: support ConstBuffer
Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:31 +08:00
James Yonan
6745799c93
fileunix: added read_binary_unix_fast()
Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:31 +08:00
James Yonan
5689c2d9c9
write_binary_unix(): added ConstBuffer variant
Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:31 +08:00
James Yonan
2b0e764534
enum_dir: refactor to allow enumeration via lambda
Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:30 +08:00
James Yonan
116a5bd5e5
bufstr: added const_buf_from_string() method
Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:30 +08:00
James Yonan
f8ec814137
Buffer: added const_buffer_ref() variant accepting a const argument
Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:30 +08:00
James Yonan
ae98aa8b6f
AsioPolySock: support AltRouting
* Added native_handle() virtual method

* Use AltRouting abstract socket when
  OPENVPN_POLYSOCK_SUPPORTS_ALT_ROUTING is defined

Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:30 +08:00
James Yonan
8f81479f1e
AsioBoundSocket::Socket: support inheritance
Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:30 +08:00
James Yonan
9598918e95
ServerProto: added schedule_disconnect() method.
Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:30 +08:00
James Yonan
4516cf67b5
ServerProto: reset CoarseTime object when AsioTimer is canceled
CoarseTime objects that track an AsioTimer must always be
reset when the AsioTimer is cancelled.  Not doing so can
cause a bug if the AsioTimer is reused after cancellation.

Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:30 +08:00
James Yonan
0ffc76a0b1
Route: implement operator< so Route objects can be used as map/set keys.
Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:30 +08:00
James Yonan
c4af9f68b0
event_loop_wait_barrier: raise default timeout to 30 seconds
Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:30 +08:00
James Yonan
d7fe87540d
appversion.hpp: rename VERSION -> BUILD_VERSION
Pass BUILD_VERSION instead of VERSION on command line to
avoid symbol conflicts.

Signed-off-by: James Yonan <james@openvpn.net>
2018-03-10 02:28:29 +08:00
Lev Stipakov
098fd412a2
[OVPN3-182] mac: add XCode project
Dependencies are assumed to be located at in $O3/deps

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-02-04 16:55:13 +08:00
Antonio Quartulli
fd5fa9403f
[OI-29] Report IV_HWADDR on iOS
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-02-04 16:55:13 +08:00
Antonio Quartulli
d3dd348c04
[OVPN3-165] send keydir opt string only when tls-auth is enabled
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-02-04 16:55:13 +08:00
Antonio Quartulli
d0532df666
mbedTLS: add support for ECDSA
Whitelist TLS ciphersuites that include the ECDSA algorithm.
This way EC certificates can be finally used.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2018-02-04 16:55:12 +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
3e002c83ce remove unused Jenkinsfile
Jenkins is not used for this repository, therefore
remove the Jenkinsfile for good and avoid misunderstandings.

Signed-off-by: Antonio Quartulli <a@unstable.cc>
2017-12-22 18:04:49 +08:00
David Sommerseth
16b10559f2 [OVPN3-140] Update company names in copyrights
OpenVPN Technologies, Inc. change their name to OpenVPN Inc. during the
autumn of 2017.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2017-12-22 17:59:39 +08:00
David Sommerseth
6caca2c313 [OVPN3-140] Relicense back to AGPLv3
This is essentially a revert of commit 04b2a3c9b7 and commit
ef42e59e05.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
4f9ae7452f cliproto: react to tls_warnings
Upon activation of the primary keycontext, check if any
tls warning was set by the SSL session object.
If so, trigger an event to the CLI/UI.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
546547ba55 Proto: export tls_warnings attribute from SSL session
Ensure that the tls_warning attribute stored in a SSL session
object is properly bubbled up to the upper layers for proper
processing

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
7cbaa26b90 SSLAPI: add tls_warning attribute
The SSLAPI instance should use this new attribute to
report potential issues detected during the tls handshake.

Upper layers will process this attribute when needed.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
7ed93a3bee clievent: add Warn event class
An instance of this object should be treated like an important
`Info`.
The App/UI should show its `reason` to the user in a striking manner.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08:00
Lev Stipakov
7a71ba17b7 win: get 'arch' param value from environment
Required for by Connect build system.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:39 +08:00
Lev Stipakov
61bb21b369 win: make parameter optional
Added mandatory parameter broke Connect build.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:39 +08:00
Lev Stipakov
15d66c49d5 [OVPN3-141] win: disable WPO
Whole Program Optimization is broken on VS2017.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:39 +08:00
Lev Stipakov
97d9c28eff [OU-15] mbedtls: remove duplicated code
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:39 +08:00
Lev Stipakov
95aec32854 [OU-15] mbedtls: refactor X509Cert to allow reuse der2pem
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:39 +08:00
Lev Stipakov
946753e4e3 [OVPN3-135] Win: remove unneeded default route
After setting up IP address and specifying gateway, Windows creates
unneeded default route 0.0.0.0/0, which might cause routing issues.

Delete route after a small delay (to ensure that Windows has created
a profile for a new network).

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:39 +08:00
Lev Stipakov
d7f8c47a2e nrpt: create separate policy per dns suffix
Contrary to what documentation says, on Windows 10 only first DNS suffix is respected.

OVPN3-133

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
577b5ca7b4 cli.cpp: fix typ0 in define
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
fc8f89d394 [OVPN3-129] android: ensure all SWIG files are archived and saved
The core libraries together with the all the SWIG output files
are now archived and saved in the O3 folder for later usage.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08: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
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
76bb99cb53 fix usage of to_string() in Android
Android is missing std::to_string() support, therefore
we should make sure the compiler has a chance to use
the openvpn::to_string() implementation provided in the core.

Remove the 'std::' prefix in time.hpp to accommodate the
behaviour described above.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08:00
Lev Stipakov
44c183aaf8 time: mute type conversion warnings for UWP client
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:39 +08:00
Lev Stipakov
7d7490c5c9 transport: enable socket protect call for UWP
OVPN3-124

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:39 +08:00
Lev Stipakov
1c003ac4e7 transport: pass protocol type to external factory
OVPN3-124

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:39 +08:00
Lev Stipakov
c0de92c7e4 transport: add stop_requeueing method
Used by UWP client to prevent queueing receive
on TCP socket after establishing tunnel.

OVPN3-124

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
e2c60c8662 android: build core library with MD5 support
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
3928069caa [OVPN3-119] mbedTLS: create INSECURE profile including MD5
Following an high number of users complaints, it was suggested
to re-enable MD5 and to give our users a notice period of some
months before dropping its support entirely.

With this patch we add a new certificate profile called "insecure"
which is equal to "legacy" with the addition of MD5.

By default OpenVPN3 still use legacy and the insecure profile
must be enabled explicitly by the client app.

The new profile is also enveloped in an ifdef so that
such support is not introduced, unless who builds the core
knows about it.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
4f99310341 remove function accidentally duplicated by last merge
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:39 +08:00
Antonio Quartulli
b91d8418ed self-test: add missing includes
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
f3cf64516f [OVPN3-116] disable SSL_CBC_RECORD_SPLITTING
SSL_CBC_RECORD_SPLITTING is not enabled in OpenVPN-2.x
therefore we have to disable it by defaultin OpenVPN-3 as well
to keep wire compatibility.

This feature can cause nasty behaviours when communicating over
TLS-1.0. Crashes of servers running openvpn < 2.3.7 have also
been witnessed due to an assert on the packet size (assert has been
removed in 2.3.7).

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-12-22 17:59:38 +08:00