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

68 Commits

Author SHA1 Message Date
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
61b6646bd0 options/hexstr : refactored parse_hex_number() to allow
error detection without throwing an exception, and
extended get_num() method in Option and OptionList to
parse both decimal and hex strings, where hex strings
are prefixed with "0x".
2016-05-12 13:45:14 -06:00
James Yonan
67e12552cf Option : refactor get_num() to provide variants with and
without a default value.  When throwing errors, cite the
index of the parameter in addition to its name.
2016-05-05 00:29:06 -06:00
James Yonan
211af3a91b string : rename methods for consistency with in-place/copy
variants of other string methods:

* rename add_trailing() -> add_trailing_copy()
* rename add_trailing_in_place() -> add_trailing()
2016-03-28 09:42:13 -06:00
James Yonan
e135add60e options : refactored get_num() so that it can be called on
either an Option or OptionList.
2016-03-28 00:02:58 -06:00
James Yonan
6ab7feff15 Make Option::err_ref() public, as it's useful when formatting
error messages that refer to a particular option.
2016-03-28 00:01:23 -06:00
James Yonan
2e06d3a367 Option : exception-proof Option::printable_directive() 2016-03-28 00:00:25 -06:00
James Yonan
ec879a1a1d Added OptionList::parse_option_from_line() method. 2016-03-15 15:04:18 -06:00
James Yonan
01a4dba328 Added OptionList::parse_from_argv_static() method for parsing
argv-style command-line.
2016-03-02 00:53:01 -07:00
James Yonan
4a00d11a4a OptionList::extend(other, name) now returns the number
of elements processed.
2016-02-05 12:11:08 -07:00
James Yonan
93913a3479 class Option -- provide a vararg constructor. 2016-02-05 12:09:37 -07:00
James Yonan
07bcab9ab3 Extend is_close_tag() in options.hpp to search for
wildcard close tag if tag string is empty.
2015-10-01 16:29:38 -07:00
James Yonan
ba91532554 In merge.hpp, detect multiline breakout attempt. 2015-09-18 21:25:40 -07:00
James Yonan
48a9d237d7 In options.hpp, added detect_multiline_breakout() method as
a security check to ensure that untrusted content pasted into
multiline config file directives such as:

<cert>
. . .
</cert>

doesn't try to break out of the pseudo-XML block
by inserting its own </cert>.
2015-09-18 10:19:38 -07:00
James Yonan
03057dee0d In OptionList, touched_ private bool is now mutable AND
volatile.  The volatile qualifier is added because
OptionList const methods are often called from multiple
threads concurrently.
2015-09-06 16:42:39 -07:00
James Yonan
c4a9cea3e1 Updated Windows client for VS 2015. 2015-06-09 11:21:41 -06:00
James Yonan
88518335c4 Boost dependency elimination -- change boost::algorithm
usage (for string algorithms) to use methods of our own
implementation in openvpn/common/string.hpp.
2015-06-04 19:22:59 -06:00
James Yonan
597c2837f4 In class Option, change storage class of "bool touched_" to
mutable so we can set it without having to resort to const_cast.
2015-06-03 23:50:34 -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
53e6af884a In OptionList, added get_optional_relaxed() and
get_default_relaxed() methods.
2015-05-13 21:55:32 -06:00
James Yonan
0fde33173a C++11 update: mass replace of boost::uint/int to std::uint/int. 2015-04-23 17:55:07 -06:00
James Yonan
9d9c51d6f4 C++11 update -- converted boost::unordered_map usage to
std::unordered_map.
2015-04-23 14:08:54 -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
a206d08820 Added OptionList::get_optional_noexcept method. 2015-04-09 15:21:56 -06:00
James Yonan
90d98c8fac class OptionList now inherits from RCCopyable. 2015-02-03 17:34:13 -07:00
James Yonan
58de6a371d Added class OptionList convenience method get_num()
with range checking.
2015-01-12 18:35:53 -07:00
James Yonan
c2c7292a70 Updated copyright to 2015. 2015-01-06 12:56:21 -07:00
James Yonan
0acb038808 Added class OptionList convenience methods get_default()
and get_num().

Also, get_optional() should return a std::string, not a
const std::string.
2014-12-29 21:54:23 -07:00
James Yonan
464690aa6b Added class ServerPushList for keeping track of
push "..." directives on the server.
2014-12-29 21:51:08 -07:00
James Yonan
ea29858135 Added Option::get_default method. 2014-12-13 21:20:29 -07:00
James Yonan
f5ff65562e OptionList, Option:
* Make use of C++11 move semantics for optimization, especially
  where std::vector<Option> is pushed onto OptionList.

* Fixed bug in Option::render() where arguments would be
  printed without any delimiter if RENDER_BRACKET flag was
  absent.

* Added parse_from_peer_info() method, for parsing peer info
  string received from client.
2014-10-30 10:36:33 -06:00
James Yonan
2c6d972ad6 Added AGPL copyright/licensing language. 2014-07-20 21:22:06 -06:00
James Yonan
03cf311f75 Windows: fix some MSVC compiler warnings. 2014-02-08 00:13:23 -07:00
James Yonan
b6d17ba69e Added Option::escape() method.
Minor string/option refactoring.
2013-12-28 20:20:21 -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
cf39be0516 Log unused options, i.e. options specified in config file that were
unrecognized, ignored, or unused.

This behavior is somewhat different (by design) to 2.x branch, which
will raise a fatal exception if an unrecognized option is
encountered.
2013-06-10 00:42:19 +00:00
James Yonan
906584ba3b Support "setenv opt" prefix before directives, where
its presence indicates that the directive is optional,
i.e. if a client doesn't understand the directive, it
should simply ignore it.
2013-06-08 16:10:35 +00:00
James Yonan
e92899c490 Relax options parser a bit and follow OpenVPN 2.x behavior
where if more than one instance of an option exists, and
a single instance of the option is required, use the last
instance.  Previously we would raise an exception in this case.
2013-06-03 06:31:22 +00:00
James Yonan
bbaaf65b0a Fixed options parsing issue if non-aggregate option was
specified in profile as well as pushed by server
(the pushed version should win).
2013-05-25 01:13:11 +00:00
James Yonan
cebc610e8e Implemented route-nopull (second attempt). 2013-03-14 02:54:58 +00:00
James Yonan
6c0be1e1c0 iOS: 1.0.1 build 55
Android: 1.1.9 build 31

* Reverted key-direction back to a default of 1.

* Raise fatal error if "fragment" option is used.

* Made TunBuilderCapture more useful as a base class for
  tun construction on various platforms.

* Added disableClientCert flag at ovpncli.hpp API.

* Updated help FAQ with more details on how to
  properly set key-direction, and notes about
  possible network disconnect during voice calls.
2013-01-24 13:34:17 +00:00
James Yonan
5055dedbfc Core: fixed issue with parsing time period options (such as
"reneg-sec"), where if period is 0, we must treat it as essentially
infinite.  This fixes the issue where "reneg-sec 0" was causing an
infinite connect loop.

Refactored number.hpp to provide all reasonable number-parsing
functionality, so that typeinfo.hpp can be retired.
2013-01-20 06:34:49 +00:00
James Yonan
4d9a751af2 Added head comments to all source files.
Minor reorganization of unicode code.
2012-11-23 06:18:43 +00:00
James Yonan
daa97ededd Added support for <connection> blocks in profile. 2012-11-14 05:12:48 +00:00
James Yonan
31d87f09a4 Extend config file parser to recognize end-of-line comments
that start with # or ;

To pass these chars as part of an argument, make sure to quote
them.
2012-11-14 03:25:59 +00:00
James Yonan
32a117242e More profile validation. 2012-11-14 02:35:50 +00:00
James Yonan
05aed22147 Allow multi-cert directives like ca and extra-certs to be specified
multiple times in the config file.
2012-11-12 16:17:25 +00:00