Repository navigation
Harden wolfcrypt wrapper argument and error handling - #65
Open
aidangarske wants to merge 31 commits into
Open
aidangarske wants to merge 31 commits into
aidangarske wants to merge 31 commits into
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #65
Scan targets checked: go-wolfssl-src, go-wolfssl-bugs
Coverage: 8 of 15 in-scope changed file(s) opened by the reviewer; not opened: hash.go, random.go, sha.go, wolfcrypt_hugeslice_other_test.go, wolfcrypt_hugeslice_unix_test.go, wolfcrypt_len.go, wolfcrypt_wrappers_test.go
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Lite
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
F-14889- b401c86 - Wc_ecc_negate_private now returns an error for keys with no curve or no private scalar instead of dereferencing NULL.F-7872- 11f50be - Wc_EncodeSignature now encodes into a bounded C buffer and rejects a digest that is too long or an output slice that is too short.F-12015- e041ae4 - Wc_curve25519_export_private_raw_ex now takes an endian argument so a little endian export round trips with import, and the old big endian export is kept and marked Deprecated.F-2549- 705a9b4 - Wc_Blake2s_HMAC_ex now returns the BLAKE2s HMAC error code, and the old void Wc_Blake2s_HMAC is kept as a deprecated wrapper.F-3284- 0125f02 - Wc_HmacFinal now rejects an output slice shorter than the HMAC digest.F-7876- a07e468 - The ChaCha20-Poly1305 wrappers now require exact key and IV lengths instead of truncating a long key, and the disabled-feature fallback sizes match wolfSSL.F-9633- d4001ef - The HKDF helper now returns the FIPS private key unlock and lock status instead of dropping it.F-9634- 2599106 - The PBKDF2 and ECC unlocked helpers now return the FIPS private key lock status instead of dropping it.F-9648- 24a4b75 - The RSA key generation wrapper now rejects key sizes and exponents that do not fit the C parameter types.F-9649- 7195ad8 - The RNG block wrapper now rejects lengths that do not fit in word32 instead of returning success on a no-op.F-9650- 954a99a - The SHA-256 update wrapper now rejects lengths that do not fit in word32 instead of returning success on a no-op.F-9651- 912cf8b - The BLAKE2s update wrapper now rejects lengths that do not fit in word32.F-9652- db7b97f - The HMAC update wrapper now rejects lengths that do not fit in word32.F-9653- ce077fd - The AES-GCM wrappers now reject input, AAD and tag lengths that do not fit in word32.F-9654- 835adac - The ChaCha20-Poly1305 wrappers now reject lengths that do not fit in word32.F-12019- 4961b56 - Wc_AesSetKey now rejects an IV shorter than one block instead of letting C read past the slice.F-12020- e1e4141 - The AES-CBC wrappers now reject lengths that do not fit in word32.F-12021- 6790b6c - Wc_HmacSetKey now rejects key lengths that do not fit in word32.F-12022- 7e28fb0 - Wc_HKDF now rejects salt, info, key and output lengths that do not fit in word32.F-14915- 5860ab1 - Wc_Blake2sFinal now resolves a requested size of 0 to the digest size and bounds it by the output slice, instead of writing 32 bytes into a 16 byte slice.F-4402- c9b1eab - The PEM passphrase C copy is now zeroed before it is freed.F-7869- f642726 - Wc_Blake2s_HMAC now writes only the requested number of output bytes.F-7870- 9f07344 - Wc_AesInit now returns BAD_FUNC_ARG for a non-nil heap hint instead of silently dropping it.F-7881- b4ee613 - The five one-shot hash wrappers now reject input that does not fit in word32.F-12054- 8030bec - Wc_KeyPemToDer now rejects passphrases containing a NUL byte.F-12820- 3ced2b6 - The ECC verify wrapper now clears its result flag when verification returns an error.F-12821- a8527eb - The AES-GCM appended tag encrypt now returns nil and the error code on failure instead of a buffer.F-12841- b1504f9 - Package init now panics when the RNG seed callback cannot be set instead of continuing without it.F-12848- e1bd774 - The ChaCha20-Poly1305 appended tag encrypt now returns nil and the error code on failure instead of a buffer.F-13585- 75abdcd - Wc_HKDF now returns NOT_COMPILED_IN when wolfSSL lacks HKDF, because its body is guarded by HAVE_HKDF.CI- 7774630 - The build workflow now runs go test on the root package in both the full and default configs.