diff --git a/src/jamidht/conversationrepository.cpp b/src/jamidht/conversationrepository.cpp index 2ddf3044bcc1d838b8681457fee46939abf6cb6e..53e89740681ac722be7764a87e8bfdeeda0619c4 100644 --- a/src/jamidht/conversationrepository.cpp +++ b/src/jamidht/conversationrepository.cpp @@ -182,12 +182,7 @@ add_initial_files(GitRepository& repo, const std::shared_ptr<JamiAccount>& accou for (const auto& crl : account->identity().second->getRevocationLists()) { if (!crl) continue; - auto v = crl->getNumber(); - std::stringstream ss; - ss << std::hex; - for (const auto& b : v) - ss << (unsigned) b; - std::string crlPath = crlsPath + DIR_SEPARATOR_STR + deviceId + DIR_SEPARATOR_STR + ss.str() + std::string crlPath = crlsPath + DIR_SEPARATOR_STR + deviceId + DIR_SEPARATOR_STR + dht::toHex(crl->getNumber()) + ".crl"; file = fileutils::ofstream(crlPath, std::ios::trunc | std::ios::binary); if (!file.is_open()) { diff --git a/src/security/certstore.cpp b/src/security/certstore.cpp index 6e1d910f3c54f4f7354fba2f52c72001988f1036..748557bcd5dc4ee958bac4e38a645e3f3eaa3df5 100644 --- a/src/security/certstore.cpp +++ b/src/security/certstore.cpp @@ -388,14 +388,8 @@ CertificateStore::pinRevocationList(const std::string& id, void CertificateStore::pinRevocationList(const std::string& id, const dht::crypto::RevocationList& crl) { - auto v = crl.getNumber(); - std::stringstream ss; - ss << std::hex; - for (const auto& b : v) - ss << (unsigned) b; - fileutils::check_dir((crlPath_ + DIR_SEPARATOR_CH + id).c_str()); - fileutils::saveFile(crlPath_ + DIR_SEPARATOR_CH + id + DIR_SEPARATOR_CH + ss.str(), + fileutils::saveFile(crlPath_ + DIR_SEPARATOR_CH + id + DIR_SEPARATOR_CH + dht::toHex(crl.getNumber()), crl.getPacked()); }