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

244 Commits

Author SHA1 Message Date
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
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
James Yonan
121e9752e7 client API: added portOverride
portOverride, like serverOverride, will override the port used
in the remote directive of the profile.

Signed-off-by: James Yonan <james@openvpn.net>
2017-12-22 17:59:38 +08:00
James Yonan
106981c3e2 JSON: allow alternative JSON library implementations
Allow source files that require JSON library functionality
to include a single file (openvpn/common/jsonlib.hpp) which
will then draw in the appropriate JSON library header based
on configuration #defines.

Code can #ifdef on HAVE_JSON to test whether or not JSON
functionality is available (previously, HAVE_JSONCPP
was used).

Currently supports JsonCpp and an OpenVPN-internal JSON
implementation.

This model assumes that alternative JSON implementations
are API-compatible with JsonCpp.

Signed-off-by: James Yonan <james@openvpn.net>
2017-12-22 17:59:38 +08:00
Antonio Quartulli
f33e7c2968 [OVPN3-5] tls-crypt: add tls-crypt support in proto.hpp test unit
By default tls-crypt is now enabled instead of tls-auth.
It can be easily changed by editing the define at the top
of test/ssl/proto.hpp

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-09-27 16:16:18 +08:00
Antonio Quartulli
389353c243 proto.cpp: uninit process at the end of the execution
Not really important, but worth fixing to avoid polluting
any memchecker output with unreleased (leaked) resources.

Release process resources before exiting the main function.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2017-09-27 16:16:18 +08:00
Lev Stipakov
8ae2a3f7cf Integrate Google Test framework
Implemented sample test for LogInfo class.

OVPN3-27
2017-09-27 16:16:18 +08:00
Lev Stipakov
96e0d89454 Revert "Merged in OVPN3-21-prepend-log-record-with-unique- (pull request #7)"
This reverts commit 62423c91cb, reversing
changes made to f26b08b6ef.
2017-09-27 16:16:18 +08:00
Lev Stipakov
cce245587b Prepend log string with unique reference.
OVPN3-21

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-08-08 11:35:37 +03:00
James Yonan
f89da9619e OpenVPN 3 client: added single-thread mode:
* enabled by OPENVPN_OVPNCLI_SINGLE_THREAD compile flag.

* turns off the signal blocker.

* Adds overrideable clock_tick() virtual method with
  configurable frequency that is used when processing
  signals when the OpenVPN client is running in
  single-thread mode.

Signed-off-by: James Yonan <james@openvpn.net>
2017-04-12 12:37:41 -06:00
James Yonan
691a641a43 Added i/o abstraction layer.
Created a lightweight abstraction layer so that another i/o
reactor can be dropped in place of asio.

The basic approach is to rename all references to asio::xxx
types to openvpn_io::xxx and then make openvpn_io a
preprocessor variable that points to the top-level namespace
of the i/o reactor implementation.

All of the source files that currently include <asio.hpp> now
include <openvpn/io/io.hpp> instead:

This gives us a lightweight abstraction layer that allows us
to define openvpn_io to be something other than asio.

Other changes:

* Inclusion of asio by scripts/build is now optional, and is
  enabled by passing ASIO=1 or ASIO_DIR=<dir>.

* Refactored openvpn/common/socktypes.hpp to no longer
  require asio.

* Refactored openvpn/log/logthread.hpp to no longer require
  asio.

* Added openvpn::get_hostname() method as alternative to
  calling asio directly.

* openvpn/openssl/util/init.hpp will now #error
  if USE_ASIO is undefined.

Signed-off-by: James Yonan <james@openvpn.net>
2017-03-30 15:48:14 -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
fc85b371ab logging: removed #ifdef OPENVPN_INSTRUMENTATION, and made
the previously conditional code always included.
2017-03-18 12:24:54 -06:00
James Yonan
88ae6eba36 SSL : added tls-cert-profile directive for mbedTLS.
legacy            -- allow 1024-bit RSA certs signed with SHA1
preferred         -- require at least 2048-bit RSA certs signed
                     with SHA256 or higher
