20146 Commits

Author SHA1 Message Date
Andras Fekete
ecc138fc6e Fixed g++ shortcomings 2023-07-11 09:26:39 -04:00
Andras Fekete
a317ac280c PR comments 2023-07-10 16:50:54 -04:00
Andras Fekete
27a95e7e82 CMake is on a TODO for later 2023-07-10 15:44:30 -04:00
Andras Fekete
0a02218ba3 Clean up allocated memory on failure 2023-07-10 12:37:07 -04:00
Andras Fekete
299b4d8552 Make wc_BuildEccKeyDer non-static 2023-07-10 11:32:17 -04:00
Andras Fekete
0efdf966d0 addressing PR comments 2023-07-10 11:14:07 -04:00
Andras Fekete
4f9b5de802 File gating 2023-07-06 17:03:57 -04:00
Andras Fekete
8421b384fb Settable 'keyAsn1' max length 2023-07-06 17:02:44 -04:00
Andras Fekete
ef9206f73f Addressing PR comments 2023-07-06 16:42:12 -04:00
Andras Fekete
266307da6c Add in ARIA wrappers
Address PR comments + other cleanup


Addressing PR comments


Minor change


Make sure the last line gets output as well


Add in ARIA SHA256 session to internal structure


Add in ARIA SHA384 session to internal structure


Add necessary function for ARIA to extract key


Fix unit tests


Rename HAVE_ARIAGCM to HAVE_ARIA


Move aria.* to wolfcrypt/port/aria


Separate out aria-crypt init functions


Adding in ECC+SHA callbacks


Avoid using AC_CHECK_FILE


Rename Aria to wc_Aria


Don't need special cases


Addressing PR comments


Code cleanup


C89 support


Remove TODO


Add documentation about buffer size


Clean up header files


Use ARIA_DEVID by default if available


Dummy update call to make MagicCrypto happy


Fix for detecting what algo type to use


Documentation


Use the appropriate sign/verify


Collect MagicCrypto functions together (and avoid leaks)


Fall back on other implementations on failure


Fix issue when compiling without CRYPTOCB


Addressing PR comments


Better cleanup


Addressing PR comments


Cleaner exit in case of error
2023-07-06 16:09:23 -04: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
e8f3afc85b
Merge pull request #6579 from julek-wolfssl/getsockopt-endianness
getsockopt needs to take in an int
2023-07-06 09:04:13 -07:00
David Garske
794425c431
Merge pull request #6577 from SparkiDev/sm_update_1
SM tests: void in function declaration that is its prototype
2023-07-06 06:04:14 -07:00
Juliusz Sosinowicz
0b4e4287c9 getsockopt needs to take in an int
This caused an issue on big endian platforms

From the getsockopt man page:
       Most socket-level options utilize an int argument for optval.  For setsockopt(), the argument should be non‐
       zero to enable a boolean option, or zero if the option is to be disabled.
2023-07-06 11:40:36 +02: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
652c5491fe
Merge pull request #6571 from julek-wolfssl/dtls-mtu-interop
Always add DTLS_MTU_ADDITIONAL_READ_BUFFER for better MTU interop
2023-07-05 13:03:10 -07:00
Juliusz Sosinowicz
b0c2e29a2e Always add DTLS_MTU_ADDITIONAL_READ_BUFFER for better MTU interop 2023-07-05 10:19:19 -07:00
David Garske
856b5c3f1b
Merge pull request #6566 from JacobBarthelmeh/soname
update soname to 40
2023-07-05 09:21:10 -07: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
Juliusz Sosinowicz
f58539581d Fix DoMonitor for Mac/BSD 2023-07-04 13:24:00 +02:00
Juliusz Sosinowicz
2feec88702 Add comment explaining threading usage 2023-07-04 11:18:44 +02:00
Juliusz Sosinowicz
713670dcc7 Use smaller buffer for copying 2023-07-04 11:18:44 +02:00
Juliusz Sosinowicz
3d2db844c1 Speed up waiting for file removal 2023-07-04 11:18:44 +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
ad2621a7a0
Merge pull request #6572 from douzzer/20230703-clang-tidy-fixes
20230703-clang-tidy-fixes
2023-07-03 10:43:45 -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
David Garske
732ef09da6
Merge pull request #6551 from SparkiDev/asn_no_certs
ASN: fix so that NO_CERTS configurations work
2023-07-03 08:55:14 -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
bff2cf5690 Add crl monitor unit testing 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
JacobBarthelmeh
877979c5c2 update soname to 40 2023-06-30 14:40:26 -07:00
David Garske
052fba887c
Merge pull request #6563 from SKlimaRA/SKlimaRA/fix-funky-ifdef
fixed bug in ifdef logic caused in pull req 6277
2023-06-30 14:30:47 -07: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
Stanislav Klima
c2726b4cbe fixed bug in ifdef logic caused in pull req 6277 2023-06-30 13:08:07 -07: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
79a7d21932 Turn on SNI by default on hosts with resources. 2023-06-30 13:04:05 -07:00