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

44 Commits

Author SHA1 Message Date
Arne Schwabe
775f1313a2 [test/misc] Convert token encrypt test to unittest
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
fffcb8083a [test/misc] Convert validate_creds test to unittests
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
59084a962e [test/misc] Convert IP checksum test to unittest
Lower amount of round from 10 million to 1 million since the test
will now be run every time and otherwise takes 20s

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
4ea420ad01 [test/misc] Convert OpenSSL PKI test to unittest
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
dccfd5bc09 [test/misc] testing: added jytest unit test wrapper
See test/jytest/README.txt for documentation.

Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
bba08fff25 [test/misc] tests: updated test/misc/sess_id.cpp to use the new conflict parameter added to SessionIDType::find_weak()
Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
168541a039 [test/misc] tests: moved misc/certcrl.cpp into test/openssl_pki and expanded its function
test/openssl_pki/pkitest.cpp (formerly moved misc/certcrl.cpp)
is an attempt to more fully test the OpenSSL PKI wrappers.

Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
8a5ce39bf1 [test/misc] tests: added streq.cpp
Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
0d75d41189 [test/misc] tests: added test for path::is_contained()
Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
564b0dfcba [test/misc] tests: extended route.cpp test for new IPv4/v6-specialized RouteType
Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
3e6b46ff78 [test/misc] Added IP checksum functions with support for partial checksums
Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
bfbb523568 [test/misc] tests: updated validatecreds.cpp for core changes
Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
ea1057b56c [test/misc] tests: updated route.cpp to test std::set<IP::Route>
Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
994ea2e411 [test/misc] tests: in static_key.cpp, added test for randomly
generated StaticKey.

Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
73f4420878 [test/misc] new tests: b64count, cookie, refscope, refscope1, sess_id,
sidasm, stat, statatomic, and strtempl.
2022-07-01 15:57:30 +02:00
James Yonan
9acd1feae6 [test/misc] tests : in path, test new varargs join() 2022-07-01 15:57:30 +02:00
James Yonan
cef5dc8aa4 [test/misc] tests : updated capture.cpp for new metric parameter passed
to tun_builder_(add|exclude)_route.
2022-07-01 15:57:30 +02:00
James Yonan
648c9a6fe3 [test/misc] Tests:
* Added hashstr and unicode1.

* Updated base64 to properly detect issues converting
  to/from utf-8 strings.

* In go script, NOSSL=1 must accompany PSSL=1 on Linux.
2022-07-01 15:57:30 +02:00
James Yonan
1fb59fb1eb [test/misc] Added test for OptionList::parse_from_argv_static(). 2022-07-01 15:57:30 +02:00
James Yonan
be72abb286 [test/misc] Added credential validation test in test/misc/validatecreds.cpp 2022-07-01 15:57:30 +02:00
James Yonan
aa75d6aaed [test/misc] Added misc tests:
* postcall.cpp -- demonstrate asio inter-thread messaging
* rcspeed.cpp -- test speed of various RC flavors

Fixed test/misc/rc.cpp so it builds/runs.
2022-07-01 15:57:30 +02:00
James Yonan
6c2babf73b [test/misc] Added tests for classes Stop and Cleanup. 2022-07-01 15:57:30 +02:00
James Yonan
4e85ec0722 [test/misc] Added test/misc/capture.cpp for testing new to_json() and
from_json() methods in TunBuilderCapture.
2022-07-01 15:57:30 +02:00
James Yonan
56cdfe6b00 [test/misc] Misc test code additions/changes:
expr.cpp -- test Macro::BooleanExpression
macro.cpp -- test Macro parsing and representation
uniter.cpp -- test Unicode::UTF8Iterator
format.cpp -- test minor changes to printfmt()
unused/comment_out.hpp -- unused code that comments
                          out a multiline string.
