Commit Graph

  • fd14f3f346 backport 2b28931855 "wolfcrypt/src/sha256.c and wolfcrypt/src/sha512.c: in WOLFSSL_SMALL_STACK_CACHE builds, allocate shafoo->W at init or context copy time, rather than in the transform function. for the SHA512 family, allocate additional space in W for "buffer" in wc_Sha512Transform()." Daniel Pouzzner 2025-12-18 17:35:53 -06:00
  • 6561bef66a backport HmacKeyCopyHash() from bfd52decb6 and wc_HmacCopy() from 50b51adc93. Daniel Pouzzner 2025-12-18 17:32:08 -06:00
  • b8f1399233 backport random.c and random.h from #9545 "20251211-DRBG-SHA2-smallstackcache-prealloc", full replacement. Daniel Pouzzner 2025-12-18 17:28:50 -06:00
  • afe82b9512 Fix PKCS#7 degenerate detection based on signerInfos length Chris Conlon 2025-12-18 15:01:09 -07:00
  • d6dcd30736 Fix PKCS#7 streaming for non OCTET STRING content types Chris Conlon 2025-12-18 14:19:47 -07:00
  • bbc3a72ea8 Merge pull request #9556 from julek-wolfssl/rng-tools-timeout-fix JacobBarthelmeh 2025-12-18 15:59:42 -07:00
  • b0b840aa0f Rename fdOpen to seedFdOpen to avoid potential conflicts. Kareem 2025-12-18 15:55:35 -07:00
  • c238defe23 Add cast for public_size Kareem 2025-12-18 15:32:59 -07:00
  • 755097d512 Track if RNG seed FD was opened and only close it if it was already open. This fixes the case where wc_FreeRng is called when _InitRng was not called on the RNG. Since the FD value defaults to 0 before _InitRng was called, and 0 is potentially a valid FD, it was being closed. Kareem 2025-12-18 15:27:00 -07:00
  • 4162f24434 Merge pull request #9555 from embhorn/zd20964 JacobBarthelmeh 2025-12-18 15:14:35 -07:00
  • c44d421306 wolfcrypt/src/hmac.c: fix FIPS version gate on wc_HmacFree() in wc_HmacSetKey(). Daniel Pouzzner 2025-12-18 16:05:09 -06:00
  • 5eef52c6fa Add test for PKCS#7 SignedData with non-OCTET_STRING content Chris Conlon 2025-12-17 15:52:10 -07:00
  • 81d32f4fe6 Move Curve25519 public key check to make_pub/make_pub_blind to cover the case where they are called directly by an application. Kareem 2025-12-18 14:37:59 -07:00
  • 2cf1253c54 fix out-of-order ForceZero()s in wc_HKDF_Extract(), wc_HKDF_Expand(), and wc_SSH_KDF() (fixes 844e961ff5). Daniel Pouzzner 2025-12-18 15:35:10 -06:00
  • 4e96b11cce Merge pull request #9557 from douzzer/20251218-fixes David Garske 2025-12-18 12:35:44 -08:00
  • 9160ac04fd backport 2b28931855 "wolfcrypt/src/sha256.c and wolfcrypt/src/sha512.c: in WOLFSSL_SMALL_STACK_CACHE builds, allocate shafoo->W at init or context copy time, rather than in the transform function. for the SHA512 family, allocate additional space in W for "buffer" in wc_Sha512Transform()." Daniel Pouzzner 2025-12-18 14:09:43 -06:00
  • f4e22afa68 backport HmacKeyCopyHash() from bfd52decb6 and wc_HmacCopy() from 50b51adc93. Daniel Pouzzner 2025-12-18 13:40:35 -06:00
  • 0420c942a0 Only use -1 for uninitialized fds as 0 is a valid fd. Kareem 2025-12-18 11:22:22 -07:00
  • 2e83b97909 Only attempt to close RNG file descriptor on platforms with XCLOSE. Kareem 2024-11-15 11:27:26 -07:00
  • fb880e943b Reset fd after closing it. Kareem 2024-05-28 16:15:19 -07:00
  • 6bcbfec200 Initalize RNG seed fd in _InitRng. Kareem 2024-05-24 12:57:34 -07:00
  • ea43bcba72 Keep RNG seed file descriptor open until the RNG is freed. Kareem 2024-05-24 12:22:32 -07:00
  • 8a8ef3512e src/internal.c: in FreeSSL_Ctx(), use wolfSSL_RefWithMutexFree(&ctx->ref), matching refactor in #8187. Daniel Pouzzner 2025-12-18 11:48:31 -06:00
  • 4e15ccec35 rng-tools: increase jitter timeout Juliusz Sosinowicz 2025-12-18 18:40:54 +01:00
  • 83e9a0780f wolfcrypt/src/wc_lms.c: fix leak in wc_LmsKey_Reload(). Daniel Pouzzner 2025-12-18 11:09:37 -06:00
  • 59b3219c0f wolfcrypt/test/test.c: fix memory leaks in Hmac tests. Daniel Pouzzner 2025-12-18 10:47:21 -06:00
  • d1a4677a8a Null deref check in Pkcs11ECDH Eric Blankenhorn 2025-12-18 10:10:57 -06:00
  • 988ba340ba address reviewer's comments Marco Oliverio 2025-12-18 10:28:54 +01:00
  • 42e324e545 [JA] Fix issues with the API documentation Masaki I. 2025-12-18 18:08:59 +09:00
  • 1484fb5069 Add IAR support to WC_OFFSETOF macro Joseph Chen 2025-12-18 15:46:35 +08:00
  • a103f5af8b Merge pull request #9545 from douzzer/20251211-DRBG-SHA2-smallstackcache-prealloc Sean Parkinson 2025-12-18 10:07:37 +10:00
  • b7e69fb2f3 Merge pull request #9543 from kareem-wolfssl/zd20944 Sean Parkinson 2025-12-18 09:29:58 +10:00
  • 911e996a8d Merge pull request #9546 from SparkiDev/curve25519_base_smul_improv JacobBarthelmeh 2025-12-17 15:28:56 -07:00
  • 498b86fabd Merge pull request #9542 from holtrop-wolfssl/rust-wolfssl-wolfcrypt-crate JacobBarthelmeh 2025-12-17 12:17:51 -07:00
  • 4bd0b3ef41 backport f771181e1a to wolfcrypt/src/ecc.c (smallstack refactor of ecc_mul2add()). Daniel Pouzzner 2025-12-17 13:07:49 -06:00
  • 481db6f1ac backport 401868908a (smallstack refactor of wc_ecc_mulmod_ex2()). Daniel Pouzzner 2025-12-17 13:04:57 -06:00
  • b23f59f137 Merge pull request #9540 from sameehj/linuxkm_tegra_fips_fixes Daniel Pouzzner 2025-12-17 12:49:23 -06:00
  • 04a06fee0f Merge pull request #9535 from philljj/kernel_readme JacobBarthelmeh 2025-12-17 11:32:58 -07:00
  • 4d0f78e7a4 backport random.c and random.h from #9545 "20251211-DRBG-SHA2-smallstackcache-prealloc", full replacement. Daniel Pouzzner 2025-12-17 12:11:39 -06:00
  • a2ab7b3e80 Merge pull request #9548 from julek-wolfssl/fix-os-check-cflags JacobBarthelmeh 2025-12-17 10:37:44 -07:00
  • 39a903b30c Merge pull request #9549 from embhorn/zd20965 JacobBarthelmeh 2025-12-17 10:35:43 -07:00
  • 16e035d692 Merge pull request #9547 from SparkiDev/aesgcm_ossl_arm32_asm_fix JacobBarthelmeh 2025-12-17 10:33:38 -07:00
  • 393dab2151 Merge pull request #9524 from julek-wolfssl/zephyr-cpp JacobBarthelmeh 2025-12-17 10:30:18 -07:00
  • e93835acd9 sanity checks on buffer size with AES and CAAM Integrity use JacobBarthelmeh 2025-12-17 10:15:32 -07:00
  • fc7d4ffad4 PR#9545 20251211-DRBG-SHA2-smallstackcache-prealloc addressing peer review: clear dest if necessary in InitHandshakeHashesAndCopy(), style tweaks in random.c, explanatory comments in sha512.c. Daniel Pouzzner 2025-12-17 11:07:22 -06:00
  • 33fc601011 tweaks from PRBs results: Daniel Pouzzner 2025-12-16 23:49:21 -06:00
  • e159c650ea .wolfssl_known_macro_extras: add CONFIG_CRYPTO_DRBG. Daniel Pouzzner 2025-12-16 17:03:17 -06:00
  • 79d1e6b295 .github/workflows/trackmemory.yml: new workflow testing various configs with -DWC_RNG_SEED_CB -DWOLFSSL_TRACK_MEMORY -DWOLFSSL_DEBUG_MEMORY. Daniel Pouzzner 2025-12-16 17:02:18 -06:00
  • fb82bdbc35 wolfcrypt/test/test.c: * in wolfcrypt_test_main(), when WOLFSSL_TRACK_MEMORY, check and error if wc_MemStats_Ptr->currentBytes > 0; * don't call the hash initialization APIs for hash structs that are later copied over with the hash copy API (sha224_test(), sha256_test(), sha512_test(), etc) * in hash_test(), either wc_HashNew() or wc_HashInit(), not both (fixes leaks); * in hmac_*_test(), add test coverage for wc_HmacCopy(); * in _rng_test(), when WOLFSSL_TRACK_MEMORY && WOLFSSL_SMALL_STACK_CACHE, check that wc_MemStats_Ptr->totalAllocs doesn't increase when wc_RNG_GenerateBlock() is called, and if HAVE_HASHDRBG) && !CUSTOM_RAND_GENERATE_BLOCK, check that forcing a reseed doesn't result in an increase. * add missing context cleanups in openSSL_evpMD_test(). Daniel Pouzzner 2025-12-16 17:02:09 -06:00
  • 8bd0fb0e4b wolfcrypt/src/random.c and wolfssl/wolfcrypt/random.h: refactor WOLFSSL_SMALL_STACK_CACHE support to eliminate all heap calls after init and before cleanup. * add DRBG_internal.{seed_scratch,digest_scratch} * add WC_RNG.{drbg_scratch,health_check_scratch,newSeed_buf} * refactor to implement new WOLFSSL_SMALL_STACK_CACHE dynamics: * wc_RNG_HealthTestLocal() * Hash_df() * Hash_gen() * Hash_DRBG_Generate() * Hash_DRBG_Instantiate() * _InitRng() * PollAndReSeed() * wc_FreeRng() * wc_RNG_HealthTest_ex_internal() * wc_RNG_HealthTest_ex() * wc_RNG_HealthTestLocal() * refactor out WOLFSSL_KERNEL_MODE gates (now all WOLFSSL_SMALL_STACK_CACHE) Daniel Pouzzner 2025-12-16 17:01:54 -06:00
  • 2b28931855 wolfcrypt/src/sha256.c and wolfcrypt/src/sha512.c: in WOLFSSL_SMALL_STACK_CACHE builds, allocate shafoo->W at init or context copy time, rather than in the transform function. for the SHA512 family, allocate additional space in W for "buffer" in wc_Sha512Transform(). Daniel Pouzzner 2025-12-16 17:01:36 -06:00
  • 525266c467 wolfssl/wolfcrypt/mem_track.h and wolfcrypt/src/memory.c: add WOLFSSL_API extern memoryStats *wc_MemStats_Ptr, set by InitMemoryTracker() and cleared by CleanupMemoryTracker(), allowing public access to the memory statistics. Daniel Pouzzner 2025-12-16 17:00:24 -06:00
  • 1e38a1011e wolfcrypt/src/wolfentropy.c: in wc_Entropy_Get(): * use a bss segment allocation for noise, to avoid a heap allocation (access is already mutex-protected), and * in the loop, WC_CHECK_FOR_INTR_SIGNALS() and WC_RELAX_LONG_LOOP(). Daniel Pouzzner 2025-12-16 16:59:42 -06:00
  • 38b675ef68 linuxkm/lkcapi_sha_glue.c: * as for other glue families, when LINUXKM_LKCAPI_REGISTER_ALL_KCONFIG, don't "#error Config conflict" if explicit LINUXKM_LKCAPI_DONT_REGISTER_foo is defined for the missing algorithm; * in km_hmac_init(), use wc_HmacCopy() to copy p_ctx->wc_hmac to t_ctx->wc_hmac; * in get_drbg(), when tfm == crypto_default_rng, only migrate_disable() and local_bh_disable() if preempt_count() == 0, i.e. if not in already in an uninterruptible context; * add can_spin argument to get_drbg_n() -- wc_linuxkm_drbg_seed() can_spin, wc_mix_pool_bytes() !can_spin, and wc_crng_reseed() can_spin; * add compile-time assert that WOLFSSL_SMALL_STACK_CACHE is defined if LINUXKM_DRBG_GET_RANDOM_BYTES; Daniel Pouzzner 2025-12-16 16:59:28 -06:00
  • 50b51adc93 wolfcrypt/src/hmac.c and wolfssl/wolfcrypt/hmac.h: implement WOLFSSL_API wc_HmacCopy(), and remove the WOLFSSL_HMAC_COPY_HASH gate on HmacKeyCopyHash(). Daniel Pouzzner 2025-12-16 16:59:11 -06:00
  • 8090817c11 configure.ac: when KERNEL_MODE_DEFAULTS, set ENABLED_SMALL_STACK_CACHE_DEFAULT=yes regardless of FIPS/version. Daniel Pouzzner 2025-12-16 16:58:56 -06:00
  • 8e03d0523c wolfssl/test.h: add missing wc_HmacFree()s in myMacEncryptCb(), myDecryptVerifyCb(), myEncryptMacCb(), myVerifyDecryptCb(). Daniel Pouzzner 2025-12-16 16:58:36 -06:00
  • 15fcf7095f linuxkm/lkcapi_{dh,ecdh,ecdsa,rsa,aes}_glue.c: when LINUXKM_LKCAPI_REGISTER_ALL_KCONFIG, don't "#error Config conflict" if explicit LINUXKM_LKCAPI_DONT_REGISTER_foo is defined for the missing algorithm. Daniel Pouzzner 2025-12-16 16:58:08 -06:00
  • dc0fe803a5 src/internal.c: in InitHandshakeHashesAndCopy(), don't call InitHandshakeHashes(), to avoid leaking in the later wc_FooCopy() operation. Daniel Pouzzner 2025-12-16 16:57:46 -06:00
  • 918b6973bd tests/api.c: in test_wolfSSL_dtls_stateless_HashWOLFSSL(), when WOLFSSL_SMALL_STACK_CACHE, omit ssl->hsHashes from the comparison (init-time heap pointers destabilize its bit signature). Daniel Pouzzner 2025-12-16 16:57:28 -06:00
  • 2802e2d82b wolfcrypt/src/rsa.c: in RsaUnPad_OAEP(), refactor volatile-based constant time mitigation to fix "using value of assignment with ‘volatile’-qualified left operand is deprecated [-Werror=volatile]" (new warning from gcc-16.0.0_p20251207, not reported by gcc-16.0.0_p20251116-r1). Daniel Pouzzner 2025-12-16 16:57:18 -06:00
  • cd3e81a656 src/ssl_load.c: in ProcessBufferCert(), check ctx for nullness before accessing ctx->verifyNone (fixes -Wnull-dereference reported by multi-test dtls-no-rsa-no-dh after merge of 36e66eb763). Daniel Pouzzner 2025-12-16 16:56:55 -06:00
  • d5691fe849 Fix MQX example null deref Eric Blankenhorn 2025-12-17 09:35:01 -06:00
  • 5aa2840bed Fix MQX example null deref Eric Blankenhorn 2025-12-17 09:33:21 -06:00
  • a5f1fde955 linuxkm: fix Tegra Yocto FIPS build issues (ARM64, RT, PIE) Sameeh Jubran 2025-12-05 18:32:21 +02:00
  • 432f0e33f6 Fix incorrect use of CFLAGS in os-check Juliusz Sosinowicz 2025-12-17 10:28:43 +01:00
  • f61bfd7805 Check KeyShare after HRR Juliusz Sosinowicz 2025-12-16 17:10:26 +01:00
  • af2c6cc932 AES-GCM ARM32/Thumb2 ASM: don't change aes->reg in decrypt Sean Parkinson 2025-12-17 16:04:25 +10:00
  • f54266c2c6 Curve25519: improved smul Sean Parkinson 2025-12-17 13:25:36 +10:00
  • b42e9a9410 Merge pull request #9529 from SparkiDev/dsa_pg_sp_int_fix JacobBarthelmeh 2025-12-16 14:52:45 -07:00
  • 75fdf959c1 Merge pull request #9514 from kareem-wolfssl/zd20936 JacobBarthelmeh 2025-12-16 14:48:17 -07:00
  • 9156b50bbc Merge pull request #9538 from SparkiDev/tls13_dup_ext_alert_code_fix JacobBarthelmeh 2025-12-16 14:43:19 -07:00
  • 95afe9ca06 Merge pull request #9539 from julek-wolfssl/APP_DATA_READY-docs JacobBarthelmeh 2025-12-16 14:42:39 -07:00
  • ac84464140 Updates for latest zephyr with cpp Juliusz Sosinowicz 2025-12-11 17:36:20 +01:00
  • 9020373405 Rust crate: update CHANGELOG for v1.0.0 Josh Holtrop 2025-12-16 10:08:10 -05:00
  • 37fa1581d3 Rust crate: bump version to 1.0.0 Josh Holtrop 2025-12-16 10:04:15 -05:00
  • 95e8276d55 Rust crate: add CHANGELOG.md Josh Holtrop 2025-12-16 09:06:07 -05:00
  • 52e7801939 Rust crate: bump version Josh Holtrop 2025-12-16 09:03:10 -05:00
  • 357b8952c6 Rust crate: only set link-search and link-arg for local repo build Josh Holtrop 2025-12-16 09:02:34 -05:00
  • 0fa0fd2317 (d)tls: refactor wolfSSL_GetMaxFragSize(), simplify length computations Marco Oliverio 2025-12-15 17:34:15 +01:00
  • e9f3bd5ddd dtls: test precise header headroom computation Marco Oliverio 2025-12-15 17:32:52 +01:00
  • 36eda9fb75 Check Curve25519 public key after generating one to avoid generating invalid keys. Kareem 2025-12-15 16:30:43 -07:00
  • 5512c2d0b4 Merge pull request #9541 from jackctj117/empty-hash-comment Sean Parkinson 2025-12-16 08:34:16 +10:00
  • 85d40c8e9b Merge pull request #9522 from JacobBarthelmeh/time Sean Parkinson 2025-12-16 08:24:49 +10:00
  • a3cc7214e7 Update include.am for Rust crate rename Josh Holtrop 2025-12-15 16:28:26 -05:00
  • 968662063d Merge remote-tracking branch 'upstream/master' into zd20936 Kareem 2025-12-15 14:06:18 -07:00
  • 447ba11379 Add README.md in wolfssl-wolfcrypt crate directory Josh Holtrop 2025-12-15 15:22:44 -05:00
  • 0a469d4a4d Avoid unused variable warning in ECCPoint test Josh Holtrop 2025-12-15 13:02:55 -05:00
  • d3863e5fa3 TLS 1.3: duplicate extension alert code fix Sean Parkinson 2025-12-15 09:34:13 +10:00
  • 8cd0c9bd11 Rust wrapper: rename wolfssl crate to wolfssl-wolfcrypt Josh Holtrop 2025-12-12 15:23:45 -05:00
  • 585a8d22aa Added comment with empty hash imofrmation jackctj117 2025-12-15 10:52:24 -07:00
  • 52ee00132d Merge pull request #9528 from SparkiDev/tls13_missing_ext_fix Daniel Pouzzner 2025-12-15 11:05:02 -06:00
  • 901ddab007 Merge pull request #9534 from rlm2002/coverity Daniel Pouzzner 2025-12-15 11:03:18 -06:00
  • b9368d7a3d Merge pull request #9516 from embhorn/gh3665 Daniel Pouzzner 2025-12-15 10:49:57 -06:00
  • 7e5d1d3d6d Merge pull request #9523 from JacobBarthelmeh/bio Daniel Pouzzner 2025-12-15 10:39:55 -06:00
  • 61c72d2406 Merge pull request #9525 from JacobBarthelmeh/docs Daniel Pouzzner 2025-12-15 10:34:39 -06:00
  • a379797482 Merge pull request #9526 from holtrop/rust-wrapper-notes Daniel Pouzzner 2025-12-15 09:58:25 -06:00
  • c73de0d133 Update APP_DATA_READY doc string Juliusz Sosinowicz 2025-12-15 12:18:10 +01:00
  • dacb3425cd DSA Parameter Generation: init g earlier Sean Parkinson 2025-12-12 09:39:21 +10:00
  • 44be44a509 TLS 1.3 missing extension: return correct alert code Sean Parkinson 2025-12-12 09:23:02 +10:00