Skip to content

Fix Fenrir Issues in wolfProvider extend test suite coverage#377

Open
aidangarske wants to merge 3 commits intowolfSSL:masterfrom
aidangarske:fenrir-fixes
Open

Fix Fenrir Issues in wolfProvider extend test suite coverage#377
aidangarske wants to merge 3 commits intowolfSSL:masterfrom
aidangarske:fenrir-fixes

Conversation

@aidangarske
Copy link
Member

@aidangarske aidangarske commented Mar 24, 2026

Description

  • Add 9 new tests covering fenrir fixes 169, 170, 171, 172, 271, 395, 396, 510, 511, 512, 514, 829, 830, 836, 837, 838, 839, 1183, 1184, 1185, 1186, 1187, 1280, 1281
  • Fix 8 bugs found by the new tests in the fenrir fix implementations
  • Fix pre-existing test_rsa_decode_pkcs8 failure (PSS digest name mismatch)

New Tests

  • test_hmac_dup #514: Partial HMAC update, dup context, feed different tails to each, verify both MACs match independently computed expected values
  • test_mac_key_match #837: Create HMAC keys with same and different material, verify EVP_PKEY_eq returns match for same keys and non-match for different keys
  • test_mac_sig_dup #1186: DigestSign partial update, copy context mid-stream, diverge with different data, verify both MACs match expected values
  • test_cmac_dup #836: Same pattern as test_hmac_dup but for CMAC with AES-256-CBC cipher
  • test_des3_tls_cbc #838: DES3-CBC encrypt/decrypt roundtrip with all padding sizes (1-8), cross-provider interop in both directions
  • test_drbg_reseed #169, #170: Create SEED-SRC/CTR-DRBG hierarchy, generate, reseed with NULL entropy, generate again and verify output differs, the uninstantiate and call verify_zeroization
  • test_rsa_pss_mgf1_get_params #1184: Generate RSA-PSS key with SHA-256 signing digest and SHA-384 MGF1 digest, verify EVP_PKEY_get_params returns the MGF1 digest (384) not the signing digest (256)
  • test_rsa_kem #395, #396: Generate RSA-2048 key, encapsulate with RSASVE, decapsulate, verify recovered secret matches original
  • test_ecx_dup #1281: Load Ed25519/Ed448 key from DER, EVP_PKEY_dup, verify EVP_PKEY_eq, bidirectional sign/verify between original and duplicate

aidangarske and others added 2 commits March 23, 2026 12:37
…14, 829, 830, 836, 837, 838, 839, 1183, 1184, 1185, 1186, 1187, 1280, 1281 for wolfProvider

This comment was marked as resolved.

wolfSSL-Fenrir-bot

This comment was marked as resolved.

- wp_drbg_reseed: Replace parentClearSeed callback with OPENSSL_clear_free(seed, seedLen)
- wp_drbg_reseed: Same fix as above — securely wipes and frees the seed buffer
- wp_ecx_dup: Remove dead ok variable; when private key not selected, re-init the key and import only public part to avoid leaking private material
- wp_rsa_kmgmt.c: SHA1 fallback replaced with ok = 0 error — unknown digest is now a failure, not a silent fallback
- wp_hmac.c: Remove unused rc variable and (void)rc
- wp_cmac.c: Add keyLen <= sizeof(dst->key) bounds check before XMEMCPY
- test_tls_cbc.c: Check RAND_bytes() return value
@aidangarske aidangarske marked this pull request as ready for review March 24, 2026 02:07
@aidangarske aidangarske requested review from Copilot and removed request for Copilot March 24, 2026 02:07
@aidangarske
Copy link
Member Author

aidangarske commented Mar 24, 2026

Jenkins retest this please

As per Jenkins supervisor the build is still failing from cloud node termination which is unrelated:
#1221 was killed the same way as #1219 and #1220: cloud node wolf-linux-cloud-node-7aybgj was terminated mid-build by GCP (ComputeEngineComputerLauncher.terminateNode + Node is being removed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants