-
Notifications
You must be signed in to change notification settings - Fork 1k
CRYPTOCB_ONLY: add test infra + SHA256 + AES #10351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
0f82b9e
tests/swdev: add scaffolding for WOLF_CRYPTO_CB_ONLY_* testing
rizlik 6fb617a
tests/swdev: add ECC support to wc_swdev
rizlik 8f0d4db
tests/swdev: add RSA support to wc_swdev
rizlik 65b49b2
_CRYPTO_CB_ONLY_{RSA,ECC,SHA256,AES}: move WOLF_CRYPTO_CB guards to s…
rizlik 61bfff1
WOLF_CRYPTO_CB_ONLY_SHA256: strip software SHA-256 and dispatch via s…
rizlik c5ef060
WOLF_CRYPTO_CB_ONLY_AES: add support + swdev for testing
rizlik ade53b0
CRYPTO_CB_ONLY_SHA256: fix: guard Sha256FinalRaw under CB_ONLY_SHA256
rizlik df2fd4e
swdev: refcount swdev Init/Cleanup
rizlik 438e512
test: use XFREE to pair XMALLOC
rizlik c926aaf
swdev: add copyright headers
rizlik 799f7d4
swdev: support user_settings.h based main library builds
rizlik 6d4fa59
tests:api: skip TLS_CALLBACK_TEST under CRYPTO_CB_ONLY_*
rizlik 71819bc
swdev: pair internal wolfCrypt_Init() with wolfCrypt_Cleanup()
rizlik 31891ea
swdev: always add swdev files to EXTRA_DISK
rizlik b1a3d72
github ci: minor rewording
rizlik c84ea8d
tests: api: remove extra wolfSSL_cleanup()
rizlik a98d479
tests: swdev: api: init/deinit swdev in TestSetup/TestCleanup
rizlik cf6c645
aes: CRYPTO_ONLY_AES: do keyscheduling to support GCM on ECB-only device
rizlik e03bc94
swdev: add AES-ECB only testing option
rizlik 6c2040a
swdev: add README.md
rizlik cbaf9c1
cryptocb: don't declare wc_Sha256Trasnform under ONLY_SHA256
rizlik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| name: cryptocb-only Tests | ||
|
|
||
| # 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 | ||
|
|
||
| jobs: | ||
| make_check: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| # WOLF_CRYPTO_CB_ONLY_ECC: strips software ECC; swdev provides the | ||
| # software path via cryptocb. FP_ECC / ECCSI / SAKKE / deterministic-k | ||
| # test / OPENSSL_EXTRA compat layer all reference stripped primitives | ||
| # directly, so they stay off. | ||
| - name: ECC | ||
| cppflags: -DWOLF_CRYPTO_CB_ONLY_ECC | ||
| # WOLF_CRYPTO_CB_ONLY_RSA: strips software RSA; swdev provides the | ||
| # software path via cryptocb. | ||
| - name: RSA | ||
| cppflags: -DWOLF_CRYPTO_CB_ONLY_RSA | ||
| # WOLF_CRYPTO_CB_ONLY_SHA256: strips software SHA-256; swdev provides | ||
| # the software path via cryptocb. SHA-224 not yet supported. | ||
| - name: SHA256 | ||
| extra_config: --disable-sha224 | ||
| cppflags: -DWOLF_CRYPTO_CB_ONLY_SHA256 | ||
| # WOLF_CRYPTO_CB_ONLY_AES: strips software AES; swdev provides the | ||
| # software path via cryptocb. | ||
| - name: AES | ||
| cppflags: -DWOLF_CRYPTO_CB_ONLY_AES | ||
| # Same as AES but tells swdev to refuse AES-GCM (SWDEV_AES_ONLYECB). | ||
| # That forces the parent's CB_ONLY_AES host-side GCM software path: | ||
| # GHASH runs on the host while AES-CTR blocks dispatch back through | ||
| # cryptocb ECB. The AES entry above instead has swdev handle GCM | ||
| # end-to-end, so the host-side GCM path is otherwise uncovered. | ||
| - name: AES_GCM_via_ECB | ||
| cppflags: -DWOLF_CRYPTO_CB_ONLY_AES -DSWDEV_AES_ONLYECB | ||
| # All four ONLY_* macros at once: every supported software primitive | ||
| # is stripped and dispatched through cryptocb. Catches any cross- | ||
| # algorithm call that a single-strip entry would still resolve via | ||
| # the remaining software paths. | ||
| - name: ALL | ||
| extra_config: --disable-sha224 | ||
| cppflags: >- | ||
| -DWOLF_CRYPTO_CB_ONLY_ECC -DWOLF_CRYPTO_CB_ONLY_RSA | ||
| -DWOLF_CRYPTO_CB_ONLY_SHA256 -DWOLF_CRYPTO_CB_ONLY_AES | ||
| name: make check (${{ matrix.name }}) | ||
| if: github.repository_owner == 'wolfssl' | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 10 | ||
| env: | ||
| # Common feature set for every entry. | ||
| BASE_CONFIG: >- | ||
| --enable-swdev --enable-cryptocb --enable-ecc --enable-rsa --enable-dh | ||
| --enable-aesgcm --enable-aesccm --enable-aesctr --enable-aescfb | ||
| --enable-aeskeywrap --enable-aessiv --enable-aesofb --enable-aesxts | ||
| --enable-camellia --enable-chacha --enable-poly1305 | ||
| --enable-sha --enable-sha3 --enable-shake128 --enable-shake256 | ||
| --enable-blake2 --enable-blake2s | ||
| --enable-hkdf --enable-hashdrbg --enable-hashflags | ||
| --enable-curve25519 --enable-ed25519 --enable-curve448 --enable-ed448 | ||
| --enable-mlkem --enable-dilithium | ||
| --enable-scrypt --enable-pwdbased --enable-pkcs7 --enable-pkcs12 | ||
| --enable-certgen --enable-certreq --enable-certext | ||
| --enable-keygen --enable-asn=all | ||
| --enable-cmac --enable-xchacha | ||
| --enable-crl --enable-ocsp --enable-ocspstapling --enable-ocspstapling2 | ||
| --enable-dtls --enable-dtls13 --enable-tls13 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| name: Checkout wolfSSL | ||
|
|
||
| - name: Test wolfSSL | ||
| run: | | ||
| ./autogen.sh | ||
| ./configure $BASE_CONFIG ${{ matrix.extra_config }} CPPFLAGS="${{ matrix.cppflags }}" | ||
| make -j 4 | ||
| make check | ||
|
|
||
| - name: Print errors | ||
| if: ${{ failure() }} | ||
| run: | | ||
| for file in scripts/*.log | ||
| do | ||
| if [ -f "$file" ]; then | ||
| echo "${file}:" | ||
| cat "$file" | ||
| fi | ||
| done |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.