Compare commits

..

No commits in common. "master" and "0.2.0.25" have entirely different histories.

3 changed files with 8 additions and 14 deletions

View File

@ -61,10 +61,15 @@ void SaltSteamId(authdata_t* authdata) {
byte buf[MAX_HASHDATA_LEN];
CSizeBuf szbuf(buf, sizeof buf);
// deprecated auth version reunion2015 has a truncated ticket buffer
const uint32_t MAX_RAWAUTHDATA_TRUNC = 16;
uint32_t authKeyMaxLen = (g_ReunionConfig->getAuthVersion() == av_reunion2015)
? MAX_RAWAUTHDATA_TRUNC : authdata->authKeyLen;
if (g_ReunionConfig->getAuthVersion() < av_reunion2018)
szbuf.WriteLong(authdata->steamId);
if (g_ReunionConfig->getAuthVersion() > av_dproto)
szbuf.Write(authdata->authKey, Reunion_AuthKeyMaxLen(authdata));
szbuf.Write(authdata->authKey, authKeyMaxLen);
szbuf.Write(g_ReunionConfig->getSteamIdSalt(), g_ReunionConfig->getSteamIdSaltLen());

View File

@ -37,27 +37,17 @@ int g_NumClientAuthorizers = 0;
const char *g_RevEmuCryptKey = "_YOU_SERIOUSLY_NEED_TO_GET_LAID_";
const uint32_t g_SteamEmuHashKey = 0xC9710266;
static uint32_t revHash(const char* str, int n = -1)
static uint32_t revHash(const char* str)
{
uint32_t hash = 0x4E67C6A7;
for (int cc = *str; cc && n != 0; cc = *++str, --n) {
for (int cc = *str; cc; cc = *++str) {
hash ^= (hash >> 2) + cc + 32 * hash;
}
return hash;
}
// deprecated auth version reunion2015 has a truncated ticket buffer
size_t Reunion_AuthKeyMaxLen(authdata_t* authdata)
{
const uint32_t MAX_RAWAUTHDATA_TRUNCATED = 16;
uint32_t authKeyMaxLen = (g_ReunionConfig->getAuthVersion() == av_reunion2015)
? min(authdata->authKeyLen, MAX_RAWAUTHDATA_TRUNCATED) : authdata->authKeyLen;
return authKeyMaxLen;
}
void RevEmuFinishAuthorization(authdata_t* authdata, const char* authStr, size_t authKeyMaxLen, bool stripSpecialChars)
{
uint32_t volumeId;

View File

@ -85,4 +85,3 @@ class CNoSteam48Authorizer : public IClientAuthorizer {
extern void Reunion_Init_Authorizers();
extern client_auth_kind Reunion_Authorize_Client(authdata_t* authdata);
extern const char* Reunion_GetAuthorizerName(client_auth_kind authKind);
extern size_t Reunion_AuthKeyMaxLen(authdata_t* authdata);