Commit Graph

23934 Commits

Author SHA1 Message Date
Daniel Pouzzner
3e1f365e75
Merge pull request #8064 from SparkiDev/regression_fixes_14
Regression test fixes
2024-10-15 11:47:37 -05:00
Andras Fekete
a5331d406c Revert "Merge pull request #8072 from rizlik/github-fix"
This reverts commit 0f8b4dbc63, reversing
changes made to 743a78dc85.
2024-10-15 12:39:01 -04:00
Marco Oliverio
724fdae7d7 ocsp: propagate ocsp cb return error 2024-10-15 10:03:15 +00:00
jordan
e3c2c650aa infer: fix dead store, and uninitialized value errors. 2024-10-14 22:45:17 -05:00
Daniele Lacamera
cc7ccf951a Move heap variable to all sha implementations 2024-10-14 14:21:29 -05:00
Daniel Pouzzner
260a0dee47 examples/client/client.c: fix numbering annotations, and fix string literal grouping for "-H". 2024-10-14 14:21:29 -05:00
Daniel Pouzzner
0d5d05d44d more WOLFSSL_NO_MALLOC fixes:
wolfcrypt/src/dh.c: in wc_DhGenerateParams(), use named constant for buf size, and only XFREE it if !WOLFSSL_NO_MALLOC;

wolfcrypt/src/ecc.c and wolfssl/wolfcrypt/ecc.h: in wc_ecc_new_point_ex(), remove !WOLFSSL_NO_MALLOC gate around XMALLOC(), and if XMALLOC()ed, set ecc_point.isAllocated, then in wc_ecc_del_point_ex, XFREE() iff ecc_point.isAllocated;

wolfcrypt/src/pkcs7.c: in wc_PKCS7_RsaVerify(), when WOLFSSL_NO_MALLOC, jumbo-size the digest buffer to cope with in-place dynamics in RsaUnPad();

wolfcrypt/test/test.c: add !WOLFSSL_NO_MALLOC gates around various XFREE()s of objects that are on the stack in WOLFSSL_NO_MALLOC builds;

wolfssl/wolfcrypt/types.h: add an unconditional include of memory.h (itself guarded against multiple inclusion) to assure availability of WC_DEBUG_CIPHER_LIFECYCLE prototypes/macros.
2024-10-14 14:21:29 -05:00
Daniel Pouzzner
9312f3cb86 wolfssl/wolfcrypt/types.h: define USE_WOLF_STRDUP for the fallback definition of XSTRDUP regardless of WOLFSSL_NO_MALLOC (wc_strdup_ex() uses XMALLOC(), which may be a user or static pool allocator). 2024-10-14 14:21:29 -05:00
Daniel Pouzzner
0665ff9de7 wolfcrypt/src/asn.c: revert earlier WOLFSSL_NO_MALLOC changes (not needed, after proper gating in test.c). 2024-10-14 14:21:29 -05:00
Daniel Pouzzner
551eb3f44b wolfcrypt/src/ed25519.c and wolfcrypt/src/hash.c: remove gating around isAllocated XFREE()s in wc_ed25519_free() and wc_HashFree(). 2024-10-14 14:21:28 -05:00
Daniel Pouzzner
dc2a8118de Revert "Allow compiling aes.c with WOLFSSL_NO_MALLOC"
This reverts commit 56a96ba609.
2024-10-14 14:21:28 -05:00
Daniel Pouzzner
ee92f38f88 Revert "fix unused variables"
This reverts commit 06195a2e2a.
2024-10-14 14:21:28 -05:00
Daniel Pouzzner
2ca3e1100e Revert "Move heap variable to all sha implementations"
This reverts commit a3f6babfdc.
2024-10-14 14:21:28 -05:00
Daniel Pouzzner
886ebb6ec0 fixes for enable-all-crypto enable-cryptonly WOLFSSL_NO_MALLOC:
wolfcrypt/src//asn.c: add stack buffer codepaths in ParseKeyUsageStr(), SetKeyIdFromPublicKey(), and EncodePolicyOID;

wolfcrypt/src/dh.c: add stack buffer codepath in wc_DhGenerateParams();

