• src/ssh/deucessh-lang.hsrc/ssh/README.md TODO.md deucessh.h ssh-auth.c

    From Deuc¿@VERT to Git commit to main/sbbs/master on Mon Mar 30 10:39:12 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/753f3fd5ec67a958e6001e0a
    Added Files:
    src/ssh/deucessh-lang.h
    Modified Files:
    src/ssh/README.md TODO.md deucessh.h ssh-auth.c ssh-conn.c ssh-internal.h ssh-trans.c ssh-trans.h ssh.c src/ssh/test/dssh_test_internal.h test_enc.c test_mac.c
    Log Message:
    API cleanup: items 93, 97, 100 + internal type hygiene

    Item 93: Create deucessh-lang.h public header for language registration. Languages are external-only (apps parse language tags); moved struct,
    typedef, _Static_assert, and dssh_transport_register_lang() from
    ssh-trans.h to new public header following deucessh-comp.h pattern.

    Item 97: Document dssh_parse_uint32/dssh_serialize_uint32 return values
    in deucessh.h and README.md.

    Item 100: Replace dssh_session/dssh_channel typedefs with struct
    pointers in all internal code (ssh-internal.h, ssh.c, ssh-trans.c,
    ssh-auth.c, ssh-conn.c). Public headers keep typedefs for the
    external API. Remove deucessh-conn.h include from ssh-trans.c; add dssh_session_stop() forward declaration to ssh-internal.h.

    Additional cleanup from the audit:
    - Remove dead dssh_transport_state/dssh_transport_global_config pointer
    typedefs from ssh-trans.h (defined but never used).
    - Replace callback typedefs in internal struct fields with raw function
    pointer types (ssh-internal.h, ssh-trans.h). Drop deucessh.h include
    from ssh-trans.h and ssh-internal.h; add forward declaration of
    struct dssh_session_s in ssh-trans.h.
    - Fix TOCTOU race on 5 callback invocation sites: snapshot function
    pointer into a local before NULL check to prevent use-after-clear if
    a setter races with the demux thread. ssh-auth.c handle_banner()
    already had this pattern; now terminate_cb, debug_cb, unimplemented_cb,
    global_request_cb, and window_change_cb all do the same.

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net