Commit Graph
51 Commits
Author SHA1 Message Date
Sergio R. Caprile 4536694f20 Fix 2-way auth, fix skip hostname validation 2025-09-26 13:40:15 -03:00
Sergey Lyubka 9fd87060f9 Verify host against CN, too 2025-08-12 15:49:08 +01:00
Sergey Lyubka 9f76ea8030 CHACHA20 -> MG_ENABLE_CHACHA20 2025-08-12 08:42:20 +01:00
Sergio R. Caprile e670ea3d61 fix possible overflow, improve tests 2025-07-31 13:43:18 -03:00
Sergio R. Caprile aa76f5673b ChaCha20 not working in S390 (bigendian) 2025-07-30 16:13:34 -03:00
Sergio R. Caprile 52ab6bc499 make it C89-friendly 2025-07-07 15:15:31 -03:00
Sergey Lyubka 074ef5197b Introduce mg_calloc 2025-06-24 10:52:44 +01:00
Sergio R. Caprile d6fdfe5b1b avoid ASAN reporting read overflows 2025-06-05 17:26:56 -03:00
Sergio R. Caprile 1f48b1ca65 flush TLS buffer 2025-05-23 14:04:59 -03:00
Sergio R. Caprile fadf28adb4 Make built-in TLS play fair to TCP
Handshake functions in Mongoose TLS assumed data was being fully sent
after calling mg_io_send(). This was in fact the case with the usual 1460-bytes MSS, but not with the default 536-bytes MSS.
This PR removes all those calls from individual handshake functions, actual send is done at the main handshake function, keeping track of the amount of data sent, and so handling small MTUs/MSSs and possible MG_IO_WAITs when running over a socket layer.
2025-05-22 14:45:46 -03:00
Sergio R. Caprile cc8ecc5a42 stronger bounds checking 2025-05-12 18:13:41 -03:00
Sergio R. Caprile c1849c2b19 fix IO_WAIT on send for builtin TLS and MbedTLS 2025-03-11 16:14:12 -03:00
Sergio R. Caprile 8906b1ac0f Merge pull request #3025 from cesanta/ub
fix UB and possible exception trigger
2025-03-07 13:49:37 -03:00
Sergey Lyubka b50081a83b TLS verification 2025-02-10 15:36:29 +00:00
Sergio R. Caprile ce1a70e2dc fix error msg 2025-01-29 10:15:45 -03:00
Sergio R. Caprile a0d9b6a7e0 fix UB and possible HF trigger 2025-01-28 10:24:59 -03:00
Sergio R. Caprile b8b3a5c305 fix built-in TLS not calling MG_EV_TLS_HS; uniformize mg_tls_init() 2025-01-27 10:54:56 -03:00
Sergio R. Caprile 317591bc8a improve TLS testing 2025-01-17 14:07:49 -03:00
Sergio R. Caprile 7fc96a61ad fix mg_tls_pending 2024-12-16 16:03:36 -03:00
Sergey Lyubka 19cbb27b4c Fix TLS handling in net_builtin 2024-12-15 13:32:19 +00:00
Sergey Lyubka 93dd7a85f6 Fix IP fragmentation checks for big-endian CPUs 2024-10-04 16:18:33 +01:00
Sergey Lyubka 683f65f8ac Make mg_random() fallible. Abort TLS on weak RNG 2024-09-02 11:06:10 -03:00
Sergey Lyubka 641c7d1967 MG_IO_SIZE=256 on embedded platforms 2024-08-30 15:52:14 -03:00
Sergio R. Caprile fe77075996 Refactor tls receive pointer scheme 2024-07-26 12:15:05 -03:00
Sergio R. Caprile 4d6b126b9d unbreak after incorrect cleanup 2024-07-26 12:14:33 -03:00
Sergio R. Caprile 5a8c56e784 Misc TLS cleanups 2024-07-25 19:01:35 -03:00
Sergey Lyubka 4b49c63344 Make net_builtin send client TLS HS 2024-07-23 18:47:48 +01:00
Sergio R. Caprile d46798c2a7 silence cast and c++ warnings) 2024-07-08 17:02:54 -03:00
Sergey Lyubka ddf3ba8a15 Squash vc98 chacha warnings 2024-07-07 10:29:52 +01:00
Sergio R. Caprile 00862344f7 fix stack trashing 2024-07-03 14:44:51 -03:00
Sergey Lyubka df257a8e8a Add mtls and chacha20 2024-06-09 17:43:49 +01:00
Sergio R. Caprile ab75bfa6e7 bring mg_strdup() back 2024-05-31 17:45:53 -03:00
Sergio R. Caprile 3c531897b6 cleanup 'str' API 2024-05-09 14:10:27 -03:00
Sergey Lyubka 2def6e867d Reduce stack usage in mg_tls_hexdump() 2024-05-09 15:48:55 +01:00
Sergey Lyubka e6bf658271 Fix #2685 - squash warnings in tls_builtin 2024-04-17 07:32:51 +01:00
Sergey Lyubka e0e599ffa1 Fix #2612 - struct mg_str::ptr -> buf 2024-04-16 22:42:45 +01:00
Sergey Lyubka d094e090ff Squash warnings 2024-03-27 08:58:48 +00:00
Sergey Lyubka e4cd6bd824 Cleanup debugging leftovers 2024-03-26 11:33:59 +00:00
Sergey Lyubka ba678b9ad1 TLS client implementation 2024-03-25 19:20:40 +00:00
Sergey Lyubka f883504d2d Fix #2573 - GCC build warning in tls_builtin.c::mul() 2024-01-20 08:51:01 +00:00
Sergey Lyubka 0ad4002569 Make TLS less verbose 2024-01-14 23:27:52 +00:00
Sergey Lyubka dfc2e97d5e Squash warning 2024-01-14 22:10:18 +00:00
Sergey Lyubka 06f8238107 Fix TLS codepath for pending data. Reuse c->rtls 2023-12-22 16:17:06 +00:00
Sergio R. Caprile 285dc63c5c reformat comments 2023-12-20 16:40:31 -03:00
Sergey Lyubka a0e66fb9e6 Add built-in TLS 1.3 stack: server side, EC support 2023-12-20 11:04:31 +00:00
cpq 144c2f443e TLS layer: c->rtls to optimise recvd TLS data 2023-12-10 12:18:07 +00:00
Sergio R. Caprile bb5aba2e19 Make tls_builtin build with current API 2023-11-03 14:02:41 -03:00
Sergio R. Caprile face6c44c6 SAME54 Ethernet driver
Add tls_builtin.c
2023-08-10 18:59:23 -03:00
Sergio R. Caprile 3721bcc790 Revert "Foo" 2023-08-10 17:48:55 -03:00
cpq 8005a5e687 Changes 2023-08-04 13:53:01 +01:00