Commit Graph

10020 Commits

Author SHA1 Message Date
Albert Ribes 2e25c65129 wolfcrypt test: Fix build on 32 bit machines
Declare a 64 bit variable using W64LIT to avoid warnings on 32 bit
machines
2025-07-21 10:34:19 +02:00
Josh Holtrop 06d86af67c Add API to decode SymmetricKeyPackage and OneSymmetricKey CMS objects 2025-07-19 18:28:06 -04:00
Hideki Miyazaki 7a03b9fea6 fix trailing whitespaces 2025-07-18 07:54:45 +09:00
Hideki Miyazaki 70587dd2d5 Addressed code review by devin 2025-07-18 07:51:04 +09:00
jordan e571988059 dual alg certs: fix dual alg certs build, and asn cleanup. 2025-07-17 15:15:11 -05:00
Colton Willey f3ee192a96 Set out ptr properly for RSA pad crypto cb inline 2025-07-17 12:01:39 -07:00
Hideki Miyazaki ba358b8fb8 Sanity check before free 2025-07-17 18:51:57 +09:00
Hideki Miyazaki 59659ef8fb fix long line and trailing whitespaces 2025-07-17 18:26:55 +09:00
Hideki Miyazaki cc123d7c3a Make properties related to SCE TLS hidden
- Fix RSA Crypt callback
 - Eliminate WOLFSSL_LOCAL
2025-07-17 18:16:40 +09:00
JacobBarthelmeh 2c90d1585a Merge pull request #8897 from anhu/compat_additions
Compatibility layer additions for X.509 extensions and RSA PSS
2025-07-15 10:52:33 -06:00
JacobBarthelmeh 9430c8a5a1 Merge pull request #9003 from embhorn/cov_531298
Fix blake2b_final coverity reports
2025-07-14 16:20:19 -06:00
Josh Holtrop af3296a836 wc_PKCS7_KeyWrap(): mark pointers as to const and check for NULL 2025-07-14 17:28:23 -04:00
Daniel Pouzzner 2c341a5806 Merge pull request #8990 from JacobBarthelmeh/license
updating license from GPLv2 to GPLv3

