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

2478 Commits

Author SHA1 Message Date
James Yonan
160c4f667a
license : this branch (common) is proprietary, so remove all GPL headers.
Signed-off-by: James Yonan <james@openvpn.net>
2020-01-09 12:22:55 +02:00
James Yonan
20a160b723
copyright : updated to 2016 2020-01-09 12:22:55 +02:00
James Yonan
a23ebb0654
Factored out HTTP Server acceptor classes into openvpn/acceptor. 2020-01-09 12:22:55 +02:00
James Yonan
bde3a3ec01
Added i/o abstraction layer.
Created a lightweight abstraction layer so that another i/o
reactor can be dropped in place of asio.

This commit includes:

* Added ASIO=1 to many "go" scripts that require asio
* Renamed "asio::" to "openvpn_io::".

Signed-off-by: James Yonan <james@openvpn.net>
2020-01-09 12:22:55 +02:00
James Yonan
05f6f01772
copyright: updated to 2017
Signed-off-by: James Yonan <james@openvpn.net>
2020-01-09 12:22:55 +02:00
James Yonan
e316c8d82d
license : this branch (common) is proprietary, so remove all GPL headers.
Signed-off-by: James Yonan <james@openvpn.net>
2020-01-09 12:22:54 +02:00
James Yonan
aed8b6c194
copyright : updated to 2016 2020-01-09 12:22:54 +02:00
James Yonan
e8aeff0607
Fixed issue in openvpn/acceptor/namedpipe.hpp when building on pre-Vista Windows: the PIPE_REJECT_REMOTE_CLIENTS flag to CreateNamedPipeA isn't recognized by pre-Vista Windows, so #ifdef out on those platforms. 2020-01-09 12:22:54 +02:00
James Yonan
780fc414c8
Minor fix to namedpipe.hpp: added missing include. 2020-01-09 12:22:54 +02:00
James Yonan
2b0ff516a2
Factored out HTTP Server acceptor classes into openvpn/acceptor. 2020-01-09 12:22:53 +02:00
James Yonan
713d1c9ffc
HTTP: added Alt Routing support to HTTP client/server
Alt Routing allows services on meshed PG nodes to communicate
with services on other nodes via the secure mesh, and without
requiring SSL.

Signed-off-by: James Yonan <james@openvpn.net>
2020-01-09 12:22:53 +02:00
James Yonan
fd5eb53e18
Added i/o abstraction layer.
Created a lightweight abstraction layer so that another i/o
reactor can be dropped in place of asio.

This commit includes:

* Added ASIO=1 to many "go" scripts that require asio
* Renamed "asio::" to "openvpn_io::".

Signed-off-by: James Yonan <james@openvpn.net>
2020-01-09 12:22:53 +02:00
James Yonan
f914b19b5a
Moved asio files from openvpn/common to openvpn/asio
Signed-off-by: James Yonan <james@openvpn.net>
2020-01-09 12:22:53 +02:00
James Yonan
6a005cd487
copyright: updated to 2017
Signed-off-by: James Yonan <james@openvpn.net>
2020-01-09 12:22:52 +02:00
James Yonan
ac4550b413
license : this branch (common) is proprietary, so remove all GPL headers.
Signed-off-by: James Yonan <james@openvpn.net>
2020-01-09 12:22:52 +02:00
James Yonan
4983ec3e03
copyright : updated to 2016 2020-01-09 12:22:52 +02:00
James Yonan
6e3857adc5
ListenerBase : now inherits from preprocessor var OPENVPN_ACCEPTOR_LISTENER_BASE_RC (which may be virtual) and which defaults to non-virtual RC<thread_unsafe_refcount>
This is done for OMI server-side, to allow the OMI object to
be both a socket listener and runcontext client.
2020-01-09 12:22:52 +02:00
James Yonan
3f8b88e40a
Factored out HTTP Server acceptor classes into openvpn/acceptor. 2020-01-09 12:22:46 +02:00
James Yonan
23c14a3e32 AddrPort, PeerAddr: added to_json() methods
Signed-off-by: James Yonan <james@openvpn.net>
2019-12-26 03:44:14 -07:00
James Yonan
6a5430e763 ServerPushList: added JSON parse() method
Signed-off-by: James Yonan <james@openvpn.net>
2019-12-26 03:44:14 -07:00
James Yonan
a9f2055d07 string: added starts_with_delim() function
Signed-off-by: James Yonan <james@openvpn.net>
2019-12-26 03:44:14 -07:00
Arne Schwabe
8ea9b68138 Fix free in RSA external PKI, remove unused return value of EC do_sign
Errors fixed from gcc:

openvpn/openssl/pki/extpki.hpp: In static member function ‘static ECDSA_SIG* openvpn::ExternalPKIECImpl::ecdsa_sign_sig(const unsigned char*, int, const BIGNUM*, const BIGNUM*, EC_KEY*)’:
openvpn/openssl/pki/extpki.hpp:366:11: warning: variable ‘out’ set but not used [-Wunused-but-set-variable]

From Converity scan:

>>>     CID 351295:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "rsa_meth" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
117     	  if (rsa_meth)
118     	    RSA_meth_free(rsa_meth);
119     	}

Remove also check from sigout.size() > siglen. The buffer will throw an
exception if the decoded bytes do not fit.
2019-12-18 17:48:50 +01:00
Lev Stipakov
0e13f83152
findcoredeps.cmake: add missing libs to ovpncli
Those are required by Wintun support core.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-12-11 16:15:54 +02:00
David Sommerseth
d0ab53a5d5
Merge changes applied to coming Core release 2019-12-10 15:20:49 +01:00
Lev Stipakov
d97d4882d9 net30 topology (win): fix incorrect remote calculation
When configuring net30 topology (TAP_WIN_IOCTL_CONFIG_POINT_TO_POINT),
remote value is calculated based on assumption that local address is
network + 2 and remote is network + 1. This holds for openvpn 2.4:

