extend CREDS_load() to check if key and cert match #466
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # GitHub Actions for genCMPClient | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # Copyright (c) Siemens AG, 2021-2024 | |
| name: OpenSSL compatibility | |
| on: push | |
| jobs: | |
| version: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| branch: [openssl-4.0, openssl-3.6, openssl-3.5, openssl-3.4, openssl-3.0] | |
| 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 ${{matrix.branch}} | awk '{print $1}'`" >> "$GITHUB_ENV" | |
| echo "OPENSSL_DIR=`pwd`/${{ matrix.branch }}" >> $GITHUB_ENV | |
| - id: cache-openssl | |
| name: cache openssl | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ env.OPENSSL_DIR }} | |
| key: openssl-${{ env.cache-name }}-${{ runner.os }}-${{ runner.arch }} | |
| - if: ${{ steps.cache-openssl.outputs.cache-hit != 'true' }} | |
| name: build openssl | |
| run: | | |
| git clone https://github.com/openssl/openssl.git --branch ${{ matrix.branch }} --depth 1 | |
| cd openssl | |
| ./config --banner=Configured --debug --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: cmake build, install, uninstall, Debian | |
| run: | | |
| cmake . | |
| make | |
| ./cmpClient -help | |
| DESTDIR=tmp make install uninstall | |
| make deb | |
| make clean | |
| - name: cmake out-of-source build with libcmp | |
| run: | | |
| mkdir build-with-libcmp | |
| cd build-with-libcmp | |
| USE_LIBCMP=1 cmake -S .. -B . | |
| make | |
| ./cmpClient -help | |
| cd .. | |
| - if: ${{ matrix.branch == 'openssl-3.5' }} | |
| name: When using OpenSSL 3.5, switch Mock test credentials to PQC algorithms | |
| run: | | |
| cd test/recipes/80-test_cmp_http_data/Mock/ | |
| # use script to overwrite test keys and certificates for Mock test, this time using PQC algorithms | |
| Algo_used="PQC" ./setup-mock.sh all | |
| cd ../../../../ | |
| - name: make (using Makefile_v1) test_Mock | |
| run: | | |
| make -f Makefile_v1 clean | |
| make -f Makefile_v1 test_Mock | |
| make -f Makefile_v1 clean_all | |
| - name: make (using Makefile_v1) with static libcmp | |
| run: | | |
| USE_LIBCMP=1 STATIC_LIBCMP=1 make -f Makefile_v1 | |
| ./cmpClient -help | |
| make -f Makefile_v1 clean | |