|
| 1 | +name: Tiny TLS 1.3 Tests |
| 2 | + |
| 3 | +# START OF COMMON SECTION |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: [ 'release/**' ] |
| 7 | + pull_request: |
| 8 | + types: [opened, synchronize, reopened, ready_for_review] |
| 9 | + branches: [ '*' ] |
| 10 | + schedule: |
| 11 | + - cron: '42 10 * * 1-5' |
| 12 | + |
| 13 | +concurrency: |
| 14 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 15 | + cancel-in-progress: true |
| 16 | +# END OF COMMON SECTION |
| 17 | + |
| 18 | +permissions: |
| 19 | + contents: read |
| 20 | + |
| 21 | +jobs: |
| 22 | + # Build + make check every --enable-tinytls13 spelling on one runner via |
| 23 | + # .github/scripts/parallel-make-check.py (see psk.yml for the pattern). |
| 24 | + make_check: |
| 25 | + name: make check |
| 26 | + if: ${{ (github.repository_owner == 'wolfssl') && (github.event_name != 'pull_request' || github.event.pull_request.draft == false) }} |
| 27 | + runs-on: ubuntu-24.04 |
| 28 | + timeout-minutes: 10 |
| 29 | + steps: |
| 30 | + - uses: actions/checkout@v5 |
| 31 | + name: Checkout wolfSSL |
| 32 | + |
| 33 | + - name: Install dependencies |
| 34 | + uses: ./.github/actions/install-apt-deps |
| 35 | + with: |
| 36 | + packages: autoconf automake libtool build-essential bubblewrap |
| 37 | + ghcr-debs-tag: ubuntu-24.04-minimal |
| 38 | + |
| 39 | + - name: Set up ccache |
| 40 | + uses: ./.github/actions/ccache-setup |
| 41 | + with: |
| 42 | + workflow-id: tinytls13 |
| 43 | + read-only: ${{ github.event_name == 'pull_request' }} |
| 44 | + max-size: 100M |
| 45 | + |
| 46 | + - name: Allow unprivileged user namespaces (for bwrap) |
| 47 | + run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 || true |
| 48 | + |
| 49 | + # Every tiny TLS 1.3 profile/adder spelling, so each is proven to build |
| 50 | + # and pass make check (which runs the TLS handshake test suite) out of |
| 51 | + # the box. Server is enabled where a config needs the server-side tests. |
| 52 | + # The psk-p256 and cert-rsaverify configs strip to combinations |
| 53 | + # (ECDHE-only ECC without certs, RSA verify only) that the OpenSSL-compat |
| 54 | + # API unit suite (coupled to examples via BUILD_TESTS) does not gate for. |
| 55 | + # Rather than carry test-harness edits for those, they build static with |
| 56 | + # --disable-examples, skip make check ("check": false), and instead run |
| 57 | + # wolfcrypt/test/testwolfcrypt plus examples/tls13/tls13_memio.c |
| 58 | + # (a self-contained in-memory TLS 1.3 handshake) for real crypto and |
| 59 | + # handshake verification. |
| 60 | + - name: Build and test all tinytls13 configs |
| 61 | + run: | |
| 62 | + cat > "$RUNNER_TEMP/tinytls13-configs.json" <<'EOF' |
| 63 | + [ |
| 64 | + {"name": "tinytls13-psk-x25519", "minutes": 1, |
| 65 | + "configure": ["--enable-tinytls13=psk,server", "--disable-mlkem"]}, |
| 66 | + {"name": "tinytls13-psk-p256", "minutes": 1, "check": false, |
| 67 | + "configure": ["--enable-tinytls13=psk,p256,server", "--enable-static", "--disable-shared", "--disable-examples", "--disable-mlkem"], |
| 68 | + "run": [["make", "wolfcrypt/test/testwolfcrypt"], ["./wolfcrypt/test/testwolfcrypt"], |
| 69 | + ["cc", "-I.", "-I..", "../examples/tls13/tls13_memio.c", "src/.libs/libwolfssl.a", "-lm", "-o", "tls13_memio"], |
| 70 | + ["./tls13_memio"]]}, |
| 71 | + {"name": "tinytls13-psk-staticmem", "minutes": 1, |
| 72 | + "configure": ["--enable-tinytls13=psk,server,staticmem", "--disable-mlkem"]}, |
| 73 | + {"name": "tinytls13-psk-mldsa", "minutes": 1, |
| 74 | + "configure": ["--enable-tinytls13=psk,server,mldsa", "--disable-mlkem"]}, |
| 75 | + {"name": "tinytls13-psk-sha384", "minutes": 1, |
| 76 | + "configure": ["--enable-tinytls13=psk,server,sha384", "--disable-mlkem"]}, |
| 77 | + {"name": "tinytls13-cert", "minutes": 1, |
| 78 | + "configure": ["--enable-tinytls13=cert,server", "--disable-mlkem"]}, |
| 79 | + {"name": "tinytls13-cert-sha384", "minutes": 1, |
| 80 | + "configure": ["--enable-tinytls13=cert,server,sha384", "--disable-mlkem"]}, |
| 81 | + {"name": "tinytls13-cert-mutualauth", "minutes": 1, |
| 82 | + "configure": ["--enable-tinytls13=cert,mutualauth,server", "--disable-mlkem"]}, |
| 83 | + {"name": "tinytls13-cert-rsaverify", "minutes": 1, "check": false, |
| 84 | + "configure": ["--enable-tinytls13=cert,server,rsaverify", "--enable-static", "--disable-shared", "--disable-examples", "--disable-mlkem"], |
| 85 | + "run": [["make", "wolfcrypt/test/testwolfcrypt"], ["./wolfcrypt/test/testwolfcrypt"], |
| 86 | + ["cc", "-I.", "-I..", "../examples/tls13/tls13_memio.c", "src/.libs/libwolfssl.a", "-lm", "-o", "tls13_memio"], |
| 87 | + ["./tls13_memio"]]}, |
| 88 | + {"name": "tinytls13-cert-mldsa", "minutes": 1, |
| 89 | + "configure": ["--enable-tinytls13=cert,server,mldsa", "--enable-static", "--disable-mlkem"], |
| 90 | + "run": [["cc", "-I.", "-I..", "../examples/tls13/tls13_memio.c", "src/.libs/libwolfssl.a", "-lm", "-o", "tls13_memio"], |
| 91 | + ["./tls13_memio"]]}, |
| 92 | + {"name": "tinytls13-psk-client-only", "minutes": 1, |
| 93 | + "configure": ["--enable-tinytls13=psk", "--disable-mlkem"]}, |
| 94 | + {"name": "tinytls13-cert-client-only", "minutes": 1, |
| 95 | + "configure": ["--enable-tinytls13=cert", "--disable-mlkem"]}, |
| 96 | + {"name": "tinytls13-psk-asm", "minutes": 1, |
| 97 | + "configure": ["--enable-tinytls13=psk,server,asm", "--disable-mlkem"]}, |
| 98 | + {"name": "tinytls13-cert-asm", "minutes": 1, |
| 99 | + "configure": ["--enable-tinytls13=cert,server,asm", "--disable-mlkem"]}, |
| 100 | + {"name": "tinytls13-cert-chacha", "minutes": 1, "check": false, |
| 101 | + "configure": ["--enable-tinytls13=cert,server", "--enable-static", "--disable-shared", "--disable-examples", "--disable-mlkem"], |
| 102 | + "cflags": "-DHAVE_CHACHA -DHAVE_POLY1305", |
| 103 | + "run": [["cc", "-I.", "-I..", "../examples/tls13/tls13_memio.c", "src/.libs/libwolfssl.a", "-lm", "-o", "tls13_memio"], |
| 104 | + ["./tls13_memio", "TLS13-CHACHA20-POLY1305-SHA256"]]}, |
| 105 | + {"name": "tinytls13-cert-aes256", "minutes": 1, "check": false, |
| 106 | + "configure": ["--enable-tinytls13=cert,server,sha384", "--enable-static", "--disable-shared", "--disable-examples", "--disable-mlkem"], |
| 107 | + "cflags": "-DWOLFSSL_AES_256", |
| 108 | + "run": [["cc", "-I.", "-I..", "../examples/tls13/tls13_memio.c", "src/.libs/libwolfssl.a", "-lm", "-o", "tls13_memio"], |
| 109 | + ["./tls13_memio", "TLS13-AES256-GCM-SHA384"]]}, |
| 110 | + {"name": "tinytls13-psk-mlkem", "minutes": 1, |
| 111 | + "configure": ["--enable-tinytls13=psk,server", "--enable-static"], |
| 112 | + "run": [["cc", "-I.", "-I..", "../examples/tls13/tls13_memio.c", "src/.libs/libwolfssl.a", "-lm", "-o", "tls13_memio"], |
| 113 | + ["./tls13_memio", "-", "mlkem"]]}, |
| 114 | + {"name": "tinytls13-cert-staticmem", "minutes": 1, "check": false, |
| 115 | + "configure": ["--enable-tinytls13=cert,server,staticmem", "--enable-static", "--disable-shared", "--disable-examples", "--disable-mlkem"], |
| 116 | + "run": [["make", "wolfcrypt/test/testwolfcrypt"], ["./wolfcrypt/test/testwolfcrypt"], |
| 117 | + ["cc", "-I.", "-I..", "../examples/tls13/tls13_memio.c", "src/.libs/libwolfssl.a", "-lm", "-o", "tls13_memio"], |
| 118 | + ["./tls13_memio"]]}, |
| 119 | + {"name": "tinytls13-nomalloc", "minutes": 1, "check": false, |
| 120 | + "configure": ["--enable-tinytls13=psk,server,staticmem", "--enable-static", "--disable-shared", "--disable-examples", "--disable-crypttests", "--disable-mlkem"], |
| 121 | + "cflags": "-DWOLFSSL_NO_MALLOC"}, |
| 122 | + {"name": "tinytls13-combo-cert-mutualauth-sha384", "minutes": 1, |
| 123 | + "configure": ["--enable-tinytls13=cert,mutualauth,server,sha384", "--disable-mlkem"]}, |
| 124 | + {"name": "tinytls13-combo-cert-mldsa-sha384", "minutes": 1, |
| 125 | + "configure": ["--enable-tinytls13=cert,server,mldsa,sha384", "--enable-static", "--disable-mlkem"], |
| 126 | + "run": [["cc", "-I.", "-I..", "../examples/tls13/tls13_memio.c", "src/.libs/libwolfssl.a", "-lm", "-o", "tls13_memio"], |
| 127 | + ["./tls13_memio"]]}, |
| 128 | + {"name": "tinytls13-bare", "minutes": 1, |
| 129 | + "configure": ["--enable-tinytls13", "--disable-mlkem"]}, |
| 130 | + {"name": "tinytls13-usersettings", "minutes": 1, "check": false, |
| 131 | + "user_settings": "examples/configs/user_settings_tinytls13.h", |
| 132 | + "configure": ["--enable-usersettings", "--enable-static", "--disable-shared", "--disable-examples", "--disable-crypttests"]} |
| 133 | + ] |
| 134 | + EOF |
| 135 | + .github/scripts/parallel-make-check.py \ |
| 136 | + ${{ github.event_name == 'schedule' && '--build-only' || '' }} \ |
| 137 | + --private-dir=certs \ |
| 138 | + "$RUNNER_TEMP/tinytls13-configs.json" |
| 139 | +
|
| 140 | + - name: ccache stats |
| 141 | + if: always() |
| 142 | + run: ccache -s || true |
| 143 | + |
| 144 | + - name: Upload logs on failure |
| 145 | + if: failure() |
| 146 | + uses: actions/upload-artifact@v6 |
| 147 | + with: |
| 148 | + retention-days: 7 |
| 149 | + name: tinytls13-logs |
| 150 | + path: | |
| 151 | + build-*/make-check.log |
| 152 | + build-*/test-suite.log |
| 153 | + build-*/config.log |
| 154 | + if-no-files-found: ignore |
0 commit comments