• 3rdp/build/cl-do-debug.patchsrc/sbbs3/ftpsrvr.c js_socket.c jsexec.c l

    From Deuc¨@VERT to Git commit to main/sbbs/master on Wed Dec 20 12:59:11 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/19bb57967c6d8355cb239185
    Added Files:
    3rdp/build/cl-do-debug.patch
    Modified Files:
    src/sbbs3/ftpsrvr.c js_socket.c jsexec.c load_cfg.c mailsrvr.c sbbs.version scfgdefs.h services.c ssl.c ssl.h websrvr.c
    Log Message:
    Fix TLS handbrake/hang/crash issue

    Private key objects in cryptlib are not copied into sessions when
    they're added, only the refcount is incremented. These objects
    contain a bignum context, which therefore ends up shared across all
    instances of the private key. Unfortunately, the locking is on the
    session context, not the private key objects, so shared bignum contexts
    can cause memory corruption.

    Further, even if the locking issue was fixed, the performance handbrake
    would still exists... activating sessions that use the same private key
    would be serialized, with the results we've been seeing lately.

    With this, each session gets a unique private key, which is loaded
    from the file. When a session is finished with the key, it is cached
    in a list with an epoch, so when the date on the key file changes, old
    private keys will be eliminated.

    While this solves a lot of issues, logging of certificate generation
    and loading issues has regressed to the point where it's effectively
    not done at all. Logging was previously passed back to the caller,
    but given the much longer call chain to get to where a cert is created,
    the extra parameters was just too much. Something better should be
    done here at some point.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net