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

64 Commits

Author SHA1 Message Date
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
James Yonan
074dbafa27 Ported minicrypto lib to OS X for PolarSSL optimization.
These scripts

  scripts/mac/build-minicrypto
  scripts/mac/build-polarssl

will now build PolarSSL (on OSX) with libminicrypto linkage.
Currently, only SHA1/256/512 implementations from OpenSSL are
built in libminicrypto.  We leave the current PolarSSL AES
implementation as-is since it now implements AES-NI.

Also added portable openssl/build-openssl script.
2014-03-04 17:42:00 -07:00
James Yonan
ebd47cb635 Updated PolarSSL crypto self-test in the core for PolarSSL 1.3.x
using new shaX method names.  Also updated proto.cpp test suite
to run SelfTest::crypto_self_test on startup.
2014-03-04 10:42:07 -07:00
James Yonan
48fd793c4e Minor changes to test suite test/ssl/proto.cpp:
* On Windows, allow build parameters to be specified in
  protowin.h.

* For client and server, initialize tls_version_min to
  TLSVersion::UNDEF.
2014-03-03 18:43:13 -07:00
James Yonan
bd02377947 Changes to core self test test/ssl/proto.cpp :
* Fixed compile issue due to need to replace cc.enable_debug()
  with cc.ssl_debug_level = 1.

* Added RENEG var to control number of "virtual seconds" between
  SSL renegotiations.

* Doc changes in README.txt.
2014-03-03 14:43:38 -07:00
James Yonan
e46aa77826 Doc update for proto/ssl stress test. 2014-01-07 15:47:41 -07:00
James Yonan
82be8b0107 packet_id.hpp now logs errors to a SessionStats objects,
like the rest of the core.

Added verbose() method to class SessionStats so that clients can
know whether to pass extra text data to error() virtual method.
2013-05-22 05:13:11 +00:00
James Yonan
f71e6c485e Minor test script move. 2013-01-31 15:05:24 +00:00
James Yonan
0ba6e76170 Added copyright to some straggler files. 2013-01-31 15:00:45 +00:00
James Yonan
8af477eb06 Additional file reorg in proto unit test. 2013-01-30 21:15:07 +00:00
James Yonan
77bd160a51 Updated proto unit test with fresh certs/keys. 2013-01-30 21:08:55 +00:00
James Yonan
0387c23486 Minor edits & file reorg to protocol unit test. 2013-01-30 16:24:37 +00:00
James Yonan
923908c19a Minor doc update. 2012-11-27 04:00:30 +00:00
James Yonan
9f18b28f86 Misc build system changes to support OpenSSL. 2012-11-27 03:05:46 +00:00
James Yonan
d5874f4684 Misc client and pre-server cleanup. 2012-11-26 01:51:24 +00:00
James Yonan
cf70bee986 In proto.cpp test code, default to OpenSSL server. 2012-09-26 01:33:41 +00:00
James Yonan
b88790efef iOS client changes:
* Updated to Xcode 4.5 and tested client build on iOS6.

* Note that it is no longer necessary to copy the private
  SystemConfiguration header files for the VPN API into the
  Xcode tree.  The OpenVPN Xcode project file will now
  reference them directly from the ovpn3 tree.

* Note that in Xcode 4.5, the iPhoneOSProductTypes.xcspec file that
  must be edited to allow bundle signing is now a binary plist.
  Use the Mac plutil tool to convert it to JSON so it can be edited
  then convert back to binary:

  $ cp iPhoneOSProductTypes.xcspec iPhoneOSProductTypes.xcspec.backup
  $ plutil -convert json -r iPhoneOSProductTypes.xcspec
  [ edit iPhoneOSProductTypes.xcspec according to instructions in
     ovpn3/doc/Build_VPN_App_and_Plugin.pdf ]
  $ plutil -convert binary1 iPhoneOSProductTypes.xcspec

* The ARM assembler provided in Xcode 4.5 is no longer able to
  assemble the Minicrypto ASM algorithms.  As a workaround, before
  updating to Xcode 4.5, preserve the previous clang binary by
  copying it to ~/clang3/clang -- the build-minicrypto script will
  expect it to exist.  This is the version of clang that must be used:

  $ ~/clang3/clang --version
  Apple clang version 3.0 (tags/Apple/clang-211.10.1) (based on LLVM 3.0svn)
  Target: x86_64-apple-darwin11.4.2
  Thread model: posix

* Make sure to update your PATH to include the new Xcode 4.5 clang and
  rebuild all libraries.  I found that updating to Xcode 4.5 left the
  old clang in /usr/bin.  The Xcode 4.5 clang should show this version
  info:

  $ clang --version
  Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM 3.1svn)
  Target: x86_64-apple-darwin11.4.2
  Thread model: posix

* Added $O3/scripts/mac/build-all script to build all Mac/iOS
  dependencies.
2012-09-25 21:04:27 +00:00
James Yonan
dcd62a79e6 Allow test/ssl/proto.cpp to be run on Mac OS X with PolarSSL
used as both client and server implementation.

Added DH support to PolarSSL.

Added CLIENT_NO_RENEG and SERVER_NO_RENEG flags to test code
in proto.cpp to allow scenarios to be tested where either
the server, client, or both initiate renegotiation.

Updated test/ovpncli/cli.cpp with new command line options
and will now run on Mac OS X.

Updated Android and iOS build systems to no longer include
any LZO support, and to include Snappy support instead.
2012-09-15 06:56:18 +00:00
James Yonan
58efad3b74 Updated linux scripts to work with latest core and library
organization.

Added scripts under scripts/linux for building dependent
libraries.

Added test/ovpncli/cli.cpp to provide a command line client that
exercises ovpncli.hpp API and can be built via build script.
2012-09-09 23:10:20 +00:00
James Yonan
da1ae7be57 More additions to debugging code for KeyContext state
transitions in proto.hpp.
2012-08-31 21:39:01 +00:00
James Yonan
0622cd2878 Minor refactoring to help bracket rare session invalidated
exception in proto.hpp.
2012-08-31 06:50:43 +00:00
James Yonan
7331ee349b Full iOS beta for OpenVPN Connect. 2012-08-01 12:28:13 +00:00
James Yonan
eccd2cf64f Extended build script to build static libraries.
First version of static libovpncli tested on
iPad (without tun support yet).
2012-05-29 21:15:28 +00:00
James Yonan
2206210562 Misc fixes to update PolarSSL support for 1.1.3. 2012-05-29 16:29:11 +00:00
James Yonan
7b55f4d767 Refactored Mac build scripts to easily switch between OS X, iOS, and iOS simulator. 2012-05-27 09:55:44 +00:00
James Yonan
dafe931877 Build script changes when CLANG=1:
* use -fvisibility=hidden
* use -O4 (LTO) by default
2012-05-23 04:45:01 +00:00
James Yonan
53fa94260f Added clang/LLVM support. 2012-05-22 12:25:33 +00:00
James Yonan
130364c1a5 Add sha2/sha4 to PolarSSL/OpenSSL bridge.
Clean up PolarSSL build scripts, allow testing target.
2012-03-25 22:07:45 +00:00
James Yonan
ca680ba568 Added capability for PolarSSL to use OpenSSL ciphers/digests. 2012-03-23 20:04:33 +00:00
James Yonan
1531bb6f8f Implemented AppleCryptoAPI for Mac. 2012-03-15 12:13:16 +00:00
James Yonan
c4d19c69ea Minor reorg in SSLContext classes. 2012-03-14 03:24:45 +00:00
James Yonan
1b0088ab2e PolarSSL support fully implemented (except for External PKI). 2012-03-14 00:51:40 +00:00
James Yonan
801bfae881 Added Polar SSL crypto support via PolarSSLCryptoAPI. 2012-03-13 04:51:52 +00:00
James Yonan
34dc950815 Core refactor to abstract random and crypto APIs using
static polymorphism.  Only OpenSSL crypto API is
presently implemented.  Still need to implement Apple
and PolarSSL.
2012-03-12 12:24:40 +00:00
James Yonan
74503a4efa Started PolarSSL port. Initially just add RNG support.
Because PolarSSL RNG requires state object, add state
objects for all other RNG providers (OpenSSL, Apple SSL)
to maintain a polymorphic model.
2012-03-11 12:09:25 +00:00
James Yonan
da248a8fbd Search/replace of:
std::exception& e

to:

  const std::exception& e
2012-02-17 19:28:44 +00:00
James Yonan
1f5e50d733 Implemented OpenVPNClient stats methods.
Simplified autologin sensing.
Java test client will now dump stats on exit.
2012-02-12 23:09:28 +00:00
James Yonan
f13ed3e7a8 Implemented Java client using Swig. 2012-02-11 14:02:51 +00:00
James Yonan
f57c9da3a8 Added QUIET option to proto.cpp.
Other minor fixes to proto.cpp.
2012-02-07 12:56:32 +00:00
James Yonan
e7a5d9f55b Start process of moving client logic out of cli.cpp into
general-purpose classes.

Rename ProtoStats to SessionStats and make it more flexible
by using an abstract base class model.

Add a client event queue for the beginnings of a client-backend
API.

Added logic to ProtoContext to invalidate session on certain
kinds of errors in TCP that would be normally be okay in UDP
such as HMAC_ERROR, DECRYPT_ERROR, etc.

Add some alignment adjustment logic for READ_LINK_TCP (3 bytes)
and READ_LINK_UDP (1 byte).
2012-02-04 10:24:54 +00:00
James Yonan
d9e8a028c8 Ported core to Windows except for TAP driver support. 2012-01-25 08:32:27 +00:00
James Yonan
29bc40bf09 Added TCP transport support.
Disable retransmission of control channel packets
when running in TCP mode.
2012-01-20 23:13:48 +00:00
James Yonan
ac32190acf Minor changes to proto.cpp on Apple to conform with new
SSL context Config class semantics.
2011-12-18 11:33:15 +00:00