From 563ab165a8d584f192dcd353fa29a0140dec9b2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 8 Apr 2016 08:29:38 +0000 Subject: AIM adaptation for mir_hmac256 git-svn-id: http://svn.miranda-ng.org/main/trunk@16610 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/AimOscar/src/utility.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'protocols/AimOscar/src/utility.cpp') 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 -- cgit v1.2.3