suiteb            -- require NSA Suite-B

The current default is legacy.

The directive can be set in the profile or overridden/defaulted
in the client API via ClientAPI::Config::tlsCertProfileOverride
var.

TODO: implement for OpenSSL.
2017-03-18 12:24:54 -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
a6b7cf458f mbedTLS: Port from polarssl-1.3 to mbedtls-2.3 (functional)
This patch builds on work by David Sommerseth <davids@openvpn.net>
to move the PolarSSL API from polarssl-1.3 to mbedtls-2.3, which
has significant differences in some areas.

- Strings containing keys, certificates, CRLs, and DH parameters
  need to be NULL-terminated and the length argument provided to
  the corresponding mbedtls parse function must be able to read
  the NULL-terminator.  These places have been modified with a
  '+1' to the length argument (x509cert.hpp, x509crl.hpp, dh.hpp,
  pkctx.hpp).

- The SSL context object has been split up in mbedtls-2.3
  Now many of the SSL configurations are done in a separate
  SSL config object, which is added to the SSL context once
  configured.  In addition private/public keys are now stored
  in a separate pk_context, which is later on attached to the
  SSL context.  Due to this, many of the calls setting either
  SSL configuration parameters or working with pk_contexts have
  been refactored.  (sslctx.hpp)

- The older API loading the CA chain took a hostname argument.
  The new API requires mbedtls_ssl_set_hostname() explicitly to
  be called setting hostname.  Some refactoring was needed here
  too (sslctx.hpp).

- x509_oid_get_description() is now replaced by
  mbedtls_oid_get_extended_key_usage().

- when mbedTLS renamed OID_CMP to MBEDTLS_OID_CMP, the return
  value was changed so that a return value of 0 now means equal
  rather than not-equal.

- mbedtls/platform.h must be loaded before any other mbedtls
  include files (sslchoose.hpp).

- All functions and macros related to mbedTLS are now prefixed
  with mbedtls_/MBEDTLS_

- Refactored External PKI and added some options to cli.cpp
  to make it easier to test that the feature still works
  correctly.  This included removing the sig_type var and
  standardizing on a PKCS#1 digest prefix per RFC 3447.

- Updated test keys to 2048 bits.

- Updated dependency build scripts to build mbedTLS.

- Enable MD4 in mbedTLS build script (needed for NTLM auth).

- Use an allow-all X509 cert profile to preserve compatibility
  with older configs.  Going forward, we will implement new
  options to increase strictness on minimum RSA key size and
  required cert signing algs.

- Added human-readable reason strings that explain why
  a given cert in the chain wasn't accepted.

- This patch doesn't rename any files or rename internal
  OpenVPN 3 symbols such as PolarSSLContext.  This will
  be done in a separate commit.

Signed-off-by: James Yonan <james@openvpn.net>
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
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
83a2e3584f cli : updated ovpn3 command line client to no longer delay
one second before handling INFO,OPEN_URL messages since
the ovpn3 core now implements the delay internally.
2016-08-17 15:26:08 -06:00
James Yonan
ba15049f18 Mac client : implemented INFO,OPEN_URL handler for Mac OS X
command line client.
2016-08-11 14:05:33 -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
ca5205b4f3 random : consolidate random functionality in RandomAPI. 2016-06-28 22:31:17 -06:00
James Yonan
94ffa2318c ovpn3 "cli" client : support DEBUG=3 in build script
to enable full debug info and disable optimization.
2016-06-26 21:56:53 -06:00
James Yonan
2f1fd1ad83 Added INFO notification to OpenVPN control channel protocol:
INFO,<payload>

Payload can be any UTF-8 printable string under 64 KB
(multiple lines are okay).

INFO notifications can be sent from server to client
in real-time, on any active client connection.

The client will attach the payload to an INFO event and
forward it to the controlling app via the event callback:

  virtual void event(const Event&) = 0;
