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

96 Commits

Author SHA1 Message Date
David Sommerseth
3fbe0a2701
Update copyrights
Signed-off-by: David Sommerseth <davids@openvpn.net>
2020-03-18 19:37:32 +01:00
Arne Schwabe
9c547ba3ff
Remove force_aes_cbc_ciphersuites option
This option has been very likely been to fix some incompatibilities
between some TLS libraries. But nobody really remember what it fixes
and its usage today is questionable. So remove the option instead
of supporting an option we cannot even test anymore.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2020-03-11 19:51:18 +01:00
Arne Schwabe
424d9b34af Rename GCM classes and files to AEAD
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2020-02-18 18:50:27 +01: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
56a831f92a [OVPN3-5] crypto/ssl: add support for AES-256-CTR
Add support for AES-256-CTR (used by tls-crypt) in the crypto
layer and make sure that each SSL library plugin is aware of it.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-09-27 16:16:18 +08:00
James Yonan
782e8eb4ff Apple: moved some source files.
Moved Apple non-crypto source files from openvpn/applecrypto
to openvpn/apple.

Signed-off-by: James Yonan <james@openvpn.net>
2017-04-12 13:28:08 -06:00
James Yonan
d689b6dd20 Added new Apple Core Foundation wrappers:
CFHost
CFSocket
CFStream

Signed-off-by: James Yonan <james@openvpn.net>
2017-04-12 12:32:20 -06:00
James Yonan
10eb7233f2 Apple CF wrapper: renamed OWN/BORROW.
In keeping with Apple terminology, do the following renames:

  CF::BORROW -> CF::GET
  CF::OWN -> CF::CREATE

This more clearly ties into Apple's "Get" and "Create" rules
for object allocation and wrapping.

Signed-off-by: James Yonan <james@openvpn.net>
2017-04-12 12:20:02 -06:00
James Yonan
962fe87103 Apple CF wrapper: simplify cf.hpp dependency profile.
simplify cf.hpp dependency profile so that it
can easily be included without drawing in too many other
dependencies.  In particular, move code that depends
on buffer.hpp to cfhelper.hpp and remove dependency on
exception.hpp.

Signed-off-by: James Yonan <james@openvpn.net>
2017-04-12 12:16:32 -06:00
James Yonan
fc7eaafd82 Apple CF wrappers: moved CFRunLoop/CFRunLoopSource wrapper
to applecrypto/cf, where all other CF wrappers currently
reside.

Signed-off-by: James Yonan <james@openvpn.net>
2017-04-12 11:59:22 -06:00
James Yonan
b2cd82a5bf copyright: updated to 2017.
Signed-off-by: James Yonan <james@openvpn.net>
2017-03-18 13:11:09 -06:00
James Yonan
050e8717f1 mbedTLS: Port from polarssl-1.3 to mbedtls-2.3 (symbol renames)
This patch renames internal OpenVPN 3 symbols
from polarssl -> mbedtls.

Signed-off-by: James Yonan <james@openvpn.net>
2017-03-18 12:24:54 -06:00
James Yonan
1fd81ebf96 random : because the RandomAPI interface now supports
both cryptographic and non-cryptographic algorithms, as
a failsafe, add a new virtual method assert_crypto()
that will throw an exception if the algorithm is not
crypto strength.  assert_crypto() should now be called
before any RNG is used for crypto purposes.
2017-03-18 12:24:54 -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
971abda88f copyright : updated to 2016 2016-09-03 23:29:23 -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
b75c780cab Renamed boost::intrusive_ptr<T> usage to RCPtr<T>. 2015-05-17 21:26:53 -06:00
James Yonan
35ac9f6229 Renamed types.hpp to size.hpp since it now only defines
size_t and ssize_t.
2015-05-17 13:27:34 -06:00
James Yonan
fe6fcefa61 C++11 : rename NULL to nullptr 2015-05-17 02:53:37 -06:00
James Yonan
36550cd35e Update to C++11 noncopyable semantics.
Instead of inheriting from boost::noncopyable,
use the C++11 delete qualifier:

    Class(const Class&) = delete;
    Class& operator=(const Class&) = delete;
