Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20250120-lean-fips #8370

Merged
merged 8 commits into from
Jan 25, 2025
Merged

20250120-lean-fips #8370

merged 8 commits into from
Jan 25, 2025

Conversation

douzzer
Copy link
Contributor

@douzzer douzzer commented Jan 23, 2025

wolfssl/wolfcrypt/types.h: tweak for buildability in no-PK FIPS, re limits.h.

fixes for clang-tidy complaints with NO_ERROR_STRINGS.

configure.ac: tweaks for clarity

see https://github.com/wolfSSL/fips/pull/320

dgarske
dgarske previously approved these changes Jan 23, 2025
…lCast_fips();

wolfcrypt/src/aes.c: add missing parens in GHASH_ONE_BLOCK_SW() to mollify clang-tidy;

wolfssl/wolfcrypt/fips_test.h: add FIPS_CAST_AES_ECB;

wolfssl/wolfcrypt/settings.h: #ifdef WOLFSSL_LINUXKM, #undef HAVE_LIMITS_H.
…stency with OpenSSL;

fix internal functions wolfSSL_read_internal() and ReceiveData() to likewise accept size_t sz;

add negative sz checks where needed to other functions that call wolfSSL_read_internal() and ReceiveData();

add min_size_t() and max_size_t() to misc.c/misc.h.
@douzzer douzzer force-pushed the 20250120-lean-fips branch from 7a55bc0 to 1b338ab Compare January 24, 2025 22:20
change Buffers.prevSent and .plainSz from int to word32;

change SendData() sz arg from int sz to size_t sz;

add asserts in SendData() and ReceiveData() to prevent sz > INT_MAX (assuring no overflow internally or in the returned int).

wolfssl/ssl.h and src/ssl.c:

change WOLFSSL_BUFFER_INFO.length from unsigned int to word32 (no functional change, just for consistency);

add wolfSSL_write_internal(), refactor wolfSSL_write() to call it, and fix wolfSSL_write_ex() to take size_t sz, not int sz.
…ev(), long ago annotated with PRAGMA_GCC("GCC diagnostic ignored \"-Wmaybe-uninitialized\"").

wolfcrypt/src/misc.c: fix typo, max_size_t_() -> max_size_t().
dgarske
dgarske previously approved these changes Jan 25, 2025
@dgarske dgarske merged commit 0932891 into wolfSSL:master Jan 25, 2025
159 checks passed
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.

4 participants