2022-07-01 15:57:30 +02:00
James Yonan
319250f33e [test/misc] Added code to test new format.hpp methods. 2022-07-01 15:57:30 +02:00
James Yonan
96578014b2 [test/misc] Added test for new packet ID code. 2022-07-01 15:57:30 +02:00
James Yonan
5d047d9ecd [test/misc] Added code to test/misc/rc.cpp to test dynamic_pointer_cast<>(). 2022-07-01 15:57:30 +02:00
James Yonan
21571c4d23 [test/misc] Added tests for RCWeak release notification callables. 2022-07-01 15:57:30 +02:00
James Yonan
d911ef260e [test/misc] Updated RC test (test/misc/rc.cpp) to test weak pointers. 2022-07-01 15:57:30 +02:00
James Yonan
0462dd2a77 [test/misc] Renamed boost::intrusive_ptr<T> usage to RCPtr<T>. 2022-07-01 15:57:30 +02:00
James Yonan
f8547529c9 [test/misc] Renamed types.hpp to size.hpp since it now only defines
size_t and ssize_t.
2022-07-01 15:57:30 +02:00
James Yonan
4f58b7f76b [test/misc] Added std::atomic and RC tests. 2022-07-01 15:57:30 +02:00
James Yonan
1d8fcb614a [test/misc] Added/modified tests for Pool and VPNServerNetblock. 2022-07-01 15:57:30 +02:00
James Yonan
6fce09413c [test/misc] Updated Route tests after Route was decoupled from CIDRMap
and made into a standalone class.

go script: now runs on Mac or Linux

template.cpp -- include logsimple.hpp

Additions:

dcast -- measure performance of dynamic_cast.
route -- test new Route class.
safestr -- test new SafeString class.
2022-07-01 15:57:30 +02:00
James Yonan
ff5ec86852 [test/misc] Android 1.1.1 build 9
* Fix attempt for java.lang.NullPointerException in
  net.openvpn.openvpn.OpenVPNService.onStartCommand(OpenVPNService.java:838)

* Allow non-unified profiles (i.e. profiles containing directives that
  reference other files) to be imported from SD card, as long
  as all referenced files are present in the same directory on the
  SD card as the profile.

* Relaxed parsing of "remote" directive to allow the port and/or
  protocol parameters to be omitted.  The port defaults to 1194
  and the protocol to UDP.  Either defaults can be changed with
  the "port" or "proto" directive.

* Fixed issue where profile parser was choking on files containing
  Windows-style line-endings.
2022-07-01 15:57:30 +02:00
James Yonan
05a18484e4 [test/misc] Checkpoint for new core server implementation
(not yet complete).
2022-07-01 15:57:30 +02:00
James Yonan
f1961e285c [test/misc] Added IP::Pool and IP::Range with tests. 2022-07-01 15:57:30 +02:00
James Yonan
8bbe505dd9 [test/misc] Added additional files missing from previous commit. 2022-07-01 15:57:30 +02:00
James Yonan
fe8da7b4fc [test/misc] Search/replace of:
std::exception& e

to:

  const std::exception& e
2022-07-01 15:57:30 +02:00
James Yonan
1dc9b291d7 [test/misc] Bug fixes:
* raise default headroom/tailroom to 512 for worst-case compression
  expansion

* for TCP connections use async_connect instead of connect

* for Time and Time::Duration, handle subtraction reasonably with
  infinite values

* handle possible infinite duration in to_posix_duration

* fix overflow in Time::Duration::to_milliseconds

* call Base::update_now() in ClientProto::start
2022-07-01 15:57:30 +02:00
James Yonan
2634e732c0 [test/misc] Ported core to Windows except for TAP driver support. 2022-07-01 15:57:30 +02:00
James Yonan
775c883c4d [test/misc] Added OpenVPN Static Key parser/renderer. 2022-07-01 15:57:30 +02:00
James Yonan
143edaae57 [test/misc] Implemented OpenVPN Packet ID code. 2022-07-01 15:57:30 +02:00
James Yonan
24a4eb3267 Initial checkin for OpenVPN 3 rewrite.
This very basic proof-of-concept implements a
boost::asio wrapper around the linux tun/tap device.
2010-09-13 08:52:18 +00:00