From e3905f1f740f4b662097d98022014c7c4838f05d Mon Sep 17 00:00:00 2001 From: David Garske Date: Tue, 28 Nov 2023 15:30:14 -0800 Subject: [PATCH] CI testing for wolfPKCS11 with wolfTPM backend. --- .github/workflows/build-workflow.yml | 41 ++++++++++++++++++++++++++-- .github/workflows/unit-test.yml | 6 ++++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-workflow.yml b/.github/workflows/build-workflow.yml index 077b1b0..f001099 100644 --- a/.github/workflows/build-workflow.yml +++ b/.github/workflows/build-workflow.yml @@ -7,6 +7,10 @@ on: config: required: false type: string + check: + required: false + type: string + default: 'make check' jobs: build: @@ -30,7 +34,7 @@ jobs: - name: wolfssl configure working-directory: ./wolfssl run: | - ./configure --enable-cryptonly --enable-aescfb --enable-rsapss --enable-keygen --enable-pwdbased --enable-scrypt \ + ./configure -enable-aescfb --enable-cryptocb --enable-rsapss --enable-keygen --enable-pwdbased --enable-scrypt \ C_EXTRA_FLAGS="-DWOLFSSL_PUBLIC_MP -DWC_RSA_DIRECT" - name: wolfssl make install working-directory: ./wolfssl @@ -41,6 +45,39 @@ jobs: sudo make install sudo ldconfig +#setup ibmswtpm2 + - uses: actions/checkout@v3 + with: + repository: kgoldman/ibmswtpm2 + path: ibmswtpm2 + - name: ibmswtpm2 make + working-directory: ./ibmswtpm2/src + run: | + make + ./tpm_server & + +#setup wolftpm + - uses: actions/checkout@v3 + with: + repository: wolfssl/dgarske + ref: tpm_cryptocb_keygen + path: wolftpm + - name: wolftpm autogen + working-directory: ./wolftpm + run: ./autogen.sh + - name: wolftpm configure + working-directory: ./wolftpm + run: | + ./configure --enable-swtpm + - name: wolftpm make install + working-directory: ./wolftpm + run: make + - name: wolftpm make install + working-directory: ./wolftpm + run: | + sudo make install + sudo ldconfig + #setup wolfPKCS11 - name: wolfpkcs11 autogen run: ./autogen.sh @@ -49,7 +86,7 @@ jobs: - name: wolfpkcs11 make run: make - name: wolfpkcs11 make check - run: make check + run: ${{inputs.check}} - name: wolfpkcs11 make install run: sudo make install - name: wolfpkcs11 make dist diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index dc9ab55..577b06d 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -16,6 +16,12 @@ jobs: with: config: --enable-singlethreaded + tpm: + uses: ./.github/workflows/build-workflow.yml + with: + config: --enable-singlethreaded --enable-wolftpm --disable-dh CFLAGS="-DWOLFPKCS11_TPM_STORE" + check: ./tests/pkcs11mtt + no_rsa: uses: ./.github/workflows/build-workflow.yml with: