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

40 Commits

Author SHA1 Message Date
Charlie Vigue
ef8da98bd4 Buffer: Prepare to decouple allocated buffer / RC
Rename BufferAllocated --> BufferAllocatedRc

Buffer: split RC from BufferAllocated
Also make changes as needed where BufferAllocated is used

Buffer: Split allocation flags into own struct
Leaving flags in template causes each alias to have identical flags
by different names, which requires each type to pointlessly use
the nested name.

Make RC: Clean up headers buffer.hpp, make_rc.hpp

Signed-off-by: Charlie Vigue <charlie.vigue@openvpn.com>
2024-09-11 13:23:28 +00:00
Frank Lichtenheld
a89b6cb184 Update Linux build instructions in README.rst
- Remove dependency build. For normal use cases on a
  recent distro, installing all dependencies from distro
  should be fine. Tested on Ubuntu 20.04 (mbedTLS too old,
  otherwise okay) and Ubuntu 22.04.
- Document more dependencies. With the added dependencies a
  clean build and ctest run is possible starting with the
  default ubuntu:<version> containers.
- Use ninja. We use this for all of our non-VC builds, so
  recommend it here as well.

Based on a smaller change proposed in Github#301
by Scruel Tao.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2024-07-03 10:20:10 +00:00
Heiko Hund
be3f20dc58 introduce base types for strong and weak RNGs
The need of having to call the assert_crypto() member function to ensure
that a cryptographically strong RNG is used where needed, was reported
as potentially insecure, since calling it manually can easily be missed.

In the commit the two new classes StrongRandomAPI and WeakRandomAPI are
introduced. They are to be used instead of just RandomAPI, unless it
doesn't matter what strength the RNG is.

All the places the assert_crypto() was called were converted to using
StrongRandomAPI instead. Also the RNGs for which assert_crypto() was not
throwing are now inheriting from StrongRandomAPI.

Variable names, which have the StrongRandomAPI type, but were called
prng, are changed to rng instead to follow the source code convention.

Signed-off-by: Heiko Hund <heiko@openvpn.net>
2023-11-22 04:49:31 +01:00
Arne Schwabe
f159710100
Rename ProtoContext::Config to ProtoContext::ProtoConfig
The name Config is very generic and often leads to confusion which
class in particular is used in a given context. Rename Config to
ProtoConfig to give some more clue about the context.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2023-08-23 21:13:02 +02:00
Frank Lichtenheld
4544936f4c README.rst: document new MinGW/MSVC build
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2023-02-28 13:45:16 +01:00
Frank Lichtenheld
1a723da4fb README.rst: cleanup
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2023-02-28 12:30:30 +01:00
Frank Lichtenheld
18f3ae7c25 Switch builds to c++17 standard
We want to use features only present with c++17.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2023-02-09 13:15:02 +01:00
Frank Lichtenheld
2aea7ac4b5
Merge changes from coming OpenVPN 3 Core library v3.7 bugfix update
- test_cpu_time: fix unused variable
  - Allow GIT version to be reported as part of platform (version) string
  - Update OpenSSL to 3.0.5, build fat lib for macos, drop 32 bit on iOS
  - README.rst: some fixes for macOS instructions
  - extpki.hpp: ignore deprecated EC_KEY_* functions
  - mingw: fix OpenSSL on x86_64
  - mingw: fix broken OpenSSL checkout
  - test_ssl: fix ssl.enablelegacyProvider
  - dco/GeNL: ignore message for unrelated interfaces

Signed-off-by: David Sommerseth <davids@openvpn.net>
2022-08-25 15:32:11 +02:00
Nate Rock
e6a18f7d8c
docs: Added xxhash to macos brew install
Signed-off-by: David Sommerseth <davids@openvpn.net>
2022-08-24 17:55:22 +02:00
Frank Lichtenheld
c3129ddac8 README.rst: some fixes for macOS instructions
- Fix rst syntax error
- Add pkg-config to list of brew packages to
  install. While here, order them alphabetically.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
2022-07-11 14:47:34 +02:00
Arne Schwabe
568f6615cf Update build instruction for macOS and cleanup/remove build var
Remove the vars-osx64 and vars-iossim files which are no longer used.
The IOS simulator does not support the VPN API and builds for the
IOS simulator have not been done in a very long time nor are they
particular useful.

Also switch to pkg-config for jsoncpp by default.

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-02-10 18:59:01 +01:00
Heiko Hund
51bd6d4201 use DCO opportunistically
If DCO support is compiled in, detect if it is available (i.e. Windows driver
or Linux kernel module is loaded) and then use it, if it is.

This changes the default configuration for DCO from off to on, so users of
the library need to set ClientAPI::Config::dco to false in case they do not
want to use dco for a connection.

The change is also reflected in the reference client "ovpncli". If DCO is
enabled in a build, it will detect and use it. The previously available
"ovpncliovpndco" and "ovpncliovpndcowin" clients have thus been removed.

Signed-off-by: Heiko Hund <heiko@openvpn.net>
2021-05-27 17:20:24 +02:00
David Sommerseth
2a5f0ee76f
docs: Update README
The README file had several deprecated ways of building various test
binaries.  Clean up this and direct users towards using CMake
everywhere.

The change to test/ssl/CMakeLists.txt covers various build-time
parameters the deprecated build script supported.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2021-04-22 12:54:34 +02:00
Lev Stipakov
232e54f523
Add GitHub Actions for Windows build
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2021-04-21 08:44:01 +03:00
Lev Stipakov
b3c98c59ff
vcpkg: switch to manifest mode
Add vcpkg manifest with list of dependencies, which got
consumed by cmake configure phase and stored per-project.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2021-04-21 08:40:06 +03:00
David Sommerseth
e241c1b7a4
docs: Improve rendering of README
The GitHub rendering was not optimal and commit fa2919b27c added a few
more changes disabling HTML rendering completely.  This moves the
formatting closer to the .rst format GitHub supports.

Also fix a few various typ0s and a slight sentence improvement in the
new ovpn-dco section.

Signed-off-by: David Sommerseth <davids@openvpn.net>
2020-09-23 20:04:00 +02:00
Lev Stipakov
fa2919b27c README.rst: add instructions about ovpn-dco usage
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-09-22 15:28:48 +00:00
Lev Stipakov
ae0d84be60 README.rst: Update Linux build steps
Switch to CMake buildsystem.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-09-22 15:28:48 +00:00
Lev Stipakov
8ab6a7d954 README: update Windows build instructions
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2020-01-29 23:24:56 +01:00
Lev Stipakov
48d4fdeb4b
README.rst: update Windows build instruction
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-11-07 10:44:21 +02:00
Mike
390154d0e4
Update Build instructions for OSX
The existing instructions didn't work, and expected a couple of steps which I found and added.

Reviewed-by: David Sommerseth <davids@openvpn.net>
Reviewed-by: Lev Stipakov <lev@openvpn.net>
2019-10-03 11:23:40 +02:00
Lev Stipakov
4bd5869305 README.rst: Make Windows-specific build steps up to date.
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-07-17 17:45:47 +03:00
Lev Stipakov
a2496a3616 Wintun: experimental support
This introduces experimental support for Wintun
as an alternative for tap-windows6.

In order to use wintun, set "ClientAPI::Config::wintun"
flag to "true" or use "-w" option in test client.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2019-05-29 20:21:28 +03:00
Lev Stipakov
44c6cdfdc6
[OVPN3-206] readme: update Windows build instructions
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2018-03-26 23:58:33 +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
8eb0d6c764 Add Visual Studio project info to README
OVPN3-18

Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-08-02 17:18:38 +03:00
Lev Stipakov
5f648cebd4 Document Windows build process
Signed-off-by: Lev Stipakov <lev@openvpn.net>
2017-08-01 17:19:38 +03:00
James Yonan
15b356e315 README: colorize C++ code.
Signed-off-by: James Yonan <james@openvpn.net>
2017-03-20 03:38:20 -06:00
James Yonan
2bc561857c README: fix Github em-dash issue.
Github doesn't like |mdash| in restructuredText, so replace
with a literal unicode em-dash char.

Signed-off-by: James Yonan <james@openvpn.net>
2017-03-20 03:04:55 -06:00
James Yonan
66dbbb985e README: added Developer Guide.
Signed-off-by: James Yonan <james@openvpn.net>
2017-03-20 02:26:55 -06:00
James Yonan
69ccd555ea README: note that "cli" config file must have .ovpn
extension.

Signed-off-by: James Yonan <james@openvpn.net>
2017-03-19 16:32:45 -06:00
James Yonan
2625cf1e6f README: added OpenVPN 3 Client API section.
Signed-off-by: James Yonan <james@openvpn.net>
2017-03-18 21:20:55 -06:00
James Yonan
0f595b236c README: added Linux section.
Signed-off-by: James Yonan <james@openvpn.net>
2017-03-18 18:08:59 -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
3bb8436a3c Add Contributor License Agreement and OpenSSL linking exception
Signed-off-by: Samuli Seppänen <samuli@openvpn.net>
2017-01-10 15:36:30 +02:00
James Yonan
2be63c5204 Minor changes to README.rst:
* Revise the date associated with the assertion that
  OpenVPN 3 is of primary interest to developers.

* Revise the minimum PolarSSL/mbedTLS version.
2015-12-28 21:31:45 -07:00
James Yonan
43f9c18d6f Updated README.rst. 2015-12-28 17:47:18 -07: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
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