diff --git a/.github/workflows/hostap-vm.yml b/.github/workflows/hostap-vm.yml index 4c52175d46..0beecebc28 100644 --- a/.github/workflows/hostap-vm.yml +++ b/.github/workflows/hostap-vm.yml @@ -75,7 +75,7 @@ jobs: id: cache with: path: linux/linux - key: ${{ env.LINUX_REF }} + key: hostap-linux-${{ env.LINUX_REF }} lookup-only: true - name: Checkout hostap @@ -153,7 +153,7 @@ jobs: id: cache with: path: linux/linux - key: ${{ env.LINUX_REF }} + key: hostap-linux-${{ env.LINUX_REF }} fail-on-cache-miss: true - name: show file structure diff --git a/.github/workflows/nss.sh b/.github/workflows/nss.sh new file mode 100644 index 0000000000..8a78e0fd58 --- /dev/null +++ b/.github/workflows/nss.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +set -e +set -x + +# Setup nss cert db +mkdir nssdb +./dist/Debug/bin/certutil -d nssdb -N --empty-password +./dist/Debug/bin/certutil -d nssdb -A -a -i wolfssl/certs/test/server-localhost.pem \ + -t TCP -n 'wolf localhost' + +# App data for nss +echo Hello from nss > /tmp/in + +# TLS 1.3 test +env -C wolfssl ./examples/server/server -v 4 -p 4433 \ + -c certs/test/server-localhost.pem -d -w > /tmp/server.log 2>&1 & +sleep 0.1 +./dist/Debug/bin/tstclnt -V tls1.3: -h localhost -p 4433 -d nssdb -C -4 -A /tmp/in -v +sleep 0.1 + +# DTLS 1.3 test +env -C wolfssl ./examples/server/server -v 4 -p 4433 -u \ + -c certs/test/server-localhost.pem -d -w > /tmp/server.log 2>&1 & +sleep 0.1 +./dist/Debug/bin/tstclnt -V tls1.3: -P client -h localhost -p 4433 -d nssdb -C -4 -A /tmp/in -v +sleep 0.1 diff --git a/.github/workflows/nss.yml b/.github/workflows/nss.yml new file mode 100644 index 0000000000..b39a33641a --- /dev/null +++ b/.github/workflows/nss.yml @@ -0,0 +1,89 @@ +name: nss interop Tests + +### TODO uncomment stuff + +# START OF COMMON SECTION +on: + push: + branches: [ 'master', 'main', 'release/**' ] + pull_request: + branches: [ '*' ] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +# END OF COMMON SECTION + +env: + NSS_REF: NSS_3_107_RTM + +jobs: + build_nss: + name: Build nss + if: github.repository_owner == 'wolfssl' + runs-on: ubuntu-latest + # This should be a safe limit for the tests to run. + timeout-minutes: 30 + steps: + - name: Checking if we have nss in cache + uses: actions/cache@v4 + id: cache + with: + path: dist + key: nss-${{ env.NSS_REF }} + lookup-only: true + + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: | + # Don't prompt for anything + export DEBIAN_FRONTEND=noninteractive + sudo apt-get update + # hostap dependencies + sudo apt-get install -y gyp ninja-build + + - name: Checkout nss + if: steps.cache.outputs.cache-hit != 'true' + uses: actions/checkout@v4 + with: + repository: nss-dev/nss + ref: ${{ env.NSS_REF }} + path: nss + + - name: Compile nss + if: steps.cache.outputs.cache-hit != 'true' + run: | + hg clone https://hg.mozilla.org/projects/nspr + cd nss + ./build.sh + + nss_test: + name: Test interop with nss + runs-on: ubuntu-latest + needs: build_nss + timeout-minutes: 10 + if: github.repository_owner == 'wolfssl' + steps: + - name: Checking if we have nss in cache + uses: actions/cache/restore@v4 + id: cache + with: + path: dist + key: nss-${{ env.NSS_REF }} + fail-on-cache-miss: true + + - name: Build wolfSSL + uses: wolfSSL/actions-build-autotools-project@v1 + with: + path: wolfssl + configure: --enable-dtls --enable-dtls13 + install: false + check: false + + - name: Test interop + run: bash wolfssl/.github/workflows/nss.sh + + - name: print server logs + if: ${{ failure() }} + run: | + cat /tmp/server.log