]> source.dussan.org Git - tigervnc.git/commitdiff
Remove old GnuTLS compatibility code
authorPierre Ossman <ossman@cendio.se>
Wed, 5 Jul 2023 07:32:42 +0000 (09:32 +0200)
committerPierre Ossman <ossman@cendio.se>
Wed, 5 Jul 2023 07:32:42 +0000 (09:32 +0200)
We've required GnuTLS 3.x for a long time, so this code has been dead
for a while.

common/rfb/CSecurityTLS.cxx

index e24f9d71479b5df443a2b86ffcc1edd7dda22e56..7748938bcfc74d97dcb1d37d29ce36ec67abd5fc 100644 (file)
 
 #include <gnutls/x509.h>
 
-/*
- * GNUTLS 2.6.5 and older didn't have some variables defined so don't use them.
- * GNUTLS 1.X.X defined LIBGNUTLS_VERSION_NUMBER so treat it as "old" gnutls as
- * well
- */
-#if (defined(GNUTLS_VERSION_NUMBER) && GNUTLS_VERSION_NUMBER < 0x020606) || \
-    defined(LIBGNUTLS_VERSION_NUMBER)
-#define WITHOUT_X509_TIMES
-#endif
-
-/* Ancient GNUTLS... */
-#if !defined(GNUTLS_VERSION_NUMBER) && !defined(LIBGNUTLS_VERSION_NUMBER)
-#define WITHOUT_X509_TIMES
-#endif
-
 using namespace rfb;
 
 static const char* homedirfn(const char* fn);
@@ -329,7 +314,6 @@ void CSecurityTLS::checkSession()
   if (status & GNUTLS_CERT_REVOKED)
     throw AuthFailureException("server certificate has been revoked");
 
-#ifndef WITHOUT_X509_TIMES
   if (status & GNUTLS_CERT_NOT_ACTIVATED)
     throw AuthFailureException("server certificate has not been activated");
 
@@ -340,7 +324,7 @@ void CSecurityTLS::checkSession()
                         "do you want to continue?"))
       throw AuthFailureException("server certificate has expired");
   }
-#endif
+
   /* Process other errors later */
 
   cert_list = gnutls_certificate_get_peers(session, &cert_list_size);