img6.png img7.png gnutls-logo.ps layers.ps
TEX_OBJECTS = gnutls.tex ../../lib/gnutls-api.tex serv1.tex ex1.tex ex2.tex ex3.tex fdl.tex \
- macros.tex cover.tex ciphersuites.tex resumedb.tex translayer.tex asn1.tex ../../lib/asn1-api.tex \
+ macros.tex cover.tex ciphersuites.tex handshake.tex translayer.tex asn1.tex ../../lib/asn1-api.tex \
auth.tex ciphers.tex errors.tex layers.tex
gnutls.ps: $(TEX_OBJECTS)
\par
The following authentication schemas are supported in \gnutls:
\begin{enumerate}
- \item Certificate Authentication
+ \item Certificate authentication
\item Anonymous authentication
\item SRP authentication
\end{enumerate}
\\
\hline
DHE\_DSS & The DSS\footnote{DSS stands for Digital Signature Standard} algorithm is used to sign Ephemeral Diffie Hellman
-parameters which are send to the peer. Currently \gnutls{} does not support this ciphersuite.
+parameters which are send to the peer.
\\
\hline
\end{tabular}
The Handshake Protocol of \tlsI{} negotiates cipher suites
of the form \\
{\bf TLS\_DHE\_RSA\_WITH\_3DES\_CBC\_SHA}.
-The cipher suites contain three parameters:
+The usual cipher suites contain these parameters:
\begin{itemize}
\item The key exchange algorithm (DHE\_RSA in the example)
\item The Symmetric encryption algorithm and mode (3DES\_CBC in this
\par
\gnutls{} implements the above
protocols in a reentrant way. This allows multiple threads of
-execution, without the need for Critical Sections and locks. See
+execution, without the need for critical sections and locks. See
\htmladdnormallink{http://www.gnutls.org/}{http://www.gnutls.org/}
and \htmladdnormallink{http://www.gnu.org/software/gnutls/}{http://www.gnu.org/software/gnutls/}
for updated versions of the \gnutls{} software and this document.
\input{ciphers}
-\input{resumedb}
-
\input{translayer}
+\input{handshake}
+
\input{errors}
\section{Client examples}
-\section{Resuming Sessions}
+\section{The handshake protocol}
+
+The Handshake protocol is fully controlled by application layer (your
+program). Within this protocol the parameters for cipher suites, supported
+authentication methods etc. are negotiated. Thus the application layer
+has to set up the required parameters for the connection.
+See the following functions:
+\begin{itemize}
+\item \printfunc{gnutls_cipher_set_priority}{gnutls\_cipher\_set\_priority()}:
+to set the priority of bulk cipher algorithms.
+\item \printfunc{gnutls_mac_set_priority}{gnutls\_mac\_set\_priority()}:
+to set the priority of MAC algorithms.
+\item \printfunc{gnutls_kx_set_priority}{gnutls\_kx\_set\_priority()}:
+to set the priority of key exchange algorithms.
+\item \printfunc{gnutls_compression_set_priority}{gnutls\_compression\_set\_priority()}:
+to set the priority of compression methods.
+\item \printfunc{gnutls_cert_type_set_priority}{gnutls\_cert\_type\_set\_priority()}:
+to set the priority of certificate types (ie. OpenPGP, X.509).
+\item \printfunc{gnutls_protocol_set_priority}{gnutls\_protocol\_set\_priority()}:
+to set the priority of protocol versions (ie. \sslIII{}, \tlsI).
+\item \printfunc{gnutls_cred_set}{gnutls\_cred\_set()}: to set the
+appropriate credentials structures.
+\item \printfunc{gnutls_certificate_server_set_request}
+{gnutls\_certificate\_server\_set\_request()}: to set
+whether client certificate is required or not.
+\item \printfunc{gnutls_handshake}{gnutls\_handshake()}: to initiate the
+handshake.
+\end{itemize}
+
+\subsection{Resuming Sessions}
\par
The
-\hyperref{gnutls\_handshake()}{gnutls\_handshake() (see Section }{)}{gnutls_handshake}
+\printfunc{gnutls_handshake}{gnutls\_handshake()}
function, is expensive since a lot of calculations are performed. In order to support many fast connections to
the same server a client may use session resuming. {\bf Session resuming} is a
feature of the {\bf TLS} protocol which allows a client to connect to a server,
\hyperref{gnutls\_alert\_send\_appropriate()}{gnutls\_alert\_send\_appropriate() (see Section }{)}{gnutls_alert_send_appropriate}
and
\hyperref{gnutls\_alert\_get()}{gnutls\_alert\_get() (see Section }{)}{gnutls_alert_get}.
+The alert protocol is above the record protocol.
\par
The Handshake protocol is responsible for the security parameters'
\newcommand{\sslII}{{\emph{SSL 2.0}}}
\newcommand{\ssl}{{\emph{SSL}}}
\newcommand{\HRule}{\rule{\linewidth}{0.4mm}}
+
+% accepts section name, function name
+\newcommand{\printfunc}[2]{%
+ \hyperref{#2}{#2 (see Section }{)}{#1}
+}
+
By default, if none of the above functions are called, gnutls will use
the berkeley sockets functions \emph{recv()} and \emph{send()}. In this case
gnutls will use some hacks in order for \emph{select()} to work, thus
-making easy to add \tls support to existing servers.
-
-
+making easy to add \tls{} support to existing servers.