Commit Graph

9537 Commits

Author SHA1 Message Date
JacobBarthelmeh
c22505a71a Merge pull request #8700 from embhorn/rel_fixes_cs
Fixes from CodeSonar report
2025-04-23 11:36:15 -06:00
Daniel Pouzzner
d4fc8c3791 linuxkm/: null out pointers with PTR_ERR()-encoded values before jumping to cleanup;
linuxkm/lkcapi_rsa_glue.c: in km_rsa_init(), implement error-path cleanup;

linuxkm/module_hooks.c: nix CONFIG_MODULE_SIG requirement in WOLFCRYPT_FIPS_CORE_DYNAMIC_HASH_VALUE builds;

wolfssl/wolfcrypt/settings.h: in WOLFSSL_LINUXKM setup, define WOLFSSL_ASN_INT_LEAD_0_ANY if LINUXKM_LKCAPI_REGISTER (required for kernel 5.10 crypto manager);

wolfcrypt/src/memory.c: add WC_NO_ERR_TRACE() to mock error returns in SAVE_VECTOR_REGISTERS2_fuzzer().
2025-04-22 16:44:07 -05:00
Eric Blankenhorn
66b9256f86 Fixes from CodeSonar report 2025-04-22 14:43:01 -05:00
Daniel Pouzzner
25cd009a42 Merge pull request #8695 from JacobBarthelmeh/coverity
null derefernce sanity checks and control flow issue
2025-04-22 11:37:51 -05:00
Daniel Pouzzner
9e5c064d5d Merge pull request #8679 from kojiws/keep_header_on_pkcs12_parse
Add wc_PKCS12_parse_ex() to keep PKCS8 header
2025-04-19 01:57:21 -05:00
Daniel Pouzzner
543ba268a4 Merge pull request #8558 from julek-wolfssl/openssh-9.9-fix
wolfSSL_EVP_PKEY_cmp: only compare the public keys
2025-04-19 01:51:49 -05:00
JacobBarthelmeh
69a4607f84 null sanity check on arguments in wc_HpkeContextComputeNonce, CID 515543 2025-04-18 16:47:36 -06:00
Daniel Pouzzner
8c0b931459 Merge pull request #8652 from kareem-wolfssl/zd19563_2
Add some FPKI test OIDs which are currently being used in DoD JITC certificates.
2025-04-18 14:04:29 -05:00
Koji Takeda
039ff1b460 Add wc_PKCS12_parse_ex() 2025-04-18 06:39:16 +09:00
Kareem
645da33176 Fix unused function warning for wc_AesDecrypt when building with STM32.
This function is not needed for AES-CCM, as the AES-CCM decrypt function only calls wc_AesEncrypt.
2025-04-17 14:33:44 -07:00
Kareem
038eab61d0 Add additional FPKI test OIDs. 2025-04-17 11:29:36 -07:00
Kareem
00a6c3953c Add some FPKI test OIDs which are currently being used in DoD JITC certificates. 2025-04-17 11:10:35 -07:00
Daniel Pouzzner
5b3e19c1b6 Merge pull request #8686 from miyazakh/oid_collision
fix OID collision
2025-04-17 00:54:04 -05:00
Daniel Pouzzner
90f30fd15e Merge pull request #8623 from SparkiDev/lms_kid_from_privraw
LMS: add API to get Key ID from raw private key
2025-04-17 00:49:08 -05:00
David Garske
404fafd598 Merge pull request #8677 from SparkiDev/regression_fixes_17
Regression test fixes
2025-04-16 20:20:28 -07:00
David Garske
a66fb123b4 Merge pull request #8684 from SparkiDev/lms_max_levels_1
LMS: fix for when WOLFSSL_LMS_MAX_LEVELS is 1
2025-04-16 20:19:40 -07:00
David Garske
a9e2146f06 Merge pull request #8675 from SparkiDev/entropy_memuse_fix
Entropy MemUse: fix for when block size less than update bits
2025-04-16 20:18:22 -07:00
Hideki Miyazaki
62f7ff9ec2 fix OID collision
fix qt jenkins failure
2025-04-17 11:55:03 +09:00
Sean Parkinson
62f28759d8 LMS: fix for when WOLFSSL_LMS_MAX_LEVELS is 1 2025-04-17 11:19:41 +10:00
Sean Parkinson
a34284e0a2 Entropy MemUse: support for custom hi res time
Call the custom high resolution time function when
CUSTOM_ENTROPY_TIMEHIRES is defined with the function name.
2025-04-17 09:30:29 +10:00
Juliusz Sosinowicz
290dbaa18e wolfSSL_EVP_PKEY_cmp: only compare the public keys 2025-04-16 18:14:09 +02:00
Sean Parkinson
3ac05dea09 Regression test fixes
dtls13.c: LowResTimer() not available when NO_ASN_TIME is defined.
api.c: Add certificate and key to use for when only Ed25519 or Ed448.
asn.c: Casts needed for g++ compile.
mem_track.c: Casts needed for g++ compile.
2025-04-16 21:46:48 +10:00
Sean Parkinson
5e8d018ff7 Merge pull request #8659 from kojiws/improve_mldsa_priv_key_import
Improve ML-DSA private key import and the test
2025-04-16 18:21:00 +10:00
Koji Takeda
1646a4b274 Reflect review 2025-04-16 13:46:39 +09:00
Sean Parkinson
b1aa11d42e Entropy MemUse: fix for when block size less than update bits
When the block size is less than the number of update bits, adding the
update value will make the index larger than ENTROPY_NUM_WORDS.
The update bits, ENTROPY_NUM_UPDATES_BITS, should be less than or equal
to ENTROPY_BLOCK_SZ but is not practical.
Add extra elements to the entropy state to accomadate this.
2025-04-16 10:30:37 +10:00
Daniel Pouzzner
6bf93c93d4 Merge pull request #8594 from julek-wolfssl/nss
Implement AES-CTS in wolfCrypt
2025-04-15 18:35:52 -05:00
Daniel Pouzzner
fbc6190752 Merge pull request #8160 from kaleb-himes/OE8-CHECK-IN
OE8 check in
2025-04-15 18:13:44 -05:00
JacobBarthelmeh
d9fd1072a2 Merge pull request #8672 from SparkiDev/asm_fixes_1
Various fixes for Aarch64/ARM32/Thumb2 ASM
2025-04-15 14:56:32 -06:00
Sean Parkinson
cf1f8e14ff Various fixes for Aarch64/ARM32/Thumb2 ASM
cpuid.c: hwcaps not used.
thumb2-*: ldm -> LDM
sp_arm32.c: No register assignment, fix sp_*_from_bin
sp_armthumb.c: fix sp_*_from_bin
sp_cotexm.c: fix line lengths, fix sp_*_from_bin
2025-04-15 17:00:06 +10:00
Daniel Pouzzner
b000d7382f Merge pull request #8671 from SparkiDev/poly1305_aarch64_asm_fix
Poly1305 Aarch64 ASM: fix
2025-04-14 22:36:39 -05:00
Sean Parkinson
10f0999c21 Poly1305 Aarch64 ASM: fix
r^2 may overflow after adding high bits - reduce again.
2025-04-15 11:04:47 +10:00
Daniel Pouzzner
2ec8e72579 CURVE25519_MAX_KEY_TO_DER_SZ: refactor to macro like other CURVE25519_ constants, and add FIPS clause in curve255519_der_test() to accommodate FIPS v6. 2025-04-14 18:29:22 -05:00
Sean Parkinson
9106d1275f Merge pull request #8651 from billphipps/fix_curve25519_enums
Update to expose reasonable DER buffer sizes for Curve25519
2025-04-15 08:34:12 +10:00
Kaleb Himes
6b66149edb Merge branch 'master' into OE8-CHECK-IN 2025-04-14 15:24:28 -06:00
Juliusz Sosinowicz
e320b3c90d fixup! Implement AES-CTS in wolfCrypt 2025-04-14 17:45:34 +02:00
David Garske
b77bd78b5c Merge pull request #8664 from douzzer/20250411-more-libwolfssl_sources_h-2
20250411-more-libwolfssl_sources_h-2
2025-04-14 07:38:02 -07:00
Bill Phipps
eca0318fe8 Rename to MAX_KEY_TO_DER_SZ, set to 130. Remove Curve448 changes. 2025-04-14 09:43:55 -04:00
gojimmypi
1de73200ab Remove unreachable test code 2025-04-13 09:45:08 +02:00
Koji Takeda
1252d69a9a Remove trailing spaces 2025-04-12 17:09:36 +09:00
Daniel Pouzzner
e7577bc2e9 wolfssl/wolfcrypt/libwolfssl_sources*.h: check if the other libwolfssl_sources*.h was included before concluding that "#error settings.h included before libwolfssl_sources.h.", and add WC_CONFIG_H_INCLUDED to inhibit multiple inclusions of config.h;
wolfcrypt/src/port/kcapi/kcapi_aes.c: restore #include <errno.h> removed incorrectly in ed5d8f8e6b;

