aidan garske
dace3acd4d
api.c and asn.c changes to allow 0 to be passed in and expanded coverage on test cases
...
(cherry picked from commit 8572f67e60d419ddd74d4a2b7051dcaa7d0ca6b4)
2024-07-25 08:09:37 -07:00
Kaleb Himes
3a4788b7bb
Merge pull request #7783 from douzzer/20240723-AesGcmXcrypt-NULL-in-checks
...
20240723-AesGcmXcrypt-NULL-in-checks
2024-07-24 15:33:42 -06:00
David Garske
d0782a97ce
Merge pull request #7773 from Laboratory-for-Safe-and-Secure-Systems/kyber_compat
...
Kyber fixes
2024-07-24 07:37:10 -07:00
Tobias Frauenschläger
e2b642d4ab
WolfSSL Kyber and CMake fixes
...
* Make sure wc_kyber implementation is compiled using CMake (also for
Zephyr)
* Fix compilation issue when Liboqs is also enabled
* Fix WOLFSSL_INTEL_ASM and WOLFSSL_ARM_ASM CMake options
Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de >
2024-07-24 09:55:29 +02:00
Daniel Pouzzner
f8726148df
wolfcrypt/src/aes.c: in wc_AesGcmEncrypt() and wc_AesGcmDecrypt(), check and return BAD_FUNC_ARG for nonzero sizes associated with null pointers.
2024-07-23 19:07:32 -05:00
Sean Parkinson
a34ea32f52
Merge pull request #7730 from anhu/unknownExtCallbackEx
...
Extend the unknown extension callback.
2024-07-24 08:37:44 +10:00
Daniel Pouzzner
6ee22de999
linuxkm: initial support for cross-compilation.
...
also, additional backward-compatibility measures around cp and clean recipe in linuxkm/Makefile.
also, in sp_int.c, tweak DECL_DYN_SP_INT_ARRAY() to use an explicit XMEMSET() to clear n[], to avoid unshimmable implicit memset() from gcc on aarch64.
2024-07-23 10:29:03 -05:00
David Garske
8f908e76f9
Merge pull request #7776 from douzzer/20240722-fixes
...
20240722-fixes
2024-07-23 06:46:38 -07:00
David Garske
7c6eb7c4a1
Merge pull request #7751 from SparkiDev/ecc_koblitz_ssl
...
ECC key load: fixes
2024-07-22 16:40:59 -07:00
Daniel Pouzzner
367508f498
wolfcrypt/src/asn.c: in EccSpecifiedECDomainDecode(), in calls to DataToHexString(), cast curve->size to word32 to resolve -Wconversion.
...
wolfcrypt/src/dh.c: in GeneratePrivateDh186(), add explicit suppression of uninitvar for "cBuf" arg that isn't fully initialized.
wolfcrypt/test/test.c: in mp_test_param(), explicitly initialize "buffer" to avoid uninitvar warning.
configure.ac: in FIPS builds, don't include enable_cryptocb in --enable-all or --enable-all-crypto. (they can still be enabled explicitly in FIPS builds with --enable-cryptocb, but the combination is not currently supported.)
2024-07-22 18:21:36 -05:00
Daniel Pouzzner
765231060e
wolfcrypt/test/test.c: add missing PRIVATE_KEY_UNLOCK() for hpke_test().
2024-07-19 18:31:01 -05:00
David Garske
575df43889
Merge pull request #7768 from JacobBarthelmeh/copyright
...
update copyright to 2024
2024-07-19 14:27:39 -07:00
Daniel Pouzzner
e13a8ddcfb
fixes for null derefs in native Dilithium and Kyber implementations, detected by unit.test and cppcheck.
2024-07-19 14:35:39 -05:00
Daniel Pouzzner
0aa0f26289
wolfcrypt/src/dilithium.c: fix null deref in wc_dilithium_init_ex().
2024-07-19 14:25:53 -05:00
JacobBarthelmeh
31a6a2bf59
update copyright to 2024
2024-07-19 13:15:05 -06:00
David Garske
74d4ae0075
Merge pull request #7704 from aidangarske/PKCS7_PEM
...
Added PKCS7 PEM support:
2024-07-19 07:39:51 -07:00
David Garske
8bf2fb0ae0
Merge pull request #7765 from Laboratory-for-Safe-and-Secure-Systems/dilithium_fixes
...
Dilithium fixes
2024-07-19 07:36:05 -07:00
Tobias Frauenschläger
f87849b6f6
Dilithium fixes
...
* Fixed incorrect XFREE calls
* Use key->heap where possible
* Fixed compilation with WOLFSSL_DILITHIUM_VERIFY_SMALL_MEM and
WC_DILITHIUM_CACHE_PUB_VECTORS
* Fixed compilation with WOLFSSL_DILITHIUM_ASSIGN_KEY (const pointers)
Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de >
2024-07-19 07:52:14 +02:00
gojimmypi
8356b349a5
minor asn update: comments, code format, dateType check in CheckDate.
2024-07-18 18:25:53 -07:00
Sean Parkinson
e6fcd488a6
Merge pull request #7685 from dgarske/renesas_rx_tsip
...
Renesas RX TSIP ECDSA support
2024-07-19 10:53:00 +10:00
David Garske
4eab0f1231
Fix hard coded values in TSIP ECC verify. Fix issues with tab indentation and spelling.
2024-07-18 16:45:27 -07:00
Daniel Pouzzner
4bc04673d1
suppress 4 uninitvar warnings, all associated with passing partially written arrays (true but benign positives). newly detected by cppcheck 2.14.2.
2024-07-18 17:22:17 -05:00
Daniel Pouzzner
c36ab59f24
fixes for defects identified by nightly testing:
...
* ecc.c: in wc_ecc_free(), fix gating around handling for key->sign_k to resolve memory leak, and in wc_ecc_gen_deterministic_k(), fix -Wconversion.
* test.c: add missing mp_free()s to ecdsa_test_deterministic_k_rs() and ecc521_test_deterministic_k().
* wc_HashType: change several occurrences of int to enum wc_HashType, including ecc_key.hashType and API wc_ecc_set_deterministic_ex(), to resolve C++ warnings.
* fixes for various C++ warnings/errors in crypto and TLS layers and test and benchmark code -- implicit casts, negative initializers for unsigned type, jumped initializers, and missing enums in switch()es.
2024-07-17 18:07:08 -05:00
David Garske
bbd8fdfc38
Cleanup Renesas RX default devId and improve logic for overflow check.
2024-07-16 17:48:16 -07:00
Daniel Pouzzner
5298039d09
fixes from peer review: move OS-specific code from wolfSSL_BIO_read() and wolfSSL_BIO_write() to wolfIO_Recv(), wolfIO_Send(), wolfIO_RecvFrom(), and wolfIO_SendTo(); add SOCKET_ETIMEDOUT definitions to wolfio.h; misc cleanups.
2024-07-16 19:12:19 -05:00
Daniel Pouzzner
41efa0492c
add ASN_ prefixes to ISSUER, SUBJECT, BEFORE, and AFTER enum constants defined in wolfssl/wolfcrypt/asn.h.
2024-07-16 19:12:18 -05:00
Sean Parkinson
0f3ebedba0
Merge pull request #7700 from aidangarske/ECDSA_deterministic_k
...
ecc.c and test.c changes to add support in ecc_sign_determinsitic.c
2024-07-17 09:12:32 +10:00
aidan garske
237df2cb11
Hash Type selection changes to ecc.c.
2024-07-16 15:17:40 -07:00
Sean Parkinson
500951f059
Dilithium: support fixed size arays in dilithium_key
...
Support fixed size arrays for pre-generated matrix and vectors.
Define: WC_DILITHIUM_FIXED_ARRAY
2024-07-17 07:36:14 +10:00
aidan garske
96af77d757
Hash Type selection changes to ecc.c.
2024-07-16 11:12:29 -07:00
JacobBarthelmeh
bbd769d43a
Merge pull request #7728 from SparkiDev/poly1305_aarch64_uniq_name
...
Poly1305 AArch64: unique naming of asm funcs
2024-07-16 10:10:54 -06:00
Sean Parkinson
e002b6efd3
Merge pull request #7742 from embhorn/zd18240
...
Fix ParseCRL_AuthKeyIdExt setting extAuthKeyIdSet
2024-07-16 09:38:54 +10:00
Sean Parkinson
f2f3a8273d
Merge pull request #7732 from kaleb-himes/NUCLEUS-FIPS-SRTP-KDF
...
Check-in Nucleus Plus 2.3 port work
2024-07-16 09:37:15 +10:00
Sean Parkinson
137831367d
Merge pull request #7710 from anhu/preTBS_altsigalg_fix
...
Stop stripping out the sequence header on the AltSigAlg extension.
2024-07-16 09:35:11 +10:00
David Garske
2b4acf5027
Revert built-in wc_GenerateSeed support for RX TSIP removed in #6851 .
2024-07-15 10:10:38 -07:00
Sean Parkinson
93ca213a68
Merge pull request #7736 from space88man/fix-pkcs11-slot
...
wolfcrypt/src/wc_pkcs11.c: iterate correctly over slotId
2024-07-15 15:52:40 +10:00
Sean Parkinson
dc86dad26b
ECC key load: fixes
...
asn.c:
Return the curve OID sum with alg_id for ECC keys.
ssl_load.c:
Don't permanently strip the PKCS#8 information as it contains the
curve OID.
2024-07-15 15:46:05 +10:00
Eric Blankenhorn
d6731f0f84
Fix ParseCRL_AuthKeyIdExt setting extAuthKeyIdSet
2024-07-12 07:43:23 -05:00
Anthony Hu
f84ea01f72
Get rid of macro test
2024-07-11 21:52:52 -04:00
JacobBarthelmeh
1cf96eb72c
Merge pull request #7741 from douzzer/20240714-asn-Wconversion
...
20240714-asn-Wconversion
2024-07-11 16:48:52 -06:00
JacobBarthelmeh
baec0ced59
Merge pull request #7731 from ColtonWilley/zephyr_tls_support
...
Changes needed for default TLS support in zephyr kernel
2024-07-11 16:46:43 -06:00
Sean Parkinson
e0494b5f04
Merge pull request #7738 from dgarske/pkcs11_rsakeygen
...
Fix to support PKCS11 without RSA key generation
2024-07-12 08:45:53 +10:00
Daniel Pouzzner
76f669b1cc
wolfcrypt/src/asn.c: fix -Wconversion in GetLength_ex() added in fea7a89b86.
2024-07-11 14:47:58 -05:00
Sean Parkinson
3cc7bbea67
Merge pull request #7737 from JacobBarthelmeh/staticmemory-singlethreaded
...
fix for staticmemory and singlethreaded build
2024-07-11 09:57:08 +10:00
David Garske
41cf8c090b
Fix compiler issues with unused variable and printf.
2024-07-10 16:07:43 -07:00
Anthony Hu
fe2a826ede
Better guarding.
2024-07-10 18:28:22 -04:00
Anthony Hu
6456281b41
Add support for uknown certificate extensions in PKCS7
2024-07-10 16:15:45 -04:00
David Garske
28db1b19e1
Fix to support PKCS11 without RSA key generation. Fixed Pkcs11Rsa where ret failure could be ignored.
2024-07-10 11:17:02 -07:00
Anthony Hu
e581930cb7
Extend the unknown extension callback.
...
This will allow the user to pass in a context pointer. Allows them to avoid
global variables.
We also add unknown extensions callback when processing a CA in cert manager
as CA certs can have unknown extensions as well.
Fixes ZD 18252
2024-07-10 13:22:19 -04:00
JacobBarthelmeh
204668778b
Merge pull request #7733 from SparkiDev/coverity_3
...
Coverity fixes
2024-07-10 10:01:29 -06:00