2015-04-23 15:10:43 -06:00
James Yonan
069de90ffd minor C++11 updates:
* rename BOOST_NOEXCEPT to noexcept

* verify that certain classes are noexcept move constructable
  including Option, Buffer, BufferAllocated, RunContext::Thread
2015-04-23 12:49:25 -06:00
James Yonan
e42aa65c96 Added lflags parameter to SSLConfigAPI::load().
Added initial flag LF_PARSE_MODE indicating
whether "mode" directive should be parsed.
2015-02-10 15:50:25 -07:00
James Yonan
73672d1884 Added SSLConfigAPI abstract base for configuring SSL properties
independently of SSL implementation.
2015-01-31 21:51:25 -07:00
James Yonan
0362c56c17 Add reference to private AppleCrypto AES-GCM implementation. 2015-01-27 14:12:09 -07:00
James Yonan
c2c7292a70 Updated copyright to 2015. 2015-01-06 12:56:21 -07:00
James Yonan
99fa118ad3 Removed CRYPTO_API::Cipher and CRYPTO_API::Digest from all crypto
implementations, replacing with general-purpose CryptoAlgs::Type.
2014-10-23 19:19:08 -06:00
James Yonan
a15b680dbd Simplified CipherInfo and DigestInfo by not storing
the CryptoAlgs::Type in the object.

For AppleCrypto, delegate name functionality to
CipherAlgs::name().
2014-10-21 23:03:55 -06:00
James Yonan
255b71958f Reversed polymorphic ProtoContext performance degradation.
* Performance degradation from recent commit was occurring
  in PRNG.

* Allow RNG to be used in place of PRNG.  For PolarSSL
  at least, this change completely reverses the
  polymorphic ProtoContext performance degradation
  and turns it into a net performance gain.

* Added bool prng to RNG constructors to allow
  the implementation to optimize for PRNG
  (only PolarSSL currently supports this).

Documented different use-cases for RNG vs. PRNG
in ProtoContext:

  RNG -- Random number generator.
  Use-cases demand highest cryptographic strength
  such as key generation.

  PRNG -- Pseudo-random number generator.
  Use-cases demand cryptographic strength
  combined with high performance.  Used for
  IV and ProtoSessionID generation.
2014-10-21 16:45:20 -06:00
James Yonan
3eefcab48f Updated AppleCrypto implementation for compatibility
with new CryptoAlgs cipher/digest designation scheme.
2014-10-21 15:49:16 -06:00
James Yonan
12e3f20e92 Converted SSL_API from static to dynamic polymorphism
(using SSLFactoryAPI and SSLAPI as base classes).
2014-10-15 18:12:38 -06:00
James Yonan
8b71fa9800 Converted RAND_API from static to dynamic polymorphism
(using RandomAPI as base class).
2014-10-15 12:53:18 -06:00
James Yonan
f340d93980 Implemented EnumIface for enumerating network interfaces using
getifaddrs.

Implemented iOSActiveInterface, a new ReachabilityInterface for
iOS based on EnumIface.
2014-08-22 15:16:16 -06:00
James Yonan
f539b3816d Refactored Reachability classes to use the abstract base class
ReachabilityInterface to define the basic interface for
reachability testing.

This allows for the development of new Reachability
implementations.
2014-08-22 14:58:38 -06:00
James Yonan
d54f17966b Core: fix to Reachability::reachableVia so that WiFi is only
considered to be reachable if both internet.status() and
wifi.status() both return ReachabilityBase::ReachableViaWiFi.
Previously for WiFi, we only checked internet.status().
2014-08-16 14:33:11 -06:00
James Yonan
08dd447a1c cf.hpp should #include <iostream> because it uses std::cerr. 2014-08-15 21:52:18 -06:00
James Yonan
d9b5cdf588 Core: SSL layer changes:
* Renamed SSL method write_ciphertext_ready() to
  read_cleartext_ready() for clarity.

