Commit Graph

7542 Commits

Author SHA1 Message Date
Juliusz Sosinowicz
c4cbf0508b Add zephyr action 2023-07-07 20:18:19 +02:00
JacobBarthelmeh
7213cb3cfb Merge pull request #6463 from dgarske/silabs_erf32
Updated support for Silicon Labs Simplicity Studio and the ERF32 Gecko SDK
2023-07-07 11:42:00 -06:00
David Garske
91fb24161b Merge pull request #6515 from julek-wolfssl/nginx-1.25.0
Add support for nginx-1.25.0
2023-07-07 09:29:23 -07:00
David Garske
9599ddd80a Merge pull request #6575 from julek-wolfssl/zd/15258
Properly enforce the pathLenConstraint of the BasicConstraints extension
2023-07-07 08:58:28 -07:00
David Garske
abe1bce914 Fix silabs_ecc_export_public to set the signing only flag. Added tests cases for import of private and public only verify in the SiLabs example. 2023-07-07 08:25:46 -07:00
Juliusz Sosinowicz
0abaa89787 Add support for nginx-1.25.0
- nginx: add necessary defines and function
- Implement Certificate Authorities for TLS 1.3
- Implement secret logging for TLS 1.3. Can be used for example with:
  ./configure CPPFLAGS="-DWOLFSSL_SSLKEYLOGFILE -DSHOW_SECRETS -DHAVE_SECRET_CALLBACK -DWOLFSSL_SSLKEYLOGFILE_OUTPUT='\"/tmp/secrets\"'"
- Implement session context checking for tickets
- Check for authorized responder in OCSP basic response
- Fix handling call to ocsp->statusCb
- compat: Translate SOCKET_PEER_CLOSED_E to WOLFSSL_ERROR_SYSCALL
- Fix wolfSSL_CTX_set_session_cache_mode
  - WOLFSSL_SESS_CACHE_OFF means nothing should be on
  - WOLFSSL_SESS_CACHE_NO_INTERNAL turns off only the internal cache
- Respect ssl->options.internalCacheOff
- Implement SSL_SESSION_set_time
- wolfSSL_SSL_in_init: fix detection for TLS 1.3
- Fix handling call to ssl->alpnSelect
- SendTls13NewSessionTicket: always generate new ID
  - When we send a new ticket for the same session (for example we resumed a connection and are sending a new ticket so that the client can resume in the future), we need to generate a new ID so that we don't overwrite the old session in the cache. Overwriting the session results in the `diff` calculation in `DoClientTicketCheck()` producing the wrong value and failing to resume.
Add nginx github action test
- Fix memory leaks
- wolfSSL_OCSP_basic_verify: implement OCSP_TRUSTOTHER flag
- AKID: implement matching on issuer name and serial number
- ocsp: check for a chain match for OCSP responder
- Split CreateTicket into CreateTicket and SetupTicket
- SendCertificateStatus: free response.buffer
- Use heap hint when allocating responseBuffer
- Remove responseBuffer from internal API's that don't use it anywhere
2023-07-07 11:22:58 +02:00
Sean Parkinson
52b5adb54a Merge pull request #6581 from kareem-wolfssl/eccNullKCheck
Fixed crash in wc_ecc_free.
2023-07-07 10:54:18 +10:00
David Garske
4d25faafe2 Merge pull request #6582 from SparkiDev/aes_gcm_arm_fix
AES-GCM ARM asm: fixes from GCM changes
2023-07-06 17:12:08 -07:00
Sean Parkinson
f3bae3192a Merge pull request #6580 from dgarske/sig_verify
Fix for `wc_SignatureGenerate_ex` calling verify twice
2023-07-07 08:40:39 +10:00
Sean Parkinson
af5b3b551a AES-GCM ARM asm: fixes from GCM changes
GCM is now its own structure.
GMULT, GHASH, GenerateM0 made public and fixed here too.
2023-07-07 08:35:14 +10:00
Kareem
fb9e036d5b Add NULL check in TFM's fp_forcezero. 2023-07-06 14:47:18 -07:00
Kareem
657679efda Only check for ALT_ECC_SIZE case, otherwise key->k is an array which will never be NULL. 2023-07-06 21:15:37 -07:00
Kareem
e995568626 Fixed crash in wc_ecc_free. 2023-07-06 21:10:32 -07:00
Juliusz Sosinowicz
c041863aaa Code review 2023-07-06 19:00:11 +02:00
Juliusz Sosinowicz
d2642e329d Properly enforce the pathLenConstraint of the BasicConstraints extension
- move the testsuite file helps into a new tests/utils.c file so that they can be used across all tests
- dump the raw TLS stream when WOLFSSL_DUMP_MEMIO_STREAM is defined so that it can be examined in Wireshark
2023-07-06 19:00:11 +02:00
David Garske
9ca53ac7f7 Fix for wc_SignatureGenerate_ex calling verify twice. 2023-07-06 09:34:03 -07:00
David Garske
fb0c769d6c Merge pull request #6578 from douzzer/20230705-analyzer-fixes
20230705-analyzer-fixes
2023-07-06 09:04:39 -07:00
David Garske
caa0e5aabf Fix for silabs_ecc_export_public to set the type (curve). 2023-07-06 08:57:02 -07:00
Daniel Pouzzner
1912f1bc2a fixes for clang-analyzer-core.NullDereference, clang-analyzer-core.NonNullParamChecker, clang-analyzer-deadcode.DeadStores, readability-redundant-preprocessor, clang-diagnostic-unreachable-code-break, -Werror=sign-conversion, bugprone-macro-parentheses, "Call to 'malloc' has an allocation size of 0 bytes", clang-diagnostic-declaration-after-statement re tests/unit.h:ExpectPtr() pragmas. 2023-07-06 00:53:37 -05:00
Sean Parkinson
7a73c9aac7 SM tests: void in function declaration that is its prototype
Need to have void in prototype of funtion.
2023-07-06 08:57:30 +10:00
David Garske
f00b5c3a1e Merge pull request #6537 from SparkiDev/sm
SM2/SM3/SM4: Chinese cipher support
2023-07-04 10:03:37 -07:00
David Garske
b682c2c4bb Merge pull request #6437 from julek-wolfssl/windows-crl-monitor
Implement CRL monitor for Windows
2023-07-04 10:03:14 -07:00
Juliusz Sosinowicz
7af1f0cf05 Add additional windows logging for DoMonitor 2023-07-04 14:12:38 +02:00
Sean Parkinson
e2424e6744 SM2/SM3/SM4: Chinese cipher support
Add support for:
 - SM2 elliptic curve and SM2 sign/verify
 - SM3 digest
 - SM4 cipher with modes ECB/CBC/CTR/GCM/CCM

Add APIs for SM3 and SM4.
Add SM2 sign and verify APIs.
Add support for SM3 in wc_Hash and wc_Hmac API.
Add support for SM3 and SM4 through EVP layer.
Add support for SM2-SM3 certificates. Support key ID and name hash being
with SHA-1/256 or SM3.
Add support for TLS 1.3 cipher suites: TLS-SM4-GCM-SM3, TLS-SM4-CCM-SM3
Add support for TLS 1.2 SM cipher suite: ECDHE-ECDSA-SM4-CBC-SM3
Add support for SM3 in wc_PRF_TLS.
Add SM2-SM3 certificates and keys. Generated with GmSSL-3.0.0 and
OpenSSL.
2023-07-04 13:36:28 +10:00
David Garske
6028dfd394 Merge pull request #6523 from gojimmypi/wc-memory-test
Add wolfcrypt test: R/O filesystem const memory pointer
2023-07-03 11:58:13 -07:00
David Garske
a921ab754d Merge pull request #6569 from SparkiDev/pem_der_example
PEM example: new example for convert between PEM and DER
2023-07-03 11:31:36 -07:00
gojimmypi
573fedae2f add const_byte_ptr_test for Xtensa -mforce-l32 check 2023-07-03 10:44:01 -07:00
David Garske
f72a6b705f Minor spelling fixes. 2023-07-03 10:23:55 -07:00
Daniel Pouzzner
214f9f55c4 fixes for bugprone-suspicious-missing-comma, clang-analyzer-core.NullDereference, and readability-redundant-preprocessor. 2023-07-03 11:30:08 -05:00
David Garske
678a65822f Merge pull request #6556 from StMartin81/Fix_compilation_of_wc_RsaFunctionNonBlock_if_WOLFSSL_RSA_PUBLIC_ONLY_is_defined
Fix compilation of wc_RsaFunctionNonBlock if WOLFSSL_RSA_PUBLIC_ONLY …
2023-07-03 08:55:36 -07:00
Juliusz Sosinowicz
3d68bcd6f7 Jenkins fixes 2023-07-03 14:02:51 +02:00
Juliusz Sosinowicz
ca77da92e5 Implement pthreads threading 2023-07-03 14:02:51 +02:00
Juliusz Sosinowicz
8ab0050801 Init windows CRL monitor 2023-07-03 14:02:51 +02:00
Sean Parkinson
a39a04fc88 PEM example: new example for convert between PEM and DER
PEM example converts PEM to DER and DER to PEM.
Supports encrypting DER and writing out as PEM.

