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

[vidalia-svn] r3953: Backport r3766 (makes QSslSocket required and bumps the mini (in vidalia/branches/vidalia-0.1: . src/common src/vidalia/network)



Author: edmanm
Date: 2009-07-09 14:38:45 -0400 (Thu, 09 Jul 2009)
New Revision: 3953

Modified:
   vidalia/branches/vidalia-0.1/
   vidalia/branches/vidalia-0.1/CHANGELOG
   vidalia/branches/vidalia-0.1/CMakeLists.txt
   vidalia/branches/vidalia-0.1/config.h.in
   vidalia/branches/vidalia-0.1/src/common/CMakeLists.txt
   vidalia/branches/vidalia-0.1/src/vidalia/network/geoipresolver.cpp
Log:

Backport r3766 (makes QSslSocket required and bumps the minimum Qt version
to 4.3.0) while I'm at it. So long, Debian Etch.



Property changes on: vidalia/branches/vidalia-0.1
___________________________________________________________________
Modified: svn:mergeinfo
   - /vidalia/trunk:3235,3482,3504-3505,3516-3517,3519-3520,3522,3524-3526,3528,3530,3643,3732,3740,3745,3754
/vidalia/trunk/cmake:3745
   + /vidalia/trunk:3235,3482,3504-3505,3516-3517,3519-3520,3522,3524-3526,3528,3530,3643,3732,3740,3745,3754,3951
/vidalia/trunk/cmake:3745

Modified: vidalia/branches/vidalia-0.1/CHANGELOG
===================================================================
--- vidalia/branches/vidalia-0.1/CHANGELOG	2009-07-09 18:16:52 UTC (rev 3952)
+++ vidalia/branches/vidalia-0.1/CHANGELOG	2009-07-09 18:38:45 UTC (rev 3953)
@@ -1,5 +1,7 @@
 0.1.15  09-Jul-2009
   o Include libeay32.dll in the Windows installers.
+  o Remove USE_QSSLSOCKET as a build option. If your Qt doesn't support
+    OpenSSL, then you don't get GeoIP lookups.
 
 
 0.1.14  29-Jun-2009

Modified: vidalia/branches/vidalia-0.1/CMakeLists.txt
===================================================================
--- vidalia/branches/vidalia-0.1/CMakeLists.txt	2009-07-09 18:16:52 UTC (rev 3952)
+++ vidalia/branches/vidalia-0.1/CMakeLists.txt	2009-07-09 18:38:45 UTC (rev 3953)
@@ -13,8 +13,8 @@
 
 set(VER_MAJOR   "0")
 set(VER_MINOR   "1")
-set(VER_PATCH   "14")
-set(VERSION     "${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}")
+set(VER_PATCH   "15")
+set(VERSION     "${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}-svn")
 message(STATUS  "Configuring Vidalia ${VERSION}")
 project(Vidalia)
 
@@ -25,8 +25,8 @@
   cmake_policy(SET CMP0003 OLD)
 endif(COMMAND cmake_policy)
 
-## Require Qt >= 4.2.0
-set(QT_MIN_VERSION    "4.2.0")
+## Require Qt >= 4.3.0
+set(QT_MIN_VERSION    "4.3.0")
 
 ## Specify the Qt libraries used
 include(FindQt4)
@@ -39,6 +39,9 @@
 include(CheckIncludeFileCXX)
 include(CheckTypeSize)
 include(CPack)
+if (MSVC OR UNIX)
+  include(${CMAKE_SOURCE_DIR}/cmake/FindOpenSSL.cmake)
+endif(MSVC OR UNIX)
 
 if(MSVC_IDE)
     set(CMAKE_SUPPRESS_REGENERATION TRUE)
@@ -59,21 +62,6 @@
   endif(OSX_FAT_BINARY)
 endif(APPLE)
 
-## Check for QSslSocket
-set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${QT_INCLUDES})
-check_include_file_cxx("qsslsocket.h" HAVE_QSSLSOCKET_H)
-if (HAVE_QSSLSOCKET_H)
-  check_symbol_exists(QT_NO_OPENSSL "QtGlobal" QT_NO_SSL_SUPPORT)
-  if (NOT QT_NO_SSL_SUPPORT)
-    option(USE_QSSLSOCKET "Use Qt's QSslSocket for GeoIP lookups." ON)
-  endif(NOT QT_NO_SSL_SUPPORT)
-endif(HAVE_QSSLSOCKET_H)
-if (USE_QSSLSOCKET)
-  if (MSVC OR UNIX)
-    include(${CMAKE_SOURCE_DIR}/cmake/FindOpenSSL.cmake)
-  endif(MSVC OR UNIX)
-endif(USE_QSSLSOCKET)
-
 ## UPnP support is currently optional (enabled by default)
 option(USE_MINIUPNPC "Enable UPnP support using the MiniUPnPc library." ON)
 


