|
| 1 | +name: emNET non-blocking handshake test |
| 2 | + |
| 3 | +# START OF COMMON SECTION |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: [ 'master', 'main', 'release/**' ] |
| 7 | + pull_request: |
| 8 | + branches: [ '*' ] |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | +# END OF COMMON SECTION |
| 14 | + |
| 15 | +# Build wolfSSL with -DWOLFSSL_EMNET using the clean-room shim in |
| 16 | +# tests/emnet/ (IP/IP.h + emnet_shim.c), link a non-blocking TLS 1.3 |
| 17 | +# handshake test, and run it. The test exercises the WOLFSSL_EMNET |
| 18 | +# path in wolfSSL_LastError() and asserts that would-block events |
| 19 | +# surface as WANT_READ/WANT_WRITE and the handshake completes, |
| 20 | +# guarding against regressions in the emNET error-translation logic. |
| 21 | + |
| 22 | +jobs: |
| 23 | + emnet_nonblock: |
| 24 | + name: wolfSSL emNET non-blocking handshake |
| 25 | + if: github.repository_owner == 'wolfssl' |
| 26 | + runs-on: ubuntu-24.04 |
| 27 | + timeout-minutes: 20 |
| 28 | + steps: |
| 29 | + - name: Checkout wolfSSL |
| 30 | + uses: actions/checkout@v4 |
| 31 | + |
| 32 | + - name: Install build deps |
| 33 | + uses: ./.github/actions/install-apt-deps |
| 34 | + with: |
| 35 | + packages: autoconf automake libtool build-essential |
| 36 | + |
| 37 | + - name: Bootstrap |
| 38 | + run: ./autogen.sh |
| 39 | + |
| 40 | + - name: Configure wolfSSL (WOLFSSL_EMNET + emNET shim headers) |
| 41 | + run: | |
| 42 | + ./configure \ |
| 43 | + --enable-static --disable-shared \ |
| 44 | + --enable-tls13 --disable-oldtls \ |
| 45 | + --enable-ecc --disable-examples \ |
| 46 | + --disable-benchmark --disable-crypttests \ |
| 47 | + CFLAGS="-DWOLFSSL_EMNET -I$(pwd)/tests/emnet" |
| 48 | +
|
| 49 | + # The WOLFSSL_EMNET branch in src/wolfio.c calls IP_SOCK_getsockopt |
| 50 | + # which only resolves against the test shim. Build only the static |
| 51 | + # library; examples/benchmark/crypttests are disabled above, but |
| 52 | + # explicitly target the .a to avoid pulling in any residual link |
| 53 | + # targets that would fail with an undefined reference. |
| 54 | + - name: Build wolfSSL static library |
| 55 | + run: make -j$(nproc) src/libwolfssl.la |
| 56 | + |
| 57 | + - name: Build emNET non-blocking test |
| 58 | + run: make -C tests/emnet |
| 59 | + |
| 60 | + - name: Run emNET non-blocking test |
| 61 | + run: make -C tests/emnet run |
0 commit comments