TPM locality control, fTPM per-PCR enforcement fix, and optional reset HAL #381
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: Seal Test Suite | |
| on: | |
| push: | |
| branches: [ 'master', 'main', 'release/**' ] | |
| paths: | |
| - 'examples/seal/**' | |
| - 'examples/nvram/seal_nv.c' | |
| - 'examples/nvram/nvram.h' | |
| - 'src/tpm2_wrap.c' | |
| - 'src/fwtpm/**' | |
| - 'wolftpm/tpm2_wrap.h' | |
| pull_request: | |
| branches: [ '*' ] | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths: | |
| - 'examples/seal/**' | |
| - 'examples/nvram/seal_nv.c' | |
| - 'examples/nvram/nvram.h' | |
| - 'src/tpm2_wrap.c' | |
| - 'src/fwtpm/**' | |
| - 'wolftpm/tpm2_wrap.h' | |
| repository_dispatch: | |
| types: [nightly-trigger] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| seal-test: | |
| if: github.event_name != 'pull_request' || github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout wolfTPM | |
| uses: actions/checkout@v4 | |
| - name: Setup wolfSSL | |
| uses: ./.github/actions/setup-wolfssl | |
| with: | |
| configure-flags: --enable-wolftpm --enable-pkcallbacks --enable-keygen | |
| cflags: -DWC_RSA_NO_PADDING | |
| - name: Build wolfTPM with fwTPM | |
| run: | | |
| ./autogen.sh | |
| ./configure --enable-fwtpm --enable-swtpm --enable-debug | |
| make -j"$(nproc)" | |
| - name: Start fwtpm_server | |
| run: | | |
| rm -f fwtpm_nv.bin | |
| ./src/fwtpm/fwtpm_server > /tmp/seal_fwtpm.log 2>&1 & | |
| echo $! > /tmp/seal_fwtpm.pid | |
| for i in $(seq 1 500); do | |
| ss -tln 2>/dev/null | grep -q ':2321 ' && break | |
| sleep 0.01 | |
| done | |
| if ! ss -tln 2>/dev/null | grep -q ':2321 '; then | |
| echo "fwtpm_server failed to start" | |
| cat /tmp/seal_fwtpm.log | |
| exit 1 | |
| fi | |
| - name: Run seal tests | |
| run: bash examples/seal/seal_test.sh | |
| - name: Stop fwtpm_server | |
| if: always() | |
| run: | | |
| if [ -f /tmp/seal_fwtpm.pid ]; then | |
| kill "$(cat /tmp/seal_fwtpm.pid)" 2>/dev/null || true | |
| rm -f /tmp/seal_fwtpm.pid | |
| fi | |
| rm -f fwtpm_nv.bin | |
| - name: Upload failure logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: seal-test-logs | |
| path: | | |
| seal_test.log | |
| /tmp/seal_fwtpm.log | |
| retention-days: 5 |