Property changes on: vidalia/branches/vidalia-0.1/CMakeLists.txt
___________________________________________________________________
Added: svn:mergeinfo
   + /vidalia/trunk/CMakeLists.txt:3235,3482,3504-3505,3516-3517,3519-3520,3522,3524-3526,3528,3530,3643,3732,3740,3745,3754,3766,3951
/vidalia/trunk/cmake/CMakeLists.txt:3745

Modified: vidalia/branches/vidalia-0.1/config.h.in
===================================================================
--- vidalia/branches/vidalia-0.1/config.h.in	2009-07-09 18:16:52 UTC (rev 3952)
+++ vidalia/branches/vidalia-0.1/config.h.in	2009-07-09 18:38:45 UTC (rev 3953)
@@ -1,5 +1,5 @@
 /*
-**  $Id: $
+**  $Id$
 ** 
 **  This file is part of Vidalia, and is subject to the license terms in the 
 **  LICENSE file, found in the top level directory of this distribution. If  
@@ -16,10 +16,6 @@
 
 #define VIDALIA_VERSION    "@VERSION@"
 
-#cmakedefine HAVE_QSSLSOCKET_H
-
-#cmakedefine USE_QSSLSOCKET
-
 #cmakedefine HAVE_LIMITS_H
 
 #cmakedefine HAVE_SYS_LIMITS_H


Property changes on: vidalia/branches/vidalia-0.1/config.h.in
___________________________________________________________________
Added: svn:mergeinfo
   + /vidalia/trunk/cmake/config.h.in:3745
/vidalia/trunk/config.h.in:3235,3482,3504-3505,3516-3517,3519-3520,3522,3524-3526,3528,3530,3643,3732,3740,3745,3754,3766,3951

Modified: vidalia/branches/vidalia-0.1/src/common/CMakeLists.txt
===================================================================
--- vidalia/branches/vidalia-0.1/src/common/CMakeLists.txt	2009-07-09 18:16:52 UTC (rev 3952)
+++ vidalia/branches/vidalia-0.1/src/common/CMakeLists.txt	2009-07-09 18:38:45 UTC (rev 3953)
@@ -19,28 +19,21 @@
   net.cpp
   procutil.cpp
   stringutil.cpp
-  torsocket.cpp
+  torsslsocket.cpp
   zlibbytearray.cpp
 )
-qt4_wrap_cpp(common_SRCS torsocket.h)
+qt4_wrap_cpp(common_SRCS torsslsocket.h)
 
-
-if(USE_QSSLSOCKET)
-  set(common_SRCS ${common_SRCS} torsslsocket.cpp)
-  qt4_wrap_cpp(common_SRCS torsslsocket.h)
-endif(USE_QSSLSOCKET)
-
 if(WIN32)
   set(common_SRCS ${common_SRCS}
     win32.cpp
   )
 endif(WIN32)
 
-
 add_library(common STATIC ${common_SRCS})
 target_link_libraries(common ${QT_LIBRARIES})
 
-if(USE_QSSLSOCKET AND OPENSSL_LIBRARIES)
+if(OPENSSL_LIBRARIES)
   target_link_libraries(common ${OPENSSL_LIBRARIES})
-endif(USE_QSSLSOCKET AND OPENSSL_LIBRARIES)
+endif(OPENSSL_LIBRARIES)
 


Property changes on: vidalia/branches/vidalia-0.1/src/common/CMakeLists.txt
___________________________________________________________________
Added: svn:mergeinfo
   + /vidalia/trunk/cmake/src/common/CMakeLists.txt:3745
/vidalia/trunk/src/common/CMakeLists.txt:3235,3482,3504-3505,3516-3517,3519-3520,3522,3524-3526,3528,3530,3643,3732,3740,3745,3754,3766,3951

Modified: vidalia/branches/vidalia-0.1/src/vidalia/network/geoipresolver.cpp
===================================================================
--- vidalia/branches/vidalia-0.1/src/vidalia/network/geoipresolver.cpp	2009-07-09 18:16:52 UTC (rev 3952)
+++ vidalia/branches/vidalia-0.1/src/vidalia/network/geoipresolver.cpp	2009-07-09 18:38:45 UTC (rev 3953)
@@ -19,16 +19,12 @@
 #include "geoipresolver.h"
 #include "config.h"
 
-#if defined(USE_QSSLSOCKET)
 #include <torsslsocket.h>
-#endif
 
 /** Host for the geo ip information. */ 
 #define GEOIP_HOST    "geoip.vidalia-project.net"
