aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2010-07-21 09:06:59 +0000
committerAdam Tkac <atkac@redhat.com>2010-07-21 09:06:59 +0000
commit4395823664775e9c0e23e82890e705088b79a700 (patch)
treecc160f50703aa70f0e1a2e932bf64bb7a38dcdc5 /common/rfb
parent707d361a503718f0636bc50fde56d46fb9edc980 (diff)
downloadtigervnc-4395823664775e9c0e23e82890e705088b79a700.tar.gz
tigervnc-4395823664775e9c0e23e82890e705088b79a700.zip
[Bugfix] Add "#error" directives to client-side TLS sources to avoid wrong usage.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4104 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb')
-rw-r--r--common/rfb/CSecurityTLS.cxx6
-rw-r--r--common/rfb/CSecurityTLS.h6
-rw-r--r--common/rfb/CSecurityTLSBase.cxx5
-rw-r--r--common/rfb/CSecurityTLSBase.h6
4 files changed, 12 insertions, 11 deletions
diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx
index 6bd2fa7d..ae095fae 100644
--- a/common/rfb/CSecurityTLS.cxx
+++ b/common/rfb/CSecurityTLS.cxx
@@ -23,11 +23,12 @@
#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 */
diff --git a/common/rfb/CSecurityTLS.h b/common/rfb/CSecurityTLS.h
index a2bcc57f..9e5ed72c 100644
--- a/common/rfb/CSecurityTLS.h
+++ b/common/rfb/CSecurityTLS.h
@@ -26,7 +26,9 @@
#include <config.h>
#endif
-#ifdef HAVE_GNUTLS
+#ifndef HAVE_GNUTLS
+#error "This header should not be included without HAVE_GNUTLS defined"
+#endif
#include <rfb/CSecurityTLSBase.h>
#include <rfb/SSecurityVeNCrypt.h>
@@ -48,6 +50,4 @@ namespace rfb {
};
}
-#endif /* HAVE_GNUTLS */
-
#endif /* __C_SECURITY_TLS_H__ */
diff --git a/common/rfb/CSecurityTLSBase.cxx b/common/rfb/CSecurityTLSBase.cxx
index 0755f368..289015ad 100644
--- a/common/rfb/CSecurityTLSBase.cxx
+++ b/common/rfb/CSecurityTLSBase.cxx
@@ -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 */
diff --git a/common/rfb/CSecurityTLSBase.h b/common/rfb/CSecurityTLSBase.h
index 3839ebcf..f7230b3b 100644
--- a/common/rfb/CSecurityTLSBase.h
+++ b/common/rfb/CSecurityTLSBase.h
@@ -26,7 +26,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/CSecurity.h>
#include <rfb/Security.h>
@@ -57,6 +59,4 @@ namespace rfb {
};
}
-#endif /* HAVE_GNUTLS */
-
#endif