20241010-WOLFSSL_NO_MALLOC#8065
Merged
philljj merged 10 commits intowolfSSL:masterfrom Oct 15, 2024
Merged
Conversation
danielinux
previously requested changes
Oct 11, 2024
285160f to
c40a119
Compare
JacobBarthelmeh
requested changes
Oct 11, 2024
c40a119 to
376cd16
Compare
Contributor
Author
|
retest this please. |
wolfcrypt/src//asn.c: add stack buffer codepaths in ParseKeyUsageStr(), SetKeyIdFromPublicKey(), and EncodePolicyOID;
wolfcrypt/src/dh.c: add stack buffer codepath in wc_DhGenerateParams();
wolfcrypt/src/ecc.c: add always-fail codepath to find_hole() to preempt heap allocation attempts;
wolfcrypt/test/test.c: gate out several heap-dependent subtests when defined(WOLFSSL_NO_MALLOC), and add a stack buffer codepath in ed448_test();
wolfssl/wolfcrypt/types.h: harmonize macro definitions of XFREE() to use do { ... } while (0) wrappers to assure syntactic indivisibility.
This reverts commit a3f6bab.
This reverts commit 06195a2.
This reverts commit 56a96ba.
…d isAllocated XFREE()s in wc_ed25519_free() and wc_HashFree().
…eded, after proper gating in test.c).
…finition of XSTRDUP regardless of WOLFSSL_NO_MALLOC (wc_strdup_ex() uses XMALLOC(), which may be a user or static pool allocator).
wolfcrypt/src/dh.c: in wc_DhGenerateParams(), use named constant for buf size, and only XFREE it if !WOLFSSL_NO_MALLOC; wolfcrypt/src/ecc.c and wolfssl/wolfcrypt/ecc.h: in wc_ecc_new_point_ex(), remove !WOLFSSL_NO_MALLOC gate around XMALLOC(), and if XMALLOC()ed, set ecc_point.isAllocated, then in wc_ecc_del_point_ex, XFREE() iff ecc_point.isAllocated; wolfcrypt/src/pkcs7.c: in wc_PKCS7_RsaVerify(), when WOLFSSL_NO_MALLOC, jumbo-size the digest buffer to cope with in-place dynamics in RsaUnPad(); wolfcrypt/test/test.c: add !WOLFSSL_NO_MALLOC gates around various XFREE()s of objects that are on the stack in WOLFSSL_NO_MALLOC builds; wolfssl/wolfcrypt/types.h: add an unconditional include of memory.h (itself guarded against multiple inclusion) to assure availability of WC_DEBUG_CIPHER_LIFECYCLE prototypes/macros.
…iteral grouping for "-H".
aa1de20 to
cc7ccf9
Compare
Contributor
Author
|
retest this please.. |
SparkiDev
requested changes
Oct 14, 2024
SparkiDev
approved these changes
Oct 14, 2024
JacobBarthelmeh
approved these changes
Oct 15, 2024
philljj
approved these changes
Oct 15, 2024
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.
fixes for
enable-all-cryptoenable-cryptonlyWOLFSSL_NO_MALLOC:revert changes from #8053
wolfcrypt/src/dh.c: add stack buffer codepath inwc_DhGenerateParams();wolfcrypt/src/ecc.c: add always-fail codepath tofind_hole()to preempt heap allocation attempts;wolfcrypt/test/test.c: gate out several heap-dependent subtests whendefined(WOLFSSL_NO_MALLOC), and add a stack buffer codepath ined448_test();wolfssl/wolfcrypt/types.h: harmonize macro definitions ofXFREE()to usedo { ... } while (0)wrappers to assure syntactic indivisibility.tested with
wolfssl-multi-test.sh ... super-quick-checkwithallcryptonly-no-mallocadded to it.config for
allcryptonly-no-malloc: