Set hashType in ports#10193
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #10193
Scan targets checked: wolfcrypt-api_misuse, wolfcrypt-bugs, wolfcrypt-compliance, wolfcrypt-concurrency, wolfcrypt-consttime, wolfcrypt-defaults, wolfcrypt-mutation, wolfcrypt-port, wolfcrypt-port-bugs, wolfcrypt-portability, wolfcrypt-proptest, wolfcrypt-src, wolfcrypt-zeroize
No new issues found in the changed files. ✅
There was a problem hiding this comment.
Pull request overview
This PR ensures wc_Sha512 port-specific initializers populate hashType so downstream logic can distinguish SHA-512 variants (SHA-512, SHA-512/224, SHA-512/256).
Changes:
- Set
sha->hashTypein multiple portwc_InitSha512*_eximplementations whenWOLFSSL_SHA512_HASHTYPEis enabled. - Add
hashTypeinitialization for STM32 SHA-512/224 and SHA-512/256 init paths. - Adjust several init functions to capture/init return codes before conditionally setting
hashType.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
wolfcrypt/src/sha512.c |
Sets hashType for SE050 and STM32 SHA-512 family init paths. |
wolfcrypt/src/port/silabs/silabs_hash.c |
Sets hashType after successful Silicon Labs SHA-512 init. |
wolfcrypt/src/port/riscv/riscv-64-sha512.c |
Sets hashType for RISC-V SHA-512 /224 /256 init paths. |
wolfcrypt/src/port/maxim/max3266x.c |
Sets hashType during MAX3266X SHA-512 initialization. |
wolfcrypt/src/port/kcapi/kcapi_hash.c |
Sets hashType for KCAPI SHA-512 /224 /256 init paths; updates variant comments. |
wolfcrypt/src/port/cypress/psoc6_crypto.c |
Sets hashType for PSoC6 SHA-512 /224 /256 init paths. |
wolfcrypt/src/port/caam/caam_sha.c |
Sets hashType after successful CAAM SHA-512 init. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2d7c4fa to
ea6af18
Compare
|
Retest this please Jenkins |
Description
Ensures
hashTypeis set for port implementations so downstream logic can differentiate between the sha512 modes.Testing
How did you test?
Checklist