mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +00:00
feat(Core/Crypto): add support OpenSSL 3.0 (#13354)
This commit is contained in:
@@ -17,10 +17,10 @@
|
||||
|
||||
#include "AddonMgr.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "CryptoHash.h"
|
||||
#include "Log.h"
|
||||
#include "Timer.h"
|
||||
#include <list>
|
||||
#include <openssl/md5.h>
|
||||
|
||||
namespace AddonMgr
|
||||
{
|
||||
@@ -66,6 +66,7 @@ namespace AddonMgr
|
||||
|
||||
oldMSTime = getMSTime();
|
||||
result = CharacterDatabase.Query("SELECT id, name, version, UNIX_TIMESTAMP(timestamp) FROM banned_addons");
|
||||
|
||||
if (result)
|
||||
{
|
||||
uint32 count2 = 0;
|
||||
@@ -78,14 +79,10 @@ namespace AddonMgr
|
||||
BannedAddon addon{};
|
||||
addon.Id = fields[0].Get<uint32>() + offset;
|
||||
addon.Timestamp = uint32(fields[3].Get<uint64>());
|
||||
addon.NameMD5 = Acore::Crypto::MD5::GetDigestOf(fields[1].Get<std::string>());
|
||||
addon.VersionMD5 = Acore::Crypto::MD5::GetDigestOf(fields[2].Get<std::string>());
|
||||
|
||||
std::string name = fields[1].Get<std::string>();
|
||||
std::string version = fields[2].Get<std::string>();
|
||||
|
||||
MD5(reinterpret_cast<uint8 const*>(name.c_str()), name.length(), addon.NameMD5);
|
||||
MD5(reinterpret_cast<uint8 const*>(version.c_str()), version.length(), addon.VersionMD5);
|
||||
|
||||
m_bannedAddons.push_back(addon);
|
||||
m_bannedAddons.emplace_back(addon);
|
||||
|
||||
++count2;
|
||||
} while (result->NextRow());
|
||||
|
||||
Reference in New Issue
Block a user