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

1175 Commits

Author SHA1 Message Date
James Yonan
184c6d672b redir.hpp : break out pipe i/o into its own source file. 2017-03-18 12:19:39 -06:00
James Yonan
74e05d8607 library : added class RedirectNull for redirecting stdin,
stdout, and stderr to /dev/null
2017-03-18 12:19:39 -06:00
Samuli Seppänen
04b2a3c9b7 Switch from AGPLv3 to GPLv3
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
2017-03-16 14:43:55 +02:00
James Yonan
883d967bae Incremented core version to 3.1.1 2016-09-23 16:46:24 -06:00
James Yonan
914cb0f906 client core : added MAC address reporting on Windows and Mac.
When "setenv PUSH_PEER_INFO" or "push-peer-info" is present
in client config, push the MAC address of the interface
owning the default route to the server via IV_HWADDR.
2016-09-23 16:33:04 -06:00
James Yonan
cf8d5b5c3f Incremented core version to 3.1.0 2016-09-16 04:16:40 +03:00
James Yonan
92aed81852 DCO : provide a mechanism for client to provide accurate
bandwidth stats when underlying data channel is offloaded.
2016-09-06 11:31:57 -06:00
James Yonan
07d37b0016 DCO : added explicit_exit_notify() client hook. 2016-09-06 11:31:57 -06:00
James Yonan
971abda88f copyright : updated to 2016 2016-09-03 23:29:23 -06:00
James Yonan
3fd2c451f5 Incremented core version to 3.0.21 2016-09-02 12:57:51 -06:00
James Yonan
79013381dc events : in client core, delay transmission of "Connected"
event to the last possible moment to avoid premature
trigger of post-connect events.
2016-09-02 12:52:21 -06:00
James Yonan
662bf7833e ovpn3 core : Added automatic data limits for Blowfish,
Triple DES, and other 64-bit block-size ciphers vulnerable
to "Sweet32" birthday attack (CVE-2016-6329).  Limit such
cipher keys to no more than 64 MB of data
encrypted/decrypted.  While our overall goal is to limit
data-limited keys to 64 MB, we trigger a renegotiation
at 48 MB to compensate for possible delays in renegotiation
and rollover to the new key.

This client-side implementation extends data limit
protection to the entire session, even when the server
doesn't implement data limits.

This capability is advertised to servers via the a
peer info setting:

  IV_BS64DL=1

meaning "Block-Size 64-bit Data Limit".  The "1" indicates
the implementation version.

The implementation currently has some limitations:

* Keys are renegotiated at a maximum rate of once per
  5 seconds to reduce the likelihood of loss of
  synchronization between peers.

* The maximum renegotiation rate may be further extended
  if the peer delays rollover from the old to new key
  after renegotiation.

Added N_KEY_LIMIT_RENEG stats counter to count the number
of data-limit-triggered renegotiations.

Added new stats counter KEY_STATE_ERROR which roughly
corresponds to the OpenVPN 2.x error "TLS Error:
local/remote TLS keys are out of sync".

Prevously, the TLS ack/retransmit timeout was hardcoded to
2 seconds.  Now we lower the default to 1 second and make
it variable using the (pushable) "tls-timeout" directive.
Additionally, the tls-timeout directive can be specified
in milliseconds instead of seconds by using the
"tls-timeout-ms" form of the directive.

Made the "become primary" time duration configurable via
the (pushable) "become-primary" directive which accepts
a number-of-seconds parameter.  become-primary indicates
the time delay between renegotiation and rollover to the
new key for encryption/transmission.  become-primary
defaults to the handshake-window which in turn defaults
to 60 seconds.

Incremented core version to 3.0.20.
2016-09-01 15:19:00 -06:00
James Yonan
26d0169055 time : Added Time::Duration::operator*(unsigned int) for
multiplying time durations.
2016-08-24 06:22:03 -06:00
James Yonan
636cd863ed ovpn3 SSL core: added rekey(CryptoDCInstance::NEW_SECONDARY)
method/type for initializing secondary key after a soft
renegotiation.
2016-08-23 19:36:24 -07:00
James Yonan
44813d7c6f core version : incremented to 3.0.19 2016-08-17 15:31:07 -06:00
James Yonan
8b41f8739e INFO message : buffer INFO control-channel messages received
near Connected event to fire one second after Connected
event, to reduce the chance of race conditions in the client
app, if the INFO event triggers the client app to perform an
operation that requires the VPN tunnel to be ready.
2016-08-17 15:23:26 -06:00
James Yonan
81c76484b3 C++11 : use member initializers in cliproto.hpp 2016-08-17 14:30:22 -06:00
James Yonan
5957ab8af1 server APIs : added set_acl_id(), set_fwmark(), and changed
the signature of push_reply().
2016-08-17 11:36:34 -07:00
James Yonan
a9d3f90f86 durhelper.hpp : added load_duration_default() method. 2016-08-17 11:35:52 -07:00
James Yonan
54fdda2ef4 URL::parm : added URL::ParmList::get_value_required()
method.
2016-08-17 11:34:45 -07:00
James Yonan
f3ed986525 URL::parm : trivial fix to return std::string instead of
const std::string.
2016-08-17 11:34:16 -07:00
James Yonan
b88fc41c7b URL::encode : do a speculative reserve() on return string. 2016-08-17 11:33:19 -07:00
James Yonan
96586adff0 Cleanup template : general cleanup including added missing
"inline" and using "typename" instead of "class" in
templates.
2016-08-17 11:32:01 -07:00
James Yonan
a3ecdf3260 route : removed mark as a route-specific property. 2016-08-17 11:31:11 -07:00
James Yonan
f275c66654 OpenSSL : Added class TokenEncrypt for encrypting/decrypting
tokens.
2016-08-17 11:27:36 -07:00
James Yonan
60b734fc34 RemoteList : randomize the list of IP addresses returned by
a DNS lookup.  This requires that RemoteList now owns a
RandomAPI::Ptr, which in turn simplifies the signature of
some other RemoteList methods such as randomize().
2016-08-07 09:31:28 -06:00
James Yonan
8ba7b47c43 RemoteList : removed some cases of address caching that
could occur even if tun_persist is disabled.

In particular, we now consider a set of multiple IP
addresses returned by a single DNS lookup to constitute a
kind of cache.  This helps us to not get stuck on stale
addresses when transitioning between NAT64 and regular
networks.
2016-08-07 01:17:29 -06:00
James Yonan
7e4ce67c8b iOS/Mac network reachability : Reachability and
ReachabilityTracker constructors now provide control over
which subobjects are enabled, i.e. internet and/or wifi.
2016-08-07 01:09:20 -06:00
James Yonan
e711fc70f5 iOS/Mac network reachability : don't contaminate
ReachableViaWiFi result by considering on-demand viability.
2016-08-06 21:12:43 -06:00
James Yonan
ea7cc9efd7 core version : incremented to 3.0.18 2016-08-05 10:57:36 -06:00
James Yonan
98a4643dc3 ovpn3 client : make sure to "touch" setenv directives when
iterating over them, so they don't show up as unused.
2016-08-05 10:11:25 -06:00
James Yonan
15cbd87b79 PolarSSL : for PolarSSL debug level, be sure to match on
USE_POLARSSL_APPLE_HYBRID as well as USE_POLARSSL and
include <polarssl/debug.h> for debug_set_threshold().
2016-08-05 00:57:21 -06:00
James Yonan
899fa6c4bc ovpn3 client API : added sslDebugLevel parameter to control
the logging level of the underlying SSL library.
2016-08-04 20:43:43 -06:00
James Yonan
b6b1207eeb C++11 : clang now complains about virtual methods that
override but don't include the "override" annotation,
so add the annotation as needed.
2016-08-03 13:01:44 -06:00
James Yonan
6e21fa4c58 RemoteList : added new public methods reset_cache()
and get_item().
2016-07-31 09:48:38 -07:00
James Yonan
d6acd6da66 OpenSSL : set maximum verify depth to 16. 2016-07-30 15:52:13 -07:00
James Yonan
fc249e6a46 OpenSSL, AuthCert : implemented DEFERRED_CERT_VERIFY SSL
flag, to allow server-side SSL users to get information
about client certificate validation errors without
immediately terminating the connection.  This allows
certificate errors to be handled at a higher level, such
as by messaging error info to the peer over the TLS control
channel.
2016-07-30 15:17:57 -07:00
James Yonan
b4982d78a1 OpenSSL : added new OpenSSL signature verification methods
OpenSSLSign::verify() and OpenSSLSign::verify_pkcs7().
2016-07-27 22:18:03 -07:00
James Yonan
a533374b15 linux : added daemon_pid() method and refactored
is_daemon_alive() to be based on it.
2016-07-27 22:14:20 -07:00
James Yonan
41c9857fd2 core version : incremented to 3.0.17 2016-07-13 19:02:02 -07:00
James Yonan
c7da2620e5 keepalive : in disable_keepalive(), be sure to translate
keepalive values properly when converting between
Time::Duration and unsigned int values, in the sense that
a disabled Time::Duration value (0 or infinite) should
translate to a zero-valued unsigned int.
2016-07-12 22:16:29 -07:00
James Yonan
689bfd7e8f keepalive : added is_keepalive_enabled() method. 2016-07-12 22:15:35 -07:00
James Yonan
d4b64f05fa proto.hpp logging : include more info in verbose KeyContext
logging, including:

* log Key ID,
* log on KeyContext object creation, and
* indicate whether new KeyContext object creation
  is local or remotely triggered.
2016-07-12 22:11:35 -07:00
James Yonan
cd66efb52b ovpn3 client : added compile-time string
OPENVPN_UNUSED_OPTIONS to allow client builds to
change the wording of the unused options title.
2016-07-12 22:08:06 -07:00
James Yonan
e0a9e01cb2 linux tun : add code similar to OpenVPN 2.x code that cycles
through tun driver units to find a free unit.
2016-07-12 22:05:12 -07:00
James Yonan
0128b8a98e linux tun : remove "no trunking support" error message. 2016-07-12 22:04:33 -07:00
James Yonan
93790ab02b usergroup : minor changes:
* Added uid() method.

* Removed "explicit" qualifier from constructors since it
  appears to be superfluous.

* Added "::" prefix to global libc functions.

* Added clarifying comment that SetUserGroup object does not
  own passwd and group objects, therefore *pw and *gr can
  change under us.
2016-07-12 22:02:37 -07:00
James Yonan
ecfc55f5cf time : added Time::Duration::enabled() method. 2016-07-12 22:01:57 -07:00
James Yonan
28c6cc2a57 peercred : added match_uid() method. 2016-07-12 22:01:16 -07:00
James Yonan
8a3e809d76 hexstr : print NULL when passed data pointer is null. 2016-07-12 22:00:35 -07:00