]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
*** empty log message ***
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 29 Jun 2003 16:30:56 +0000 (16:30 +0000)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 29 Jun 2003 16:30:56 +0000 (16:30 +0000)
doc/tex/certificate.tex
doc/tex/ex-client-srp.tex
doc/tex/ex-client1.tex
doc/tex/ex-serv1.tex
doc/tex/handshake.tex

index 7dd6309c473e45da3e45c61cf878526fb498325a..d8a7e2ae8f9cd66787b2bd7bd52eac27e0cde9a4 100644 (file)
@@ -24,7 +24,28 @@ The API for handling X.509 certificates is described at section \ref{sec:x509api
 on page \pageref{sec:x509api}. Some examples are listed below.
 
 
-\subsection{Verifying an X.509 certificate}
+
+\subsection{X.509 certificates}
+An X.509 certificate usually contains information about the certificate
+holder, the signer, a unique serial number, expiration dates etc. Some
+functions of \gnutls{}' API for certificate parsing are:
+\begin{itemize}
+\item \printfunc{gnutls_x509_crt_init}{gnutls\_x509\_crt\_init}
+\item \printfunc{gnutls_x509_crt_import}{gnutls\_x509\_crt\_import}
+\item \printfunc{gnutls_x509_crt_get_dn}{gnutls\_x509\_crt\_get\_dn}
+\item \printfunc{gnutls_x509_crt_get_serial}{gnutls\_x509\_crt\_get\_serial}
+\item \printfunc{gnutls_x509_crt_get_subject_alt_name}{gnutls\_x509\_crt\_get\_subject\_alt\_name}
+\end{itemize}
+
+\par
+An example program that reads the peer's certificate,
+and prints some information about the peer's certificate in a TLS session,
+is listed below.
+
+\input{ex-x509-info}
+
+
+\subsection{Verifying X.509 certificate paths}
 Verifying certificate\index{Verifying certificate paths} paths is important 
 in X.509 authentication. For this purpose the function
 \printfunc{gnutls_x509_crt_verify}{gnutls\_x509\_crt\_verify} is provided. The
@@ -62,39 +83,8 @@ about the peer's identity. It is required to verify if the certificate's
 owner is the one you expect. See section \ref{ex:rfc2818} on page \pageref{ex:rfc2818},
 for an example.
 
-\par
-Client certificate authentication\index{Certificate authentication!Client} is 
-optional in \tls{}. A server may request a certificate from the client -- using the
-\printfunc{gnutls_certificate_server_set_request}{gnutls\_certificate\_server\_set\_request}
-function. If a certificate is to be requested by the client, at the handshake 
-procedure, the server will send an extra packet,
-than contains a list of acceptable certificate signers, and indicates the
-request of a certificate. The client may then send a certificate, signed
-by one of the server's acceptable signers. In \gnutls{} the server's acceptable
-signers list is constructed using the trusted CA certificates in the
-credentials structure.
-
-\section{Using X.509\index{X.509 certificates} certificates and other structures}
-
-\subsection{Parsing an X.509 certificate}
-An X.509 certificate usually contains information about the certificate
-holder, the signer, a unique serial number, expiration dates etc. Some
-function of the \gnutls{} API for certificate parsing are:
-\begin{itemize}
-\item \printfunc{gnutls_x509_crt_init}{gnutls\_x509\_crt\_init}
-\item \printfunc{gnutls_x509_crt_import}{gnutls\_x509\_crt\_import}
-\item \printfunc{gnutls_x509_crt_get_dn}{gnutls\_x509\_crt\_get\_dn}
-\item \printfunc{gnutls_x509_crt_get_serial}{gnutls\_x509\_crt\_get\_serial}
-\item \printfunc{gnutls_x509_crt_get_subject_alt_name}{gnutls\_x509\_crt\_get\_subject\_alt\_name}
-\end{itemize}
-
-\par
-An example is shown below, that reads the peer's certificate,
-and prints some information about the peer's certificate in a TLS session.
-
-\input{ex-x509-info}
 
-\subsection{Using certificate requests}
+\subsection{PKCS \#10 certificate requests}
 A certificate request is a structure, defined in PKCS \#10, which
 is contains information about an applicant of a certificate service.
 It usually contains a private key, a distinguished name and secondary
@@ -106,7 +96,7 @@ which should return a signed certificate.
 
 \input{ex-crq}
 
-\subsection{Using PKCS \#12 structures}
+\subsection{PKCS \#12 structures}
 A PKCS \#12 structure usually contains a user's private keys and
 certificates. It is commonly used in browsers to export and import
 the user's identities.
index de5caf33f696bb5e03ee346c9503fd2a04b7cc34..9cb79c263bfc3ff8b68dea5ba80b57321ac02269 100644 (file)
@@ -18,7 +18,8 @@
 
 const int protocol_priority[] = { GNUTLS_TLS1, GNUTLS_SSL3, 0 };
 const int kx_priority[] = { GNUTLS_KX_SRP, 0 };
-const int cipher_priority[] = { GNUTLS_CIPHER_3DES_CBC, GNUTLS_CIPHER_ARCFOUR_128, 0};
+const int cipher_priority[] = { GNUTLS_CIPHER_3DES_CBC, 
+                                GNUTLS_CIPHER_ARCFOUR_128, 0};
 const int comp_priority[] = { GNUTLS_COMP_NULL, 0 };
 const int mac_priority[] = { GNUTLS_MAC_SHA, GNUTLS_MAC_MD5, 0 };
 
index 998746db2a7d2536ad656bdec5944914f43318dc..039c840253d82c4d3a1f1734923febd368a70ab5 100644 (file)
@@ -20,7 +20,8 @@
 
 const int protocol_priority[] = { GNUTLS_TLS1, GNUTLS_SSL3, 0 };
 const int kx_priority[] = { GNUTLS_KX_RSA, GNUTLS_KX_DHE_RSA, 0 };
-const int cipher_priority[] = { GNUTLS_CIPHER_3DES_CBC, GNUTLS_CIPHER_ARCFOUR_128, 0};
+const int cipher_priority[] = { GNUTLS_CIPHER_3DES_CBC, 
+                                GNUTLS_CIPHER_ARCFOUR_128, 0};
 const int comp_priority[] = { GNUTLS_COMP_NULL, 0 };
 const int mac_priority[] = { GNUTLS_MAC_SHA, GNUTLS_MAC_MD5, 0 };
 
index d368720caabfaf7d8d18ef3a8b214cb98ec367d1..8b5febb91678c92dc393062b23602dcbdec34fdd 100644 (file)
@@ -51,13 +51,13 @@ gnutls_session initialize_tls_session()
    return session;
 }
 
-gnutls_dh_params dh_params;
+static gnutls_dh_params dh_params;
 
 static int generate_dh_params(void) {
 
    /* Generate Diffie Hellman parameters - for use with DHE
     * kx algorithms. These should be discarded and regenerated
-    * once a day, once a week or once a month. Depends on the
+    * once a day, once a week or once a month. Depending on the
     * security requirements.
     */
    gnutls_dh_params_init( &dh_params);
@@ -77,9 +77,6 @@ int main()
    gnutls_session session;
    char buffer[MAX_BUF + 1];
    int optval = 1;
-   char name[256];
-
-   strcpy(name, "Echo Server");
 
    /* this must be called once in the program
     */
@@ -116,7 +113,7 @@ int main()
    err = listen(listen_sd, 1024);
    SOCKET_ERR(err, "listen");
 
-   printf("%s ready. Listening to port '%d'.\n\n", name, PORT);
+   printf("Server ready. Listening to port '%d'.\n\n", PORT);
 
    client_len = sizeof(sa_cli);
    for (;;) {
index 090f160bd875404946f61dd07901b411b2e5b684..e34889aa0762215e0f801d3c3f73dd544fc876f8 100644 (file)
@@ -34,6 +34,19 @@ handshake.
 
 \input{ciphersuites}
 
+\subsection{Client authentication}
+In the case of ciphersuites that use certificate authentication, the
+authentication\index{Certificate authentication!Client} of the client is
+optional in \tls{}. A server may request a certificate from the client -- using the
+\printfunc{gnutls_certificate_server_set_request}{gnutls\_certificate\_server\_set\_request}
+function. If a certificate is to be requested by the client, at the handshake
+procedure, the server will send an extra packet,
+than contains a list of acceptable certificate signers, and indicates the
+request of a certificate. The client may then send a certificate, signed
+by one of the server's acceptable signers. In \gnutls{} the server's acceptable
+signers list is constructed using the trusted CA certificates in the
+credentials structure.
+
 \subsection{Resuming Sessions\index{Resuming sessions}}
 \label{resume}
 \par