Revision: 4278
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4278&view=rev
Author:   atkac
Date:     2011-02-09 15:38:37 +0000 (Wed, 09 Feb 2011)

Log Message:
-----------
[Bugfix] Improve compatibility with ancient GNUTLS implementations even more.

Modified Paths:
--------------
    trunk/common/os/tls.cxx
    trunk/common/os/tls.h
    trunk/common/rfb/CSecurityTLS.cxx
    trunk/configure.ac

Modified: trunk/common/os/tls.cxx
===================================================================
--- trunk/common/os/tls.cxx     2011-02-09 14:15:09 UTC (rev 4277)
+++ trunk/common/os/tls.cxx     2011-02-09 15:38:37 UTC (rev 4278)
@@ -38,6 +38,11 @@
 
 #ifndef HAVE_GNUTLS_X509_CRT_PRINT
 
+/* Ancient GNUTLS... */
+#if !defined(GNUTLS_VERSION_NUMBER) && !defined(LIBGNUTLS_VERSION_NUMBER)
+#define GNUTLS_DIG_SHA1 GNUTLS_DIG_SHA
+#endif
+
 #define UNKNOWN_SUBJECT(err) \
        do { \
                ss << "unknown subject (" << gnutls_strerror(err) << "), "; \

Modified: trunk/common/os/tls.h
===================================================================
--- trunk/common/os/tls.h       2011-02-09 14:15:09 UTC (rev 4277)
+++ trunk/common/os/tls.h       2011-02-09 15:38:37 UTC (rev 4278)
@@ -26,6 +26,19 @@
 #ifdef HAVE_GNUTLS
 #include <gnutls/gnutls.h>
 
+#ifndef HAVE_GNUTLS_DATUM_T
+typedef gnutls_datum gnutls_datum_t;
+#endif
+#ifndef HAVE_GNUTLS_CRT_T
+typedef gnutls_x509_crt gnutls_x509_crt_t;
+#endif
+#ifndef HAVE_GNUTLS_PK_ALGORITHM_T
+typedef gnutls_pk_algorithm gnutls_pk_algorithm_t;
+#endif
+#ifndef HAVE_GNUTLS_SIGN_ALGORITHM_T
+typedef gnutls_sign_algorithm gnutls_sign_algorithm_t;
+#endif
+
 #ifndef HAVE_GNUTLS_X509_CRT_PRINT
 #ifdef WIN32
 #error "Please install more recent GNUTLS with gnutls_x509_crt_print() 
function"

Modified: trunk/common/rfb/CSecurityTLS.cxx
===================================================================
--- trunk/common/rfb/CSecurityTLS.cxx   2011-02-09 14:15:09 UTC (rev 4277)
+++ trunk/common/rfb/CSecurityTLS.cxx   2011-02-09 15:38:37 UTC (rev 4278)
@@ -57,6 +57,11 @@
 #define WITHOUT_X509_TIMES
 #endif
 
+/* Ancient GNUTLS... */
+#if !defined(GNUTLS_VERSION_NUMBER) && !defined(LIBGNUTLS_VERSION_NUMBER)
+#define WITHOUT_X509_TIMES
+#endif
+
 #define TLS_DEBUG
 
 using namespace rfb;

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac  2011-02-09 14:15:09 UTC (rev 4277)
+++ trunk/configure.ac  2011-02-09 15:38:37 UTC (rev 4278)
@@ -112,7 +112,9 @@
                       [AC_DEFINE(HAVE_GNUTLS_X509_CRT_PRINT, 1, [Is the 
gnutls_x509_crt_print() function present? ])
                        AC_MSG_RESULT(yes)],
                        AC_MSG_RESULT(no))
-       
+       AC_CHECK_TYPES([gnutls_x509_crt_t, gnutls_datum_t,
+                       gnutls_pk_algorithm_t, gnutls_sign_algorithm_t],
+                       [], [], [#include <gnutls/gnutls.h>])
        LIBS=${SAVE_LIBS}
 fi
 AC_SUBST([GNUTLS_LIBS])


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to