(linuxkm tweak to `MODULE_LICENSE("GPL")` to follow.)
2025-07-14 16:14:39 -05:00
Eric Blankenhorn 9c2ea12563 Fix blake2 final coverity issue 2025-07-14 15:04:15 -05:00
Josh Holtrop 429ccd5456 Add callback functions for custom AES key wrap/unwrap operations 2025-07-14 15:58:14 -04:00
Eric Blankenhorn efdca85aec Fix blake2 final coverity issue 2025-07-14 14:53:37 -05:00
Hideki Miyazaki ec252a73e2 fix whitespace and long line 2025-07-12 10:26:28 +09:00
Hideki Miyazaki eb8a3afe38 Addressed code review comments 2025-07-12 09:49:09 +09:00
Kareem 9fa1d2e75f Enforce WOLFSSL_MAX_PATH_LEN for ASN original as well. 2025-07-11 11:53:33 -07:00
Daniel Pouzzner d90394efa6 wolfcrypt/src/asn.c and wolfssl/wolfcrypt/asn.h: add
WC_ASN_RUNTIME_DATE_CHECK_CONTROL, with accessors wc_AsnSetSkipDateCheck()
(WOLFSSL_TEST_VIS) and wc_AsnGetSkipDateCheck() (WOLFSSL_LOCAL).  use this to
permafix test_wolfSSL_CRL_duplicate_extensions() in api.c, which has an
expiring-soon handcrafted certificate in it.
2025-07-11 11:25:25 -05:00
David Garske 70bdd9f990 Merge pull request #8989 from rlm2002/zd20212
xmemset rng before test runs
2025-07-11 08:58:30 -07:00
David Garske a36f9085c1 Fix for compat wolfSSL_RSA_sign and wolfSSL_RSA_verify to support RSA PSS with custom salt and mgf1 hash type. Adds compat API's for i2d_PrivateKey_bio , BN_ucmp and X509v3_get_ext_by_NID. ZD 20059 2025-07-11 08:51:51 -07:00
Hideki Miyazaki c4a178f029 Remove trailing whitespace 2025-07-11 22:12:49 +09:00
Hideki Miyazaki e9def03585 Null check before accessing instance 2025-07-11 17:48:36 +09:00
Hideki Miyazaki 0a0b9a3c24 Make properties related to TLS handshake hidden for TSIP TLS user context structure 2025-07-11 14:25:06 +09:00
JacobBarthelmeh 388eea3cf2 Merge pull request #8976 from holtrop/decode-encrypted-key-package
Add wc_PKCS7_DecodeEncryptedKeyPackage()
2025-07-10 17:08:06 -06:00
JacobBarthelmeh 01cd91cbea removing more locations of WOLFSSL_API used with function implementations 2025-07-10 16:44:28 -06:00
Sean Parkinson 046e46a67f Merge pull request #8825 from kareem-wolfssl/zd19911
Fix parsing RPK with no parameters.
2025-07-11 08:36:55 +10:00
David Garske 8d68977e33 Merge pull request #8985 from sebastian-carpenter/GH-issue-8951
improper access of sp_int_minimal using sp_int
2025-07-10 15:21:20 -07:00
Ruby Martin e65647faa8 xmemset rng before test runs 2025-07-10 16:17:53 -06:00
JacobBarthelmeh 629c5b4cf6 updating license from GPLv2 to GPLv3 2025-07-10 16:11:36 -06:00
Kareem 362f0a2cfd Ensure only one of the RPK algorithm parameters are set. 2025-07-10 12:43:14 -07:00
JacobBarthelmeh 13b8a972ea remove WOLFSSL_API in source code when already used in header file for function decleration 2025-07-10 13:40:27 -06:00
Josh Holtrop 3ce8c6e4fa Remove WOLFSSL_API for wc_PKCS7_DecodeEncryptedKeyPackage() in source file 2025-07-10 15:29:31 -04:00
Josh Holtrop f776c95e54 Remove do/while(0) loop in wc_PKCS7_DecodeEncryptedKeyPackage(); use if-else if chain 2025-07-10 15:25:57 -04:00
Kareem 2df674bd59 Correct RPK parsing. As per RFC7250 section 3, the algorithm parameters are optional. 2025-07-10 12:03:18 -07:00
Kareem bfacbf9764 Update ASN original to also allow larger pathLen values in Basic Constraints. 2025-07-10 11:47:47 -07:00
Kareem f0459eb1cf Allow larger pathLen values in Basic Constraints. 2025-07-10 10:37:06 -07:00
Sebastian Carpenter a00cfcb55f improper access of sp_int_minimal using sp_int
related thread: https://bugzilla.redhat.com/show_bug.cgi?id=2047439

