Commit Graph

8728 Commits

Author SHA1 Message Date
Anthony Hu
498dadad97 Ensure correct issuer is copied into PKCS7 struct during verification 2024-08-14 11:29:02 -04:00
Daniel Pouzzner
ee966beb77 wolfcrypt/src/evp.c: add wolfSSL_EVP_PKEY_is_a() and test_EVP_PKEY_is_a(). also add test_EVP_CIPHER_key_length() and add missing RC4 clause to wolfSSL_EVP_Cipher_key_length(). 2024-08-14 09:23:02 -05:00
Andras Fekete
f8c968d8d1 Fix possible memory overrun 2024-08-13 13:43:54 -04:00
Daniel Pouzzner
3875a1855e Merge pull request #7859 from SparkiDev/aarch64_poly1305_asm_improv
Aarch64 Poly1305 ASM: Improve performance
2024-08-12 18:35:49 -05:00
Daniel Pouzzner
7fac450c92 Merge pull request #7860 from dgarske/have_config
Add missing config.h on .c files
2024-08-12 18:33:04 -05:00
David Garske
537827ebde Add missing config.h on some .c files. 2024-08-12 09:29:07 -07:00
Sean Parkinson
3725594020 Aarch64 Poly1305 ASM: Improve performance
Do as many multiplications in base 64 rather than 26 with normal integer
registers.
2024-08-12 12:47:44 +10:00
JacobBarthelmeh
85bab19090 Merge pull request #7845 from ColtonWilley/pkcs7_digest_absent_params
Add option for absent hash params in PKCS7
2024-08-09 15:56:28 -06:00
Daniel Pouzzner
656ba24de5 Merge pull request #7852 from SparkiDev/sp_no_rng_fix
SP: no RNG fix
2024-08-09 15:00:15 -05:00
Daniel Pouzzner
e142b16ae2 Merge pull request #7848 from miyazakh/fips_wcPBKDF2ex
Check klen in byte in wc_PBKDF2_ex
2024-08-09 14:49:53 -05:00
Daniel Pouzzner
034e13298f Merge pull request #7847 from SparkiDev/sp_xfree_2
SP: Remove check of NULL before XFREE
2024-08-09 14:47:05 -05:00
Sean Parkinson
17a09d9853 SP: no RNG fix
Don't use RNG API when WC_NO_RNG is defined.
2024-08-09 10:18:12 +10:00
Daniel Pouzzner
24e34aa41a wolfcrypt/src/logging.c: in WOLFSSL_BUFFER(), on averted overrun, log a buffer error rather than silently failing; in wc_backtrace_render(), fix !WOLFSSL_MUTEX_INITIALIZER race mitigation code. 2024-08-08 10:49:05 -05:00
Daniel Pouzzner
f5e775fe95 wolfcrypt/src/wc_kyber.c: fixes for null derefs (nullPointerRedundantCheck) in wc_KyberKey_MakeKeyWithRandom() and wc_KyberKey_Decapsulate() added in d350ba6c41. 2024-08-08 09:13:56 -05:00
Daniel Pouzzner
763ced668e fixes for defects identified by cppcheck and clang-tidy on --enable-debug builds: null deref in tests/api.c:load_pem_key_file_as_der(), redundant declarations in wolfcrypt/benchmark/benchmark.c, and numerous unchecked XSNPRINTF()s in wolfcrypt/src/logging.c and src/internal.c. 2024-08-08 09:00:42 -05:00
Daniel Pouzzner
5f6067c3e1 add --enable-debug-trace-errcodes=backtrace.
* uses libbacktrace to enhance existing "ERR TRACE" messages with backtraces, rendered in same format as the sanitizers.
* adds wc_backtrace_render() and some related callbacks to wolfcrypt/src/logging.c.
* adds an overrideable WOLFSSL_DEBUG_BACKTRACE_RENDER_CLAUSE to the WC_ERR_TRACE() mechanism in wolfssl/wolfcrypt/error-crypt.h.
2024-08-08 09:00:42 -05:00
Hideki Miyazaki
180ad206fc check klen in byte 2024-08-08 08:52:08 +09:00
Sean Parkinson
abc910c03c SP: Remove check of NULL before XFREE
Removed more checks of NULL before XFREE.
Formatting fixes as well.
2024-08-08 09:36:05 +10:00
Daniel Pouzzner
92952a5538 Merge pull request #7839 from bandi13/noIfXFREE
No if xfree
2024-08-07 17:08:12 -05:00
Andras Fekete
38d191c159 More PR comment fixes 2024-08-07 16:56:57 -04:00
Colton Willey
75c3030554 Add option for absent hash params in PKCS7 2024-08-07 11:07:45 -07:00
Andras Fekete
a31d8c5ce7 Addressing PR comments 2024-08-07 11:14:15 -04:00
Sean Parkinson
632d9653da Merge pull request #7842 from embhorn/zd18417
Fix template DecodeSubjDirAttr to set extSubjDirAttr data
2024-08-07 18:29:04 +10:00
Sean Parkinson
18aa2b8d78 Merge pull request #7843 from dgarske/fix_sp_small_gcc
Fix for SP small calling label with GCC
2024-08-07 09:23:46 +10:00
Daniel Pouzzner
6116d5edb4 Merge pull request #7824 from anhu/maxq10xx_update
Update to the maxq10xx support
2024-08-06 18:01:39 -05:00
Sean Parkinson
2cc5ecf117 Merge pull request #7759 from JacobBarthelmeh/poly1305
w64wrapper for poly1305
2024-08-07 07:31:25 +10:00
David Garske
91ea7ab206 Fix for SP small calling label with GCC (broken in PR #7753). 2024-08-06 11:05:40 -07:00
David Garske
a30d9c9818 Merge pull request #7833 from SparkiDev/riscv-sha512-asm
RISC-V 64: Add assembly code for SHA-512
2024-08-06 10:39:10 -07:00
Anthony Hu
29a5cc39f2 Duplicate code removed 2024-08-06 10:19:09 -07:00
Anthony Hu
3cf3f297ba Update to the maxq10xx support 2024-08-06 10:19:09 -07:00
Eric Blankenhorn
1c2b47d8ad Fix template DecodeSubjDirAttr to set extSubjDirAttr data 2024-08-06 11:34:14 -05:00
JacobBarthelmeh
f1ace62363 add null sanity check and adjust add 2024-08-06 09:12:17 -06:00
Andras Fekete
f419e2351b Remove NULL test with 'ptr = NULL' at the end 2024-08-06 10:55:37 -04:00
Andras Fekete
d350ba6c41 remove NULL test with XFREE arguments with dereference 2024-08-06 10:44:59 -04:00
Andras Fekete
d6a7187538 Programmatically remove NULL test with { XFREE() } 2024-08-06 10:37:43 -04:00
Andras Fekete
eb0c64d79a Remove NULL test when there is a dereference 2024-08-06 10:29:02 -04:00
Andras Fekete
d7a0f49906 Programmatically remove NULL test before XFREE 2024-08-06 10:20:45 -04:00
Sean Parkinson
4062b94fb3 RISC-V 64: Add assembly code for SHA-512
Cleanup RISC-V 64 SHA-256 by removing unused rev_idx.
2024-08-06 10:21:48 +10:00
JacobBarthelmeh
cc2ed4a75b add w64Add for build with word64 2024-08-05 16:47:35 -06:00
Sean Parkinson
fc19c36bf8 Dilithium: fix check hint
When all indeces are 0, then don't check hints against indeces.
2024-08-06 08:22:47 +10:00
Daniel Pouzzner
d65be7af21 wolfcrypt/src/asn.c and wolfssl/wolfcrypt/asn.h: in SetDNSEntry(), defer XFREE(dnsEntry, ...) until end (fixes double free); add PBE_NONE to enum PBESTypes; in EncryptContent(), initialize id to PBE_NONE to fix a -Wmaybe-uninitialized (CheckAlgo() can leave it unchanged even when returning success). 2024-08-04 15:41:52 -05:00
Daniel Pouzzner
9aa0742baa Merge pull request #7798 from dgarske/asn_macros
ASN macro simplification

merged with github CI tests failing due to unrelated upstream changes (same tests all previously succeeded on this PR, with only 25d14f1937 added in the meantime).

supplementary testing with `wolfssl-multi-test.sh ... super-quick-check` after rebase on then-current `master` 15e99c8eff.
2024-08-02 16:36:50 -05:00
David Garske
25d14f1937 Fail with NOT_COMPILED_IN if someone tries to use ConfirmSignature with NO_ASN_CRYPT. Also default to signature failed. 2024-08-02 08:25:15 -07:00
Sean Parkinson
423c1d3e57 fixup 2024-08-02 11:58:50 +10:00
David Garske
a18d0161ef Fixes for minor implicit cast warnings and line length. Also fixed benchmark.c error without ChaCha and unused encrypt_only. 2024-08-01 15:26:02 -07:00
David Garske
65283fb9bb Improvement for the --enable-asn=nocrypt. Note: This option skips certificate signature checking, so make check TLS expected failures do not pass. Cleanup of the api.c headers / macros. 2024-08-01 10:27:22 -07:00
Sean Parkinson
ebb49b6e68 RISC-V ChaCha20: assembly implementations
ChaCha20:
  scalar and vector implementations
  vector implementations doing 6, 4, 2, 1 block at a time.
  scalar implemetations using roriw and pack
  vector implementations using VROR_VI and roriw.

RISC-V SHA-256: avoid using s0 if it can be helped.
2024-08-01 17:51:59 +10:00
Sean Parkinson
1bc085358a Merge pull request #7817 from dgarske/wildcard_c
Fix for .c files to ensure macro guards for wildcard
2024-08-01 08:46:35 +10:00
David Garske
1dd94bb0cb Fix for .c files to ensure macro guards for wildcard. 2024-07-31 14:23:05 -07:00
Daniel Pouzzner
6017c86e5d wolfcrypt/src/wc_port.c: fix -Wconversions in wc_strdup_ex(). 2024-07-31 19:36:59 +00:00