From 68f7d7ca27b942c0bea638769346f9d912296383 Mon Sep 17 00:00:00 2001 From: Mark Deric Date: Sun, 11 Jun 2023 11:45:18 -0700 Subject: [PATCH] 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 --- CMakeLists.txt | 1 - test/ssl/CMakeLists.txt | 31 ------------------------ test/ssl/README.txt | 53 ----------------------------------------- test/ssl/go | 15 ------------ 4 files changed, 100 deletions(-) delete mode 100644 test/ssl/CMakeLists.txt delete mode 100644 test/ssl/README.txt delete mode 100755 test/ssl/go diff --git a/CMakeLists.txt b/CMakeLists.txt index a661cb2a..3febe790 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/test/ssl/CMakeLists.txt b/test/ssl/CMakeLists.txt deleted file mode 100644 index 9e516b39..00000000 --- a/test/ssl/CMakeLists.txt +++ /dev/null @@ -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 () diff --git a/test/ssl/README.txt b/test/ssl/README.txt deleted file mode 100644 index f6bfdc31..00000000 --- a/test/ssl/README.txt +++ /dev/null @@ -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 diff --git a/test/ssl/go b/test/ssl/go deleted file mode 100755 index 541712c3..00000000 --- a/test/ssl/go +++ /dev/null @@ -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