From 6c0bc679241489afbe3a9ae55bd41da5ed6056b6 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Tue, 3 Jun 2014 12:39:16 +0000 Subject: Steam: work commit - added requests queue - code refactoring Note: this commit may contain regress of functionality and bugs git-svn-id: http://svn.miranda-ng.org/main/trunk@9401 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/steam_utils.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'protocols/Steam/src/steam_utils.cpp') diff --git a/protocols/Steam/src/steam_utils.cpp b/protocols/Steam/src/steam_utils.cpp index bc5d624a75..1ac29f593c 100644 --- a/protocols/Steam/src/steam_utils.cpp +++ b/protocols/Steam/src/steam_utils.cpp @@ -44,9 +44,8 @@ int CSteamProto::MirandaToSteamState(int status) } } -int CSteamProto::RsaEncrypt(const SteamWebApi::RsaKeyApi::RsaKey &rsaKey, const char *data, DWORD dataSize, BYTE *encryptedData, DWORD &encryptedSize) +int CSteamProto::RsaEncrypt(const char *pszModulus, const char *data, BYTE *encryptedData, DWORD &encryptedSize) { - const char *pszModulus = rsaKey.GetModulus(); DWORD cchModulus = (DWORD)strlen(pszModulus); // convert hex string to byte array @@ -100,6 +99,8 @@ int CSteamProto::RsaEncrypt(const SteamWebApi::RsaKeyApi::RsaKey &rsaKey, const if (!CryptImportKey(hCSP, pKeyBlob, cbKeyBlob, 0, 0, &phKey)) return GetLastError(); + DWORD dataSize = strlen(data); + // if data is not allocated just renurn size if (encryptedData == NULL) { -- cgit v1.2.3