* It's important that read_cleartext_ready() returns an accurate
  status.  To this end, add ssl_get_bytes_avail to the return
  expression for PolarSSL:

    return !ct_in.empty() || ssl_get_bytes_avail(ssl);

  This will also consider buffering inside of PolarSSL,
  and avoid potential deadlocks.

  Other SSL modules (AppleCrypto and OpenSSL) have been
  commented to warn of this issue.

* Factored out constants such as SHOULD_RETRY to namespace
  SSLConst.

* Added flags var to SSL configs.

* Added new SSL flag LOG_VERIFY_STATUS.  If disabled,
  makes for a quiet SSL negotiation if no errors.

* Detect SSL partial writes and designate a new error status
  code (SSL_PARTIAL_WRITE).

* In ProtoStackBase, detect unclassified errors from SSL layer
  (throw unknown_status_from_ssl_layer).

* PolarSSL module now recognizes Close Notify status and returns
  SSLConst::PEER_CLOSE_NOTIFY.

* In ProtoStackBase, factored out some error handling into
  common method.
2014-08-10 19:34:00 -06:00
James Yonan
564dcdc2cf Added C++11 move construction/assignment to CF::Wrap,
BufferAllocatedType, ScopedPtr, and ScopedFD.
2014-08-10 16:53:39 -06:00
James Yonan
2c6d972ad6 Added AGPL copyright/licensing language. 2014-07-20 21:22:06 -06:00
James Yonan
5129b4402c Minor addition to CF helper code:
Added CF::Wrap<T>::from_generic() method.
2014-07-11 00:32:59 -06:00
James Yonan
11acfc6ca2 Implemented Mac connection lifecycle monitoring object
(MacLifeCycle).

Monitor connection lifecycle notifications, such as sleep, wakeup,
network-unavailable, and network-available.

Note that not all platforms define a lifecycle object.  Some
platforms such as Android and iOS manage lifecycle notifications at
the service level, and they call pause(), resume(), reconnect(),
etc. as needed using the main ovpncli API.

Also, added a reason string to Pause event.
2014-03-24 17:28:46 -06:00
James Yonan
e3388ff1ec On Mac, create a DNS watchdog thread to monitor for potential changes
to DNS settings by a foreign actor.  If changes are detected,
revert them.
2014-03-24 17:23:17 -06:00
James Yonan
611cf24a38 Misc improvements to Apple CF (Core Foundation) wrappers:
* More flexible type casting.
* Support C++11 move constructors.
* Added some additional dictionary and array methods.
* mutable_dict_copy now verifies that passed src dictionary
  is defined.
2014-02-27 18:09:03 -07:00
James Yonan
96fdae7067 Fixes to allow openvpn/applecrypto/util/reachable.hpp to build
on Mac OS X.
2014-01-17 23:30:31 -07:00
James Yonan
7d2f5d43a4 iOS: network reachability and sleep/wakeup fixes for iOS 7.1 beta 2 2014-01-03 22:41:14 -07:00
James Yonan
29d4135c68 Added support for DES-CBC cipher to Applecrypto. 2013-12-20 16:37:19 -07:00
James Yonan
1481327d72 OpenVPN 1.0.2 build 98 (iOS)
Ported iOS client and OpenVPN 3 core to ARM-64.
Now building a "fat binary" with Xcode 5.0.1 that
targets arm7, arm7s, and arm64.

Outstanding issues:

* IPv6 doesn't route through tunnel on iOS7
* Client doesn't install on iOS 5.1.1.
2013-11-11 12:33:35 -07:00
James Yonan
ebad7a8bad Started a Mac OS X port of client using Mac VPN API.
Port is on hold pending VPN entitlement that must be
added (for Mac) to OpenVPN Tech. Apple Developer account.
2013-07-02 00:12:43 +00:00
James Yonan
d22631f741 For iOS build, added "Live Simulator" build configuration -- this
will build the app as if it was running on the simulator, i.e. with
null tun device, but will build for an actual iOS device.

OPENVPN_SSL_DEBUG defined in ovpncli.cpp is now a debug level and
can be set to an integer value (or 0 to disable).
2013-06-07 21:55:54 +00:00