Fixes for key material zeroization across JCE and JNI, PBKDF input validation #255
Workflow file for this run
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
| name: Test Against Stable wolfSSL Releases | |
| on: | |
| pull_request: | |
| branches: [ 'master' ] | |
| # Cancel superseded in-progress runs for the same PR. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| # First job: dynamically fetch the last 5 stable wolfSSL release tags | |
| get-stable-releases: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| versions: ${{ steps.get-versions.outputs.versions }} | |
| steps: | |
| - name: Get last 5 stable wolfSSL releases | |
| id: get-versions | |
| run: | | |
| # Fetch tags from wolfSSL/wolfssl that end with "-stable" | |
| # Sort by version number and take the last 5 | |
| VERSIONS=$(curl -s "https://api.github.com/repos/wolfSSL/wolfssl/tags?per_page=100" | \ | |
| jq -r '.[].name | select(endswith("-stable"))' | \ | |
| sort -V | \ | |
| tail -n 5 | \ | |
| jq -R -s -c 'split("\n") | map(select(length > 0))') | |
| echo "Found stable versions: $VERSIONS" | |
| echo "versions=$VERSIONS" >> $GITHUB_OUTPUT | |
| # Second job: build and test against each stable release | |
| test-stable-release: | |
| needs: get-stable-releases | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| wolfssl_version: ${{ fromJson(needs.get-stable-releases.outputs.versions) }} | |
| jdk_version: [ '21' ] | |
| # XMSS requires wolfSSL 5.9.2+ and is not pulled in by --enable-all, so | |
| # it is enabled explicitly. On stable releases older than 5.9.2 the XMSS | |
| # JUnit tests skip gracefully (FeatureDetect.XmssEnabled() returns | |
| # false), becoming real coverage once 5.9.2-stable rotates in. | |
| # LMS/HSS is verify-only in wolfJCE and is not pulled in by | |
| # --enable-all, so it is enabled explicitly. On stable releases that | |
| # predate a given LMS parameter family the LMS JUnit tests skip | |
| # gracefully (per-hash NOT_COMPILED_IN, or FeatureDetect.LmsEnabled() | |
| # returning false). | |
| wolfssl_configure: | |
| - '--enable-jni' | |
| - '--enable-jni --enable-all' | |
| - '--enable-jni --enable-all --enable-xmss' | |
| - '--enable-jni --enable-all --enable-lms' | |
| name: wolfSSL ${{ matrix.wolfssl_version }} (JDK ${{ matrix.jdk_version }}, ${{ matrix.wolfssl_configure }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup JUnit | |
| uses: ./.github/actions/setup-junit | |
| # Cache the installed wolfSSL build. Stable release tags do not | |
| # move, so these entries stay valid until a runner-image | |
| # toolchain bump rotates the key. | |
| - name: Build native wolfSSL ${{ matrix.wolfssl_version }} (cached) | |
| uses: ./.github/actions/build-wolfssl-cached | |
| with: | |
| configure: ${{ matrix.wolfssl_configure }} | |
| ref: ${{ matrix.wolfssl_version }} | |
| - name: Setup java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: ${{ matrix.jdk_version }} | |
| - name: Set LD_LIBRARY_PATH | |
| run: | | |
| echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/build-dir/lib" >> "$GITHUB_ENV" | |
| - name: Copy makefile | |
| run: cp makefile.linux makefile | |
| - name: Build JNI library | |
| run: PREFIX=$GITHUB_WORKSPACE/build-dir make | |
| - name: Build JAR (ant build-jce-debug) | |
| run: ant build-jce-debug | |
| - name: Run Java tests (ant test) | |
| run: ant test | |
| - name: Show logs on failure | |
| if: failure() || cancelled() | |
| run: | | |
| cat build/reports/*.txt |