summaryrefslogtreecommitdiff
path: root/doc/tex/alert.tex
blob: 74c6740de7a63d91088ced48e1e95505f849e55f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
\section{The TLS alert protocol}
\label{alert}

The Alert\index{TLS protocols!Alert} protocol
is there to allow signals to be sent between peers.
These signals are mostly used to inform the peer about the cause of
a protocol failure. Some of these signals are used internally by the
protocol and the application protocol does not have to cope with them
(see \emph{GNUTLS\_A\_CLOSE\_NOTIFY}), and others refer to the
application protocol solely (see \emph{GNUTLS\_A\_USER\_CANCELLED}).
An alert signal includes a level indication which may be either
fatal or warning. Fatal alerts always terminate the current connection,
and prevent future renegotiations using the current session ID.

\par The alert messages are protected by the record protocol, thus
the information that it's included does not leak. You must take
extreme care for the alert information not to leak, to a possible attacker
(via public log files etc).

\par
\begin{itemize}
\item \printfunc{gnutls_alert_send}{gnutls\_alert\_send}:
to send an alert signal.
\item \printfunc{gnutls_error_to_alert}{gnutls\_error\_to\_alert}:
to map a gnutls error number to an alert signal.
\item \printfunc{gnutls_alert_get}{gnutls\_alert\_get}:
returns the last received alert.
\item \printfunc{gnutls_alert_get_name}{gnutls\_alert\_get\_name}:
returns the name (in a character array) of the given alert.
\end{itemize}