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 /Swift/Controllers/Storages/CertificateFileStorage.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 'Swift/Controllers/Storages/CertificateFileStorage.cpp')
-rw-r--r--Swift/Controllers/Storages/CertificateFileStorage.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Swift/Controllers/Storages/CertificateFileStorage.cpp b/Swift/Controllers/Storages/CertificateFileStorage.cpp
index 55016d5..b5e85d2 100644
--- a/Swift/Controllers/Storages/CertificateFileStorage.cpp
+++ b/Swift/Controllers/Storages/CertificateFileStorage.cpp
@@ -10,14 +10,14 @@
#include <boost/filesystem/fstream.hpp>
#include <boost/numeric/conversion/cast.hpp>
-#include <Swiften/StringCodecs/SHA1.h>
#include <Swiften/StringCodecs/Hexify.h>
#include <Swiften/TLS/CertificateFactory.h>
#include <Swiften/Base/Log.h>
+#include <Swiften/Crypto/CryptoProvider.h>
namespace Swift {
-CertificateFileStorage::CertificateFileStorage(const boost::filesystem::path& path, CertificateFactory* certificateFactory) : path(path), certificateFactory(certificateFactory) {
+CertificateFileStorage::CertificateFileStorage(const boost::filesystem::path& path, CertificateFactory* certificateFactory, CryptoProvider* crypto) : path(path), certificateFactory(certificateFactory), crypto(crypto) {
}
bool CertificateFileStorage::hasCertificate(Certificate::ref certificate) const {
@@ -56,7 +56,7 @@ void CertificateFileStorage::addCertificate(Certificate::ref certificate) {
}
boost::filesystem::path CertificateFileStorage::getCertificatePath(Certificate::ref certificate) const {
- return path / Hexify::hexify(SHA1::getHash(certificate->toDER()));
+ return path / Hexify::hexify(crypto->getSHA1Hash(certificate->toDER()));
}
}