Core: header cleanup, split realmlist, boost compatibility, cotire, remove stormlib/zlib and stormlib/bzip2 and instead use dep sources
This commit is contained in:
1 parent
7fff6c424f
commit
5ff847159c
1243 files changed
+29780
-36517
No files matched your search
@@ -17,16 +17,19 @@
|
||||
*/
|
||||
|
||||
#include "AuthSession.h"
|
||||
#include "Log.h"
|
||||
#include "AuthCodes.h"
|
||||
#include "Database/DatabaseEnv.h"
|
||||
#include "QueryCallback.h"
|
||||
#include "ByteBuffer.h"
|
||||
#include "Config.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Errors.h"
|
||||
#include "GruntRealmList.h"
|
||||
#include "Log.h"
|
||||
#include "Realm.h"
|
||||
#include "SHA1.h"
|
||||
#include "TOTP.h"
|
||||
#include "openssl/crypto.h"
|
||||
#include "Configuration/Config.h"
|
||||
#include "RealmList.h"
|
||||
#include "Util.h"
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
using boost::asio::ip::tcp;
|
||||
|
||||
@@ -285,7 +288,7 @@ bool AuthSession::HandleLogonChallenge()
|
||||
if (challenge->size - (sizeof(sAuthLogonChallenge_C) - AUTH_LOGON_CHALLENGE_INITIAL_SIZE - 1) != challenge->I_len)
|
||||
return false;
|
||||
|
||||
std::string login((const char*)challenge->I, challenge->I_len);
|
||||
std::string login((char const*)challenge->I, challenge->I_len);
|
||||
TC_LOG_DEBUG("server.authserver", "[AuthChallenge] '%s'", login.c_str());
|
||||
|
||||
_build = challenge->build;
|
||||
@@ -483,7 +486,7 @@ bool AuthSession::HandleLogonProof()
|
||||
return false;
|
||||
|
||||
SHA1Hash sha;
|
||||
sha.UpdateBigNumbers(&A, &B, NULL);
|
||||
sha.UpdateBigNumbers(&A, &B, nullptr);
|
||||
sha.Finalize();
|
||||
BigNumber u;
|
||||
u.SetBinary(sha.GetDigest(), 20);
|
||||
@@ -519,11 +522,11 @@ bool AuthSession::HandleLogonProof()
|
||||
uint8 hash[20];
|
||||
|
||||
sha.Initialize();
|
||||
sha.UpdateBigNumbers(&N, NULL);
|
||||
sha.UpdateBigNumbers(&N, nullptr);
|
||||
sha.Finalize();
|
||||
memcpy(hash, sha.GetDigest(), 20);
|
||||
sha.Initialize();
|
||||
sha.UpdateBigNumbers(&g, NULL);
|
||||
sha.UpdateBigNumbers(&g, nullptr);
|
||||
sha.Finalize();
|
||||
|
||||
for (int i = 0; i < 20; ++i)
|
||||
@@ -539,9 +542,9 @@ bool AuthSession::HandleLogonProof()
|
||||
memcpy(t4, sha.GetDigest(), SHA_DIGEST_LENGTH);
|
||||
|
||||
sha.Initialize();
|
||||
sha.UpdateBigNumbers(&t3, NULL);
|
||||
sha.UpdateBigNumbers(&t3, nullptr);
|
||||
sha.UpdateData(t4, SHA_DIGEST_LENGTH);
|
||||
sha.UpdateBigNumbers(&s, &A, &B, &K, NULL);
|
||||
sha.UpdateBigNumbers(&s, &A, &B, &K, nullptr);
|
||||
sha.Finalize();
|
||||
BigNumber M;
|
||||
M.SetBinary(sha.GetDigest(), sha.GetLength());
|
||||
@@ -585,7 +588,7 @@ bool AuthSession::HandleLogonProof()
|
||||
|
||||
// Finish SRP6 and send the final result to the client
|
||||
sha.Initialize();
|
||||
sha.UpdateBigNumbers(&A, &M, &K, NULL);
|
||||
sha.UpdateBigNumbers(&A, &M, &K, nullptr);
|
||||
sha.Finalize();
|
||||
|
||||
ByteBuffer packet;
|
||||
@@ -689,7 +692,7 @@ bool AuthSession::HandleReconnectChallenge()
|
||||
if (challenge->size - (sizeof(sAuthLogonChallenge_C) - AUTH_LOGON_CHALLENGE_INITIAL_SIZE - 1) != challenge->I_len)
|
||||
return false;
|
||||
|
||||
std::string login((const char*)challenge->I, challenge->I_len);
|
||||
std::string login((char const*)challenge->I, challenge->I_len);
|
||||
TC_LOG_DEBUG("server.authserver", "[ReconnectChallenge] '%s'", login.c_str());
|
||||
|
||||
_build = challenge->build;
|
||||
@@ -756,7 +759,7 @@ bool AuthSession::HandleReconnectProof()
|
||||
SHA1Hash sha;
|
||||
sha.Initialize();
|
||||
sha.UpdateData(_accountInfo.Login);
|
||||
sha.UpdateBigNumbers(&t1, &_reconnectProof, &K, NULL);
|
||||
sha.UpdateBigNumbers(&t1, &_reconnectProof, &K, nullptr);
|
||||
sha.Finalize();
|
||||
|
||||
if (!memcmp(sha.GetDigest(), reconnectProof->R2, SHA_DIGEST_LENGTH))
|
||||
@@ -806,9 +809,9 @@ void AuthSession::RealmListCallback(PreparedQueryResult result)
|
||||
ByteBuffer pkt;
|
||||
|
||||
size_t RealmListSize = 0;
|
||||
for (RealmList::RealmMap::value_type const& i : sRealmList->GetRealms())
|
||||
for (auto const& i : sGruntRealmList->GetRealms())
|
||||
{
|
||||
const Realm &realm = i.second;
|
||||
Realm const& realm = i.second;
|
||||
// don't work with realms which not compatible with the client
|
||||
bool okBuild = ((_expversion & POST_BC_EXP_FLAG) && realm.Build == _build) || ((_expversion & PRE_BC_EXP_FLAG) && !AuthHelper::IsPreBCAcceptedClientBuild(realm.Build));
|
||||
|
||||
|
||||
@@ -20,16 +20,16 @@
|
||||
#define __AUTHSESSION_H__
|
||||
|
||||
#include "Common.h"
|
||||
#include "ByteBuffer.h"
|
||||
#include "Socket.h"
|
||||
#include "BigNumber.h"
|
||||
#include "QueryResult.h"
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include "QueryCallbackProcessor.h"
|
||||
#include <memory>
|
||||
#include "Socket.h"
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <memory>
|
||||
|
||||
using boost::asio::ip::tcp;
|
||||
|
||||
class ByteBuffer;
|
||||
class Field;
|
||||
struct AuthHandler;
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ public:
|
||||
return instance;
|
||||
}
|
||||
|
||||
bool StartNetwork(boost::asio::io_service& service, std::string const& bindIp, uint16 port, int threadCount = 1) override
|
||||
bool StartNetwork(Trinity::Asio::IoContext& ioContext, std::string const& bindIp, uint16 port, int threadCount = 1) override
|
||||
{
|
||||
if (!BaseSocketMgr::StartNetwork(service, bindIp, port, threadCount))
|
||||
if (!BaseSocketMgr::StartNetwork(ioContext, bindIp, port, threadCount))
|
||||
return false;
|
||||
|
||||
_acceptor->AsyncAcceptWithCallback<&AuthSocketMgr::OnSocketAccept>();
|
||||
|
||||
Reference in new issue
Block a user