Commit Graph

23280 Commits (a3fb5029f81c2b3bf756580c81b3e32b57ba33ed)

Author SHA1 Message Date
Daniel Pouzzner a3fb5029f8 clean up trailing whitespace and misplaced CRLFs, add missing final newlines, remove stray UTF8 nonprintables (BOMs) and ASCIIfy stray homoglyphs (spaces and apostrophes), guided by expanded coverage in wolfssl-multi-test check-source-text. 2024-09-05 14:52:18 -05:00
Daniel Pouzzner a3fea482db
Merge pull request #7914 from julek-wolfssl/gh/7825
Fix failing test_dtls_frag_ch
2024-09-04 19:35:06 -05:00
David Garske 1c8767b4d3
Merge pull request #7942 from douzzer/20240904-fix-test_wolfSSL_EVP_sm3
20240904-fix-test_wolfSSL_EVP_sm3
2024-09-04 12:40:51 -07:00
Daniel Pouzzner a31733db85
Merge pull request #7909 from SparkiDev/dilithium_fips204_draft
Dilithium: Support FIPS 204 Draft
2024-09-04 14:34:59 -05:00
Daniel Pouzzner 7e16016311 tests/api.c: fix expected retval from EVP_DigestInit() in test_wolfSSL_EVP_sm3() -- before 2c9a3c5c1c, EVP_DigestInit() incorrectly returned BAD_FUNC_ARG when passed a null ctx. 2024-09-04 14:04:29 -05:00
Daniel Pouzzner 53aec861a4
Merge pull request #7938 from billphipps/atomic_fence
Modernized memory fence support for C11 and clang
2024-09-04 13:17:26 -05:00
Daniel Pouzzner c9ff15da21
Merge pull request #7901 from SparkiDev/memusage_8
Memory usage improvements
2024-09-04 12:34:44 -05:00
András Fekete fb86818251
Merge pull request #7930 from mpsuzuki/fix-ocsp-test
[scripts/ocsp.test] Remove ${SCRIPT_DIR} from the pathname to ca-google-root.pem.
2024-09-04 12:59:25 -04:00
David Garske 0580c1a83a
Merge pull request #7889 from miyazakh/renesas_rx65n_update
Update rx64n support on gr-rose
2024-09-04 08:08:49 -07:00
David Garske 7c7de235d8
Merge pull request #7937 from douzzer/20240903-missing-WC_NO_ERR_TRACEs
20240903-missing-WC_NO_ERR_TRACEs
2024-09-04 08:07:19 -07:00
David Garske 990b4d62ea
Merge pull request #7940 from Irvise/master
Ada binding: correct Alire manifest and fix build
2024-09-04 08:05:58 -07:00
Sean Parkinson 88c3e0af22 Memory usage improvements
kdf.c: wc_PRF() - No need for previous, reuse current.
sha256.c: Transform_Sha256() - Add slow but small version for many
register implementation.
sp_int.h: Change 'used' and 'size' fields to 16-bit types when possible.
sp_int.c: Fixes for 16-bit used.
2024-09-04 22:51:31 +10:00
Irvise 2a96981dbe Ada binding: correct Alire manifest and fix build 2024-09-04 09:42:24 +02:00
Daniel Pouzzner b26fa6cf59
Merge pull request #7918 from SparkiDev/type_conversion_fixes_3
Type conversion fixes
2024-09-03 20:18:00 -05:00
Daniel Pouzzner 121b8c52f8
Merge pull request #7869 from julek-wolfssl/libspdm-x509
libspdm x509 parts
2024-09-03 20:09:31 -05:00
Bill Phipps ae939e9e6a Modernized memory fence support for C11 and clang 2024-09-03 21:09:30 -04:00
Daniel Pouzzner 806df85477 backfill more missing WC_NO_ERR_TRACE()s on error code operands, and refactor away the obsolete GEN_MEM_ERR macro mechanism in wolfcrypt/src/ecc.c. 2024-09-03 17:44:11 -05:00
Sean Parkinson ec6c7051a8
Merge pull request #7928 from dgarske/riscv_fixes
Fixes for building on RISC-V
2024-09-04 08:03:45 +10:00
David Garske b7a6c6c314 Fixes for building RISCV ASM with enable-all.
* Fix type warning for SHA512 ByteReverseWords call
* Fix issue with riscv-asm and xchacha.
2024-09-03 09:37:01 -07:00
Sean Parkinson ed7beb4e0e Type conversion fixes
Changes to get compilation with -Wconversion passing on the files.
2024-09-02 19:19:23 +10:00
Juliusz Sosinowicz 2c9a3c5c1c Missing libspdm features
- RsaFunctionPrivate: detect when only n,e,d are available
- wolfSSL_EVP_add_digest: return success
- wolfSSL_EVP_add_cipher: return success
- wolfSSL_BN_bin2bn: accept NULL data if len is 0 (checked in mp_read_unsigned_bin)
- wolfssl_read_bio: advance correct bio
- wolfSSL_X509_set_ext: return raw extension data for BASIC_CA_OID
- Implement
  - sk_X509_EXTENSION_free
  - d2i_EC_PUBKEY_bio
  - d2i_RSA_PUBKEY_bio
  - d2i_X509_REQ_INFO
  - X509_REQ_INFO_free
  - ASN1_TIME_set_string_X509