also found sp_uint8 that was not updated to sp_sign_t
2025-07-10 10:42:30 -06:00
Daniel Pouzzner b4137fe2f8 linuxkm/lkcapi_sha_glue.c: add interruptibility and additional relaxation where possible, and fix a leaked lock scenario, in get_drbg_n(), wc_linuxkm_drbg_seed(), wc_mix_pool_bytes(), and wc_crng_reseed();
wolfcrypt/src/asn.c: add a couple static attributes missed on the previous round of fixups.
2025-07-10 10:59:57 -05:00
philljj ed6d189f1a Merge pull request #8980 from douzzer/20250706-linuxkm-fixes
20250706-linuxkm-fixes
2025-07-10 10:34:59 -05:00
Josh Holtrop 6d51b73626 Shorten some wc_PKCS7_DecodeEncryptedKeyPackage() comment lines to less than 80 characters 2025-07-10 08:10:59 -04:00
David Garske b2143a815f Merge pull request #8965 from SparkiDev/ppc32_sha256_spe
PPC32 ARM ASM SHA-256: SPE impl, tidy up original
2025-07-09 17:00:26 -07:00
Sean Parkinson 98adb330ef Merge pull request #8981 from dgarske/mldsa
Fix build issue with ML-DSA 44 only
2025-07-10 09:41:36 +10:00
David Garske 7ba6f836c4 Merge pull request #8972 from SparkiDev/sp_int_8_bit_fix
SP int: fix 8 bit words and sp_clamp_ct
2025-07-09 16:30:33 -07:00
David Garske cf35abccb8 Merge pull request #8963 from SparkiDev/sp_int_type_fix
CodeQL: o is larger type and could cause issues
2025-07-09 16:30:01 -07:00
David Garske ae19c55182 Merge pull request #8966 from SparkiDev/arm32_aes_asm_fixup_bne
ARM 32-bit ASM AES: fixup 32-bit code to not use B.EQ
2025-07-09 16:29:46 -07:00
Daniel Pouzzner 01e8815762 wolfssl/wolfcrypt/settings.h: add #define WOLFSSL_NO_PUBLIC_FFDHE and #undef HAVE_PUBLIC_FFDHE to WOLFSSL_LINUXKM setup to avoid .data.rel.ro.local functions in dh.c;
linuxkm/linuxkm_wc_port.h: only use kvrealloc() on kernel >=6.11 -- the version in 5.15-6.10 is incompatible (oldsize arg).  also, restore use of kvmalloc on 4.12+, but with XREALLOC undefined, suitable for cryptonly modules; add #include <linux/sched.h> even on __PIE__ objects to make cond_sched() available;

wolfcrypt/src/asn.c: harmonize gate around definitions of BEGIN_DSA_PRIV and END_DSA_PRIV;

wolfcrypt/src/asn.c: in EccSpecifiedECDomainDecode(), work around "const char[]" types in WOLFSSL_ECC_CURVE_STATIC struct ecc_set_type on FIPS <6;

wolfcrypt/src/asn.c, wolfcrypt/src/wc_xmss.c, wolfssl/wolfcrypt/wc_lms.h: add comments to new WOLFSSL_NAMES_STATIC slots explaining where the size comes from.
2025-07-09 18:22:18 -05:00
Daniel Pouzzner 7c6afeb106 add linuxkm/wolfcrypt.lds module linker script, explicitly grouping wolfcrypt sections together;
linuxkm/Kbuild: add linker script flag, containerize several more previously-missed ELF sections, and add a test verifying no sections were missed;

linuxkm/linuxkm_memory.c: remove obsolete lkm_realloc() shim and unneeded my__show_free_areas() wrapper;

linuxkm/linuxkm_wc_port.h: add new mapping from realloc() to native kvrealloc(), and gate out a slew of headers when __PIE__ to avoid polluting wolfCrypt objects with various unneeded header-implemented functions with associated awkward symbols references;

linuxkm/lkcapi_glue.c: harmonize gate for REGISTER_ALG_OPTIONAL();

linuxkm/module_hooks.c: add "ERROR:" prefixes on pr_err()s; add wc_RunAllCast_fips() at shutdown to send confidence verification to the kernel log; remove section bounds checks now that layout is unreliable;

wolfssl/wolfcrypt/settings.h: for WOLFSSL_LINUXKM && HAVE_LINUXKM_PIE_SUPPORT, #define WOLFSSL_ECC_CURVE_STATIC and WOLFSSL_NAMES_STATIC;

wolfssl/wolfcrypt/types.h: refactor the typedef for wcchar from a pointer to a char[];

wolfcrypt/src/wc_xmss.c and wolfssl/wolfcrypt/wc_lms.h: add WOLFSSL_NAMES_STATIC code paths for struct wc_XmssString and struct wc_LmsParamsMap;

wolfcrypt/src/asn.c: add WOLFSSL_NAMES_STATIC code paths for struct CertNameData, and add static attribute to a slew of wcchars not used or declared outside asn.c.
2025-07-09 18:22:18 -05:00
David Garske 3c00e26274 Merge pull request #8974 from rlm2002/coverity_fix
Coverity: Check values
2025-07-09 16:12:42 -07:00