3043 Commits

Author SHA1 Message Date
Sean Parkinson
fc8a509b06
Merge pull request #7597 from ColtonWilley/max_altnames_and_name_constraints
Max limits on number of alternative names and name constraints
2024-05-31 11:24:30 +10:00
JacobBarthelmeh
ebdc8b9a32 rename of macros, add descriptions, minor fixes 2024-05-30 14:48:52 -06:00
Colton Willey
f13a82610c Add flag guard for IGNORE_NAME_CONSTRAINTS 2024-05-29 22:41:36 -07:00
Colton Willey
473de5796c Free ctx before return 2024-05-29 20:52:09 -07:00
Colton Willey
284dea43fe Unify max name testing to use cert files for both cases. 2024-05-29 19:00:15 -07:00
Colton Willey
a4544ce2eb Updates to address review comments 2024-05-29 17:54:52 -07:00
Colton Willey
b00ae2ac69 Initial implementation of max limits on number of alternative names and name constraints 2024-05-29 15:55:17 -07:00
JacobBarthelmeh
288fe430f5 tying in lean staticmemory build with --enable-staticmemory=small 2024-05-29 15:50:11 -06:00
kaleb-himes
a22956d881 Address periodic CAST failures observed in unit.test by pre-empting the CASTs 2024-05-20 16:35:50 -04:00
Juliusz Sosinowicz
12b9367598 test_wolfSSL_check_domain: doesn't work with WOLFSSL_HOSTNAME_VERIFY_ALT_NAME_ONLY 2024-05-16 18:20:53 +02:00
Juliusz Sosinowicz
d9f7629296 Add grpc support
- Fix BIO_BIO type
  - Set retry flags correctly
- Add CRL callback
- Copy the alt names instead of trying to share a pointer
- Allow calling wolfSSL_get_servername on client side (to get the requested name)
- Return the chain in wolfSSL_X509_STORE_CTX_get_chain in the correct order
  - Peer first, top CA last
- Fix leak in RebuildFullName
- Add CopyString helper function
- Implement
  - X509_CRL_dup
  - ASN1_UTCTIME_set
  - X509_STORE_CTX_get0_param
  - X509_STORE_get0_param
  - X509_STORE_set_verify_cb
  - X509_STORE_set_get_crl
  - X509_set1_notAfter
  - X509_set1_notBefore
2024-05-16 18:20:53 +02:00
Sean Parkinson
abd1e367a5
Merge pull request #7420 from anhu/cmp_name_case
When comparing subject names, do not worry about case.
2024-05-16 09:10:56 +10:00
David Garske
287323ab4c
Merge pull request #6933 from kareem-wolfssl/zd16927
Add stub for wolfSSL_set_ecdh_auto.
2024-05-15 13:04:06 -07:00
Kareem
4481f9b626 Add stub for wolfSSL_set_ecdh_auto. 2024-05-15 10:19:47 -07:00
Colton Willey
b156a51e82 Code cleanup per review comments 2024-05-15 09:51:00 -07:00
Colton Willey
de0a492499 Remove trailing whitespace 2024-05-15 09:12:00 -07:00
Colton Willey
d522feb1cd Free X509 object 2024-05-15 08:37:39 -07:00
Colton Willey
958b5ac465 Clean up cast warning 2024-05-15 08:30:38 -07:00
Colton Willey
eb24bce93f Add test case for bad alternative name 2024-05-15 08:22:11 -07:00
Andras Fekete
a59a3d109f Explicit cast 2024-05-14 11:03:20 -04:00
Andras Fekete
affd0a318e Fix sign conversion errors 2024-05-14 11:02:28 -04:00
Daniel Pouzzner
8ee7c36bb1 tests/api.c: add suppression for clang-analyzer-optin.core.EnumCastOutOfRange in "Bad hash type" subtest in test_wc_ecc_sm2_create_digest(). 2024-05-13 19:06:54 -05:00
David Garske
29f7578a61
Merge pull request #7446 from julek-wolfssl/hostap
hostap update
2024-05-13 10:35:01 -07:00
David Garske
d39ab765f6
Merge pull request #7519 from julek-wolfssl/gh/7516
Return length in wc_Curve448PublicKeyToDer with NULL output param
2024-05-13 09:00:33 -07:00
Daniel Pouzzner
9ac6bdd438 fixes and suppressions for defects reported by clang-analyzer-unix.Stream (new in llvm-19.0.0_pre20240504):
* added POSIX definitions for XFEOF(), XFERROR(), and XCLEARERR(), currently with no-op fallbacks for !POSIX.
* added missing file handle checks in testsuite/testsuite.c:file_test() and tests/utils.h:copy_file().
* added fixes and suppression around tests/api.c:test_wolfSSL_SMIME_read_PKCS7().
* added various fixes in examples/asn1/asn1.c and examples/pem/pem.c.
2024-05-11 15:24:54 -05:00
Juliusz Sosinowicz
239706615c Return length in wc_Curve448PublicKeyToDer with NULL output param 2024-05-10 20:10:23 +02:00
Daniel Pouzzner
cb689104d1
Merge pull request #7466 from julek-wolfssl/gh/7273
Mark all record sequence numbers before stateful parsing as read
2024-05-09 13:57:13 -04:00
Juliusz Sosinowicz
df425b306f Fix https://github.com/wolfSSL/wolfssl/issues/7391 2024-05-08 10:35:42 +02:00
Juliusz Sosinowicz
16ec3e52b7 Jenkins fixes 2024-05-08 10:35:42 +02:00
Juliusz Sosinowicz
a987e76677 Use uml for hostap tests
Remove tests that fail with openssl
2024-05-08 10:33:30 +02:00
Juliusz Sosinowicz
6b47ebd66a Expose *_set_groups for TLS < 1.3
- Add test to make sure we fail on curve mismatch
2024-05-08 10:33:20 +02:00
Juliusz Sosinowicz
66f72a258f Remove unused internal API 2024-05-08 10:33:20 +02:00
Daniel Pouzzner
97110700b2
Merge pull request #7430 from jpbland1/check-session-setup
Add `wolfSSL_SessionIsSetup`
2024-05-07 13:51:33 -04:00
John Safranek
195bbcc315 Generic Memory Pools Fix
1. Add some expository comments describing the purpose of:
   * WOLFMEM_MAX_BUCKETS
   * WOLFMEM_DEF_BUCKETS
   * WOLFMEM_BUCKETS
   * WOLFMEM_DIST
