mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-19 19:52:15 +02:00
Fix cmake for removal of proto.cpp
Removes building in the test/ssl directory from $TOP/CMakeLists.txt. Removes the files under test/ssl that are rendered useless by the $TOP/CMakeLists.txt change. Signed-off-by: Mark Deric <jmark@openvpn.net>
This commit is contained in:
parent
699bcb455a
commit
68f7d7ca27
@ -32,7 +32,6 @@ include(ovpn-doxygen)
|
||||
add_subdirectory(client)
|
||||
add_subdirectory(test/unittests)
|
||||
add_subdirectory(test/ovpncli)
|
||||
add_subdirectory(test/ssl)
|
||||
|
||||
add_subdirectory(openvpn/omi)
|
||||
add_subdirectory(openvpn/ovpnagent/win)
|
||||
|
@ -1,31 +0,0 @@
|
||||
set(TEST_PROTO_NTHREADS 1 CACHE STRING "test/ssl/proto - Number of threads")
|
||||
set(TEST_PROTO_RENEG 900 CACHE STRING "test/ssl/proto - Renegotiation intervall")
|
||||
set(TEST_PROTO_ITER 1000000 CACHE STRING "test/ssl/proto - Number of iterations")
|
||||
set(TEST_PROTO_SITER 1 CACHE STRING "test/ssl/proto - Number of high-level iterations")
|
||||
option(TEST_PROTO_VERBOSE "test/ssl/proto - Enable verbose logging" OFF)
|
||||
|
||||
add_executable(proto proto.cpp)
|
||||
add_test(ProtoTests proto)
|
||||
add_core_dependencies(proto)
|
||||
if (${TEST_PROTO_VERBOSE})
|
||||
set(PROTO_CFLAGS_VERBOSE -DVERBOSE)
|
||||
endif()
|
||||
target_compile_definitions(proto PRIVATE
|
||||
${PROTO_CFLAGS_VERBOSE}
|
||||
-DN_THREADS=${TEST_PROTO_NTHREADS}
|
||||
-DRENEG=${TEST_PROTO_RENEG}
|
||||
-DITER=${TEST_PROTO_ITER}
|
||||
-DSITER=${TEST_PROTO_SITER}
|
||||
)
|
||||
|
||||
# Copy key/certificate files required to run proto
|
||||
file(COPY . DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
|
||||
FILES_MATCHING PATTERN *.key
|
||||
PATTERN *.crt
|
||||
PATTERN dh.pem
|
||||
)
|
||||
|
||||
if (NOT WIN32)
|
||||
# We have a number of private fields that depend on compile flags for manual testing
|
||||
target_compile_options(proto PRIVATE -Wno-unused-private-field)
|
||||
endif ()
|
@ -1,53 +0,0 @@
|
||||
|
||||
The proto test utility can be tweaked with build time options changing
|
||||
the behaviour. These are set via CMake variables.
|
||||
|
||||
* TEST_PROTO_NTHREADS - Running test threads (default 1)
|
||||
The number of test client/server pairs running in parallel.
|
||||
|
||||
$ cd $O3/core/build && cmake -DTEST_PROTO_NTHREADS=4 ..
|
||||
$ cmake --build . -- test/ssl/proto
|
||||
|
||||
* TEST_PROTO_RENEG - Rengotiation (default 900)
|
||||
To simulate less data-channel activity and more SSL renegotiations
|
||||
|
||||
$ cd $O3/core/build && cmake -DTEST_PROTO_RENEG=90 ..
|
||||
$ cmake --build . -- test/ssl/proto
|
||||
|
||||
* TEST_PROTO_ITER - Iterations (default 1000000)
|
||||
For verbose output, lower the number of xmit/recv iterations by defining
|
||||
TEST_PROTO_ITER to be 10000 or less, e.g.
|
||||
|
||||
$ cd $O3/core/build && cmake -DTEST_PROTO_ITER=1000 ..
|
||||
$ cmake --build . -- test/ssl/proto
|
||||
|
||||
* TEST_PROTO_SITER - High-level Session Iterations (default 1)
|
||||
|
||||
$ cd $O3/core/build && cmake -DTEST_PROTO_SITER=2 ..
|
||||
$ cmake --build . -- test/ssl/proto
|
||||
|
||||
* TEST_PROTO_VERBOSE - Verbose log output (off)
|
||||
This will dump details of the protocol traffic as the test runs. This
|
||||
is a boolean flag.
|
||||
|
||||
$ cd $O3/core/build && cmake -DTEST_PROTO_VERBOSE=ON ..
|
||||
$ cmake --build . -- test/ssl/proto
|
||||
|
||||
|
||||
* Mbed TLS specific - run the crypto library self-test
|
||||
|
||||
$ cd $O3/core/build/test/ssl && ./proto test
|
||||
|
||||
Caveats:
|
||||
|
||||
When using MbedTLS as both client and server, make sure to build
|
||||
MbedTLS on Mac OS X with OSX_SERVER=1.
|
||||
|
||||
Typical output:
|
||||
|
||||
$ cd $O3/core/test/ssl
|
||||
$ time ./proto
|
||||
*** app bytes=73301015 net_bytes=146383320 data_bytes=36327640 prog=0000218807/0000218806 D=12600/600/12600/800 N=1982/1982 SH=17800/17800 HE=3/6
|
||||
real 0m11.003s
|
||||
user 0m10.981s
|
||||
sys 0m0.004s
|
15
test/ssl/go
15
test/ssl/go
@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
cd $O3/core
|
||||
. vars/vars-linux
|
||||
. vars/setpath
|
||||
cd test/ssl
|
||||
if [ "$MO_HYBRID" = "1" ]; then
|
||||
# mbedTLS client, OpenSSL server
|
||||
ASIO=1 OPENSSL_SYS=1 MTLS=1 build proto
|
||||
elif [ "$OSSL" = "1" ]; then
|
||||
# OpenSSL client/server
|
||||
ASIO=1 OPENSSL_SYS=1 build proto
|
||||
else
|
||||
# mbedTLS client/server
|
||||
ASIO=1 MTLS=1 NOSSL=1 build proto
|
||||
fi
|
Loading…
Reference in New Issue
Block a user