Commit Graph

22975 Commits

Author SHA1 Message Date
András Fekete
b1765ca6b4 Merge pull request #7785 from dgarske/asn_original
Fixes for ASN original
2024-07-26 14:49:13 -04:00
David Garske
5e58affd5d Merge pull request #7789 from SparkiDev/test_ssl_load
SSL loading of keys/certs: testing and fixes
2024-07-26 11:48:13 -07:00
Sean Parkinson
f7094ff3c4 Dilithium: add option to precalc with small sign (#7744)
WOLFSSL_DILITHIUM_SIGN_SMALL_MEM_PRECALC added.
It allocates memory for and pre-calculates s1, s2 and t0.
This saves decoding the vectors repeatedly in each signature trial.
2024-07-26 11:46:55 -07:00
David Garske
c3b5322f86 Merge pull request #7753 from SparkiDev/cortexm_label_fix_2
Cortex-M/Thumb2 ASM: fix label
2024-07-26 11:45:09 -07:00
Sean Parkinson
caab2c2dca SSL loading of keys/certs: testing and fixes
Added tests to cover ssl_load.c functions.
Fixes from testing.
pk.c: renamed wolfssl_dh_load_key to wolfssl_dh_load_params as it
doesn't handle keys - just parameters.
2024-07-26 11:43:10 +10:00
Daniel Pouzzner
92f1c6e339 Merge pull request #7794 from anhu/custom_ext_stop
Stop testing custom extensions in dual alg cert tests.
2024-07-25 16:33:56 -05:00
JacobBarthelmeh
56eed9e059 Merge pull request #7795 from douzzer/20240725-array_add-Wconversion
20240725-array_add-Wconversion
2024-07-25 15:19:25 -06:00
Daniel Pouzzner
b40913e80c wolfcrypt/src/random.c: restore outer cast in array_add() to avoid -Wconversion added in b28e22aef0, itself a fix for a defect added in ed11669f3c (root cause of warning is implicit type promotion). 2024-07-25 15:25:32 -05:00
Anthony Hu
73dc9baaf9 Stop testing custom extensions in dual alg cert tests. 2024-07-25 16:09:19 -04:00
David Garske
42930b28f3 Merge pull request #7790 from JacobBarthelmeh/random
fix for casting with add
2024-07-25 09:13:23 -07:00
JacobBarthelmeh
b28e22aef0 fix for casting with add 2024-07-25 09:16:05 -06:00
David Garske
c4f73f5955 Peer review cleanups. 2024-07-24 16:57:51 -07:00
Sean Parkinson
324e714a6a Merge pull request #7750 from space88man/wip-padding-refactor
PKCS#11 RSA Padding Offload
2024-07-25 09:20:01 +10: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
7f7d94abd5 Fixes for ASN original (old) to support checking int leading 0 and invalid OID. Disable invalid UTF8 test for old ASN (only supported with newer ASN template). 2024-07-24 12:35:37 -07:00
David Garske
97dcf123f0 Merge pull request #7780 from ColtonWilley/update_zephyr_readme
Update zephyr readme
2024-07-24 10:42:44 -07:00
David Garske
4b9d89d387 Fix autoconf issue with == 2024-07-24 09:10:25 -07:00
David Garske
3e2123f0b3 Disable the ECC custom curve tests for original (old) ASN. 2024-07-24 08:45:19 -07:00
David Garske
007f9ea39d Fix to restore --enable-asn=original. Fixes for building with ASN original (old). Add the new limit checks for alt names and subtree to the old ASN code. 2024-07-24 08:28:25 -07:00
S-P Chan
d2d71c276d wolfssl/wolfcrypt/pkcs11.h: RSA PKCS/PSS/OAEP related operations 2024-07-24 22:47:27 +08: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
3284f53574 Cortex-M/Thumb2 ASM: fix label
IAR doesn't like %=.
Fix code to be consistent in use of labels and branch instructions.
2024-07-24 09:20:40 +10:00
Sean Parkinson
a34ea32f52 Merge pull request #7730 from anhu/unknownExtCallbackEx
Extend the unknown extension callback.
2024-07-24 08:37:44 +10:00
Colton Willey
e1995b8313 Update zephyr readme with link to new instructions for Zephyr TLS socket support 2024-07-23 09:56:17 -07:00
David Garske
140abe6c72 Merge pull request #7746 from douzzer/20240711-linuxkm-cross-compilation
20240711-linuxkm-cross-compilation
2024-07-23 09:26:39 -07: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
Sean Parkinson
a3b6ec4a13 Merge pull request #7716 from anhu/post-hs-auth-check
Check the return code when calling post handshake auth functions
2024-07-23 08:20:51 +10:00
Anthony Hu
b1dcdabcd4 Check the return code when calling post handshake auth functions 2024-07-22 17:10:59 -04:00
David Garske
604a1fe2da Merge pull request #7774 from Laboratory-for-Safe-and-Secure-Systems/zephyr_v3_7
Zephyr V3.7 warning fix
2024-07-22 07:15:46 -07:00
Tobias Frauenschläger
bdfe2c3fdf Zephyr V3.7 warning fix
The required feature flag CONFIG_PTHREAD_IPC is deprecated since Zephyr
version 3.7. The new option is CONFIG_POSIX_THREADS. This change clears
the warning.

Signed-off-by: Tobias Frauenschläger
<tobias.frauenschlaeger@oth-regensburg.de>
2024-07-22 10:58:20 +02:00
David Garske
a9ff7730ce Merge pull request #7772 from douzzer/20240719-test-hpke-PRIVATE_KEY_UNLOCK
20240719-test-hpke-PRIVATE_KEY_UNLOCK
2024-07-20 11:44:08 -07:00
Daniel Pouzzner
765231060e wolfcrypt/test/test.c: add missing PRIVATE_KEY_UNLOCK() for hpke_test(). 2024-07-19 18:31:01 -05:00
Daniel Pouzzner
6952d1a5ea wolfssl/wolfcrypt/error-crypt.h: add NO_STDIO_FILESYSTEM definition for WC_ERR_TRACE(). 2024-07-19 18:30:31 -05:00
David Garske
33f71f6f60 Merge pull request #7770 from bandi13/fixWolfEngineFlag
Fix the actual definition of the ECC_MIN_KEY_SZ
2024-07-19 14:37:55 -07:00
David Garske
575df43889 Merge pull request #7768 from JacobBarthelmeh/copyright
update copyright to 2024
2024-07-19 14:27:39 -07:00
David Garske
4d8a6b84fb Merge pull request #7760 from douzzer/20240718-BIO_DGRAM-memory-leak
20240718-BIO_DGRAM-memory-leak
2024-07-19 14:24:30 -07:00
David Garske
16a2d2e71d Merge pull request #7769 from douzzer/20240719-PQ-fixes
20240719-PQ-fixes
2024-07-19 14:20:33 -07:00
Andras Fekete
c3d30e7987 Fix the actual definition of the ECC_MIN_KEY_SZ 2024-07-19 16:01:56 -04:00
Daniel Pouzzner
787397b28e src/bio.c and related:
* refactor WOLFSSL_BIO.num and WOLFSSL_BIO.ptr as unions, for clarity and bug resistance (no functional changes).

* in wolfSSL_BIO_free(), add WOLFSSL_BIO_DGRAM to the test for closing bio->num.fd, fixing a descriptor leak.

* use SOCKET_INVALID consistently as the invalid value for WOLFSSL_BIO.num.fd, and use SOCKET_T consistently as the internal type for file descriptors.

* move the definitions for SOCKET_T and SOCKET_INVALID from wolfio.h to the filesystem section of wc_port.h, and allow override definitions of SOCKET_T.

detected and tested with wolfssl-multi-test.sh ... pq-hybrid-all-rpk-valgrind-unittest. also tested with wolfssl-multi-test.sh ... super-quick-check.
2024-07-19 14:50:26 -05: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
0eeae4da8c Merge pull request #6460 from embhorn/mosquitto_osp
Add support for Mosquitto OSP
2024-07-19 07:49:32 -07:00
David Garske
bd5586623a Merge pull request #7703 from SparkiDev/def_ticket_cbc_hmac
Default session ticket enc/dec: allow AES-CBC with HMAC
2024-07-19 07:41:27 -07:00
David Garske
74d4ae0075 Merge pull request #7704 from aidangarske/PKCS7_PEM
Added PKCS7 PEM support:
2024-07-19 07:39:51 -07:00