ifconfig 10.8.0.6 10.8.0.5

local 10.8.0.6
network = local & 255.255.255.252 = 10.8.0.4
remote = network + 1 = 10.8.0.5

But this doesn't hold when using VPN server by vpngate:

ifconfig 10.211.1.73 10.211.1.74

local 10.211.1.73
network = local & 255.255.255.252 = 10.211.1.72
remote = network + 1 = 10.211.1.73

Remote is same as local.

To fix, use openvpn2's approach - don't do any assumptions
and use ipconfig's second option as remote value.

Fixes https://github.com/OpenVPN/openvpn3/issues/95 (broken connection to vpngate)

Reported-by: Serathin <https://github.com/Serathin>
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-12-05 11:21:15 +01:00
James Yonan
050f994347 Buffer: added some useful debugging info to buffer_full exception
Signed-off-by: James Yonan <james@openvpn.net>
2019-12-05 11:20:10 +01:00
Arne Schwabe
6892471802 Build fat libraries for OpenSSL on ios 2019-12-04 19:00:25 +01:00
Arne Schwabe
4c361ec4c3 Expand Unittest documentation 2019-12-03 11:04:15 +01:00
Arne Schwabe
99adaa0e88 Rename openvpnerrstr.c to openvpnerrstr.h
The file is used like a header in all its uses. Having it being a .c
file is a lot more difficult to handle with modern build systems
2019-12-02 14:16:56 +01:00
Arne Schwabe
a8e2e15ac0 Fix cityhash build on aarch64 2019-12-02 11:54:09 +01:00
Lev Stipakov
b62654274f
ovpn3-core.vcxproj: add ARM64 architecture
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-11-28 13:21:33 +02:00
Lev Stipakov
d446559992
appveyor: use vcpkg for building deps
Also use msbuild instead of removed python scripts

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-11-28 13:20:17 +02:00
James Yonan
4d138252df
unittests: added missing #include <mutex>
Signed-off-by: James Yonan <james@openvpn.net>
2019-11-27 18:55:08 +01:00
James Yonan
a0d05ee96c
unittests: updated googletest lib dir in build script
Signed-off-by: James Yonan <james@openvpn.net>
2019-11-27 18:55:07 +01:00
James Yonan
1ecb82ee2f
kovpn: support disabling compression framing
Signed-off-by: James Yonan <james@openvpn.net>
2019-11-27 18:55:06 +01:00
Arne Schwabe
15e5547849 [OVPN3-492] Add support for external EC certificates/keys
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2019-11-27 17:58:57 +01:00
Arne Schwabe
d159dc7c1c Move RSA external key implementation to its own file
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2019-11-27 17:58:57 +01:00
David Sommerseth
22d0f2bf28 dcocli: Do not use KoTun with ENABLE_PG and USE_TUN_BUILDER
Signed-off-by: David Sommerseth <davids@openvpn.net>
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2019-11-27 17:11:50 +01:00
Arne Schwabe
d1fd4ef1f1 Minor code style clean up
- use explicit for non copy single argument constructor
- add override where applicable

Signed-off-by: Arne Schwabe <arne@openvpn.net>
Signed-off-by: David Sommerseth <davids@openvpn.net>
2019-11-27 17:11:50 +01:00
Arne Schwabe
e7799e32ee Fix missing parameter introduce by add_bypass_routes commit
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2019-11-27 17:11:50 +01:00
Arne Schwabe
3817b8072e Refactor selecting tun methods into a common header file
This fixes DCO client only including iproute and using methods of
TUN_LINUX

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2019-11-27 17:11:50 +01:00
Arne Schwabe
8c9092b56a Rename add_exclude_route to add_route_tunbuilder
The name add_exclude_route is extremely confusing in this context as
it implies that the function only adds exclude routes and not include
routes.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2019-11-27 17:11:50 +01:00
Arne Schwabe
6228165f37 Implement configuring DCO dev via tun builder
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2019-11-27 17:11:50 +01:00
Arne Schwabe
1e2d7b1c81 Implement opening /dev/net/ovpn via tun builder interface
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2019-11-27 17:11:50 +01:00
Arne Schwabe
913adc6807 Move KoTun::DevConf into its own header file
This allows to include/use this file when the other dependencies of
kodev.hpp are not yet declared. (E.g. logging)

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2019-11-27 17:11:50 +01:00
Lev Stipakov
a679f3869e
win: support for openssl 1.1.1
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-11-27 17:10:52 +02:00
Arne Schwabe
97881b5c4f Require internal json for sslctx json functions
These functions require methods that are not available if
jsoncp is used as json library

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2019-11-27 16:03:44 +01:00
Arne Schwabe
8cc348228c Update OpenSSL to 1.1.1d and fix mac build script
Remove universal libraries and 32 bit support.
Allow user to enable/disable SSL libraries with OSSL=1 MTLS=0
2019-11-27 13:54:57 +01:00
David Sommerseth
568fdce197
Finalizing OpenVPN 3 release v3.5.2
Signed-off-by: David Sommerseth <davids@openvpn.net>
2019-11-22 15:13:05 +01:00
Lev Stipakov
13cc577053
wintun: fix ring buffer registration
As documentation says:

 > If lpOverlapped is NULL, lpBytesReturned cannot be NULL

While on Windows 10 passing NULL works by accident,
on Windows 7 it crashes.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
(cherry picked from commit 11d705d2c7)
2019-11-22 15:12:23 +01:00