diff options
author | Remko Tronçon <git@el-tramo.be> | 2013-04-26 20:07:58 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2013-04-27 11:02:06 (GMT) |
commit | 5d8c328e236f57d7390d32f9ea7bd17a31e1e740 (patch) | |
tree | bebe606707a6b835fe3fd15e694d629b5e420947 /Swift/Controllers/Storages/CertificateFileStorage.cpp | |
parent | aa131405927fc7f597ed06aff71abb0a30b59926 (diff) | |
download | swift-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.cpp | 6 |
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())); } } |