Commit Graph

7739 Commits

Author SHA1 Message Date
Sean Parkinson
75b178f666 Merge pull request #7492 from JacobBarthelmeh/porting
remove assumption of struct layout
2024-05-02 07:14:06 +10:00
Sean Parkinson
4594151588 Merge pull request #7418 from ejohnstown/generic-pool
Generic Memory Pools
2024-05-01 08:53:56 +10:00
JacobBarthelmeh
5aa39a6397 remove assumption of struct layout 2024-04-30 15:42:38 -06:00
Daniel Pouzzner
0566584191 implement full support for --enable-intelasm --enable-linuxkm. also add --enable-curve25519=noasm to allow use of the existing NO_CURVED25519_X64 code path by the linuxkm build (fe_x25519_asm.S is not kernel-compatible). 2024-04-27 12:35:23 -05:00
Juliusz Sosinowicz
2328270222 Code review 2024-04-26 15:56:20 +02:00
Juliusz Sosinowicz
49952a97d7 Fix quic header protect cipher return 2024-04-26 14:18:40 +02:00
Daniel Pouzzner
442d3f30cc src/ssl.c: refactor fix in wolfSSL_RAND_bytes() for race on initGlobalRNG to retain the initial check on initGlobalRNG, and just recheck it, to avoid possible access to uninitialized globalRNGMutex. 2024-04-25 23:47:39 -05:00
Daniel Pouzzner
59290cd066 src/quic.c: fix -Wunused-function for evp_cipher_eq(). 2024-04-25 22:09:28 -05:00
Daniel Pouzzner
963e14a1fe src/ssl.c: code style tweak from peer review. 2024-04-25 22:09:28 -05:00
Daniel Pouzzner
8e8e9bd0eb src/ssl.c: fix races in wolfSSL_Init() and wolfSSL_RAND_bytes(). 2024-04-25 22:09:28 -05:00
Sean Parkinson
c8e51112c3 Merge pull request #7372 from julek-wolfssl/zd/17435
Add secret logging callback to TLS <= 1.2
2024-04-26 09:41:58 +10:00
Sean Parkinson
5ee0e34d89 Merge pull request #7465 from julek-wolfssl/issue/7390
Clean up EVP usage in quic
2024-04-26 09:38:40 +10:00
Sean Parkinson
54022b146b Merge pull request #7456 from mrdeep1/enable-dtls13
dtls1.3: Fix issues when --enable-dtls13 enabled
2024-04-26 09:24:01 +10:00
Juliusz Sosinowicz
c62faa048c Add secret logging callback to TLS <= 1.2 2024-04-25 17:11:07 +02:00
Juliusz Sosinowicz
d61fec5af9 Clean up EVP usage in quic 2024-04-25 16:34:38 +02:00
Anthony Hu
329650fb4c Get rid of some code with NO_OLD_TLS 2024-04-24 16:00:45 -04:00
Jon Shallow
e36df36f84 dtls1.3: Fix issues when --enable-dtls13 enabled
Fixed issue reported by scan-build when DTLS13 is enabled.

Fix compile issue when WOLFSSL_DTLS_CH_FRAG is enabled.

