[glib-networking] Don't bother manually verifying activation/expiration time



commit e1a8d06648328f3c5cb2de5ca016de8ac3ddc2b2
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sun Mar 11 15:16:18 2018 -0500

    Don't bother manually verifying activation/expiration time
    
    GTlsDatabase no longer bothers trying to report all possible causes of
    verification error. Accordingly, there's no longer any reason for
    GTlsCertificate to do so. GnuTLS will check these for us if the
    certificate might otherwise be trusted.

 tls/gnutls/gtlscertificate-gnutls.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)
---
diff --git a/tls/gnutls/gtlscertificate-gnutls.c b/tls/gnutls/gtlscertificate-gnutls.c
index 6a506ad..024d872 100644
--- a/tls/gnutls/gtlscertificate-gnutls.c
+++ b/tls/gnutls/gtlscertificate-gnutls.c
@@ -317,7 +317,6 @@ g_tls_certificate_gnutls_verify (GTlsCertificate     *cert,
   guint num_certs, i;
   gnutls_x509_crt_t *chain;
   GTlsCertificateFlags gtls_flags;
-  time_t t, now;
 
   cert_gnutls = G_TLS_CERTIFICATE_GNUTLS (cert);
   num_certs = 0;
@@ -362,21 +361,6 @@ g_tls_certificate_gnutls_verify (GTlsCertificate     *cert,
   else
     gtls_flags = 0;
 
-  /* We have to check these ourselves since gnutls_x509_crt_list_verify
-   * won't bother if it gets an UNKNOWN_CA.
-   */
-  now = time (NULL);
-  for (i = 0; i < num_certs; i++)
-    {
-      t = gnutls_x509_crt_get_activation_time (chain[i]);
-      if (t == (time_t) -1 || t > now)
-        gtls_flags |= G_TLS_CERTIFICATE_NOT_ACTIVATED;
-
-      t = gnutls_x509_crt_get_expiration_time (chain[i]);
-      if (t == (time_t) -1 || t < now)
-        gtls_flags |= G_TLS_CERTIFICATE_EXPIRED;
-    }
-
   g_free (chain);
 
   if (identity)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]