diff --git a/.github/workflows/OpenSSL_master-PQC.yml b/.github/workflows/OpenSSL_master-PQC.yml index 9e7d2909..fb2be12f 100644 --- a/.github/workflows/OpenSSL_master-PQC.yml +++ b/.github/workflows/OpenSSL_master-PQC.yml @@ -11,7 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: set cache env run: | echo "cache-name=`git ls-remote https://github.com/openssl/openssl.git master | awk '{print $1}'`" >> "$GITHUB_ENV" @@ -29,21 +28,23 @@ jobs: run: | git clone https://github.com/openssl/openssl.git --branch master --depth 1 cd openssl - ./config --banner=Configured --debug --strict-warnings --prefix=${{ env.OPENSSL_DIR }} shared zlib + ./config --banner=Configured --strict-warnings --prefix=${{ env.OPENSSL_DIR }} shared zlib make -s -j4 sudo make install_sw install_ssldirs cd .. - - name: set OpenSSL env run: | echo "OPENSSL_LIB=${{ env.OPENSSL_DIR }}/lib64" >> $GITHUB_ENV echo "${{ env.OPENSSL_DIR }}/bin" >> "$GITHUB_PATH" echo "LD_LIBRARY_PATH=${{ env.OPENSSL_DIR }}/lib64:$LD_LIBRARY_PATH" >> "$GITHUB_ENV" - - name: test_Mock with PQ algorithms + - name: Generate test certificate run: | cd test/recipes/80-test_cmp_http_data/Mock/ ./setup-mock.sh all - cd ../../../../ - make -f Makefile_v1 test_Mock + - name: test Mock + run: | + which openssl + ldd /usr/bin/openssl + make -f Makefile_v1 test_Mock diff --git a/.github/workflows/OpenSSL_versions.yml b/.github/workflows/OpenSSL_versions.yml index 6875132f..136f5f3b 100644 --- a/.github/workflows/OpenSSL_versions.yml +++ b/.github/workflows/OpenSSL_versions.yml @@ -48,10 +48,12 @@ jobs: cmake . make ./cmpClient -help - - mkdir build-with-libcmp - cd build-with-libcmp - USE_LIBCMP=1 cmake -S .. -B . + if [[ $(openssl version | cut -d' ' -f2 | cut -d'.' -f1) -lt 4 ]]; then + echo "OpenSSL version is less than 4.0, proceeding with build" + mkdir build-with-libcmp + cd build-with-libcmp + USE_LIBCMP=1 cmake -S .. -B . + fi make clean build DESTDIR=tmp make install uninstall make deb @@ -59,12 +61,13 @@ jobs: run: | make -f Makefile_v1 ./cmpClient -help - # make -f Makefile_v1 test_Mock # TODO add after solving issue #76 + make -f Makefile_v1 test_Mock # TODO add after solving issue #76 make -f Makefile_v1 clean_all - - USE_LIBCMP=1 STATIC_LIBCMP=1 make -f Makefile_v1 - ./cmpClient -help - make -f Makefile_v1 clean + if [[ $(openssl version | cut -d' ' -f2 | cut -d'.' -f1) -lt 4 ]]; then + USE_LIBCMP=1 STATIC_LIBCMP=1 make -f Makefile_v1 + ./cmpClient -help + make -f Makefile_v1 clean + fi diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7073112..329e786d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -92,4 +92,7 @@ jobs: # sudo apt-get update # sudo apt-get install -y >/dev/null libssl-dev build-essential # not needed # USE_LIBCMP=1 make -f Makefile_v1 test_Mock OPENSSL_CMP_ASPECTS=credentials V=1 # can be helpful for debugging - make -f Makefile_v1 test_all + cd test/recipes/80-test_cmp_http_data/Mock/ + ./setup-mock.sh all + cd ../../../../ + make -f Makefile_v1 test_all V=1 diff --git a/test/recipes/80-test_cmp_http.t b/test/recipes/80-test_cmp_http.t index 9a4fa136..c0a8ba92 100644 --- a/test/recipes/80-test_cmp_http.t +++ b/test/recipes/80-test_cmp_http.t @@ -386,8 +386,8 @@ sub start_server { print "Cannot get expected output from the $server_name server\n"; return 0; } - $kur_port = $server_port if $kur_port eq "\$server_port"; - $pbm_port = $server_port if $pbm_port eq "\$server_port"; + $kur_port = $server_port; + $pbm_port = $server_port; $server_tls = $server_port if $server_tls; return $pid; } diff --git a/test/recipes/80-test_cmp_http_data/Mock/server.cnf b/test/recipes/80-test_cmp_http_data/Mock/server.cnf index 932bb11a..7e60b2ac 100644 --- a/test/recipes/80-test_cmp_http_data/Mock/server.cnf +++ b/test/recipes/80-test_cmp_http_data/Mock/server.cnf @@ -1,6 +1,6 @@ [cmp] # mock server configuration -port = 1700 +port = 0 srv_secret = pass:test srv_cert = server.crt srv_key = server.key @@ -19,4 +19,4 @@ rsp_newwithnew = newWithNew.pem rsp_newwithold = newWithOld.pem rsp_oldwithnew = oldWithNew.pem -verbosity = 2 # do not show any errors +verbosity = 1 # do not show any errors diff --git a/test/recipes/80-test_cmp_http_data/test.cnf b/test/recipes/80-test_cmp_http_data/test.cnf index 63bfc57f..be1c000a 100644 --- a/test/recipes/80-test_cmp_http_data/test.cnf +++ b/test/recipes/80-test_cmp_http_data/test.cnf @@ -10,7 +10,7 @@ certout = test.cert.pem policies = certificatePolicies #policy_oids = 1.2.3.4 #policy_oids_critical = 1 -#verbosity = 7 +verbosity = 8 ############################# server-dependent configurations @@ -65,8 +65,8 @@ expect_sender = $server_dn subject = "/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd/CN=leaf" newkey = signer.key out_trusted = signer_root.crt -kur_port = 1700 -pbm_port = 1700 +kur_port = +pbm_port = pbm_ref = pbm_secret = pass:test cert = signer.crt