summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-04-26 20:07:58 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-04-27 11:02:06 (GMT)
commit5d8c328e236f57d7390d32f9ea7bd17a31e1e740 (patch)
treebebe606707a6b835fe3fd15e694d629b5e420947 /Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp
parentaa131405927fc7f597ed06aff71abb0a30b59926 (diff)
downloadswift-5d8c328e236f57d7390d32f9ea7bd17a31e1e740.zip
swift-5d8c328e236f57d7390d32f9ea7bd17a31e1e740.tar.bz2
Removing third-party hash implementations.
Using library/platform implementation instead. Change-Id: I2457c2dad80e6fdda023a7f31c3906ff10fe09ed
Diffstat (limited to 'Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp')
-rw-r--r--Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp
index 502cf2d..65ff290 100644
--- a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp
+++ b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp
@@ -30,6 +30,8 @@
#include <Swiften/Network/DummyConnection.h>
#include <Swiften/Network/DummyTimerFactory.h>
#include <Swiften/StringCodecs/Hexify.h>
+#include <Swiften/Crypto/CryptoProvider.h>
+#include <Swiften/Crypto/PlatformCryptoProvider.h>
using namespace Swift;
@@ -44,14 +46,12 @@ class SOCKS5BytestreamClientSessionTest : public CppUnit::TestFixture {
CPPUNIT_TEST(testReadBytestream);
CPPUNIT_TEST_SUITE_END();
- const HostAddressPort destinationAddressPort;
- const std::string destination;
-
public:
- SOCKS5BytestreamClientSessionTest() : destinationAddressPort(HostAddressPort(HostAddress("127.0.0.1"), 8888)),
- destination(SOCKS5BytestreamRegistry::getHostname("foo", JID("requester@example.com/test"), JID("target@example.com/test"))), eventLoop(NULL), timerFactory(NULL) { }
+ SOCKS5BytestreamClientSessionTest() : destinationAddressPort(HostAddressPort(HostAddress("127.0.0.1"), 8888)) {}
void setUp() {
+ crypto = boost::shared_ptr<CryptoProvider>(PlatformCryptoProvider::create());
+ destination = SOCKS5BytestreamRegistry::getHostname("foo", JID("requester@example.com/test"), JID("target@example.com/test"), crypto.get());
randomGen.seed(static_cast<unsigned int>(time(NULL)));
eventLoop = new DummyEventLoop();
timerFactory = new DummyTimerFactory();
@@ -297,10 +297,13 @@ private:
};
private:
+ HostAddressPort destinationAddressPort;
+ std::string destination;
DummyEventLoop* eventLoop;
DummyTimerFactory* timerFactory;
boost::shared_ptr<MockeryConnection> connection;
const std::vector<HostAddressPort> failingPorts;
+ boost::shared_ptr<CryptoProvider> crypto;
};
CPPUNIT_TEST_SUITE_REGISTRATION(SOCKS5BytestreamClientSessionTest);