2024-09-02 10:01:12 +02:00
suzuki toshiya 2fa0da74e4 [scripts/ocsp.test] Remove ${SCRIPT_DIR} from the pathname to ca-google-root.pem. 2024-08-31 18:22:20 +09:00
Daniel Pouzzner 4d837e74c4
Merge pull request #7303 from Irvise/master
[Ada] Initial library support
2024-08-31 00:26:29 -05:00
David Garske 72fc08ede8
Merge pull request #7927 from douzzer/20240830-wolfSSL_ERR_reason_error_string-EnumCastOutOfRange
20240830-wolfSSL_ERR_reason_error_string-EnumCastOutOfRange
2024-08-30 13:17:32 -07:00
Daniel Pouzzner 126df1d9ee src/internal.c: in wolfSSL_ERR_reason_error_string(), return "unknown error number" when error==0 and !OPENSSL_EXTRA, to avoid provoking clang-analyzer-optin.core.EnumCastOutOfRange. 2024-08-30 14:32:56 -05:00
David Garske 13ec0f0694
Merge pull request #7916 from SparkiDev/riscv-sha3-asm
RISC-V ASM: SHA-3
2024-08-30 09:06:36 -07:00
Juliusz Sosinowicz b67fd6f29c Fix failing test_dtls_frag_ch
- Add option to disable ECH
- InitSuites: clean up DTLS paths
- wolfSSL_parse_cipher_list: remove WOLFSSL_MAX_SUITE_SZ setting
- wolfSSL_parse_cipher_list: add rationale for keeping ciphersuites
- test_dtls_frag_ch: ECH and ciphersuites were pushing the ClientHello message over the fragmentation limit. Disabling ECH and limiting ciphersuites fixes the test.
2024-08-30 09:56:52 +02:00
Sean Parkinson d475ecc8d3
Merge pull request #7917 from douzzer/20240828-WOLFSSL_DEBUG_TRACE_ERROR_CODES-TLS
20240828-WOLFSSL_DEBUG_TRACE_ERROR_CODES-TLS
2024-08-30 14:12:20 +10:00
Sean Parkinson 0df8a0f88c
Merge pull request #7925 from JacobBarthelmeh/readme
update CVE listed in changelog
2024-08-30 14:11:17 +10:00
Daniel Pouzzner 2dcd04668b src/internal.c: in wolfSSL_ERR_reason_error_string(), restore handling for -WOLFSSL_X509_V_ERR_*, but separated from handling for the proper wolfSSL_ErrorCodes. 2024-08-29 21:28:02 -05:00
Daniel Pouzzner 255465a757 src/internal.c: in wolfSSL_ERR_reason_error_string(), remove handling for -WOLFSSL_X509_V_ERR_*, and make corresponding changes in wolfssl/error-ssl.h and tests/api.c. 2024-08-29 20:02:42 -05:00
JacobBarthelmeh 26756da925 update CVE listed in changelog 2024-08-29 16:45:23 -06:00
Daniel Pouzzner 4b4000bf61
Merge pull request #7903 from SparkiDev/ecc_sigalgo_params_null
Certificates: ECC signature algorithm parameter
2024-08-29 16:16:08 -05:00
Daniel Pouzzner fab5c9f864
Merge pull request #7880 from ColtonWilley/tls13_send_cert_use_signed_len
Use signed variable for length calculation in SendTls13Certificate
2024-08-29 16:12:41 -05:00
Daniel Pouzzner ef4ea53570
Merge pull request #7912 from julek-wolfssl/gh/7686
DTLS 1.3: check size including headers
2024-08-29 16:09:53 -05:00
Daniel Pouzzner 41449fac48
Merge pull request #7895 from embhorn/zd18433
Use verify callback before checking dates
2024-08-29 15:52:04 -05:00
Daniel Pouzzner 5e1bf9d4f2
Merge pull request #7908 from anhu/no_stdio
Don't include stdio.h if not needed.
2024-08-29 15:33:41 -05:00
Daniel Pouzzner f670400183
Merge pull request #7921 from gasbytes/oss-fuzz-70747
added missing wolfSSL_X509_NAME_free(dName)
2024-08-29 15:15:52 -05:00
Daniel Pouzzner 17870d4159 src/internal.c: in wolfSSL_ERR_reason_error_string(), add missing error string for SCR_DIFFERENT_CERT_E.
wolfssl/ssl.h, wolfssl/error-ssl.h, wolfssl/wolfcrypt/error-crypt.h, wolfcrypt/src/error.c, and src/internal.c:
* fix values of WOLFSSL_ERROR_SSL and WOLFSSL_ERROR_WANT_X509_LOOKUP to match OpenSSL values;
* move legacy CyaSSL compat layer error codes from ssl.h to error-ssl.h and renumber them to conform to existing sequence;
* move enum IOerrors from ssl.h to error-ssl.h to get picked up by support/gen-debug-trace-error-codes.sh;
* add to enum wolfSSL_ErrorCodes negative counterparts for several positive error return constants;
* include error-ssl.h from ssl.h;
* add label (wolfCrypt_ErrorCodes) to error-crypt.h enum, and in wc_GetErrorString(), use switch ((enum wolfCrypt_ErrorCodes)error) to activate switch warnings for missing enums;
* in wolfSSL_ERR_reason_error_string(), use switch((enum wolfSSL_ErrorCodes)error) to activate switch warnings for missing enums;
* in ssl.h, add special-case WOLFSSL_DEBUG_TRACE_ERROR_CODES macros for WOLFSSL_FAILURE;
* in error-crypt.h, add missing WOLFSSL_API attribute to wc_backtrace_render(); and
* harmonize gating of error codes, ssl.h / error-ssl.h / internal.c:wolfSSL_ERR_reason_error_string() / api.c:error_test().

