~ubuntu-branches/ubuntu/quantal/gnutls26/quantal

« back to all changes in this revision

Viewing changes to doc/examples/ex-rfc2818.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-05-20 13:07:18 UTC
  • mfrom: (12.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110520130718-db41dybbanzfvlji
Tags: 2.10.5-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Fix build failure with --no-add-needed.
  - Build for multiarch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
  if (status & GNUTLS_CERT_REVOKED)
44
44
    printf ("The certificate has been revoked.\n");
45
45
 
 
46
  if (status & GNUTLS_CERT_EXPIRED)
 
47
    printf ("The certificate has expired\n");
 
48
 
 
49
  if (status & GNUTLS_CERT_NOT_ACTIVATED)
 
50
    printf ("The certificate is not yet activated\n");
46
51
 
47
52
  /* Up to here the process is the same for X.509 certificates and
48
53
   * OpenPGP keys. From now on X.509 certificates are assumed. This can
73
78
      return;
74
79
    }
75
80
 
76
 
  /* Beware here we do not check for errors.
77
 
   */
78
 
  if (gnutls_x509_crt_get_expiration_time (cert) < time (0))
79
 
    {
80
 
      printf ("The certificate has expired\n");
81
 
      return;
82
 
    }
83
 
 
84
 
  if (gnutls_x509_crt_get_activation_time (cert) > time (0))
85
 
    {
86
 
      printf ("The certificate is not yet activated\n");
87
 
      return;
88
 
    }
89
81
 
90
82
  if (!gnutls_x509_crt_check_hostname (cert, hostname))
91
83
    {