[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r2429: Correctly load the CA certificate used to verify SSL connect (in vidalia/trunk: . src/vidalia/network)
Author: edmanm
Date: 2008-03-20 22:27:36 -0400 (Thu, 20 Mar 2008)
New Revision: 2429
Modified:
vidalia/trunk/
vidalia/trunk/CHANGELOG
vidalia/trunk/src/vidalia/network/geoipresolver.cpp
vidalia/trunk/src/vidalia/network/geoipresolver.h
Log:
r233@lysithea: edmanm | 2008-03-20 22:27:30 -0400
Correctly load the CA certificate used to verify SSL connections to the
GeoIP server. This caused Vidalia >= 0.1.0 clients built against Qt >= 4.3.2
to be unable to retrieve updated GeoIP information. Fixes ticket #349.
Property changes on: vidalia/trunk
___________________________________________________________________
svk:merge ticket from /local/vidalia/trunk [r233] on 90112fd6-a33b-4cea-8d39-48ff1d78625c
Modified: vidalia/trunk/CHANGELOG
===================================================================
--- vidalia/trunk/CHANGELOG 2008-03-20 22:53:58 UTC (rev 2428)
+++ vidalia/trunk/CHANGELOG 2008-03-21 02:27:36 UTC (rev 2429)
@@ -1,3 +1,9 @@
+0.1.2 xx-xxx-2008
+ o Correctly load the CA certificate used to verify SSL connections to the
+ GeoIP server. This caused Vidalia >= 0.1.0 clients built against Qt >=
+ 4.3.2 to be unable to retrieve updated GeoIP information. (Ticket #349)
+
+
0.1.1 17-Mar-2008
o Use CMake to configure the version number that ends up getting displayed
in the About box.
Modified: vidalia/trunk/src/vidalia/network/geoipresolver.cpp
===================================================================
--- vidalia/trunk/src/vidalia/network/geoipresolver.cpp 2008-03-20 22:53:58 UTC (rev 2428)
+++ vidalia/trunk/src/vidalia/network/geoipresolver.cpp 2008-03-21 02:27:36 UTC (rev 2429)
@@ -33,6 +33,19 @@
#define GEOIP_PAGE "/cgi-bin/geoip"
+/** Default constructor. */
+GeoIpResolver::GeoIpResolver()
+{
+ _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
* made. */
void
@@ -234,8 +247,6 @@
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());
- QByteArray caCert(":/geoip/cacert_root.crt");
- socket->addCaCertificate(QSslCertificate(caCert));
socket->connectToRemoteHost(GEOIP_HOST, GEOIP_SSL_PORT, true);
} else {
vInfo("Opening an unencrypted connection to the GeoIP host at %1:%2 "
Modified: vidalia/trunk/src/vidalia/network/geoipresolver.h
===================================================================
--- vidalia/trunk/src/vidalia/network/geoipresolver.h 2008-03-20 22:53:58 UTC (rev 2428)
+++ vidalia/trunk/src/vidalia/network/geoipresolver.h 2008-03-21 02:27:36 UTC (rev 2429)
@@ -35,8 +35,7 @@
public:
/** Default constructor. */
- GeoIpResolver()
- { _socksAddr = QHostAddress::LocalHost; _socksPort = 9050; }
+ GeoIpResolver();
/** Sets the address and port of Tor, through which GeoIP requests will be
* made. */