This is probably the best explanation I've seen of what's going on and why so many servers and clients might be broken:
> Links to (on page 2):
>
>
http://tools.ietf.org/html/rfc4346#page-27>
http://rfc.net/rfc4217.html#p21>
> Any thoughts on this?
Now that's interesting. Section 12.6 of RFC 4217 (FTP over SSL/TLS), for
data connections, shows a "passive" shutdown of the SSL session, i.e. the
client shuts down the session (sending a 'close_notify' to the server);
the server does not reply with its own 'close_notify' alert.
_However_, Section 12.3, for the control connection, uses an _active_
shutdown (both client and server send their 'close_notify' alerts) when
the CCC command is used.
Which means, effectively, that the SSL session shutdown behavior is not
consistent; some behaviors lead to an active (bi-directional) shutdown,
some do not. No wonder implementations get this wrong (mod_tls gets it
wrong, as it tries to use the same shutdown sequence for all connections,
be they control, data, or CCC-cleared).