wolfcrypt/src/ecc.c: add always-fail codepath to find_hole() to preempt heap allocation attempts;

wolfcrypt/test/test.c: gate out several heap-dependent subtests when defined(WOLFSSL_NO_MALLOC), and add a stack buffer codepath in ed448_test();

wolfssl/wolfcrypt/types.h: harmonize macro definitions of XFREE() to use do { ... } while (0) wrappers to assure syntactic indivisibility.
2024-10-14 14:21:28 -05:00
Daniel Pouzzner
0f8b4dbc63
Merge pull request #8072 from rizlik/github-fix
ci: github: fix ubuntu version to 22.04
2024-10-14 13:47:44 -05:00
Marco Oliverio
5d3f7c2528 ci: github: fix ubuntu version to 22.04 2024-10-14 16:46:45 +00:00
Juliusz Sosinowicz
743a78dc85
Merge pull request #8046 from embhorn/zd18758
Clear ctx in wolfSSL_EVP_DigestInit
2024-10-14 14:35:20 +02:00
Daniel Pouzzner
caf920100c
Merge pull request #8051 from cconlon/eccOidCacheLock
Add lock around static ECC ecc_oid_cache
2024-10-11 17:34:54 -05:00
Daniel Pouzzner
dfd8ead95e
Merge pull request #8050 from philljj/fix_acert_defines
Fix acert defines, add more tests, cleanup.
2024-10-11 16:22:34 -05:00
Daniel Pouzzner
f8da04d8b0
Merge pull request #7766 from miyazakh/zd18141_tls13_ocsp
Add OCSP response for intermediate cert into Certificate extension on TLS1.3
2024-10-11 15:49:19 -05:00
Sean Parkinson
65742c4a7a ARM32 ASM: regenerated with fixes
Fix thumb interwork def check to be consistent and update #endif.
Remove duplicate check in generated C files.
2024-10-11 09:07:57 +02:00
Sean Parkinson
5f1ddadf71 Regression test fixes
Fix unit tests to not compile when NO_RSA is defined and RSA used.
test_wc_PKCS7_EncodeSignedData: only RSA supported with streaming.
test_wolfSSL_RSA when SP math and SP: CRT parameters required.
test_wolfSSL_OCSP_REQ_CTX to compile with NO_ASN_TIME.
test_wolfSSL_IMPLEMENT_ASN1_FUNCTIONS: make sure all objects freed even
on memory allocation failure.
test_wolfSSL_error_cb: don't use bio if is NULL.
test_wolfSSL_BN_enc_dec: don't free a twice on memory allocation error.
test_wc_dilithium_der: remove debug printing
test_othername_and_SID_ext: make sid_oid NULL after free to ensure no
double free on later memory allocation failure.
test_wolfSSL_RSA: don't leak when BN_dup fails.
test_wolfSSL_i2d_ASN1_TYPE: free ASN1 string whn no ASN1 type to put it
into.
test_tls13_rpk_handshake: don't leak on failure
test_dtls_client_hello_timeout_downgrade: only move memory when test is

