https://gitlab.synchro.net/main/sbbs/-/commit/76bffee6fc3abb7d1b82b208
Modified Files:
src/ssh/ssh-auth.c src/ssh/test/dssh_test_internal.h test_auth.c
Log Message:
ssh-auth.c: DSSH_TESTABLE + direct server parse tests (17 new)
Make auth_server_impl, get_methods_impl, auth_password_impl,
auth_kbi_impl, and auth_publickey_impl DSSH_TESTABLE for direct
testing from the main thread without needing a server thread.
Add direct_server_test() helper: injects SERVICE_REQUEST + crafted USERAUTH_REQUEST into c2s, closes c2s, calls auth_server_impl
directly. No threads, deterministic coverage.
17 server-side parse/state tests:
- Password: no boolean, no pw_len, pw overflow, change no new_pw,
change new_pw overflow
- Publickey: no has_sig, no algo_len, algo overflow, no pk_len,
pk overflow, sig no sig_len, sig overflow
- Wrong first message type (not SERVICE_REQUEST)
- Short/overflow SERVICE_REQUEST payload
- Long username (>255, truncation ternary)
- NULL username_out_len parameter
Co-Authored-By: Claude Opus 4.6 (1M context) <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net