wolfcrypt/src/port/liboqs/liboqs.c: include libwolfssl_sources.h;

wolfcrypt/src/port/riscv/*.c: include libwolfssl_sources.h;

wolfcrypt/test/test.c: fix use of WC_TEST_RET_ENC_I() where WC_TEST_RET_ENC_EC() was required.
2025-04-12 00:35:49 -05:00
Koji Takeda
770b6cb9e7 Fix too long lines 2025-04-12 10:58:13 +09:00
David Garske
75501fd728 Merge pull request #8662 from douzzer/20250411-more-libwolfssl_sources_h
20250411-more-libwolfssl_sources_h
2025-04-11 13:39:06 -07:00
Daniel Pouzzner
ed5d8f8e6b update several files in wolfcrypt/src/port/arm to include libwolfssl_sources.h;
update wolfcrypt/src/port/af_alg, wolfcrypt/src/port/devcrypto, and wolfcrypt/src/port/kcapi to include libwolfssl_sources.h;

remove a slew of includes across lib sources made redundant by libwolfssl_sources.h.
2025-04-11 13:57:23 -05:00
David Garske
fb4970b7e0 Fix debug logs (disabled in PR #8616) 2025-04-11 11:19:24 -07:00
gojimmypi
8ee7d381ec Fix hash_test() memory leak in wolfcrypt/test/test.c (#8506)
* Fix hash_test() memory leak in wolfcrypt/test/test.c
* Escape HASH_TYPE_E comparisons
* Revised hash_test() in test.c
* Use ERROR_OUT and WC_NO_ERR_TRACE patterns, polish
* Remove placeholder init, no longer needed
* remove verbose hash_test() WOLFSSL_MSG and PRINT_HEAP_CHECKPOINT
2025-04-11 10:37:55 -07:00
JacobBarthelmeh
704e97bca6 Merge pull request #8595 from dgarske/renesas_rx_tsip
Fixes for Renesas RX TSIP
2025-04-11 11:22:13 -06:00
David Garske
11001c86f0 Merge pull request #8644 from lealem47/zd19343
CMSIS: Skip Mutex calls if OS isn't running
2025-04-11 09:58:10 -07:00
Koji Takeda
a3862f0e59 Improve ML-DSA private key import 2025-04-11 16:28:54 +09:00
David Garske
e8656d0d22 Merge pull request #8616 from julek-wolfssl/zd/19589
openssl compat: Push/pop to/from the end of the list object
2025-04-10 16:02:23 -07:00
Sean Parkinson
3919491a6a Merge pull request #8589 from kareem-wolfssl/zd19572
Check if HWCAP_ASIMDRDM is defined.
2025-04-10 08:25:30 +10:00