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

659 Commits

Author SHA1 Message Date
James Yonan
5f85652033 For client, replaced all instances of PRNG to new dynamic type. 2014-10-19 19:59:48 -06:00
James Yonan
5102cff6f1 Added polymorphic classes for message digest algorithms.
Converted PRNG from static to dynamic polymorphism.
Did not fix PRNG users yet.
2014-10-19 19:14:56 -06:00
James Yonan
e8ca0c47f3 Added "chm" tag to CBC/HMAC encrypt/decrypt class names and
source filenames to distinguish from new modes such as AEAD.
2014-10-19 15:19:14 -06:00
James Yonan
677cd039c4 Defer data channel initialization until after client-side
options pull, so that cipher/digest can be pushed by server.
Note: incomplete, see fixmes.
2014-10-18 20:37:08 -06:00
James Yonan
bd04ed3755 Added CryptoAlgs for managing crypto algorithms independently of
underlying crypto implementation.

Modified proto.hpp to use the new CryptoAlgs types for
cipher/digest selection.

Added initial PolarSSL implementation for cipher/digest
selection using CryptoAlgs types.

Note: this implementation is incomplete, see fixmes.
2014-10-18 10:50:51 -06:00
James Yonan
9145145b64 Checkpoint toward fully polymorphic data channel API. Added a
three-level factory model:

CryptoDCFactory   -- builds CryptoDCContext objects for a given
                     cipher/digest
CryptoDCContext   -- builds CryptoDCBase objects for a given key ID
CryptoDCBase      -- encrypt/decrypt data channel
2014-10-17 15:52:29 -06:00
James Yonan
031554e45a Comment out the "set -e" at the top of scripts/android/build-toolchain
as it appears to cause premature exit.
2014-10-16 11:45:28 -06:00
James Yonan
f47ce33c48 Renamed CryptoContextBase to CryptoDCBase to emphasize
that this is the Data Channel crypto API.  Related factories,
derived classes, and typedefs also renamed.
2014-10-16 10:10:42 -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
fd57f32ac2 In proto.hpp, delay instantiation of CryptoContext until
init_data_channel_crypto_context().
2014-10-14 23:15:21 -06:00
James Yonan
11e9ca2a20 Added linux/core.hpp with n_cores() and bind_to_core(). 2014-10-13 16:10:49 -06:00
James Yonan
411c63902d In tunio.hpp, allow stats ptr to be NULL. 2014-10-12 19:19:48 -06:00
James Yonan
ab7dfe6f05 Added CryptoContextBase abstraction to allow use of new
data channel modes and non-CBC ciphers such as AES-GCM.
2014-10-08 13:43:40 -06:00
James Yonan
1e8d9d55ee Added missing #include to openvpn/polarssl/util/error.hpp. 2014-09-25 15:30:12 -06:00
James Yonan
c2968bfe08 Added README.rst. Contains basic instructions for building
a Mac OS X client based on OpenVPN 3.
2014-08-31 14:05:13 -06:00
James Yonan
2b09f0ccc8 Fixes to get Java-based client working on Linux again. 2014-08-29 23:33:57 -06:00
James Yonan
c192716aa4 Fixes to javacli/build-android :
* Use "git clean -q -fXd ." to clean.
* Remove DBG_DIR_SUFFIX code, as this is now built into
  $PLATFORM definitions in vars.
* Added CXX_COMPILER_FLAGS.
2014-08-29 23:29:49 -06:00
James Yonan
1c95639063 Build linux dependencies with LIB_FPIC="-fPIC" so that they can
be linked into Java native module (i.e. libovpncli.so).
2014-08-29 23:27:09 -06:00
James Yonan
4a6ebb5bae Added missing method set_disconnect() to linux tuncli.hpp. 2014-08-29 18:49:55 -06:00
James Yonan
f777487748 Added script vars/o3 to set O3 env var. 2014-08-29 18:44:41 -06:00
James Yonan
5539a22684 Repo reorganization: standardize on $O3 representing the top-level
directory that contains core and possibly other components as well.
2014-08-29 18:42:02 -06:00
James Yonan
758af9708e After git repo reorganization, updated Android build scripts for
dependencies and OpenVPN 3 shared library.
2014-08-29 11:52:16 -06:00
James Yonan
68afaf3324 Created build-extras system where other components (outside of core)
can modify build system behavior.
2014-08-28 16:06:26 -06:00
James Yonan
6ba90c9ef7 In build script, remove references to DBG_DIR_SUFFIX as it is made
obsolete by existence of vars-x-dbg files.
2014-08-28 16:04:27 -06:00
James Yonan
bdcb1980a8 Added AGPL text in COPYING. 2014-08-28 15:05:23 -06:00
James Yonan
302046c3ea Updated build scripts for repo reorganization. 2014-08-28 13:33:14 -06:00
James Yonan
9373f515ee Cleaned up top-level directory by moving vars-* and dependency
build scripts to vars and deps.
2014-08-27 16:40:34 -06:00
James Yonan
d53d21a32c Minor fix to TunNull: added missing virtual method
set_disconnect().
2014-08-26 13:10:05 -06:00
James Yonan
f5be27e837 Added new method TunBuilderBase::tun_builder_persist():
Return true if tun interface may be persisted, i.e. rolled
into a new session with properties untouched.  This method
is only called after all other tests of persistence
allowability succeed, therefore it can veto persistence.
If persistence is ultimately enabled,
tun_builder_establish_lite() will be called.  Otherwise,
tun_builder_establish() will be called.
2014-08-25 22:37:48 -06:00
James Yonan
55d6eff7ef Added AGPL copyrights to some misc source files. 2014-08-25 01:02:40 -06:00
James Yonan
3be8d66d0b Added disconnect bool to TunBuilderBase::tun_builder_teardown:
+    // Indicates that tunnel is being torn down.
+    // If disconnect == true, then the teardown is occurring
+    // prior to final disconnect.
+    virtual void tun_builder_teardown(bool disconnect) {}
2014-08-24 23:09:16 -06:00
James Yonan
e957170893 Adjusted calls in udpserv.hpp to UDPTransport::Link because
send() method now returns 0 (success) or a system error code
instead of boolean true (success) or false (error).
2014-08-24 22:56:20 -06:00
James Yonan
bd919049e8 Moved "sources" file from top-level directory into scripts. 2014-08-23 01:26:59 -06:00
James Yonan
f5b71c8d43 Merge branches 'server.20140819' and 'ios-tun-persist.20140816' 2014-08-23 01:12:46 -06:00
James Yonan
17ca7f440a Added new explicit TRANSPORT_ERROR event that is triggered when
the transport layer socket (UDP, TCP, or HTTP proxy) encounters
a send error that indicates potential network reconfiguration
at the system level.

TRANSPORT_ERROR will trigger a core-level reconnect in 5 seconds
(higher than the usual 2), and also notify the higher levels
(above ClientAPI::OpenVPNClient), allowing them to schedule
their own network reachability tests to preempt the default
5-second reconnect.
2014-08-22 15:32:35 -06:00
James Yonan
e66fed28b7 Added new TunBuilderBase method tun_builder_establish_lite
that is similar to tun_builder_establish, however it is called
when the connection is restarted with a persisted tunnel.
2014-08-22 15:26:45 -06:00
James Yonan
a6de516649 Factored out most of the business logic of Mac::Version into
AppleVersion so that it can be used by other version
implementations such as iOS.
2014-08-22 15:18:09 -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
b7bb4f0cfb Added IP::Addr::from_sockaddr() method to allow construction
of an IP::Addr object using an IPv4 or IPv6 struct sockaddr.
2014-08-22 14:45:10 -06:00
James Yonan
06359beab1 Added remote bypass feature to tun_persist, currently enabled
on iOS only.  Remote bypass will add exclude routes for all
cached remote server IPs so that the client is not locked out
of contacting subsequent servers in the remote list after the
routing configuration for the initial connection has taken effect.
2014-08-20 10:11:22 -06:00
James Yonan
5fc2aff9d7 Merge branch 'master' into ios-tun-persist.20140816 2014-08-19 17:02:49 -06:00
James Yonan
d091ef6afc Support TransportMap seed randomization. This is to prevent
an attacker from using knowledge about the hash table
bucket hashing function to maliciously attempt to create
unbalanced hash buckets, which in turn could lead to DoS.
2014-08-19 16:46:56 -06:00
James Yonan
2f2c785f17 Removed TransportServerParent, as it doesn't appear to be needed yet. 2014-08-19 16:07:17 -06:00
James Yonan
5826910bbe Refactored server-side client instance object (ServerProto::Session)
to use Link abstraction (openvpn/common/link.hpp) to link with
transport layer (and other layers such as routing and management
as development progresses).
2014-08-19 15:41:59 -06:00
James Yonan
1531189578 class BackRef is no longer used. Move it to unused directory. 2014-08-19 09:20:39 -06:00
James Yonan
d87a9e3c1e Server development initial checkpoint:
1. UDP server
2. Client instance objects

No routing, authentication, or management.

Server will negotiate a client then push AUTH_FAILED.
2014-08-19 01:13:42 -06:00
James Yonan
ea406b83c8 Added flag OPENVPN_RC_USERDEF to allow for debug implementations
of intrusive_ptr_add_ref and intrusive_ptr_release.
2014-08-19 00:57:38 -06:00
James Yonan
170fc59508 Refer to abort() as std::abort(). 2014-08-18 02:55:30 -06:00