[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[vidalia-svn] r2153: Support building against Qt 4.3 without OpenSSL again. (in trunk: . src/geoip src/util)



Author: edmanm
Date: 2007-12-01 03:54:48 -0500 (Sat, 01 Dec 2007)
New Revision: 2153

Modified:
   trunk/
   trunk/src/geoip/geoipresolver.cpp
   trunk/src/util/torsslsocket.cpp
   trunk/src/util/torsslsocket.h
Log:
 r2187@lysithea:  edmanm | 2007-12-01 03:51:22 -0500
 Support building against Qt 4.3 without OpenSSL again.



Property changes on: trunk
___________________________________________________________________
 svk:merge ticket from /local/vidalia/trunk [r2187] on 0108964c-5b0b-4c9e-969f-e2288315d100

Modified: trunk/src/geoip/geoipresolver.cpp
===================================================================
--- trunk/src/geoip/geoipresolver.cpp	2007-12-01 08:11:47 UTC (rev 2152)
+++ trunk/src/geoip/geoipresolver.cpp	2007-12-01 08:54:48 UTC (rev 2153)
@@ -29,6 +29,10 @@
 #include <torsslsocket.h>
 #include "geoipresolver.h"
 
+#if QT_VERSION >= 0x040300 && !defined(QT_NO_OPENSSL)
+#define USE_SSL 1
+#endif
+
 /** Host for the geo ip information. This hostname round-robins between
  * pasiphae.vidalia-project.net, thebe.vidalia-project.net, and
  * cups.cs.cmu.edu. */ 
@@ -209,7 +213,7 @@
   }
 
   /* Create a socket used to request the geo ip information. */
-#if QT_VERSION >= 0x040300
+#if defined(USE_SSL)
   TorSslSocket *socket = new TorSslSocket(_socksAddr, _socksPort);
 #else
   TorSocket *socket = new TorSocket(_socksAddr, _socksPort);
@@ -226,7 +230,7 @@
   _requestList.insert(socket, request);
   
   /* Connect so we can send our request and return the request ID. */
-#if QT_VERSION >= 0x040300
+#if defined(USE_SSL)
   if (TorSslSocket::supportsSsl()) {
     QByteArray caCert(":/geoip/cacert_root.crt");
     socket->addCaCertificate(QSslCertificate(caCert));

Modified: trunk/src/util/torsslsocket.cpp
===================================================================
--- trunk/src/util/torsslsocket.cpp	2007-12-01 08:11:47 UTC (rev 2152)
+++ trunk/src/util/torsslsocket.cpp	2007-12-01 08:54:48 UTC (rev 2153)
@@ -26,7 +26,8 @@
  */
 
 #include "torsslsocket.h"
-#if QT_VERSION >= 0x040300
+
+#if QT_VERSION >= 0x040300 && !defined(QT_NO_OPENSSL)
 #include <QDataStream>
 #include <QStringList>
 

Modified: trunk/src/util/torsslsocket.h
===================================================================
--- trunk/src/util/torsslsocket.h	2007-12-01 08:11:47 UTC (rev 2152)
+++ trunk/src/util/torsslsocket.h	2007-12-01 08:54:48 UTC (rev 2153)
@@ -29,9 +29,8 @@
 #define _TORSSLSOCKET_H
 
 #include <QtGlobal>
-#if QT_VERSION >= 0x040300
-/* XXX: We should do some autoconf magic to define a HAVE_QSSLSOCKET_H
- * appropriately. */
+
+#if QT_VERSION >= 0x040300 && !defined(QT_NO_OPENSSL)
 #include <QSslSocket>
 #include <QHostAddress>