Skip to content

Commit

Permalink
ssl: Document TLS alerts in ssl_error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
essen committed Nov 19, 2024
1 parent b29cbe0 commit 253a7e6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/ssl/src/ssl.erl
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,18 @@ An option that can be supplied to a TLS server.
The type for the messages that are delivered to the owner of a
TLS/DTLS socket in active mode.
The `ssl_error` reason may convey a TLS protocol alert if such an event occurs
after the connection has been established. The most common case when this will
happen is on the client side when a TLS-1.3 server requests a client certificate
and the provided certificate is not accepted by the server, as it will be
verified after the server has sent its last handshake message.
The `ssl_passive` message is sent only when the socket is in `{active, N}` mode
and the counter has dropped to 0. It indicates that the socket has transitioned
to passive (`{active, false}`) mode.
""".
-type active_msgs() :: {ssl, sslsocket(), Data::binary() | list()} | {ssl_closed, sslsocket()} |
{ssl_error, sslsocket(), Reason::any()} | {ssl_passive, sslsocket()}. % exported
{ssl_error, sslsocket(), Alert::error_alert() | Reason::any()} | {ssl_passive, sslsocket()}. % exported

-doc(#{title => <<"Socket">>}).
-doc """
Expand Down

0 comments on commit 253a7e6

Please sign in to comment.