2016-05-10 17:53:09 -06:00
James Yonan
74d89fab7c OpenVPN protocol core : when passing objects to methods that
may assert ownership over them, use C++11 rvalue/move
semantics.
2016-05-10 13:02:11 -06:00
James Yonan
2255bab03a OpenVPN protocol core : added logic to control channel
receive path to reassemble messages fragmented by the
SSL layer up to a max message size of 64 KB.

Ramifications:

* Peer info data and pushed options can be significantly
  larger (i.e. approaching 64 KB).

* Less need for the options continuation feature.

Limitations:

* While this patch doesn't change the underlying OpenVPN
  protocol, it can result in messages being sent that are
  fragmented by the receiving SSL implementation into
  multiple buffers.  Implementations that lack reassembly
  capabilities (such as OpenVPN 2.x at this point in time)
  would see each buffer fragment as a separate message.

* This patch running on the server will break negotiation
  with pre-peer-info clients.  Basically this means it will
  interoperate with any OpenVPN 3 version or OpenVPN 2.x
  version that includes the June 2010 commit "Implemented a
  key/value auth channel from client to server.
  Version 2.1.1i".
2016-05-09 21:39:04 -06:00
James Yonan
c033a93aa7 proto test : offset client/server reneg-sec to avoid
renegotiation collisions, and add note about new OpenSSL
error that can be triggered by such collisions.
2016-05-06 14:13:09 -06:00
James Yonan
0f40e47f9c cli.cpp : in log() method, use a mutex around std::cout
output, since log() can be called from multiple threads.
2016-04-09 00:57:21 -06:00
James Yonan
86d7729794 clievent : distinguish between 3 event categories
(instead of 2):

(a) ordinary events such as CONNECTING, CONNECTED,
(b) nonfatal errors such as TRANSPORT_ERROR that will
    automatically trigger a reconnect, and
(c) fatal errors such as AUTH_FAILED, that will be followed
    by a DISCONNECT

In ClientAPI::Event, added a new "fatal" boolean to indicate
when errors are fatal.

Added a new non-fatal event TUN_ERROR that triggers a
reconnect when errors are indicated in tunio.hpp.
2016-03-31 20:24:28 -06:00
James Yonan
081925f81b Removed gok script. 2016-03-19 02:00:26 -06:00
James Yonan
2b42b96312 Added IPv6 setting to ovpn3 client API via
ClientAPI::Config::ipv6 string:

  IPv6 preference
    no      -- disable IPv6, so tunnel will be IPv4-only
    yes     -- request combined IPv4/IPv6 tunnel
    default (or empty string) -- leave decision to server
2016-02-05 12:16:20 -07:00
James Yonan
426eb9d671 Autologin Sessions are now enabled via the client API
bool ClientAPI::Config::autologinSessions and default
to false.  Previously, the logic was hardcoded to true.

Autologin Sessions can be enabled in the cli.cpp wrapper
using the -a flag.
2016-02-04 11:39:44 -07:00
James Yonan
cd675664f0 Added build flag OPENVPN_DISABLE_EXPLICIT_EXIT to prevent
client from sending an Explicit Exit message to server on
disconnect.  Intended only for testing.
2016-01-27 14:16:03 -07:00
James Yonan
e3be7b998b Added gremlin option to client, controllable via
ClientAPI::Config::gremlinConfig string.

The gremlin option allows extra packet latency
or unreliability to be added to the tunnel.

The format of the option is a comma-separated list
of numerical parameters:

  send_delay_ms, recv_delay_ms, send_drop_prob, recv_drop_prob

Parameter description:

  send_delay_ms  : delay packets by n milliseconds before
                   transmission (UDP/TCP).
  recv_delay_ms  : delay received packets by n milliseconds
                   before processing them (UDP/TCP).
  send_drop_prob : drop sent packets with probability 1/n
                   (UDP only).
  recv_drop_prob : drop received packets with probability
                   1/n (UDP only).