Added better support for 40-bit RC2-CBC PBE.
Added AES-128-CBC encryption support with PKCS#5v2.
Fixed handling of iterations to support writing 24-bit values.
Declared enum types for pass to PKCS#8 encryption APIs.

Add more DER and PEM files to certs directory.
Add testing of 'pem' with pem.test script.
2023-07-03 17:20:35 +10:00
Sean Parkinson
5be883a995 ASN: fix so that NO_CERTS configurations work
Moved code around and update #ifdefs so that --enable-cryptonly
CFLAGS=-DNO_CERTS compiles.
2023-07-03 09:16:44 +10:00
Sean Parkinson
da4424cd0c Merge pull request #6559 from dgarske/sni_defaults
Turn on SNI by default on hosts with resources
2023-07-03 08:07:45 +10:00
JacobBarthelmeh
a4c058649b Merge pull request #6560 from dgarske/stm32_nuttx
Support for using the Nuttx STM RNG register definitions
2023-06-30 16:15:49 -06:00
Chris Conlon
e1cb74f24a Merge pull request #6492 from night1rider/wolfssl-wolfcrypttest-statickeys
Added to cert buffer keys and updated testwolfcrypt
2023-06-30 14:21:40 -06:00
Martin Stolpe
81484ef74b Fix compilation of wc_RsaFunctionNonBlock if WOLFSSL_RSA_PUBLIC_ONLY is defined 2023-06-30 13:05:21 -07:00
David Garske
6052e01879 Fixes for SNI test with static memory enabled. Fixes for other minor static memory build combinations. 2023-06-30 13:04:05 -07:00
David Garske
53c30f44a0 Support for using the Nuttx STM RNG register definitions, enabled with STM32_NUTTX_RNG. ZD 16315 2023-06-30 13:00:52 -07:00
David Garske
9fc68f4a80 Merge pull request #6558 from anhu/wolfSSL_X509_NAME_heap
Allocate WOLFSSL_X509_NAME with heap hint.
2023-06-30 10:35:08 -07:00
Sean Parkinson
a1939d22b9 wolfBot fixes
Importing an EC point ordinate with one being zero will result in
different errors based on different implementations. Check both known
error codes.

Benchmark usage fixed.
2023-06-30 09:07:46 +10:00
Anthony Hu
ed4774f606 Allocate WOLFSSL_X509_NAME with heap hint. 2023-06-29 12:04:32 -04:00
David Garske
dcfa410540 Merge pull request #6289 from jpbland1/nuttx-hw-acel
Nuttx hw acel benchmark with STM32_HW_CLOCK_AUTO
2023-06-28 09:32:48 -07:00
JacobBarthelmeh
78107b0f88 Merge pull request #6540 from dgarske/bench_fix
Fix for benchmark always using 4KB of memory for `gStats`
2023-06-27 16:18:29 -06:00
John Bland
c72d008a5c add STM32_HW_CLOCK_AUTO which turns the stm32 hw
accleration clock on and off automatically
2023-06-27 17:16:46 -04:00
John Bland
fbadcf67da add the STM32 peripheral clock enable and disable
calls to the benchmark program so the benchmark program can use hardware accleration
2023-06-27 17:16:46 -04:00
David Garske
0d0d2cf50c Merge pull request #6531 from bandi13/extraCMakeOptions
Extra c make options
2023-06-27 13:26:03 -07:00
David Garske
b1fe15dc70 Further refactor of the benchmark stats tracking. Always use the allocated list (avoids using a stack pointer for ECC descriptions). 2023-06-27 13:05:04 -07:00