Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/pidgin-opensteamworks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEion Robb <eion@robbmob.com>2016-02-16 09:20:03 +0300
committerEion Robb <eion@robbmob.com>2016-02-16 09:20:03 +0300
commit9d51f3049b9d1daa4c94bc7d5bdb49c776fae0d3 (patch)
treef2671b9d1da28b32213c7e87576fe1af25a7b5a6
parent239cb361a44767c459685a41021c129cc3c119e7 (diff)
Fix for bad function calls in win32 RSA functions
-rw-r--r--steam-mobile/steam_rsa.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/steam-mobile/steam_rsa.c b/steam-mobile/steam_rsa.c
index 2f74d8b..767bcd4 100644
--- a/steam-mobile/steam_rsa.c
+++ b/steam-mobile/steam_rsa.c
@@ -447,13 +447,14 @@ steam_encrypt_password(const gchar *modulus_str, const gchar *exponent_str, cons
return NULL;
}
- DWORD dataSize = (DWORD)strlen(password);
- DWORD encryptedSize;
+ DWORD dataSize = strlen(password);
+ DWORD encryptedSize = dataSize;
// get length of encrypted data
- if (!CryptEncrypt(phKey, 0, TRUE, 0, NULL, &encryptedSize, dataSize))
+ if (!CryptEncrypt(phKey, 0, TRUE, 0, NULL, &encryptedSize, 0))
{
- purple_debug_error("steam", "password encryption failed, couldnt get length of RSA, error=%d\n", GetLastError());
+ gint errorno = GetLastError();
+ purple_debug_error("steam", "password encryption failed, couldnt get length of RSA, error=%d %s\n", errorno, g_win32_error_message(errorno));
free(pKeyBlob);
free(pbBuffer);