wolfSSL_certs_clear, wolfSSL_set_SSL_CTX, SetSSL_CTX: Check return from
AllocCopyDer.
d2i_generic: make sure impBuf is only freed once.
wolfSSL_BIO_write: don't dereference front unless it is not NULL.
wolfssl_dns_entry_othername_to_gn: don't free obj twice
wolfSSL_X509_REQ_add1_attr_by_NID: don't access reqAttributes if NULL.
succeeding.
2024-10-11 11:49:01 +10:00
Sean Parkinson
9c4960f3fa
Merge pull request #8035 from danielinux/armv8-armasm-ARMv7-A
Allow armv8-asm on ARMv7-A with -mthumb-interwork
2024-10-11 09:49:31 +10:00
Daniel Pouzzner
daef866313
Merge pull request #8053 from danielinux/fix-no-malloc
Allow building with WOLFSSL_NO_MALLOC again
2024-10-10 16:27:28 -05:00
JacobBarthelmeh
c49f571a79
Merge pull request #8059 from douzzer/20241010-WOLFCRYPT_TEST_LINT
20241010-WOLFCRYPT_TEST_LINT
2024-10-10 14:16:51 -06:00
Jack Tjaden
864eaaeef9 Added more discriptive README for NDS and MelonDS C-flag 2024-10-10 12:50:09 -06:00
Daniel Pouzzner
bcc65a09ca wolfcrypt/test/test.c: harmonize gating for hpke_test() and berder_test(), so that --enable-all-crypto passes -DWOLFCRYPT_TEST_LINT. 2024-10-10 01:06:05 -05:00
Daniel Pouzzner
b5475f3d81 wolfcrypt/test/test.c: add WOLFSSL_WOLFCRYPT_TEST_LINT, allowing testing for -Wunused-function in enable-all configurations. No functional changes, but several missing or inconsistent gates fixed. 2024-10-10 00:25:39 -05:00
Daniel Pouzzner
8b2a26a691
Merge pull request #8054 from bandi13/fixUncalledTest
Test was never called
2024-10-10 00:00:07 -05:00
John Safranek
8d3ed05272
Merge pull request #8058 from douzzer/20241009-wolfcrypt_test-FIPS-SMALL_STACK
20241009-wolfcrypt_test-FIPS-SMALL_STACK
2024-10-09 17:52:52 -07:00
Daniel Pouzzner
12ba4355d2 configure.ac and wolfssl/wolfcrypt/settings.h: define WOLFSSL_FIPS_READY for fips=ready, WOLFSSL_FIPS_DEV for fips=dev, and add predefined override FIPS version values when defined(WOLFSSL_FIPS_READY) || defined(WOLFSSL_FIPS_DEV). 2024-10-09 17:58:31 -05:00
Daniel Pouzzner
74d14d9687 wolfcrypt/test/test.c: fix for FIPS <6.0.0 with WOLFSSL_SMALL_STACK. 2024-10-09 16:40:48 -05:00
Aidan Garske
64a359c501
Merge pull request #8057 from gojimmypi/workflow-update 2024-10-09 13:41:28 -07:00
Chris Conlon
7b805d7a7d Add lock around static ECC ecc_oid_cache 2024-10-09 14:35:14 -06:00
gojimmypi
e81ae7bcb6
Run win-csharp-test only for wolfssl owner 2024-10-09 11:14:28 -07:00
Daniel Pouzzner
10e449dc00
Merge pull request #8056 from bandi13/fixCoverity
Add several fixes to coverity scan
2024-10-09 10:59:41 -05:00
Andras Fekete
c8840a53ad Add several fixes to coverity scan 2024-10-09 11:51:56 -04:00
Andras Fekete
d3f143aa2a Test was never called 2024-10-09 09:20:17 -04:00
Daniele Lacamera
a3f6babfdc Move heap variable to all sha implementations 2024-10-09 15:11:42 +02:00
Daniele Lacamera
06195a2e2a fix unused variables 2024-10-09 14:06:38 +02:00
Daniele Lacamera
56a96ba609 Allow compiling aes.c with WOLFSSL_NO_MALLOC 2024-10-09 13:55:42 +02:00
Daniele Lacamera
43574e2255 Allow building with WOLFSSL_NO_MALLOC again 2024-10-09 13:44:03 +02:00
Daniele Lacamera
a23d384e06 Improve guards to build with -mthumb-interwork 2024-10-09 12:41:55 +02:00
jordan
244fff844f acert: pacify c++ style comment warning. 2024-10-08 21:21:25 -05:00
jordan
bed680a96c acert: line length. 2024-10-08 20:47:49 -05:00
jordan
deda512598 acert: fix unused store error. 2024-10-08 17:05:53 -05:00
jordan
410e2f148c Missing free call. 2024-10-08 16:17:16 -05:00
jordan
052cf77233 acert: fix defines, cleanup, more testing. 2024-10-08 16:11:46 -05:00
Daniel Pouzzner
ce9d0e236c
Merge pull request #8047 from ColtonWilley/x509_store_free_ref
Free X509 store ref on store free
2024-10-08 15:25:16 -05:00
Daniel Pouzzner
e6dac68ce3
Merge pull request #7966 from cconlon/x509CheckHostLeftWildcardOnly
Add left-most wildcard matching support to X509_check_host()
2024-10-08 15:17:27 -05:00