From e453d4d9db9090313aa9d8f94d0793248b915e61 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 5 Jul 2023 09:32:42 +0200 Subject: [PATCH] Remove old GnuTLS compatibility code We've required GnuTLS 3.x for a long time, so this code has been dead for a while. --- common/rfb/CSecurityTLS.cxx | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx index e24f9d71..7748938b 100644 --- a/common/rfb/CSecurityTLS.cxx +++ b/common/rfb/CSecurityTLS.cxx @@ -46,21 +46,6 @@ #include -/* - * 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); -- 2.39.5