-
Notifications
You must be signed in to change notification settings - Fork 971
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
Open
rizlik
wants to merge
14
commits into
wolfSSL:master
Choose a base branch
from
rizlik:cryptocbonly
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c6c582b
tests/swdev: add scaffolding for WOLF_CRYPTO_CB_ONLY_* testing
rizlik b8eb7a9
tests/swdev: add ECC support to wc_swdev
rizlik cf2ee76
tests/swdev: add RSA support to wc_swdev
rizlik a37cc8b
_CRYPTO_CB_ONLY_{RSA,ECC,SHA256,AES}: move WOLF_CRYPTO_CB guards to s…
rizlik c364bd5
WOLF_CRYPTO_CB_ONLY_SHA256: strip software SHA-256 and dispatch via s…
rizlik 9b571cd
WOLF_CRYPTO_CB_ONLY_AES: add support + swdev for testing
rizlik df905e7
CRYPTO_CB_ONLY_SHA256: fix: guard Sha256FinalRaw under CB_ONLY_SHA256
rizlik 7846a1f
swdev: refcount swdev Init/Cleanup
rizlik 071eca7
test: use XFREE to pair XMALLOC
rizlik bc4ab9e
swdev: add copyright headers
rizlik b8869fd
swdev: support user_settings.h based main library builds
rizlik 6e07dcc
tests:api: skip TLS_CALLBACK_TEST under CRYPTO_CB_ONLY_*
rizlik 8687d8c
swdev: pair internal wolfCrypt_Init() with wolfCrypt_Cleanup()
rizlik b352114
swdev: always add swdev files to EXTRA_DISK
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
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,95 @@ | ||
| 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 piggybacks on the SHA-256 | ||
| # software core so it is incompatible with this strip and must be | ||
| # explicitly disabled (it is default-on on x86_64/aarch64). | ||
| - 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 | ||
| # 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. SHA-224 is left at the platform | ||
| # default (on for x86_64/aarch64); entries that need it off pass | ||
| # --disable-sha224 in extra_config. | ||
| 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
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.