Commit Graph
32 Commits
Author SHA1 Message Date
Brad ArantandClaude Sonnet 5 dfb33c0f16 Fix TCPServer::connectionRequest() unconditionally initializing TLS
connectionRequest() had a literal "if(true) { registerSocket(...);
acceptSocket(); }" guarding the TLS handshake setup for every accepted
connection, regardless of whether this TCPServer was ever given a
TLSInfo. TLS::createContext() only sets `ctx` when tlsInfo is non-NULL
(correctly guarded there) - so for any plain, non-TLS TCPServer, `ctx`
is left uninitialized, and this unconditional call reached
TLS::registerSocket() -> SSL_new(ctx) with garbage, segfaulting the
whole process on the very first connection.

Found while building APIServer (a new non-TLS HTTP server on top of
TCPServer) - confirmed via gdb (SIGSEGV inside SSL_new, called from
TLS::registerSocket, called from this exact line) that this affects ANY
non-TLS ServerCore-based server's first accepted connection, not
anything specific to the new code being tested against it.

Fixed by checking `tlsInfo` (already a TCPSocket-protected member this
class inherits) instead of the unconditional `true` - matches the guard
TLS::createContext() already uses correctly for the same distinction.

Verified live: before the fix, a non-TLS ApiServer segfaulted on the
first curl request every time; after, GET/HEAD/POST requests across
several real routes complete correctly and the server stays up for
repeated requests, including one that deliberately throws (confirming
the crash is really gone, not just less frequent).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 11:28:59 -07:00
Brad Arant 5feabd0fde TLS almost connects. Needs read and write logic finished. 2025-02-20 15:33:28 -08:00
Brad Arant e0c0e2c07e Some work - trying to catch up to where I was. 2025-02-19 16:18:50 -08:00
Brad Arant e9cf447512 TCPSession2 is gone. publish commands are gone but usable if you put them in your server. 2024-07-30 16:22:36 -07:00
Brad Arant a391882541 Made server a pointer for eliminating TCPSession2. 2024-07-30 15:59:25 -07:00
Brad Arant 6ded352265 Fixed merge for some reason. 2024-07-10 13:39:55 -07:00
Brad Arant b7deabc5dc Rework for TLS. 2024-07-10 13:30:18 -07:00
brad Arant 48e2c27c3c Wierd reason after pull of new branch. 2024-07-09 20:07:59 -07:00
Brad Arant b63b4785cf Synced up to Matts code. 2023-02-11 17:24:25 -08:00
Brad Arant d8eb3d7bb2 merged in publish handlers. 2023-02-09 11:38:09 -08:00
Brad Arant f1d019e1e0 updated stuff. 2023-02-07 20:07:12 -08:00
Brad 5821853007 nothing really 2023-02-08 03:38:48 +00:00
Brad 1e76a7f49a setup ignore update for .history files. 2023-02-08 03:31:51 +00:00
Brad Arant 0dc5d5738e Fixed writing issue during write to another socket. 2022-10-25 20:33:50 -07:00
Brad Arant 9af17daed6 Fixing command list delimiter depth. 2022-07-26 16:07:37 -07:00
Brad Arant 769606f01e an attempt 2022-04-11 21:06:21 -07:00
Brad Arant 3a6883e77f Cleaned up socket scheduling. Very clean now. 2022-03-15 21:02:35 +00:00
Brad Arant 03a3799888 Mods to improve stability for Zephora. 2022-03-14 18:48:58 +00:00
Brad Arant 96d9295df8 Optimizations. 2021-09-23 16:28:32 -07:00
Brad Arant ec39c1df1a Added subscription service capability. 2021-08-31 17:57:21 -07:00
barant 608f8a2b0c Update changes. 2021-08-14 15:03:43 -07:00
Brad Arant b16e2e1a1b Compiles. 2021-08-10 14:07:50 -07:00
Brad Arant 20d5c99517 Working Version 2021-08-07 11:47:54 -07:00
Brad Arant 46f98dff69 Many changes 2021-08-05 13:07:53 -07:00
barant 50bbfcc3c3 Got it to compile. 2021-07-23 16:42:50 -07:00
barant d445834af6 Many changes to ServerCore 2021-07-23 08:57:27 -07:00
Brad Arant bcea21cf96 Got it compiling and somewhat working, except post. 2020-11-29 13:57:06 -08:00
barant b4ab5fb86a New build. 2020-04-13 09:40:58 -07:00
barant a5a51f8aae Major changes to socket scheduling in EPoll. 2020-02-29 19:27:58 -08:00
barant d373a2e4a0 Alsmost TLS 2019-09-21 13:07:18 -07:00
barant 43a24b900a TLS work. Not done. 2019-09-20 20:25:45 -07:00
barant a40f7314a8 Elimination of Service object, 2019-09-18 18:32:15 -07:00