summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2002-06-15 20:36:23 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2002-06-15 20:36:23 +0000
commit7596768b33aa9408200b5f897192b03563a21261 (patch)
tree60e8525761a5b65fb1bddd0391b6cf75548483b4
parentb842a29cb65beca15188a780e4d6b6d343e7a4e6 (diff)
downloadgnutls-7596768b33aa9408200b5f897192b03563a21261.tar.gz
*** empty log message ***
-rw-r--r--doc/tex/alert.tex9
-rw-r--r--doc/tex/ciphers.tex4
-rw-r--r--doc/tex/errors.tex6
-rw-r--r--doc/tex/examples.tex2
-rw-r--r--doc/tex/handshake.tex27
-rw-r--r--doc/tex/layers.tex14
-rw-r--r--doc/tex/macros.tex2
-rw-r--r--doc/tex/memory.tex2
-rw-r--r--doc/tex/record.tex13
-rw-r--r--doc/tex/translayer.tex28
10 files changed, 60 insertions, 47 deletions
diff --git a/doc/tex/alert.tex b/doc/tex/alert.tex
index 1a70b3e88f..b69635348f 100644
--- a/doc/tex/alert.tex
+++ b/doc/tex/alert.tex
@@ -1,4 +1,5 @@
\section{The TLS alert protocol}
+\label{alert}
The Alert\index{Alert protocol} protocol
is there to allow signals to be sent between peers.
@@ -18,13 +19,13 @@ extreme care for the alert information not to leak, to a possible attacker
\par
\begin{itemize}
-\item \printfunc{gnutls_alert_send}{gnutls\_alert\_send()}:
+\item \printfunc{gnutls_alert_send}{gnutls\_alert\_send}:
to send an alert signal.
-\item \printfunc{gnutls_alert_send_appropriate}{gnutls\_alert\_send\_appropriate()}:
+\item \printfunc{gnutls_alert_send_appropriate}{gnutls\_alert\_send\_appropriate}:
to send an alert signal that depends on a given gnutls error number.
-\item \printfunc{gnutls_alert_get}{gnutls\_alert\_get()}:
+\item \printfunc{gnutls_alert_get}{gnutls\_alert\_get}:
returns the last received alert.
-\item \printfunc{gnutls_alert_get_name}{gnutls\_alert\_get\_name()}:
+\item \printfunc{gnutls_alert_get_name}{gnutls\_alert\_get\_name}:
returns the name (in a character array) of the given alert.
\end{itemize}
diff --git a/doc/tex/ciphers.tex b/doc/tex/ciphers.tex
index 60894e1ac2..ea5e18be60 100644
--- a/doc/tex/ciphers.tex
+++ b/doc/tex/ciphers.tex
@@ -4,7 +4,7 @@ Confidentiality is provided by using block encryption algorithms like {\bf 3DES}
{\bf AES\footnote{AES or Advanced Encryption Standard is actually the RIJNDAEL algorithm. This is the
algorithm that will replace DES.}}, or
stream algorithms like {\bf ARCFOUR\footnote{ARCFOUR is a compatible
-algorithm with RSA's RC4 algorithm, which is considered as a trade secret.}} See \hyperref{fig:ciphers}{figure }{}{fig:ciphers} for a complete list.
+algorithm with RSA's RC4 algorithm, which is considered to be a trade secret.}} See \hyperref{fig:ciphers}{figure }{}{fig:ciphers} for a complete list.
Ciphers are encryption algorithms that use a single (secret) key
to encrypt and decrypt data. Block algorithms in TLS also provide protection
against statistical analysis of the data. \gnutls{} makes use of this property
@@ -16,7 +16,7 @@ actual data size.
\begin{tabular}{|l|p{9cm}|}
\hline
-3DES\_CBC & 3DES\_CBC is the DES block cipher algorithm used with multiple (triple)
+3DES\_CBC & 3DES\_CBC is the DES block cipher algorithm used with triple
encryption (EDE). Has 64 bits block size and is used in CBC mode.
\\
\hline
diff --git a/doc/tex/errors.tex b/doc/tex/errors.tex
index abc4fd49da..08c127c76a 100644
--- a/doc/tex/errors.tex
+++ b/doc/tex/errors.tex
@@ -1,4 +1,4 @@
-\section{\index{Error handling}}
+\section{Error handling\index{Error handling}}
\par
In \gnutls{} most functions return an integer type as a result.
In almost all cases a zero or a positive number means success, and
@@ -12,11 +12,11 @@ a fatal error code is GNUTLS\_E\_DECRYPTION\_FAILED. Non-fatal errors
may warn about something, ie a warning alert was received, or
indicate the some action has to be taken. This is the case with
the error code GNUTLS\_E\_REHANDSHAKE returned by
-\hyperref{gnutls\_record\_recv()}{gnutls\_record\_recv() (see Section }{)}{gnutls_record_recv}.
+\printfunc{gnutls_record_recv}{gnutls\_record\_recv}.
This error code indicates that the server requests a rehandshake. The client
may ignore this request, or may reply with an alert.
You can test if an error code is a fatal one by using the
-\hyperref{gnutls\_error\_is\_fatal()}{gnutls\_error\_is\_fatal() (see Section }{)}{gnutls_error_is_fatal}.
+\printfunc{gnutls_error_is_fatal}{gnutls\_error\_is\_fatal}.
\par
If any non fatal errors, that require an action, are to be returned by a
function, these error codes will be documented
diff --git a/doc/tex/examples.tex b/doc/tex/examples.tex
index c1b12e7ffa..03f03ce69c 100644
--- a/doc/tex/examples.tex
+++ b/doc/tex/examples.tex
@@ -17,7 +17,7 @@ The following function does check the peer's
X.509 certificate, and prints some information about the current state.
\par
This function should be called after a successful
-\hyperref{gnutls\_handshake()}{gnutls\_handshake() (see Section }{)}{gnutls_handshake}
+\printfunc{gnutls_handshake}{gnutls\_handshake}
\input{ex3}
diff --git a/doc/tex/handshake.tex b/doc/tex/handshake.tex
index d63a01c773..408d134ef5 100644
--- a/doc/tex/handshake.tex
+++ b/doc/tex/handshake.tex
@@ -1,4 +1,5 @@
\section{The TLS handshake protocol\index{Handshake protocol}}
+\label{handshake}
The Handshake protocol is fully controlled by application layer (your
program). Within this protocol the parameters for cipher suites, supported
@@ -6,24 +7,24 @@ 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()}:
+\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()}:
+\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()}:
+\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()}:
+\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()}:
+\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()}:
+\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
+\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
+{gnutls\_certificate\_server\_set\_request}: to set
whether client certificate is required or not.
-\item \printfunc{gnutls_handshake}{gnutls\_handshake()}: to initiate the
+\item \printfunc{gnutls_handshake}{gnutls\_handshake}: to initiate the
handshake.
\end{itemize}
@@ -32,7 +33,7 @@ handshake.
\subsection{Resuming Sessions\index{Resuming sessions}}
\par
The
-\printfunc{gnutls_handshake}{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,
@@ -62,9 +63,9 @@ nesessary parameters. See the functions:
The server side is different. A server has to specify some callback functions
which store, retrieve and delete session data. These can be registered with:
\begin{itemize}
-\item \printfunc{gnutls_db_set_remove_function}{gnutls\_db\_set\_remove\_function}
-\item \printfunc{gnutls_db_set_store_function}{gnutls\_db\_set\_store\_function}
-\item \printfunc{gnutls_db_set_retrieve_function}{gnutls\_db\_set\_retrieve\_function}
+\item \printfunc{gnutls_db_set_remove_func}{gnutls\_db\_set\_remove\_func}
+\item \printfunc{gnutls_db_set_store_func}{gnutls\_db\_set\_store\_func}
+\item \printfunc{gnutls_db_set_retrieve_func}{gnutls\_db\_set\_retrieve\_func}
\item \printfunc{gnutls_db_set_ptr}{gnutls\_db\_set\_ptr}
\end{itemize}
diff --git a/doc/tex/layers.tex b/doc/tex/layers.tex
index 4485e17703..5ca2b8db5a 100644
--- a/doc/tex/layers.tex
+++ b/doc/tex/layers.tex
@@ -7,26 +7,22 @@ is to serve all other protocols and is above the transport layer.
The Record protocol offers symmetric encryption, data authenticity, and
optionally compression.
In \gnutls{} the record protocol is accessed using the
-\hyperref{gnutls\_record\_recv()}{gnutls\_record\_recv() (see Section }{)}{gnutls_record_recv} and
-\hyperref{gnutls\_record\_send()}{gnutls\_record\_send() (see Section }{)}{gnutls_record_send}
+\printfunc{gnutls_record_recv}{gnutls\_record\_recv} and
+\printfunc{gnutls_record_send}{gnutls\_record\_send}
functions.
\par
The Alert protocol offers some signaling to the other protocols. It can
help informing the peer for the cause of failures and other error
-conditions. See
-\hyperref{gnutls\_alert\_send()}{gnutls\_alert\_send() (see Section }{)}{gnutls_alert_send},
-\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}.
+conditions. See section \ref{alert} on page \pageref{alert} for more information.
The alert protocol is above the record protocol.
\par
The Handshake protocol is responsible for the security parameters'
negotiation, the initial key exchange and
authentication. See \hyperref{figure}{figure }{}{fig:cert} for the
-protocol layering in TLS. See the
-\hyperref{gnutls\_handshake()}{gnutls\_handshake() (see Section }{)}{gnutls_handshake} function.
+protocol layering in TLS.
+See section \ref{handshake} on page \pageref{handshake} for more information.
\begin{figure}[hbtp]
\includegraphics{layers}
diff --git a/doc/tex/macros.tex b/doc/tex/macros.tex
index 403e062833..adecaa79b7 100644
--- a/doc/tex/macros.tex
+++ b/doc/tex/macros.tex
@@ -10,6 +10,6 @@
% accepts section name, function name
\newcommand{\printfunc}[2]{%
- \hyperref{#2}{#2 (see section }{ p. \pageref{#1})}{#1}
+ \hyperref{#2}{#2() (see section }{ p. \pageref{#1})}{#1}
}
diff --git a/doc/tex/memory.tex b/doc/tex/memory.tex
index 4b81f5b2ad..b632a2e53d 100644
--- a/doc/tex/memory.tex
+++ b/doc/tex/memory.tex
@@ -5,7 +5,7 @@ on the sensitivity of the data they contain. However for performance
reasons, the default memory functions do not overwrite sensitive data from
memory, nor protect such objects from being written to the swap.
In order to change the default behaviour the
-\printfunc{gnutls_global_set_mem_func}{gnutls\_global\_set\_mem\_func()}
+\printfunc{gnutls_global_set_mem_func}{gnutls\_global\_set\_mem\_func}
\\
function is available which can be used to set other memory
handlers than the defaults.
diff --git a/doc/tex/record.tex b/doc/tex/record.tex
index e16a730482..d6c4292cdd 100644
--- a/doc/tex/record.tex
+++ b/doc/tex/record.tex
@@ -5,11 +5,20 @@ to encrypt and authenticate packets.
The following functions are available:
\par
\begin{itemize}
-\item \printfunc{gnutls_record_send}{gnutls\_record\_send()}:
+\item \printfunc{gnutls_record_send}{gnutls\_record\_send}:
to send an record packet (with application data).
-\item \printfunc{gnutls_record_recv}{gnutls\_record\_recv()}:
+\item \printfunc{gnutls_record_recv}{gnutls\_record\_recv}:
to receive a record packet (with application data).
\end{itemize}
+As you may have already noticed, the functions which access the Record protocol,
+are quite limited, given the importance of this protocol in \tls{}.
+This is because the Record protocol's parameters are all set by
+the Handshake protocol (see section \ref{handshake} on page \pageref{handshake}).
+\par
+The Record protocol initialy starts with NULL parameters, which means
+no encryption, and no MAC is used. Encryption and authentication begin
+just after the handshake protocol has finished.
+
\input{ciphers}
diff --git a/doc/tex/translayer.tex b/doc/tex/translayer.tex
index 067dec0bb7..af1e8aedaf 100644
--- a/doc/tex/translayer.tex
+++ b/doc/tex/translayer.tex
@@ -1,21 +1,27 @@
\section{The transport layer}
\par
-\gnutls{} can be used above any reliable transport layer. You may need to
-use the functions:
+\gnutls{} is not limited to any transport layer, it
+can be used above any transport layer, as long as, it is a reliable
+one. A set of functions is provided and its purpose is to load
+to gnutls the required callbacks to access the transport layer.
+
\begin{itemize}
-\item \printfunc{gnutls_transport_set_push_func}{gnutls\_transport\_set\_push\_func()}
-\item \printfunc{gnutls_transport_set_pull_func}{gnutls\_transport\_set\_pull\_func()}
+\item \printfunc{gnutls_transport_set_push_func}{gnutls\_transport\_set\_push\_func}
+\item \printfunc{gnutls_transport_set_pull_func}{gnutls\_transport\_set\_pull\_func}
+\item \printfunc{gnutls_transport_set_ptr}{gnutls\_transport\_set\_ptr}
\end{itemize}
-These functions accept a function as a parameter. The given functions will
-be used by gnutls to send and receive data.
-These functions should return -1 on error and should set errno appropriately.
-\gnutls{} supports EINTR and EAGAIN errno values. These values are
-usually used in non blocking IO and interrupted system calls.
+
+These functions accept a callback function as a parameter.
+The callback functions should return -1 on error and should set errno
+appropriately.
+\par
+\gnutls{} currently only interprets the EINTR and EAGAIN errno values.
+These values are usually used in non blocking IO and interrupted system calls.
The corresponding values (GNUTLS\_E\_INTERRUPTED, GNUTLS\_E\_AGAIN)
will be returned to the caller of the gnutls function. \gnutls{} functions
can be resumed (called again), if any of these values is returned.
\par
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
+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 TCP/IP servers.