Commit Graph

1812 Commits (5807e9b595c6c3f7103d59b79dd4663dcdf88ed2)

Author SHA1 Message Date
Emma Stensland 5807e9b595 F-6720: use a full 16-byte IV in CAAM/SECO AES-CBC examples 2026-07-15 10:04:02 -06:00
Emma Stensland 069f16efe2 F-2907 F-2912 F-3466 F-3467 F-3468 F-3469 F-3470: fix file handle, PKCS7 object, and key-decode buffer leaks across pkcs7 examples 2026-07-15 09:39:17 -06:00
Emma Stensland 6d28833ed3 fixed duplicate unlink(out_file) 2026-07-14 15:15:29 -06:00
Emma Stensland 8c968eb572 F-1296 F-2112 F-2893 F-2900 F-3899 F-4121 F-4127: Fix error handling in TLS, DTLS, and protocol examples 2026-07-14 15:06:41 -06:00
Emma Stensland 8f0f1af04a F-1298 F-1302 F-1307 F-1712 F-1713 F-1719 F-1720 F-1721 F-1722 F-2093 F-3466 F-3472 F-3477 F-4131 F-4132 F-4600 F-5612 F-6286 F-6289 F-6536: Fix error handling in crypto and signature examples 2026-07-14 15:06:41 -06:00
Emma Stensland f38780093c F-1300 F-2099 F-2100 F-2101 F-2113 F-2116 F-3474 F-3475 F-3476 F-3692 F-3694 F-3695 F-3892 F-3893 F-3894 F-4126: fix key/RNG leaks and zeroize private key buffers in certgen, ecc, and PQ examples 2026-07-14 14:32:22 -06:00
Emma Stensland 210e9caf3e F-1715 F-2114 F-3224 F-3690 F-4120 F-4123 F-4124 F-5614 F-5615: replace hardcoded/UAF-prone secrets and keys with RNG-generated values, zeroize key material before free, and flag non-constant-time secret comparisons 2026-07-14 13:33:25 -06:00
Emma Stensland 717e52d02b F-1305 F-1306 F-1714 F-2111 F-2905 F-2906 F-2909 F-3897 F-4125 F-4608 F-6288: fix NULL-deref, fd-leak, unaligned-access, and buffer-overflow bugs across CAN, PKCS7, embedded, and PEM-printing examples 2026-07-14 13:33:25 -06:00
Emma Stensland 320dca9c66 F-1302 F-1303 F-1304 F-1308 F-3471 F-3691 F-4601: fix buffer overflows, malloc/realloc NULL checks, and padding validation in crypto file-encryption examples 2026-07-14 13:33:25 -06:00
Emma Stensland 3a8472e7e4 F-3896 F-6291: fix linked-list head overwrite leak in memory-bucket-optimizer and zeroize PUF key material on exit 2026-07-14 13:05:13 -06:00
Emma Stensland 1149b07ac5 F-1293 F-1700 F-1709 F-1710 F-2095 F-2096 F-2098 F-2102 F-2103 F-2896 F-3226 F-4128 F-4129 F-4602: fix socket, buffer, and object leaks in BLE, custom-io, can-bus, certfields, and TLS examples 2026-07-14 12:59:50 -06:00
Emma Stensland 7bdf89dd97 F-3220 F-3221 F-3696 F-4603 F-4604 F-4609: zeroize DTLS session and OCSP CA key buffers, fix exit codes and ocsp_resp leak 2026-07-14 09:50:18 -06:00
Emma Stensland 278736016e F-2115 F-3693 F-3890 F-3895 F-5608 F-5609 F-5613 F-6290 F-6537 F-6538: fix RPi-Pico, TOPPERS, PSK, lwIP, Mynewt, uTasker, wolfIP, and STSafe examples issues 2026-07-13 17:29:28 -06:00
Emma Stensland 1cedd247eb F-1723 F-1724 F-1725 F-2908 F-2910 F-2911 F-3461 F-3683 F-3684 F-3891 F-4605 F-4606 F-4607: fix CAAM, Renesas, SGX, and UEFI examples issues 2026-07-13 17:29:28 -06:00
Emma Stensland 9ac1bcbc4e F-1297: fix RSA signature verification check that always passed regardless of result 2026-07-13 16:39:01 -06:00
Emma Stensland 12ba640b3a F-1701 F-1292 F-3225 F-3902 F-1705: fix double-close, wrong-socket, and NULL-check bugs, and harden fd/session sentinel handling across DTLS, TLS, PSK, and CAN-bus examples 2026-07-13 16:39:01 -06:00
Emma Stensland b389087ed7 F-5610: fix ENC28J60 TLS server continuing past a NULL WOLFSSL session, and harden ESP32 socket/string handling 2026-07-13 16:39:01 -06:00
Emma Stensland 99cdfa1e3a F-1295 F-1697 F-3684 F-6287: fix duplicate wolfSSL_write call, wc_FreeDhKey double-free/key2 leak, fileSize dead-code checks, and unsigned keySz < 0 check 2026-07-10 16:56:42 -06:00
Emma Stensland 73d813efe4 F-2895 F-2897 F-2898 F-2899 F-3898: fix cipher suite string colons, nanosecond overflow arithmetic, and shutdown() call in lwIP 2026-07-10 16:56:42 -06:00
Emma Stensland ac4b7b574e F-1698 F-1699 F-2094 F-2097 F-3222 F-3465 F-3900 F-4130 F-4599 F-5611 F-6285: fix logic and conditional bugs 2026-07-10 16:56:42 -06:00
Paul Adelsbach a627f04342
Merge pull request #578 from SparkiDev/pqc_proxy_examples
PQC proxy
2026-07-10 16:06:09 -06:00
Paul Adelsbach 0d71d9887a
Merge pull request #581 from night1rider/fenrir-issue-4598
Return WANT_WRITE on EWOULDBLOCK in my_IOSend
2026-07-10 15:55:15 -06:00
Paul Adelsbach 1ea8602197
Merge pull request #582 from night1rider/fenrir-issue-2894
Give each PSK thread its own heap copy of connfd
2026-07-10 15:50:04 -06:00
Zackery bf7fb899af
Merge pull request #575 from dgarske/amebapro2-huk-example
Add RealTek AmebaPro2 (RTL8735B) HUK wolfCrypt example
2026-07-10 14:13:48 -06:00
David Garske aebd9198c4
Merge pull request #587 from night1rider/fenrir-issue-1301
Propagate failure from EVP decrypt_file error paths
2026-07-06 17:23:20 -07:00
David Garske 4a5b5c9f4d
Merge pull request #588 from night1rider/fenrir-issue-1294
Fix operator precedence in wolfSSL_connect return check
2026-07-06 17:23:00 -07:00
David Garske 2eec706d69
Merge pull request #586 from night1rider/fenrir-issue-1696
Fix NULL check after wolfSSL_new to test the returned ssl object
2026-07-06 17:22:51 -07:00
David Garske d9aa3545aa
Merge pull request #579 from stenslae/f-1289-1718-1707-fixes
F-1289 F-1718 F-1707 F-1705 oob write and null pointer fixes
2026-07-06 11:26:12 -07:00
David Garske c43acf442a rtl8735b: GCM-wrap the HUK ECDSA scalar (authenticated unwrap)
Provision the wrapped scalar with AES-GCM (iv + tag) instead of ECB, so a
tampered/corrupted/wrong-device blob fails at unwrap (AES_GCM_AUTH_E) rather than
yielding a garbage scalar. Matches the wc_Rtl8735b_EccKey iv/tag fields.
2026-07-02 16:43:55 -07:00
David Garske 2bf2c06056 rtl8735b: enable WOLF_CRYPTO_CB_COPY/FREE for HUK HMAC
The HUK HMAC accumulation buffer now lives on the inner SHA-256 devCtx and relies
on the cryptocb copy/free ops so wc_HmacCopy/wc_HmacFree manage it correctly.
2026-07-02 16:34:16 -07:00
David Garske 36af63f1dd Add RealTek AmebaPro2 (RTL8735B) HUK-in-TLS example
In-memory TLS 1.2 ECDHE-ECDSA handshake with the server certificate ECDSA P-256
signature produced on the HUK HW engine via a PK sign callback. The rest of TLS
(PRF/HMAC, record AES-GCM, ECDHE) stays in software: a whole-CTX WC_HUK_DEVID
would route TLS's own 32-byte HMAC keys (e.g. the P-256 ECDHE pre-master in the
PRF) to the HUK, whose key==seed semantics break key derivation. Validated on
RTL8735B silicon.
2026-07-02 16:18:01 -07:00
night1rider 2765b5a7d2 Return WANT_WRITE on EWOULDBLOCK in my_IOSend
wolfSSL's own send callback returns WANT_WRITE when a send would block; this one returned WANT_READ. It currently works because both are -2, but the send path should use WANT_WRITE.
2026-06-30 11:18:03 -06:00
night1rider 5b00968010 Give each PSK thread its own heap copy of connfd
Pass a per-connection malloc'd descriptor instead of the address of the reused stack variable connfd, which the next accept() could overwrite before the thread dereferences it; the thread frees it after copying.
2026-06-30 10:02:24 -06:00
night1rider f86be21227 Propagate failure from EVP decrypt_file error paths
Set a non-success ret before each error goto so the function no longer returns WOLFSSL_SUCCESS on failure, using AES_GCM_AUTH_E when EVP_DecryptFinal_ex rejects a tampered GCM tag, and correct the mislabeled perror strings.
2026-06-30 10:01:32 -06:00
night1rider 16b3986226 Fix NULL check after wolfSSL_new to test the returned ssl object
Check cli_ssl and srv_ssl instead of the unchanged cli_ctx/srv_ctx so a failed wolfSSL_new is detected rather than dereferenced.
2026-06-30 09:59:11 -06:00
night1rider 25e0ec5dd5 Fix operator precedence in wolfSSL_connect return check
Parenthesize the assignment so ret receives the actual return value rather than the boolean result of the != comparison.
2026-06-30 09:58:41 -06:00
Emma Stensland 2318302ba6 F-1289 F-1718 F-1707 oob write and null pointer fixes 2026-06-25 15:58:01 -06:00
David Garske 9bdd578564 Add RealTek AmebaPro2 (RTL8735B) HUK wolfCrypt example (AES, HMAC-SHA256, ECDSA) 2026-06-25 10:23:54 -07:00
Sean Parkinson 6ba3b3b7ef PQC proxy
Proxies that sit in front of a client and server that don't support PQC crypto algorithms.
2026-06-25 20:48:22 +10:00
Juliusz Sosinowicz 54f85adb37
Merge pull request #573 from helkoulak/ascon-examples
Ascon examples
2026-06-18 16:42:40 +02:00
Hosam Elkoulak cdcebdc1e2 move var declarations to the beginning of the block 2026-06-17 13:45:28 +02:00
Hosam Elkoulak 7744b613d7 Move declarations to the beginning of the block 2026-06-16 17:26:27 +02:00
Hosam Elkoulak 7727575e95 Fix logic when to opt out in case of empty password 2026-06-16 17:25:11 +02:00
Hosam Elkoulak c8d9c3b193 Add error checks for fseek and ftell function calls 2026-06-16 17:23:58 +02:00
Hosam Elkoulak 2da7daf2b9 Avoid overflowing the key array by providing a separate array for the password 2026-06-16 17:22:26 +02:00
Hosam Elkoulak 53855725f2 Zero byte files are now supported by Ascon file encrypt + fix for loop index, it should be defined as long as well for huge files 2026-06-12 17:29:15 +02:00
Hosam Elkoulak 7c26f5dbaf Decrypt in blocks and some fixes 2026-06-08 21:03:45 +02:00
Hosam Elkoulak c5584726bf Some more fixes 2026-06-05 18:50:48 +02:00
Hosam Elkoulak 04329e4aa1 Use goto instead of while loop 2026-05-30 00:04:14 +02:00
Hosam Elkoulak 6ffa7eac4c Fix input len at cleanup 2026-05-29 23:51:15 +02:00