2. Switch the API test for LoadStaticMemory() to named constants.
3. Delete redundant test case. Add a new test case.
4. In the wolfCrypt test for the memory constants, check the sizes of
   the WOLFMEM_BUCKETS and WOLFMEM_DIST lists against
   WOLFMEM_DEF_BUCKETS which should be their length. Check that
   WOLFMEM_DEF_BUCKETS is not greater than WOLFMEM_MAX_BUCKETS.
5. Default for WOLFMEM_MAX_BUCKETS should be WOLFMEM_DEF_BUCKETS, set it
   to what is specified. Add a warning if MAX is less than DEF.
6. Separate the definition of the constant LARGEST_MEM_BUCKET so it is
   dependent on config and not if WOLFMEM_BUCKETS isn't set.
2024-05-03 16:15:38 -07:00
Anthony Hu
4ddba7ac8a When comparing subject names, do not worry about case. 2024-05-03 15:03:07 -04:00
Daniel Pouzzner
0c1d583ab4 tests/api.c: fix double close in test_server_loop(). 2024-05-02 19:07:36 -05:00
Sean Parkinson
4594151588
Merge pull request #7418 from ejohnstown/generic-pool
Generic Memory Pools
2024-05-01 08:53:56 +10:00
Sean Parkinson
72d49964b9
Merge pull request #7379 from mrdeep1/enable-rpk
configure.ac: Add in --enable-rpk option
2024-05-01 08:44:08 +10:00
John Safranek
6be55269db
Generic Memory Pools
1. Add API for function `wc_UnloadStaticMemory()` which frees the mutex
   used by the static memory pool.
2. Update the `wc_LoadStaticMemory_ex()` test to free the static memory
   pool's mutex on each successful test case.
2024-04-30 09:34:48 -07:00
John Safranek
f6ae432be1
Generic Memory Pools
1. Add API test for function `wc_LoadStaticMemory_ex()`.
2024-04-30 09:29:20 -07:00
Sean Parkinson
068a3b5e99
Merge pull request #7481 from douzzer/20240424-sha-C-dynamic-fallback
20240424-sha-C-dynamic-fallback
2024-04-30 09:00:57 +10:00
Sean Parkinson
bd9a27a39b
Merge pull request #7472 from ColtonWilley/remove-des3-guard-from-pkcs12-tests
Remove DES3 flag guard from pkcs12 tests
2024-04-29 10:54:39 +10:00
Daniel Pouzzner
885497ba5a add missing gate around Sha256_SetTransform() declaration in wolfcrypt/src/sha256.c;
remove stray definitions of XTRANSFORM*() in wolfcrypt/src/sha512.c;

restore global intel_flags in the !WC_NO_INTERNAL_FUNCTION_POINTERS paths of sha256.c and sha512.c;

disable test_wolfSSL_dtls_compare_stateless() in tests/api.c when DEBUG_VECTOR_REGISTER_ACCESS_FUZZING (it depends on a stable SHA512 hash of the in-memory struct WOLFSSL image).
2024-04-27 12:35:23 -05:00
Colton Willey
2fb70b260b Remove DES3 flag guard from pkcs12 tests that do not depend on DES3 code 2024-04-25 12:15:02 -07:00
Juliusz Sosinowicz
7644d792b6 Mark all record sequence numbers before stateful parsing as read
Fixes https://github.com/wolfSSL/wolfssl/issues/7273
2024-04-25 16:23:41 +02:00
Anthony Hu
329650fb4c Get rid of some code with NO_OLD_TLS 2024-04-24 16:00:45 -04:00
Jon Shallow
4a1df83b6f configure.ac: Add in --enable-rpk option
By default RPK (RFC7250) support is not enabled, but is enabled when
--enable-rpk, --enable-all or --enable-dist is used.

Makes use of the HAVE_RPK compile time option.

Fix clang issue reported in tests/api.c during test suites
2024-04-23 21:30:21 +01:00
JacobBarthelmeh
c2e60d523f fix for WOLFSSL_NO_PEM build 2024-04-17 11:16:18 -06:00
John Bland
b184cdf7b5 add underscore to make it more consistient and readable 2024-04-17 03:56:07 -04:00
John Bland
c1dbbcc81e add wolfSSLSessionIsSetup so the user can check if
a session ticket has been sent by the server
2024-04-17 03:54:51 -04:00