-/** The non-encrypted GeoIP service lives on port 80. */
-#define GEOIP_PORT      80
-/** The SSL GeoIP service runs on port 1443 (443 was taken). */
-#define GEOIP_SSL_PORT  1443
+/** The SSL GeoIP service lives on port 1443. */
+#define GEOIP_SSL_PORT      1443
 /** Page that we request the geo ip information from. */
 #define GEOIP_PAGE    "/cgi-bin/geoip"
 
@@ -39,11 +35,9 @@
   _socksAddr = QHostAddress::LocalHost;
   _socksPort = 9050;
 
-#if defined(USE_QSSLSOCKET)
   if (! QSslSocket::addDefaultCaCertificates(":/geoip/cacert_root.crt"))
     vWarn("Failed to add the GeoIP CA certificate to the default CA "
           "certificate database.");
-#endif
 }
 
 /** Sets the address and port of Tor, through which GeoIP requests will be
@@ -226,11 +220,7 @@
   }
 
   /* Create a socket used to request the geo ip information. */
-#if defined(USE_QSSLSOCKET)
   TorSslSocket *socket = new TorSslSocket(_socksAddr, _socksPort);
-#else
-  TorSocket *socket = new TorSocket(_socksAddr, _socksPort);
-#endif
 
   connect(socket, SIGNAL(connectedToRemoteHost()), this, SLOT(connected()),
           Qt::QueuedConnection);
@@ -243,21 +233,10 @@
   _requestList.insert(socket, request);
   
   /* Connect so we can send our request and return the request ID. */
-#if defined(USE_QSSLSOCKET)
-  if (TorSslSocket::supportsSsl()) {
-    vInfo("Opening an SSL connection to the GeoIP host at %1:%2 (request id %3)")
-                          .arg(GEOIP_HOST).arg(GEOIP_SSL_PORT).arg(request->id());
-    socket->connectToRemoteHost(GEOIP_HOST, GEOIP_SSL_PORT, true);
-  } else {
-    vInfo("Opening an unencrypted connection to the GeoIP host at %1:%2 "
-          "(request id %3)").arg(GEOIP_HOST).arg(GEOIP_PORT).arg(request->id());
-    socket->connectToRemoteHost(GEOIP_HOST, GEOIP_PORT, false);
-  }
-#else
-  vInfo("Opening an unencrypted connection to the GeoIP host at %1:%2 "
-        "(request id %3)").arg(GEOIP_HOST).arg(GEOIP_PORT).arg(request->id());
-  socket->connectToRemoteHost(GEOIP_HOST, GEOIP_PORT);
-#endif
+  vInfo("Opening an SSL connection to the GeoIP host at %1:%2 (request id %3)")
+                        .arg(GEOIP_HOST).arg(GEOIP_SSL_PORT).arg(request->id());
+  socket->connectToRemoteHost(GEOIP_HOST, GEOIP_SSL_PORT, true);
+
   return request->id();
 }