summaryrefslogtreecommitdiff
path: root/protocols/Steam/src/steam_utils.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2017-12-05 22:48:07 +0100
committerRobert Pösel <robyer@seznam.cz>2017-12-05 22:48:31 +0100
commit0a8dbb91b0f505da3ce617fa5284719b8356cdac (patch)
tree428fec080c21abd172b27ffdde15c52a86c9c7dd /protocols/Steam/src/steam_utils.cpp
parentdd604b30c3153903bef1d40d4ebaa62f14671177 (diff)
Steam: For RsaEncryption use exponent received from server
Diffstat (limited to 'protocols/Steam/src/steam_utils.cpp')
-rw-r--r--protocols/Steam/src/steam_utils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/Steam/src/steam_utils.cpp b/protocols/Steam/src/steam_utils.cpp
index 4723eb7fd9..409ce4276a 100644
--- a/protocols/Steam/src/steam_utils.cpp
+++ b/protocols/Steam/src/steam_utils.cpp
@@ -48,7 +48,7 @@ int CSteamProto::MirandaToSteamState(int status)
}
}
-int CSteamProto::RsaEncrypt(const char *pszModulus, const char *data, BYTE *encryptedData, DWORD &encryptedSize)
+int CSteamProto::RsaEncrypt(const char *pszModulus, DWORD &exponent, const char *data, BYTE *encryptedData, DWORD &encryptedSize)
{
DWORD cchModulus = (DWORD)mir_strlen(pszModulus);
int result = 0;
@@ -103,7 +103,7 @@ int CSteamProto::RsaEncrypt(const char *pszModulus, const char *data, BYTE *encr
RSAPUBKEY *pRsaPubKey = (RSAPUBKEY*)(pKeyBlob + sizeof(PUBLICKEYSTRUC));
pRsaPubKey->magic = 0x31415352; // RSA1 // Use public key
pRsaPubKey->bitlen = cbLen * 8; // Number of bits in the modulus.
- pRsaPubKey->pubexp = 0x10001; // "010001" // Exponent.
+ pRsaPubKey->pubexp = exponent; // Exponent.
// Copy the modulus into the blob. Put the modulus directly after the
// RSAPUBKEY structure in the blob.