summaryrefslogtreecommitdiff
path: root/protocols/AimOscar
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-04-08 08:55:26 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-04-08 08:55:26 +0000
commitceaf8483c74a658e13b740ddff6b2ef85c0ee063 (patch)
tree2c759e45e10c62249145983a88f1677979d3fdd9 /protocols/AimOscar
parent563ab165a8d584f192dcd353fa29a0140dec9b2f (diff)
base64 to be used instead of bin2hex
git-svn-id: http://svn.miranda-ng.org/main/trunk@16611 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/AimOscar')
-rwxr-xr-xprotocols/AimOscar/src/connection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/AimOscar/src/connection.cpp b/protocols/AimOscar/src/connection.cpp
index 2375109264..c7b9dd1b20 100755
--- a/protocols/AimOscar/src/connection.cpp
+++ b/protocols/AimOscar/src/connection.cpp
@@ -275,8 +275,8 @@ void fill_session_url(char *buf, size_t bufSize, char *token, char *secret, time
mir_hmac_sha256(session_key, (BYTE*)password, mir_strlen(password), (BYTE*)secret, mir_strlen(secret));
generate_signature(signature, "GET", AIM_SESSION_URL, query_string, session_key);
- size_t cbLen = mir_snprintf(buf, bufSize, "%s?%s&sig_sha256=", AIM_SESSION_URL, query_string);
- bin2hex(signature, sizeof(signature), buf + cbLen);
+ ptrA szEncoded(mir_base64_encode(signature, sizeof(signature)));
+ mir_snprintf(buf, bufSize, "%s?%s&sig_sha256=%s", AIM_SESSION_URL, query_string, (char*)szEncoded);
}
bool parse_start_socar_session_response(char *response, char *bos_host, unsigned short bos_port, char *cookie, char *tls_cert_name, bool encryption = true)