diff options
author | George Hazan <george.hazan@gmail.com> | 2016-04-08 08:29:38 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-04-08 08:29:38 +0000 |
commit | 563ab165a8d584f192dcd353fa29a0140dec9b2f (patch) | |
tree | 8dfe637db24084ca3cc4dbc871c0e60971972e8f /protocols/AimOscar/src/utility.cpp | |
parent | f4239191646ae0e49d4984a083d31110e9bc42c1 (diff) |
AIM adaptation for mir_hmac256
git-svn-id: http://svn.miranda-ng.org/main/trunk@16610 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/AimOscar/src/utility.cpp')
-rwxr-xr-x | protocols/AimOscar/src/utility.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp index b6c6822db6..0c2b28e1a1 100755 --- a/protocols/AimOscar/src/utility.cpp +++ b/protocols/AimOscar/src/utility.cpp @@ -100,11 +100,9 @@ void CAimProto::start_connection(void*) }
- bool use_clientlogin = getByte(AIM_KEY_CLIENTLOGIN, 0);
-
+ bool use_clientlogin = getByte(AIM_KEY_CLIENTLOGIN, 0) != 0;
if (!use_clientlogin)
{
-
char* login_url = getStringA(AIM_KEY_HN);
//if (login_url == NULL) login_url = mir_strdup(use_ssl ? AIM_DEFAULT_SERVER : AIM_DEFAULT_SERVER_NS);
@@ -664,19 +662,3 @@ unsigned short get_random(void) id &= 0x7fff;
return id;
}
-
-void hmac_sha256(const char *key, const char *msg, char *buf)
-{
- unsigned char hash[32];
-
- HMAC_CTX hmac;
- HMAC_CTX_init(&hmac);
- HMAC_Init_ex(&hmac, &key[0], strlen(key), EVP_sha256(), NULL);
- HMAC_Update(&hmac, (unsigned char*)&msg[0], strlen(msg));
- unsigned int len = 32;
- HMAC_Final(&hmac, hash, &len);
- HMAC_CTX_cleanup(&hmac);
-
- mir_strncpy(buf, key, len);
-
-}
\ No newline at end of file |