tests/api.c:
* add error_test() adapted from wolfcrypt/test/test.c, checking all error strings for expected presence/absence and length, called from existing test_wolfSSL_ERR_strings().
* in post_auth_version_client_cb(), add missing !NO_ERROR_STRINGS gating.

add numerous WC_NO_ERR_TRACE()s to operand error code uses, cleaning up error traces in general, and particularly when WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS.
* crypto lib (36),
* crypto test&benchmark (20),
* TLS lib (179),
* examples (122),
* linuxkm (3),
* tests/api.c (2272).
2024-08-29 14:22:56 -05:00
Reda Chouk 109e4c3dfb added missing wolfSSL_X509_NAME_free(dName) 2024-08-29 17:59:02 +02:00
Juliusz Sosinowicz 31ec2b0acd
Merge pull request #7920 from bandi13/fixOSPOpenSSH
Fix compilation error for RSA_MAX_SIZE
2024-08-29 16:41:18 +02:00
Andras Fekete b886ffd04b Fix compilation error for RSA_MAX_SIZE 2024-08-29 09:31:10 -04:00
Sean Parkinson 7c3d66ecd6 RISC-V ASM: SHA-3
Add assembly implementations of SHA-3.
Use VSRL_VX instead of two VSRL_VI operations as immediate is only 5
bits.
2024-08-29 17:58:02 +10:00
Daniel Pouzzner b178138d83 src/internal.c: in wolfSSL_ERR_reason_error_string(), add missing error string for SCR_DIFFERENT_CERT_E, and de-gate error strings previously gated on HAVE_HTTP_CLIENT.
tests/api.c: add error_test() adapted from wolfcrypt/test/test.c, checking all error strings for expected presence/absence and length, called from existing test_wolfSSL_ERR_strings().

wolfssl/ssl.h, wolfssl/error-ssl.h, and wolfssl/wolfcrypt/error-crypt.h:
* move several negative error return codes from ssl.h to error-ssl.h,
* renumber them to conform to existing sequence, and
* include error-ssl.h from ssl.h;
* add special-case WOLFSSL_DEBUG_TRACE_ERROR_CODES macros for WOLFSSL_FAILURE;
* add missing WOLFSSL_API attribute to wc_backtrace_render().

add numerous WC_NO_ERR_TRACE()s to operand error code uses, cleaning up error traces in general, and particularly when WOLFSSL_DEBUG_TRACE_ERROR_CODES_ALWAYS.
* crypto lib (36),
* crypto test&benchmark (20),
* TLS lib (179),
* examples (122),
* linuxkm (3),
* tests/api.c (2272).
2024-08-28 23:05:04 -05:00
David Garske d4f6b5b300
Merge pull request #7915 from embhorn/zd18539
Fix WOLFSSL_NO_TLS12 build error
2024-08-28 10:03:58 -07:00
Eric Blankenhorn 1a3a730eb9 Fix WOLFSSL_NO_TLS12 build error 2024-08-28 10:51:11 -05:00
David Garske 5e77c06ea2
Merge pull request #7913 from bandi13/fixDocumentation
Doxygen complains about the quotes used
2024-08-28 07:34:03 -07:00
Andras Fekete 6494233774 Doxygen complains about the quotes used 2024-08-28 09:31:34 -04:00
Juliusz Sosinowicz b2f59f733a DTLS 1.3: check size including headers 2024-08-28 12:58:50 +02:00
Sean Parkinson a3e239c2ad Certificates: ECC signature algorithm parameter
Allow, with a define, ECC signature algorithm parameters to be NULL and
not just empty.
Only for interop.
2024-08-28 11:10:41 +10:00