diff options
Diffstat (limited to 'Swiften/TLS/Certificate.cpp')
-rw-r--r-- | Swiften/TLS/Certificate.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/TLS/Certificate.cpp b/Swiften/TLS/Certificate.cpp index a796463..ec268c8 100644 --- a/Swiften/TLS/Certificate.cpp +++ b/Swiften/TLS/Certificate.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Remko Tronçon + * Copyright (c) 2010-2013 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ @@ -8,7 +8,7 @@ #include <sstream> -#include <Swiften/StringCodecs/SHA1.h> +#include <Swiften/Crypto/CryptoProvider.h> #include <Swiften/StringCodecs/Hexify.h> namespace Swift { @@ -19,8 +19,8 @@ const char* Certificate::ID_ON_DNSSRV_OID = "1.3.6.1.5.5.7.8.7"; Certificate::~Certificate() { } -std::string Certificate::getSHA1Fingerprint() const { - ByteArray hash = SHA1::getHash(toDER()); +std::string Certificate::getSHA1Fingerprint(Certificate::ref certificate, CryptoProvider* crypto) { + ByteArray hash = crypto->getSHA1Hash(certificate->toDER()); std::ostringstream s; for (size_t i = 0; i < hash.size(); ++i) { if (i > 0) { |