]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
more documentation updates
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 10 Oct 2002 22:15:26 +0000 (22:15 +0000)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 10 Oct 2002 22:15:26 +0000 (22:15 +0000)
doc/tex/ex-alert.tex
doc/tex/ex-rfc2818.tex
doc/tex/examples.tex
lib/rfc2818_hostname.c

index 8afe6e69b6279ebdae9eee9788844f54c286ea11..b5cd0f9cfbc21c5f626e3167bf42b6613c8a2bce 100644 (file)
@@ -17,7 +17,7 @@ void check_alert(gnutls_session session, int ret)
       last_alert = gnutls_alert_get(session);
 
       /* The check for renegotiation is only useful if we are 
-       * a client, and should be removed otherwise.
+       * a server, and we had requested a rehandshake.
        */
       if (last_alert == GNUTLS_A_NO_RENEGOTIATION &&
           ret == GNUTLS_E_WARNING_ALERT_RECEIVED)
index a50bdf70b392539c0a7811e3585ee08815d2eb14..b22895c06ab848ea8fb34afa4df8b1ab43cd280f 100644 (file)
@@ -24,7 +24,7 @@ void verify_certificate( gnutls_session session, const char* hostname)
    }
 
    if ( gnutls_certificate_expiration_time_peers(session) < time(0)) {
-      printf("The certificate is expired\n");
+      printf("The certificate has expired\n");
       return;
    }
 
index 3bf599b1f355f39c0378015c91cc3cd6adcb6a26..cc0c88e07d6a4754905123208680e46054cafbb7 100644 (file)
@@ -28,14 +28,9 @@ This function should be called after a successful
 \par HTTPS clients have to verify not only the peer's certificate,
 but also the hostname in this certificate. That is to know that
 they actually connected to the right site.
-RFC2818 specifies some hostname checking algorithm, and this --a simple form--
-is implemented in the following example.
 
 \par
-This function should be called right after a successful
-\printfunc{gnutls_certificate_verify_peers}{gnutls\_certificate\_verify\_peers}.
-See also
-\printfunc{gnutls_x509_check_certificates_hostname}{gnutls\_x509\_check\_certificates\_hostname}.
+The following function is an example on how to fully verify a certificate.
 
 \input{ex-rfc2818}
 
index f1fbd8d5f2143297451c5437038e0353e48f958d..a3e11a14b21b52e1fee14c99821cd953ec441b10 100644 (file)
@@ -33,6 +33,8 @@ static int hostname_compare(const char *certname, const char *hostname);
   * the given hostname. This is a basic implementation of the matching described
   * in RFC2818 (HTTPS).
   *
+  * Returns 1 on success, and 0 on failure.
+  *
   **/
 int gnutls_x509_check_certificates_hostname(const gnutls_datum * cert,
                                 const char *hostname)