Set any parameter to 0 to disable.

Gremlin parameters currently work with UDP and TCP
transport as documented above, but not for proxy transport.

Client must be built with the OPENVPN_GREMLIN flag to compile
gremlin functionality.

Command-line client can set the gremlin config
string using --gremlin or -G, for example:

  --gremlin=250,250,64,64

When using the above parameters, an extra 500 milliseconds
will be added to round-trip latency, and 1/64 sent or
received packets will be dropped.
2016-01-26 00:27:11 -07:00
James Yonan
8e9c059680 In command line client (cli.cpp), allow additional config
file directives to be specified on the command line after
the config file name.
2015-12-28 13:23:39 -07:00
James Yonan
1219720d26 In cli.cpp, fixed regression where command line arg
parser wasn't aligning correctly on the argv array.
2015-12-11 12:11:25 -07:00
James Yonan
ee8489afe2 In test/ssl/go, build for PolarSSL by default but
build for OpenSSL if OSSL=1.
2015-11-27 17:25:59 -07:00
James Yonan
a96c972c43 Refactored cli.cpp so it can be called externally
via openvpn_client() method.
2015-11-25 19:51:12 -07:00
James Yonan
8fd85864c3 In cli.cpp, document the process for using a custom logging
class with ovpn3 core:

  // If enabled, don't direct ovpn3 core logging to
  // ClientAPI::OpenVPNClient::log() virtual method.
  // Instead, logging will go to LogBaseSimple::log().
  // In this case, make sure to define:
  //   LogBaseSimple log;
  // at the top of your main() function to receive
  // log messages from all threads.
  // Also, note that the OPENVPN_LOG_GLOBAL setting
  // MUST be consistent across all compilation units.
  #if 0
  #define OPENVPN_LOG_GLOBAL // use global rather than thread-local log object pointer
  #include <openvpn/log/logbasesimple.hpp>
  #endif
2015-11-25 11:31:24 -07:00
James Yonan
0609c76c0b Refactored Mac OS X tun handler (tuncli.hpp) by moving tun
interface management code into TunMac::Setup()
(tunsetup.hpp).

Added TunBuilderSetup::Config, Base, and Factory for use
as a unix-portable abstraction layer for tun interface
management code.

Added Stop object pointer to Mac OS X tun config
(TunMac::ClientConfig), so that tun management code can
detect stop commands if it's blocking outside of outer
asio::io_context.
2015-11-20 19:16:39 -07:00
James Yonan
a9ed9d47f2 ovpn3 client API now supports adding user-defined peer-info
data to the OpenVPN handshake (peer-info is a client -> server
key/value list that is part of the OpenVPN protocol).  To
add peer-info key/value pairs, use ClientAPI::Config::peerInfo.

