From 699805f92b46fe6e3282672e89e693e20125497a Mon Sep 17 00:00:00 2001 From: Alexander Gluzsky Date: Fri, 8 Apr 2016 01:25:53 +0000 Subject: aim: "clientlogin": code is turned on by default old authorization mechanizm is kept for some time, it can be used only without encryption //TODO: testing is required, i does not have working aim account to test it, so i have tested only first stage of authorization where i can bypass login:password validation git-svn-id: http://svn.miranda-ng.org/main/trunk@16608 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/AimOscar/src/utility.cpp | 41 +++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 14 deletions(-) (limited to 'protocols/AimOscar/src/utility.cpp') diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp index 4ba0cc56c5..b6c6822db6 100755 --- a/protocols/AimOscar/src/utility.cpp +++ b/protocols/AimOscar/src/utility.cpp @@ -99,26 +99,39 @@ void CAimProto::start_connection(void*) return; } - //bool use_ssl = !getByte(AIM_KEY_DSSL, 0); - bool use_ssl = false; - char* login_url = getStringA(AIM_KEY_HN); - //if (login_url == NULL) login_url = mir_strdup(use_ssl ? AIM_DEFAULT_SERVER : AIM_DEFAULT_SERVER_NS); - if (login_url == NULL) login_url = mir_strdup(AIM_DEFAULT_SERVER); + bool use_clientlogin = getByte(AIM_KEY_CLIENTLOGIN, 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); + + + if (login_url == NULL) login_url = mir_strdup(AIM_DEFAULT_SERVER); + - m_hServerConn = aim_connect(login_url, get_default_port(), use_ssl, login_url); - mir_free(login_url); + m_hServerConn = aim_connect(login_url, get_default_port(), false, login_url); //ssl does not work anymore with old authorization algo - m_pref1_flags = 0x77ffff; - m_pref1_set_flags = 0x77ffff; - mir_free(m_pref2_flags); m_pref2_flags = NULL; m_pref2_len = 0; - mir_free(m_pref2_set_flags); m_pref2_set_flags = NULL; m_pref2_set_len = 0; + mir_free(login_url); - if (m_hServerConn) - aim_connection_authorization(); + m_pref1_flags = 0x77ffff; + m_pref1_set_flags = 0x77ffff; + mir_free(m_pref2_flags); m_pref2_flags = NULL; m_pref2_len = 0; + mir_free(m_pref2_set_flags); m_pref2_set_flags = NULL; m_pref2_set_len = 0; + + if (m_hServerConn) + aim_connection_authorization(); + else + broadcast_status(ID_STATUS_OFFLINE); + } else - broadcast_status(ID_STATUS_OFFLINE); + { + aim_connection_clientlogin(); + + } } } -- cgit v1.2.3