• src/sbbs3/ssl.c

    From Deucе@VERT to Git commit to main/sbbs/master on Tue Jan 9 09:15:22 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/7d157b980e97dbb87258b49e
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    You can't just screw around with a pair of shared linked lists
    without locking! That's chaos!

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Tue Jan 9 09:18:47 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/4050fabe5ff89660555f9183
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    Eliminate LOR introduced in previous commit.

    Since lock_ssl_cert() is a reader lock, there shouldn't be a whole
    lot of contention on aquiring it anyway, and we can thundering herd
    our way out of it when it clears.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Jan 19 12:09:37 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/88bbe26bf67384f213df0dc1
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    Use new rwlock for ssl certificate.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to Git commit to main/sbbs/master on Fri Jan 19 12:09:37 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/c2499626c59ea535f8dc2b5e
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    Merge branch 'use-rwlock' into 'master'

    Use new rwlock for ssl certificate.

    See merge request main/sbbs!386

    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Jan 19 16:22:20 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/c47e29612c1f78bf1bb835ba
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    Clean up and push down locks.

    Now each lock has an easily understandable purpose, and covers the
    lowest possible amount of code.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Fri Jan 19 16:30:19 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/9fdb5950548fe41960d8bbe0
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    Fix GCC warnings

    warning: value computed is not used

    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Jan 19 16:49:50 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/5e3c60b9a154ee1e64710f83
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    Have get_sess_list_entry() verify the correct epoch

    With this, it's not strictly necessary to clear cert_list in ssl_sync()
    when the certificate changes, but it's still a good idea to prevent
    unusable memory from being held onto.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Jan 19 16:49:50 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/a437c173ec7c7dfa35625e2e
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    May as well make sure internal_do_cryptInit() actually works.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Mon Jan 22 14:57:23 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/0700951f70912e516305c181
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    Mutex-protect access to cryptfail.

    Totally not sketchy, trust me.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Mon Jan 22 19:40:40 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/0aa72717d5701c3d52259674
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    Friendly cryptlib version check failure handling

    <Deuce> Feel free to not lock the mutex and never free/NULLify that string. <Deuce> Should be nicer for people with separate logs, and a few bytes never hurt anyone.

    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Feb 7 23:00:19 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/bffceeba0fcdcacfd828351e
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    asprintf() on Linux does not guarantee to set the ptr to NULL on error.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Mar 5 11:31:02 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/b5b3769123c99c8500377ebc
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    Don't set cryptlib_initialized = true until the init is complete

    is_crypt_initialized() does not depend on the once value.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Mar 5 11:36:29 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/fea518c7ae55a66649a81068
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    assert() pthread_mutex assumptions in ssl.c

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Thu Mar 6 12:50:07 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/2adf8468d63418b04cef9c2d
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    Log a (notice-level) message when creating a self-signed cert

    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Mar 7 17:32:19 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/3122a36b6b0bad4296401ab3
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    Fix failure handing in crypt initialization.

    Don't add the atexit() do_cryptEnd() handler until we're not going
    to call cryptEnd() ourselves.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sun Mar 9 06:51:55 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/d1c741d07362a4a3327532f7
    Modified Files:
    src/sbbs3/ssl.c
    Log Message:
    Incremental backoff on loading SSL cert

    Try for 16 seconds (14 loops) to load the SSL certificate.

    On the first time through the loop, create self-signed certificate
    if configured to do so.

    This also splits the generation of the self-signed certificate into
    a separate function.

    While we're here, split the new SSL epoch out into a separate function
    as well, and explicitly call it when we create a new self-signed
    cert. This at least partially fixes the epoch thing, but there's
    still the possibility of creating it multiple times in the same
    second... the file date isn't really enough.

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