Incremented core OPENVPN_VERSION to "3.0.6".
2015-09-21 19:42:24 -07:00
James Yonan
1acc33feaf Obsoleted asiodispatch in favor of C++11 lambdas. 2015-06-25 13:59:12 -06:00
James Yonan
0bac5d8990 Core: revamped packet ID code to use a much larger window size,
allowing backtracks of up to 2048 (previous limit was 64).
In addition, we now maintain the packet ID window as a bit
array (previously a byte array was used).
2015-06-18 01:55:52 -06:00
James Yonan
496e797a21 Added client hooks for DCO (Data Channel offload).
Updated tun implementation on Linux.
2015-06-17 01:48:33 -06:00
James Yonan
b9844280e0 Minor gitignore mod. 2015-06-11 12:32:42 -06:00
James Yonan
c4a9cea3e1 Updated Windows client for VS 2015. 2015-06-09 11:21:41 -06:00
James Yonan
1563dca02f Added Asio to deps/lib-versions.
Removed Snappy dependency as ovpn3 clients now
standardize on LZ4 (with LZO-asym fallback).
2015-06-06 13:29:30 -06:00
James Yonan
c6a21c827b Boost dependency elimination -- final removal of Boost
dependency.  Asio is now included as a standalone,
header-only dependency.
2015-06-06 10:59:18 -06:00
James Yonan
8d9e1e2e41 Deleted some obsolete server files. 2015-06-04 21:06:07 -06:00
James Yonan
9c23b145a2 In ovpn3 command-line client (cli.cpp), scope the signal handler
(for unix) so that it's only active during thread->join() to
minimize potential deadlock issues between signal handler and
main thread.
2015-05-27 22:01:05 -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
e494846f7d Moved count_t to its own header file. 2015-05-17 13:17:24 -06:00
James Yonan
fe6fcefa61 C++11 : rename NULL to nullptr 2015-05-17 02:53:37 -06:00
James Yonan
3bcf8743c1 More conversions of threads/mutexes from boost to C++11 std.
As part of this work, removed openvpn/common/thread.hpp
2015-05-10 20:04:22 -06:00
James Yonan
e4c2ab6c71 In cli.cpp, improve dynamic challenge/response support.
In client API, allow ClientAPI::ProvideCreds::dynamicChallengeCookie
to be set with either the dynamic challenge/response State ID
or the full cookie.
2015-05-10 15:39:57 -06:00
James Yonan
f094f93213 In cli.cpp build script, enable -DOPENVPN_SHOW_SESSION_TOKEN 2015-05-10 15:38:43 -06:00
James Yonan
2144a08c69 Converted test/ssl/proto.cpp from boost::thread to std::thread. 2015-04-23 17:17:40 -06:00
James Yonan
a51c0bf0bf Mostly complete transition from boost::thread to std::thread. 2015-04-23 17:07:56 -06:00
James Yonan
2ca397b513 Core: #define BOOST_DISABLE_ASSERTS because boost asserts on
null smart pointer dereferences are fairly useless
since a segfault will generate more actionable debug info.
2015-04-10 23:48:24 -06:00
James Yonan
a37949cade Minor change to test/ovpncli/go script. 2015-04-10 22:40:10 -06:00
James Yonan
7927982371 Added "Exclude Routes Emulation" feature for both IPv4 and IPv6.
This feature is needed by Android because it lacks a native
VPN API method for excluding routes.

If redirect-gateway is enabled and exclude routes are present,
such as:

  route 54.215.128.71 255.255.255.255 net_gateway

the client will emulate the excluded route(s) by adding routes
that encompass the entire IPv4/v6 address space EXCEPT for the
excluded route.  These routes will be used for redirect-gateway
instead of the standard 0.0.0.0/0 and ::0/0.
2015-02-28 15:09:53 -07:00
James Yonan
8f4b17ce6a Add extension parameter to ProfileMerge constructor to allow
parsing of files with non-ovpn extensions.
2015-02-10 15:48:08 -07:00
James Yonan
5c31950852 Added TLS version min override parameter to ClientAPI::Config:
// Override the minimum TLS version:
  //   disabled -- don't specify a minimum, and disable any minimum
  //               specified in profile
  //   default or ""  -- use profile minimum
  //   tls_1_0  -- use TLS 1.0 minimum (overrides profile)
  //   tls_1_1  -- use TLS 1.1 minimum (overrides profile)
  //   tls_1_2  -- use TLS 1.2 minimum (overrides profile)
  std::string tlsVersionMinOverride;
