Colton Willey
2bcfff3497
Expand testing to include SW implementation of RSA with padding callback, code cleanup to address review comments.
2024-08-30 13:41:51 -07:00
Colton Willey
50a3a37ff2
Merge branch 'master' of github.com:ColtonWilley/wolfssl into rsa_pad_crypto_cb
2024-08-29 11:14:49 -07:00
Eric Blankenhorn
dcea21a9a5
Merge pull request #7897 from douzzer/20240823-WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS
...
20240823-WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS
2024-08-27 15:41:20 -05:00
Colton Willey
b7299a23c0
Add new crypto callback for RSA with padding.
2024-08-27 13:09:23 -07:00
Daniel Pouzzner
90152fedda
Merge pull request #7902 from gasbytes/wc_pkcs7_decodeauthenvelopeddata-problem
...
Added check on error out from wc_PKCS7_EncodeAuthEnvelopedData
2024-08-27 00:40:21 -05:00
Daniel Pouzzner
2537e08a99
Merge pull request #7890 from embhorn/zd18463
...
Various Coverity fixes
2024-08-26 23:34:23 -05:00
Reda Chouk
25dd8b641e
added check on error out from wc_PKCS7_EncodeAuthEnvelopedData
2024-08-26 19:29:06 +02:00
Sean Parkinson
60f438f0c3
Dilithum, Kyber: Update to final specification
...
FIPS 203 and FIPS 204 final specification changes.
2024-08-26 17:42:27 +10:00
Daniel Pouzzner
3f0ba97d1e
Merge pull request #7893 from gojimmypi/pr-asn-allow-zero-serial
...
Introduce WOLFSSL_ASN_ALLOW_0_SERIAL
2024-08-23 21:09:41 -05:00
Daniel Pouzzner
1d34b565fa
Merge pull request #7891 from SparkiDev/test_fixes_2
...
Test fixes
2024-08-23 21:08:44 -05:00
Daniel Pouzzner
a39f521f7f
Merge pull request #7884 from dgarske/x86_notwindows
...
Fixes for building x86 in Visual Studio for non-windows OS
2024-08-23 17:38:30 -05:00
Daniel Pouzzner
7725e75c42
add WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS flag for optional errcode tracing in apps, define it in wolfcrypt/test/test.c when defined(WOLFSSL_DEBUG_TRACE_ERROR_CODES), and deploy WC_NO_ERR_TRACE() to test.c where needed.
2024-08-23 16:35:43 -05:00
Eric Blankenhorn
6dab58266d
Various Coverity fixes
2024-08-23 16:09:18 -05:00
gojimmypi
8baf39310f
Introduce WOLFSSL_ASN_ALLOW_0_SERIAL
2024-08-22 12:30:15 -07:00
Sean Parkinson
08d8a74992
Test fixes
...
api.c:
Update #ifdefs.
sp_int.c:
Fix free call when hardening is disabled.
2024-08-22 16:09:22 +10:00
Sean Parkinson
e99bbf9429
Merge pull request #7875 from douzzer/20240814-debug-trace-errcodes-MP
...
20240814-debug-trace-errcodes-MP
2024-08-22 10:10:45 +10:00
Daniel Pouzzner
2448d482f4
wolfssl/wolfcrypt/error-crypt.h: move MPI error codes to range {-97, -100} to avoid collisions.
2024-08-20 23:37:21 -05:00
Daniel Pouzzner
05c4955316
linuxkm: add support for WOLFSSL_DEBUG_BACKTRACE_ERROR_CODES using dump_stack().
2024-08-20 23:36:07 -05:00
Daniel Pouzzner
0da78a7ee2
move several MP error codes from wolfssl/wolfcrypt/sp_int.h, wolfssl/wolfcrypt/tfm.h, and wolfssl/wolfcrypt/integer.h, to wolfssl/wolfcrypt/error-crypt.h, harmonizing their names and numbers.
...
wolfssl/wolfcrypt/error-crypt.h: add WC_FIRST_E.
wolfcrypt/src/error.c: add MP error code strings.
wolfssl/error-ssl.h: add WOLFSSL_FIRST_E and WOLFSSL_LAST_E.
wolfcrypt/test/test.c: update error_test() for new error code layout, refactoring the "missing" check.
src/internal.c: use WC_FIRST_E and WC_LAST_E in wolfSSL_ERR_reason_error_string().
src/ssl.c: fix wolfSSL_ERR_GET_REASON() to identify in-range error codes using WC_FIRST_E, WC_LAST_E, WOLFSSL_FIRST_E, and WOLFSSL_LAST_E.
sp_int.h: provide for WOLFSSL_DEBUG_TRACE_ERROR_CODES, and refactor MP error codes as enums, for consistency with other error codes.
wolfcrypt/src/ecc.c: fix 2 identicalInnerCondition's.
2024-08-20 14:09:06 -05:00
Juliusz Sosinowicz
3260a9b680
Address code review
2024-08-20 10:53:44 +02:00
David Garske
294362a0b7
Fixes for building x86 in Visual Studio for non-windows OS.
2024-08-19 13:00:41 -07:00
Juliusz Sosinowicz
a6a40de249
init sssd support
...
- Refactor OCSP to separate IO callback
- wolfSSL_BIO_reset: fix return
- CheckCertCRL_ex: return CRL_CERT_DATE_ERR instead of ASN_AFTER_DATE_E
- CheckCertCRL_ex: return most relevant error code
- i2d/d2i APIs: correct parameters handling and return codes
- Custom ASN1 structures: major refactor to make it much more versatile
- Use WOLFSSL_ASSERT_SIZEOF_GE where applicable
- wolfSSL_EVP_SignFinal: implement ecc
- wolfSSL_EVP_VerifyFinal: implement ecc
- OBJ_NAME_do_all: bring closer to OpenSSL functionality
- Correct return of *_push api
- Implement:
- OCSP_REQ_CTX API
- d2i_ECPKParameters
- wolfSSL_sk_insert
- OCSP_parse_url
- X509_STORE_set1_param
- X509_get0_subject_key_id
- X509_OBJECT_retrieve_by_subject
- OCSP_sendreq_nbio
2024-08-16 17:22:41 +02:00
David Garske
1190d1bafe
Merge pull request #7873 from SparkiDev/riscv-poly1305-asm
...
RISC-V 64 ASM: Add Poly1305 implementation
2024-08-15 09:40:06 -07:00
Sean Parkinson
ccd8b9aa8d
Merge pull request #7872 from douzzer/20240814-linuxkm-kyber-asm
...
20240814-linuxkm-kyber-asm
2024-08-15 14:46:55 +10:00
Daniel Pouzzner
003ea8bff0
Merge pull request #7868 from dgarske/pq_xms_lmss
...
Fixes for building wolfBoot sources for PQ LMS/XMSS
2024-08-14 23:28:12 -05:00
Daniel Pouzzner
14254e8a6e
Merge pull request #7862 from bigbrett/wc-test-nocryptocb
...
cryptocb test disable option
2024-08-14 23:18:02 -05:00
Daniel Pouzzner
a2acc41b3f
wolfcrypt/src/wc_kyber.c: in kyberkey_encapsulate(), don't overallocate "at" for USE_INTEL_SPEEDUP.
2024-08-14 21:51:12 -05:00
Sean Parkinson
3ade7a875e
RISC-V 64 ASM: Add Poly1305 implementation
...
Implementation using standard and vector instructions.
2024-08-15 09:01:34 +10:00
Daniel Pouzzner
7a29b1e4fd
add comments explaining dependence on idempotency for race-free dynamics re checkedAESNI, haveAESNI, intel_flags, and sha_method. see #7863 .
2024-08-14 15:23:48 -05:00
Daniel Pouzzner
1fa2d2d625
ASN: move DecodedCert.extSubjKeyIdSz and .extAuthKeyIdSz out of the OPENSSL_EXTRA gate. fixes test.c:certext_test(), broken by f8c968d8d1 for some valid configs.
2024-08-14 14:45:11 -05:00
Daniel Pouzzner
21484ec75a
linuxkm: add asm support for Kyber.
2024-08-14 14:45:11 -05:00
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
David Garske
01eaa56290
Fixes for building wolfBoot sources for PQ LMS/XMSS.
...
* Don't throw `#error "This code requires libxmss"`, just gate ext_xmss on HAVE_LIBXMSS. Same for LMS.
2024-08-13 14:10:45 -07: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
Brett Nicholas
8df5d61179
add optional cryptocb test disable macro to wolfCrypt tests
2024-08-12 15:16:33 -06: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