• src/sbbs3/ssl.c

    From Rob Swindell (on Windows 11)@1:103/705 to Git commit to main/sbbs/master on Wednesday, November 11, 2026 11:49:26
    https://gitlab.synchro.net/main/sbbs/-/commit/72f4ea568a7c43de6dd2479a
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    ssl: don't clear the shared cert_path when a certificate load fails

    get_ssl_cert() and create_self_signed_cert() zeroed the static
    cert_path on failure, without a lock, while other threads could be in get_ssl_cert()'s retry loop. Those threads then tried to open "" for
    the rest of their retries, so one transient failure to read ssl.cert
    (e.g. from an overloaded network share) failed every TLS session being
    set up at the time:

    get_ssl_cert: Failed to open/read TLS certificate:
    SMTPS ERROR 'Data has not been initialised' (-11) setting private key
    SMTPS !Unable to set private key

    The path never changes once set, so leave it alone on failure, and set
    it under tls_cert_file_date_lock in ssl_sync(), which every reader of
    cert_path has already passed through.

    The clears date from 976801798b (2023-12-20) and d1c741d073
    (2025-03-09).

    Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
    --- SBBSecho 3.38-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)