Skip to content

Commit 3d82ef0

Browse files
committed
Add refactored crypto tests
1 parent 45b717b commit 3d82ef0

18 files changed

Lines changed: 9649 additions & 1223 deletions

test-refactor/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Translated tests:
7373
|---|---|---|---|
7474
| `wh_test_dma.c::whTest_Dma` | `misc/wh_test_dma.c::whTest_Dma` | Misc | |
7575
| `wh_test_cert.c::whTest_CertRamSim` | `server/wh_test_cert.c::whTest_CertVerify` | Server | remove ramsim coupling and migrate to server group |
76-
| `wh_test_crypto.c::whTest_Crypto` | `client-server/wh_test_crypto.c::{whTest_CryptoSha256, whTest_CryptoAes, whTest_CryptoEcc256}` | Client | Subset only; remaining cases listed below |
76+
| `wh_test_crypto.c::whTest_Crypto` | `client-server/wh_test_aes.c::whTest_CryptoAes`, `client-server/wh_test_sha.c::{whTest_CryptoSha224/256/384/512, ...LargeInput, ...Async, ...DmaAsync}` (16 functions), `client-server/wh_test_ecc.c::{whTest_CryptoEcc, whTest_CryptoEccCacheDuplicate, whTest_CryptoEccCrossVerify, whTest_CryptoEccAsync}`, `client-server/wh_test_curve25519.c::whTest_CryptoCurve25519`, `client-server/wh_test_ed25519.c::{whTest_CryptoEd25519Inline, whTest_CryptoEd25519ServerKey, whTest_CryptoEd25519Dma}`, `client-server/wh_test_mldsa.c::{whTestCrypto_MlDsaClient, whTestCrypto_MlDsaDmaClient, whTestCrypto_MlDsaVerifyOnlyDma}`, `client-server/wh_test_cmac.c::whTest_CryptoCmac`, `client-server/wh_test_keypolicy.c::{whTest_CryptoKeyUsagePolicies, whTest_CryptoKeyRevocationAesCbc}`, `client-server/wh_test_rng.c::{whTest_CryptoRng, whTest_CryptoRngAsync, whTest_CryptoRngDmaAsync}`, `client-server/wh_test_rsa.c::whTest_CryptoRsa` | Client | Full coverage |
7777
| `wh_test_clientserver.c` (echo and server-info paths) | `client-server/wh_test_echo.c::whTest_Echo`, `client-server/wh_test_server_info.c::whTest_ServerInfo` | Client | pthread test ported, sequential test dropped |
7878
| `wh_test_wolfcrypt_test.c::whTest_WolfCryptTest` | `client-server/wh_test_wolfcrypt.c::whTest_WolfCryptTest` | Client | |
7979
| `wh_test_flash_ramsim.c::whTest_Flash_RamSim` | `posix/wh_test_flash_ramsim.c::{whTest_FlashWriteLock, whTest_FlashEraseProgramVerify, whTest_FlashUnitOps}` | POSIX port-specific (`whTestGroup_RunOne`) | remove ramsim coupling and migrate to server group |
@@ -86,7 +86,6 @@ Not yet migrated (still live in `wolfHSM/test/`):
8686
|---|---|
8787
| `wh_test_comm.c::whTest_Comm` | |
8888
| `wh_test_clientserver.c::whTest_ClientServer` | Pthread variant: remaining client-side coverage (NVM ops, etc.) still needs to be split out as new tests. The sequential test is dropped |
89-
| `wh_test_crypto.c::whTest_Crypto` | RNG, key cache, key-cache enforcement, RSA, CMAC, Curve25519, ML-DSA, key usage policies, key revocation |
9089
| `wh_test_crypto_affinity.c::whTest_CryptoAffinity` | |
9190
| `wh_test_keywrap.c::whTest_KeyWrapClientConfig` | |
9291
| `wh_test_multiclient.c::whTest_MultiClient` | |
@@ -102,3 +101,4 @@ Not yet migrated (still live in `wolfHSM/test/`):
102101

103102
### Other improvements
104103
- Add callback from `wh_Server_HandleRequestMessage` to allow sleep and avoid a busy loop
104+
- Implement `whTestPort_ResetServer/Client` and re-enable persistent-NVM-artifact tests (`WOLFHSM_CFG_TEST_ALLOW_PERSISTENT_NVM_ARTIFACTS` is intentionally not defined in `config/wolfhsm_cfg.h`)

0 commit comments

Comments
 (0)