]> source.dussan.org Git - tigervnc.git/commitdiff
[Bugfix] Add "#error" directives to client-side TLS sources to avoid wrong usage.
authorAdam Tkac <atkac@redhat.com>
Wed, 21 Jul 2010 09:06:59 +0000 (09:06 +0000)
committerAdam Tkac <atkac@redhat.com>
Wed, 21 Jul 2010 09:06:59 +0000 (09:06 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4104 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/CSecurityTLS.cxx
common/rfb/CSecurityTLS.h
common/rfb/CSecurityTLSBase.cxx
common/rfb/CSecurityTLSBase.h

index 6bd2fa7d73b840d762a29f74f0c751bd81403418..ae095fae942be22486d61e4f83aa49ac082948b3 100644 (file)
 #include <config.h>
 #endif
 
-#ifdef HAVE_GNUTLS
+#ifndef HAVE_GNUTLS
+#error "This source should not be compiled without HAVE_GNUTLS defined"
+#endif
 
 #include <rfb/CSecurityTLS.h>
 
-
 using namespace rfb;
 
 CSecurityTLS::CSecurityTLS() :  anon_cred(0)
@@ -63,4 +64,3 @@ void CSecurityTLS::checkSession(gnutls_session session)
 
 }
 
-#endif /* HAVE_GNUTLS */
index a2bcc57fe08616880d33c8d6bc7b77cbaf900859..9e5ed72cab94086a1bb9dc0623b5ca54c14b866d 100644 (file)
@@ -26,7 +26,9 @@
 #include <config.h>\r
 #endif\r
 \r
-#ifdef HAVE_GNUTLS\r
+#ifndef HAVE_GNUTLS\r
+#error "This header should not be included without HAVE_GNUTLS defined"\r
+#endif\r
 \r
 #include <rfb/CSecurityTLSBase.h>\r
 #include <rfb/SSecurityVeNCrypt.h>\r
@@ -48,6 +50,4 @@ namespace rfb {
   };\r
 }\r
 \r
-#endif /* HAVE_GNUTLS */\r
-\r
 #endif /* __C_SECURITY_TLS_H__ */\r
index 0755f3686d942d75788b2bb81190c9868fe59c06..289015ad488a8d71bade7e823fb8e0b8aeafc41b 100644 (file)
@@ -23,7 +23,9 @@
 #include <config.h>
 #endif
 
-#ifdef HAVE_GNUTLS
+#ifndef HAVE_GNUTLS
+#error "This header should not be compiled without HAVE_GNUTLS defined"
+#endif
 
 #include <rfb/CSecurityTLSBase.h>
 #include <rfb/CConnection.h>
@@ -136,4 +138,3 @@ bool CSecurityTLSBase::processMsg(CConnection* cc)
   return true;
 }
 
-#endif /* HAVE_GNUTLS */
index 3839ebcff9f015d500a5114c77ee9e5d881d7142..f7230b3b7589f1c7c3e108d3f74c0521553a018a 100644 (file)
@@ -26,7 +26,9 @@
 #include <config.h>\r
 #endif\r
 \r
-#ifdef HAVE_GNUTLS\r
+#ifndef HAVE_GNUTLS\r
+#error "This header should not be compiled without HAVE_GNUTLS defined"\r
+#endif\r
 \r
 #include <rfb/CSecurity.h>\r
 #include <rfb/Security.h>\r
@@ -57,6 +59,4 @@ namespace rfb {
   };\r
 }\r
 \r
-#endif /* HAVE_GNUTLS */\r
-\r
 #endif\r