-
Notifications
You must be signed in to change notification settings - Fork 82
Fix changes to pqc header file rename #501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
6f8bae6
Fix changes to pqc header file rename
aidangarske 182230c
PR #501: enforce wolfSSL >= v5.8.0 floor for PQC + add nightly upstre…
aidangarske aeffbfa
Support wolfSSL v5.8.0+ for PQC: cast RSA, H-set workaround, ForceZer…
aidangarske be879c8
Rename wolfssl-versions.yml -> wolfssl-versions-pqc.yml
aidangarske File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: Nightly CI | ||
|
|
||
| # Daily fan-out to every wolfTPM workflow that listens for the | ||
| # 'nightly-trigger' repository_dispatch event. Catches upstream wolfSSL | ||
| # drift (e.g. header renames, API breaks) within ~24h. | ||
| # | ||
| # Workflows opt in by adding the listener to their `on:` block: | ||
| # repository_dispatch: | ||
| # types: [nightly-trigger] | ||
| # | ||
| # repository_dispatch is API-only — there is no UI button to trigger | ||
| # these workflows by hand. Maintainers cannot accidentally fire them. | ||
| # Workflows that should never be batch-triggered (e.g. hw-spdm-test on | ||
| # the self-hosted Pi runner) simply don't add the listener. | ||
|
|
||
| on: | ||
| schedule: | ||
| # 02:00 UTC daily (offset from typical top-of-hour congestion). | ||
| - cron: '17 2 * * *' | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| fan-out: | ||
| name: Dispatch nightly-trigger to all listening workflows | ||
| runs-on: ubuntu-latest | ||
| if: github.repository == 'wolfSSL/wolfTPM' | ||
|
|
||
| steps: | ||
| - name: Send repository_dispatch event | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| await github.rest.repos.createDispatchEvent({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| event_type: 'nightly-trigger', | ||
| }); | ||
| core.info('Dispatched nightly-trigger; all listening workflows will fire.'); |
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| name: wolfSSL Version Matrix (PQC) | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ 'master', 'main', 'release/**' ] | ||
| pull_request: | ||
| branches: [ '*' ] | ||
| repository_dispatch: | ||
| types: [nightly-trigger] | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| # Resolve the latest -stable wolfSSL tag at run time so we don't have to | ||
| # bump this workflow every release. Floor (v5.8.0) and master are fixed: | ||
| # v5.8.0 exercises every version-gated workaround in fwtpm_crypto.c, and | ||
| # master surfaces upstream drift on the nightly run. | ||
| discover-versions: | ||
| name: Resolve wolfSSL version matrix | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
| latest-stable: ${{ steps.set-matrix.outputs.latest-stable }} | ||
| steps: | ||
| - name: Resolve latest -stable wolfSSL tag | ||
| id: set-matrix | ||
| run: | | ||
| set -euo pipefail | ||
| # List remote v*-stable tags, version-sort, take the highest. | ||
| # Equivalent to `git tag -l 'v*-stable' | sort -V | tail -1` in a | ||
| # local clone, but avoids cloning just to read tag names. | ||
| LATEST=$(git ls-remote --tags --refs https://github.com/wolfSSL/wolfssl.git 'v*-stable' \ | ||
| | awk -F/ '{print $NF}' | sort -V | tail -n 1) | ||
| if [ -z "${LATEST:-}" ]; then | ||
| echo "::error::Could not resolve latest wolfSSL -stable tag from remote" | ||
| exit 1 | ||
| fi | ||
| echo "Latest stable wolfSSL: $LATEST" | ||
| echo "latest-stable=$LATEST" >> "$GITHUB_OUTPUT" | ||
| MATRIX=$(jq -nc --arg latest "$LATEST" '{ | ||
| include: [ | ||
| {"wolfssl-version":"v5.8.0-stable","wolfssl-ref":"v5.8.0-stable","cache-key":"wolfssl-pqc-v5.8.0-v1"}, | ||
| {"wolfssl-version":$latest,"wolfssl-ref":$latest,"cache-key":("wolfssl-pqc-" + $latest + "-v1")}, | ||
| {"wolfssl-version":"master","wolfssl-ref":"master","cache-key":""} | ||
| ] | ||
| }') | ||
| echo "matrix=$MATRIX" >> "$GITHUB_OUTPUT" | ||
|
|
||
| pqc-build-test: | ||
| name: wolfSSL ${{ matrix.wolfssl-version }} | ||
| needs: discover-versions | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 25 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: ${{ fromJson(needs.discover-versions.outputs.matrix) }} | ||
|
|
||
| steps: | ||
| - name: Checkout wolfTPM | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install build deps | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y autoconf automake libtool | ||
|
|
||
| - name: Cache wolfSSL ${{ matrix.wolfssl-version }} | ||
| if: matrix.wolfssl-version != 'master' | ||
| id: cache-wolfssl | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/wolfssl-install | ||
| key: ${{ matrix.cache-key }} | ||
|
|
||
| - name: Build wolfSSL ${{ matrix.wolfssl-version }} with PQC | ||
| if: matrix.wolfssl-version == 'master' || steps.cache-wolfssl.outputs.cache-hit != 'true' | ||
| run: | | ||
| cd ~ | ||
| git clone --depth 1 --branch ${{ matrix.wolfssl-ref }} \ | ||
| https://github.com/wolfSSL/wolfssl.git | ||
| cd wolfssl | ||
| ./autogen.sh | ||
| ./configure --enable-wolftpm --enable-pkcallbacks --enable-keygen \ | ||
| --enable-dilithium --enable-mlkem --enable-experimental \ | ||
| --enable-harden CFLAGS="-DWC_RSA_NO_PADDING" \ | ||
| --prefix=$HOME/wolfssl-install | ||
| make -j"$(nproc)" | ||
| make install | ||
|
|
||
| - name: wolfSSL version info | ||
| run: | | ||
| grep LIBWOLFSSL_VERSION_STRING $HOME/wolfssl-install/include/wolfssl/version.h | ||
| grep LIBWOLFSSL_VERSION_HEX $HOME/wolfssl-install/include/wolfssl/version.h | ||
|
|
||
| - name: Build wolfTPM with v1.85 + fwTPM | ||
| run: | | ||
| ./autogen.sh | ||
| CPPFLAGS="-I$HOME/wolfssl-install/include" \ | ||
| LDFLAGS="-L$HOME/wolfssl-install/lib -Wl,-rpath,$HOME/wolfssl-install/lib" \ | ||
| ./configure --enable-v185 --enable-fwtpm --enable-debug=verbose | ||
| make -j"$(nproc)" | ||
|
|
||
| - name: Run fwtpm_unit.test (PQC KAT block) | ||
| run: | | ||
| export LD_LIBRARY_PATH=$HOME/wolfssl-install/lib | ||
| ./tests/fwtpm_unit.test | ||
|
|
||
| - name: Upload failure logs | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: wolfssl-versions-${{ matrix.wolfssl-version }}-logs | ||
| path: | | ||
| config.log | ||
| tests/*.log | ||
| test-suite.log | ||
| retention-days: 5 |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.