2015-02-04 20:29:43 -07:00
James Yonan
a1a3b6f256 Added "--alt-proxy, -A" help message to test/ovpncli/cli.cpp. 2015-02-04 14:57:09 -07:00
James Yonan
557df02296 Added AltProxy API that allows for alternative proxy implementations
to be developed outside the core.
2015-02-02 23:11:51 -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
d4af03c205 Extended follow_references parameter of ProfileMerge class to allow
for full reference following (e.g. cert ssl/serv.crt) as is helpful
in server-side environments.
2015-01-19 14:30:37 -07:00
James Yonan
84fb5c7731 Added NULL=1 option to test/ovpncli/go to build a tunnull binary. 2015-01-17 04:41:46 -07:00
James Yonan
c2c7292a70 Updated copyright to 2015. 2015-01-06 12:56:21 -07:00
James Yonan
3fe1a359c0 Added OpenSSL GCM support. 2014-12-31 00:24:54 -07:00
James Yonan
3115ad5cfe test/ssl/proto.cpp changes:
1. work with latest proto.hpp API changes.
2. NOERR -- if defined, turn off simulated errors
3. FORCE_AES_CBC -- set force_aes_cbc_ciphersuites SSL flag
4. if VERBOSE, enable SSL debugging output
2014-12-30 18:15:05 -07:00
James Yonan
7e1d159cee Major protocol upgrades:
* peer_id/DATA_V2/op32
  client -> server:
    IV_PROTO=2
  server -> client :
    push "peer-id 1234"
    push "peer-id -1"

* AEAD/GCM support
  client -> server:
    IV_NCP=2
  server -> client:
    push "cipher AES-256-GCM"

* Compression V2
  client -> server:
    IV_LZ4v2=1
    IV_COMP_STUBv2=1
  server -> client:
    push "compress stub-v2"
    push "compress lz4-v2"

* TCP non-linear packet ID
  client -> server:
    IV_TCPNL=1
  server -> client:
    [always enabled]
2014-12-21 10:32:37 -07:00
James Yonan
827fcb89e9 Added quick build scripts for ovpncli, proto, and serv. 2014-10-25 23:37:46 -06:00
James Yonan
8a5db3d9a6 Updated test/ssl/.gitignore 2014-10-23 20:27:05 -06:00
James Yonan
6422234d9f Added .gitignore for test/serv. 2014-10-22 12:39:09 -06:00
James Yonan
5fefd67404 Added test/serv/README.txt 2014-10-22 12:38:39 -06:00
James Yonan
ae04729453 Updated serv.cpp for new template-free ProtoContext. 2014-10-22 12:24:14 -06:00
James Yonan
8a7cba4135 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-10-22 12:24:14 -06:00
James Yonan
1017608878 Removed TransportServerParent, as it doesn't appear to be needed yet. 2014-10-22 12:24:14 -06:00
James Yonan
19ded1f0a3 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-10-22 12:24:14 -06:00
James Yonan
0034d0690f Added serv.cpp stub. 2014-10-22 12:24:14 -06:00
James Yonan
733ab29479 Moved original serv.cpp proof-of-concept into unused. 2014-10-22 12:24:14 -06:00
James Yonan
3bb3673a35 Minor fixes so that serv.cpp will compile. 2014-10-22 12:24:14 -06:00
James Yonan
05a4dc3519 Server checkpoint. 2014-10-22 12:24:14 -06:00
James Yonan
20ce65f7ea Checkpoint for new core server implementation (not yet complete). 2014-10-22 12:24:14 -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
05c2a1a56a Added some .gitignore files for compiled test binaries. 2014-10-21 16:55:32 -06:00
James Yonan
af0784b882 Doc Update
test/ovpncli/README.txt -- C++11 is the default mode, so
remove info about how to enable it.

test/ssl/README.txt -- include note about building proto
with Profile-Guided Optimization on Linux.
2014-10-21 16:48:05 -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
c7983ffef3 Allow HYBRID=1 builds of proto.cpp. 2014-10-21 16:41:05 -06:00
James Yonan
243fd3feaa Updated test/ssl/proto.cpp to work with new dynamically
polymorphic ProtoContext.

Benchmarks show that polymorphic changes to ProtoContext
have produced a slowdown of 1.64%.
2014-10-20 20:30:13 -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
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
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
55d6eff7ef Added AGPL copyrights to some misc source files. 2014-08-25 01:02:40 -06:00
James Yonan
b0ba64d3b8 Updated proto self-test README.txt doc. 2014-08-10 20:26:22 -06:00