Fix running of scripts/dtlscid.test by removing 'set -e' as bwrap
command may not be there.
2024-04-24 12:07:29 +01:00
András Fekete
a75c2befb5 Add CUDA support (#7436)
* Redirect the AesEncrypt_C call to device
* Fix function declarations
* Force CC=nvcc with CUDA
* Don't let C++ mangle function names
* Add larger parallelization
* Add in memory copy to device
* `nvcc` does not support '-Wall' nor '-Wno-unused'
* Add in README.md
* Clean up script to output color coded data
* Fix Asymmetric cipher comparisons
* Add in standard output parsing in addition to the CSV
* Add option to output results in a CSV

---------

Co-authored-by: Andras Fekete <andras@wolfssl.com>
2024-04-23 08:26:27 -07:00
John Safranek
2168b154b6 Generic Memory Pools
1. Modify wolfSSL_CTX_load_static_memory() to use wc_LoadStaticMemory()
   instead of reimplementing it.
2. Initialize the pointers in wc_LoadStaticMemory() to null.
3. Whitespace changes.
2024-04-22 08:54:37 -07:00
Sean Parkinson
5bb22d8343 Merge pull request #7439 from JacobBarthelmeh/build_test
fix for WOLFSSL_NO_PEM build
2024-04-22 10:48:57 +10:00
Sean Parkinson
e1b66ca62d Merge pull request #7407 from mrdeep1/key_share
Handle PSK-Only negotiation with key_share not being sent in Server Hello
2024-04-22 10:45:56 +10:00
JacobBarthelmeh
78670f5098 Merge pull request #7453 from douzzer/20240419-wolfSSL_CTX_SetTmpDH-double-free
20240419-wolfSSL_CTX_SetTmpDH-double-free
2024-04-19 13:48:37 -06:00
Daniel Pouzzner
39e2405e2f src/ssl_load.c: fix double-free in wolfSSL_CTX_SetTmpDH(). 2024-04-19 11:43:32 -05:00
JacobBarthelmeh
5f9ed54aaa Merge pull request #7451 from SparkiDev/test_fixes_1
Fixes from configuration testing
2024-04-19 10:43:31 -06:00
JacobBarthelmeh
9242f611b2 Merge pull request #7449 from lealem47/nginx_stubs
Adding stubs required for latest nginx
2024-04-19 10:38:17 -06:00
Jon Shallow
7b22681287 Handle PSK-Only negotiation with key_share not being sent in Server Hello
The wrong cipher suite is potentially chosen if key_share is not seen by the client.

$ cat /tmp/test
Client_identitySHA256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef

Server:
$ gnutls-serv --http --priority NORMAL:+ECDHE-PSK:+PSK:+ECDHE-ECDSA:+AES-128-CCM-8:+CTYPE-CLI-ALL:+CTYPE-SRV-ALL:+SHA256 --pskpasswd=/tmp/test

Client:
$ examples/client/client -vd -g -s -p 5556 2>&1| grep HTTP
2024-04-19 17:14:28 +01:00
Sean Parkinson
97d560d9af Fixes from configuration testing
asn1.c: Allow sample to build without coding (base64 decoding).

set_curves_list(): function for ECC, Ed25519, Ed448 but this block of
code is ECC only. Fixed #ifdef protection.

wolfSSL_CTX_set1_curves_list and wolfSSL_set1_curves_list also available
when Curve25519/Curve448 compiled in but not ECC.
2024-04-19 08:40:19 +10:00
Lealem Amedie
7a7af18887 Guard with OPENSSL_EXTRA instead of WOLFSSL_NGINX 2024-04-18 16:33:37 -06:00
JacobBarthelmeh
fe671f72e1 Merge pull request #7435 from SparkiDev/ssl_misc_fixup
ssl_misc.c: wolfssl_file_len() protection
2024-04-18 14:36:38 -06:00
Daniel Pouzzner
e48f06bd53 fixes for WOLFSSL_DUAL_ALG_CERTS: "cannot take address of bit-field ‘altKeyType’" and "‘altPrivateKeyType’" in ProcessBufferTryDecode(), "‘heap’ undeclared" in ProcessBufferCertAltPublicKey(), "‘consumed’ undeclared" in ProcessFile(), "‘keySz’ undeclared" in wolfSSL_CTX_use_PrivateKey_Id(). 2024-04-18 13:49:44 -05:00
Lealem Amedie
a1cf316630 Adding stubs required for latest nginx 2024-04-18 12:28:31 -06:00
JacobBarthelmeh
41f31f4635 Merge pull request #7440 from douzzer/20240417-fix-LoadSystemCaCertsWindows
20240417-fix-LoadSystemCaCertsWindows
2024-04-17 15:47:48 -06:00
Daniel Pouzzner
6e3a9d5447 src/ssl_load.c: in LoadSystemCaCertsWindows(), fix flub introduced in 8e9810e87e. 2024-04-17 13:24:26 -05:00
JacobBarthelmeh
c2e60d523f fix for WOLFSSL_NO_PEM build 2024-04-17 11:16:18 -06:00
Sean Parkinson
593cb77e51 ssl_misc.c: wolfssl_file_len() protection
wolfssl_file_len is now used by wolfssl_read_file_static() which is
compiled in with less restrictions.
Fix #ifdef protection.
2024-04-17 22:44:13 +10:00
Daniel Pouzzner
3df11e7eab fixes for cppcheck uninitvar src/pk.c (false positives) and nullPointerRedundantCheck in src/ssl_load.c (true positive). 2024-04-17 01:00:41 -05:00
Sean Parkinson
8e9810e87e ssl.c: Move functions out to separate files
Moved E[CD][25519||448] APIs to pk.c
Move public key PEM APIs to pk.c.
Move wolfSSL loading and using of private keys and certificates to
ssl_load.c
Move PKCS#7 and PKCS#12 APIs to ssl_p7p12.c.
Move session and session cache APIs to ssl_sess.c.
Other minor fixes.
2024-04-16 10:30:59 +10:00
JacobBarthelmeh
3742c4dd57 Merge pull request #7413 from gojimmypi/PR-PlatformIO-FreeRTOS
Modify PlatformIO FreeRTOS include path, settings.h
2024-04-12 14:32:55 -06:00
JacobBarthelmeh
8b656d5a5f Merge pull request #7295 from kaleb-himes/SRTP-KDF-FS
SRTP-KDF FS Preview
2024-04-11 13:41:05 -06:00
gojimmypi
b1261f5471 Modify PlatformIO FreeRTOS include path, settings.h 2024-04-11 07:46:35 -07:00
JacobBarthelmeh
a8415a7926 Merge pull request #7367 from mrdeep1/hello_verify_request
Support DTLS1.3 downgrade when using PSK
2024-04-09 16:17:59 -06:00
kaleb-himes
ef2a636610 Expose additional features of opensslall in a compliant way 2024-04-09 09:48:33 -06:00
kaleb_himes
81f5ac7f6c SRTP-KDF FS Preview 2024-04-09 09:48:33 -06:00
Sean Parkinson
d96e5ec589 No match cipher suite alert type change
TLS 1.0/1.1/1.2 specifications require the of a return a handshake
failure alert when no cipher suites match.
TLS 1.3 specification requires the return of a "handshake_failure" or
"insufficient_security" fatal alert.

Change alert sent from "illegal_parameter" to "handshake_failure".
2024-04-08 11:25:50 +10:00
Daniel Pouzzner
d1efccd259 Merge pull request #7381 from dgarske/netdb_ioctl
Restore `HAVE_NETDB_H` and `HAVE_SYS_IOCTL_H` checks in the wolfio.c.
2024-04-05 16:02:21 -04:00
Daniel Pouzzner
7d66cc46ff Merge pull request #7375 from mrdeep1/fix_rpk
RPK: Define Certificates correctly for (D)TLS1.2
2024-04-05 15:48:25 -04:00
Anthony Hu
cf2f58bfdf Merge pull request #7395 from douzzer/20240403-RPK-cleanups
20240403-RPK-cleanups
2024-04-05 13:43:15 -04:00
Daniel Pouzzner
cdf2504612 fixes for non-portable (endian-sensitive) code patterns around word16 in TLS layer. 2024-04-05 10:42:05 -05:00
Daniel Pouzzner
747755b3c4 fixes for analyzer carps around HAVE_RPK:
fix clang-analyzer-deadcode.DeadStores in src/tls.c TLSX_ClientCertificateType_GetSize();

fix clang-analyzer-deadcode.DeadStores in tests/api.c test_tls13_rpk_handshake();

fix null pointer to XMEMCPY() in src/internal.c CopyDecodedName().
2024-04-04 00:15:01 -05:00
Daniel Pouzzner
8511b2dc6b ProcessBuffer(): in WOLFSSL_DUAL_ALG_CERTS code path, fall through without disrupting ret, if cert->sapkiOID and cert->sapkiLen are unset. 2024-04-03 13:54:57 -05:00