mirror of
https://github.com/jhillyerd/inbucket.git
synced 2026-10-29 05:32:31 +00:00
9876bb2bd9
The TLS connection state lived on the shared POP3 Server, and Session reached it through its embedded *Server. Once any client completed STLS, every later session saw a non-nil state: CAPA stopped advertising STLS and the STLS command returned "-ERR A TLS session already agreed upon." until the server restarted. Sessions also wrote the shared field concurrently without synchronization. Move tlsState to Session. ForceTLS sessions set it when the session starts, and STLS sets it on the negotiating session only. TestSTLSPerSession runs CAPA, STLS and a TLS handshake on two sessions of one server; it fails against the previous code on the second session. Signed-off-by: Antoine Deschênes <antoine@antoinedeschenes.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>