diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/AimOscar/aim.cpp | 8 | ||||
-rw-r--r-- | protocols/FacebookRM/main.cpp | 8 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/gg.c | 8 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/gg.h | 1 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/oauth.c | 6 | ||||
-rw-r--r-- | protocols/IRCG/main.cpp | 6 | ||||
-rw-r--r-- | protocols/IcqOscarJ/init.cpp | 5 | ||||
-rw-r--r-- | protocols/JabberG/jabber.cpp | 14 | ||||
-rw-r--r-- | protocols/MRA/Mra.cpp | 18 | ||||
-rw-r--r-- | protocols/MSN/msn.cpp | 14 | ||||
-rw-r--r-- | protocols/NewsAggregator/Src/NewsAggregator.cpp | 7 | ||||
-rw-r--r-- | protocols/Omegle/main.cpp | 6 | ||||
-rw-r--r-- | protocols/Quotes/Forex.cpp | 4 | ||||
-rw-r--r-- | protocols/Twitter/main.cpp | 9 | ||||
-rw-r--r-- | protocols/Weather/weather.cpp | 5 | ||||
-rw-r--r-- | protocols/YAMN/main.cpp | 5 | ||||
-rw-r--r-- | protocols/Yahoo/libyahoo2/config.h | 12 | ||||
-rw-r--r-- | protocols/Yahoo/libyahoo2/crypt.c | 52 | ||||
-rw-r--r-- | protocols/Yahoo/libyahoo2/libyahoo2.c | 36 | ||||
-rw-r--r-- | protocols/Yahoo/main.cpp | 14 | ||||
-rw-r--r-- | protocols/Yahoo/yahoo.h | 1 |
21 files changed, 58 insertions, 181 deletions
diff --git a/protocols/AimOscar/aim.cpp b/protocols/AimOscar/aim.cpp index e59bdbf395..655fd0e42c 100644 --- a/protocols/AimOscar/aim.cpp +++ b/protocols/AimOscar/aim.cpp @@ -22,10 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. char AIM_CAP_MIRANDA[16] = "MirandaA";
PLUGINLINK *pluginLink;
-MD5_INTERFACE md5i;
-MM_INTERFACE mmi;
-UTF8_INTERFACE utfi;
-LIST_INTERFACE li;
int hLangpack;
HINSTANCE hInstance;
@@ -115,10 +111,6 @@ static int protoUninit(PROTO_INTERFACE* ppro) extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
{
pluginLink = link;
- mir_getMMI(&mmi);
- mir_getMD5I(&md5i);
- mir_getUTFI(&utfi);
- mir_getLI(&li);
mir_getLP(&pluginInfo);
hMooduleLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
diff --git a/protocols/FacebookRM/main.cpp b/protocols/FacebookRM/main.cpp index 8725af285e..e287712d0c 100644 --- a/protocols/FacebookRM/main.cpp +++ b/protocols/FacebookRM/main.cpp @@ -24,11 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // TODO: Make following as "globals" structure?
PLUGINLINK *pluginLink;
-MM_INTERFACE mmi;
-LIST_INTERFACE li;
CLIST_INTERFACE* pcli;
-UTF8_INTERFACE utfi;
-MD5_INTERFACE md5i;
int hLangpack;
HINSTANCE g_hInstance;
@@ -127,10 +123,6 @@ static HANDLE g_hEvents[1]; extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
{
pluginLink = link;
- mir_getMMI(&mmi);
- mir_getLI(&li);
- mir_getUTFI(&utfi);
- mir_getMD5I(&md5i);
mir_getLP(&pluginInfo);
pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
diff --git a/protocols/Gadu-Gadu/gg.c b/protocols/Gadu-Gadu/gg.c index 6cb5abf554..778f62eeb1 100644 --- a/protocols/Gadu-Gadu/gg.c +++ b/protocols/Gadu-Gadu/gg.c @@ -43,10 +43,6 @@ static const MUUID interfaces[] = {MIID_PROTOCOL, MIID_LAST}; // Other variables
HINSTANCE hInstance;
PLUGINLINK *pluginLink;
-struct MM_INTERFACE mmi;
-struct SHA1_INTERFACE sha1i;
-struct MD5_INTERFACE md5i;
-struct LIST_INTERFACE li;
XML_API xi;
SSL_API si;
CLIST_INTERFACE *pcli;
@@ -572,10 +568,6 @@ int __declspec(dllexport) Load(PLUGINLINK * link) PROTOCOLDESCRIPTOR pd;
pluginLink = link;
- mir_getMMI(&mmi);
- mir_getSHA1I(&sha1i);
- mir_getMD5I(&md5i);
- mir_getLI(&li);
mir_getXI(&xi);
mir_getLP(&pluginInfo);
diff --git a/protocols/Gadu-Gadu/gg.h b/protocols/Gadu-Gadu/gg.h index 8ebfbd81a8..79abb3190e 100644 --- a/protocols/Gadu-Gadu/gg.h +++ b/protocols/Gadu-Gadu/gg.h @@ -356,7 +356,6 @@ typedef void (__cdecl GGThreadFunc)(void*, void*); extern HINSTANCE hInstance;
extern PLUGINLINK *pluginLink;
extern CLIST_INTERFACE *pcli;
-extern struct LIST_INTERFACE li;
extern list_t g_Instances;
// Screen saver
diff --git a/protocols/Gadu-Gadu/oauth.c b/protocols/Gadu-Gadu/oauth.c index 2c0631d655..15f9e592fe 100644 --- a/protocols/Gadu-Gadu/oauth.c +++ b/protocols/Gadu-Gadu/oauth.c @@ -204,7 +204,7 @@ void oauth_setparam(SortedList *params, const char *name, const char *value) p = mir_alloc(sizeof(OAUTHPARAMETER));
p->name = oauth_uri_escape(name);
p->value = oauth_uri_escape(value);
- li.List_InsertPtr(params, p);
+ List_InsertPtr(params, p);
}
void oauth_freeparams(SortedList *params)
@@ -331,7 +331,7 @@ char *oauth_auth_header(const char *httpmethod, const char *url, OAUTHSIGNMETHOD if (oauth_sign_request(&oauth_parameters, httpmethod, url, consumer_secret, token_secret)) {
oauth_freeparams(&oauth_parameters);
- li.List_Destroy(&oauth_parameters);
+ List_Destroy(&oauth_parameters);
return NULL;
}
@@ -355,7 +355,7 @@ char *oauth_auth_header(const char *httpmethod, const char *url, OAUTHSIGNMETHOD }
oauth_freeparams(&oauth_parameters);
- li.List_Destroy(&oauth_parameters);
+ List_Destroy(&oauth_parameters);
return res;
}
diff --git a/protocols/IRCG/main.cpp b/protocols/IRCG/main.cpp index a44217abc9..b94e26d614 100644 --- a/protocols/IRCG/main.cpp +++ b/protocols/IRCG/main.cpp @@ -24,9 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. PLUGINLINK* pluginLink;
HINSTANCE hInst = NULL;
-UTF8_INTERFACE utfi;
-MM_INTERFACE mmi;
-LIST_INTERFACE li;
int hLangpack;
@@ -100,9 +97,6 @@ static int ircProtoUninit( CIrcProto* ppro ) extern "C" int __declspec(dllexport) Load( PLUGINLINK *link )
{
pluginLink = link;
- mir_getMMI( &mmi );
- mir_getUTFI( &utfi );
- mir_getLI( &li );
mir_getLP( &pluginInfo );
AddIcons();
diff --git a/protocols/IcqOscarJ/init.cpp b/protocols/IcqOscarJ/init.cpp index 2e05d249ab..db0af2db23 100644 --- a/protocols/IcqOscarJ/init.cpp +++ b/protocols/IcqOscarJ/init.cpp @@ -39,10 +39,6 @@ HINSTANCE hInst;
PLUGINLINK* pluginLink;
-MM_INTERFACE mmi;
-UTF8_INTERFACE utfi;
-MD5_INTERFACE md5i;
-LIST_INTERFACE li;
int hLangpack;
DWORD MIRANDA_VERSION;
@@ -111,7 +107,6 @@ static int OnModulesLoaded( WPARAM, LPARAM ) extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
{
pluginLink = link;
- mir_getMD5I( &md5i );
mir_getLP( &pluginInfo );
// Get Miranda version
diff --git a/protocols/JabberG/jabber.cpp b/protocols/JabberG/jabber.cpp index d265df4fc8..a5f21e2613 100644 --- a/protocols/JabberG/jabber.cpp +++ b/protocols/JabberG/jabber.cpp @@ -63,13 +63,8 @@ PLUGININFOEX pluginInfo = { {0x144e80a2, 0xd198, 0x428b, {0xac, 0xbe, 0x9d, 0x55, 0xda, 0xcc, 0x7f, 0xde}} // {144E80A2-D198-428b-ACBE-9D55DACC7FDE}
};
-MM_INTERFACE mmi;
-LIST_INTERFACE li;
-UTF8_INTERFACE utfi;
-MD5_INTERFACE md5i;
-SHA1_INTERFACE sha1i;
-XML_API xi;
-TIME_API tmi;
+XML_API xi;
+TIME_API tmi;
CLIST_INTERFACE* pcli;
@@ -234,11 +229,6 @@ extern "C" int __declspec( dllexport ) Load( PLUGINLINK *link ) pluginLink = link;
// set the memory, lists & utf8 managers
- mir_getMMI( &mmi );
- mir_getLI( &li );
- mir_getUTFI( &utfi );
- mir_getMD5I( &md5i );
- mir_getSHA1I( &sha1i );
mir_getXI( &xi );
mir_getTMI( &tmi );
mir_getLP( &pluginInfo );
diff --git a/protocols/MRA/Mra.cpp b/protocols/MRA/Mra.cpp index 4bc6f56c28..0cf1e55d46 100644 --- a/protocols/MRA/Mra.cpp +++ b/protocols/MRA/Mra.cpp @@ -1,7 +1,6 @@ #include "Mra.h"
PLUGINLINK *pluginLink;
-MM_INTERFACE mmi;
MRA_SETTINGS masMraSettings;
int hLangpack;
@@ -72,9 +71,7 @@ extern "C" MRA_API int Load(PLUGINLINK *link) PROTOCOLDESCRIPTOR pd={0};
pluginLink=link;
- mir_getLP(&pluginInfoEx);
- mir_getMMI(&mmi);
-
+ mir_getLP(&pluginInfoEx);
// Get module name from DLL file name
if (GetModuleFileName(masMraSettings.hInstance,szBuff,MAX_FILEPATH))
@@ -105,7 +102,7 @@ extern "C" MRA_API int Load(PLUGINLINK *link) // load libs
if (GetModuleFileName(NULL,szBuff,MAX_FILEPATH))
- {//
+ {//
DWORD dwErrorCode;
masMraSettings.dwMirWorkDirPathLen=GetFullPathName(szBuff,MAX_FILEPATH,masMraSettings.szMirWorkDirPath,&lpwszFileName);
@@ -215,11 +212,8 @@ extern "C" MRA_API int Unload(void) masMraSettings.lpfnUncompress=NULL;
}
- SecureZeroMemory(pluginLink,sizeof(pluginLink));
- SecureZeroMemory(&mmi,sizeof(pluginLink));
-
DebugPrintCRLFW(L"Unload - DONE");
-return(0);
+ return(0);
}
@@ -257,7 +251,7 @@ static int OnModulesLoaded(WPARAM wParam,LPARAM lParam) DB_Mra_CreateResidentSetting(DBSETTING_BLOGSTATUSID);
DB_Mra_CreateResidentSetting(DBSETTING_BLOGSTATUS);
DB_Mra_CreateResidentSetting(DBSETTING_BLOGSTATUSMUSIC);
-
+
// всех в offline // тк unsaved values сохраняются их нужно инициализировать
for(HANDLE hContact=(HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);hContact!=NULL;hContact=(HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0))
{// функция сама проверяет принадлежность контакта к MRA
@@ -266,7 +260,7 @@ static int OnModulesLoaded(WPARAM wParam,LPARAM lParam) #endif
MraAvatarsQueueInitialize(&masMraSettings.hAvatarsQueueHandle);
-
+
VersionConversions();
MraAntiSpamLoadBadWordsW();
@@ -287,7 +281,7 @@ int OnPreShutdown(WPARAM wParam,LPARAM lParam) InterlockedExchange((volatile LONG*)&masMraSettings.dwGlobalPluginRunning,FALSE);
MraSetStatus(ID_STATUS_OFFLINE,0);
-
+
MraAvatarsQueueDestroy(masMraSettings.hAvatarsQueueHandle);
masMraSettings.hAvatarsQueueHandle=NULL;
diff --git a/protocols/MSN/msn.cpp b/protocols/MSN/msn.cpp index 4554de8538..16b11dedaa 100644 --- a/protocols/MSN/msn.cpp +++ b/protocols/MSN/msn.cpp @@ -25,13 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. HINSTANCE hInst;
PLUGINLINK *pluginLink;
int hLangpack;
-
-MM_INTERFACE mmi;
-LIST_INTERFACE li;
-UTF8_INTERFACE utfi;
-MD5_INTERFACE md5i;
-SHA1_INTERFACE sha1i;
-TIME_API tmi;
+TIME_API tmi;
HANDLE hMooduleLoaded;
@@ -121,12 +115,6 @@ static int msnProtoUninit(CMsnProto* ppro) extern "C" int __declspec(dllexport) Load(PLUGINLINK* link)
{
pluginLink = link;
-
- mir_getLI(&li);
- mir_getMMI(&mmi);
- mir_getUTFI(&utfi);
- mir_getMD5I(&md5i);
- mir_getSHA1I(&sha1i);
mir_getTMI(&tmi);
mir_getLP(&pluginInfo);
diff --git a/protocols/NewsAggregator/Src/NewsAggregator.cpp b/protocols/NewsAggregator/Src/NewsAggregator.cpp index 7d33817b86..694eb46bea 100644 --- a/protocols/NewsAggregator/Src/NewsAggregator.cpp +++ b/protocols/NewsAggregator/Src/NewsAggregator.cpp @@ -22,13 +22,11 @@ Boston, MA 02111-1307, USA. HINSTANCE hInst = NULL;
PLUGINLINK *pluginLink;
int hLangpack;
-struct MM_INTERFACE mmi;
HANDLE hOptHook = NULL, hLoadHook = NULL, hOnPreShutdown = NULL, hPrebuildMenuHook = NULL, hPackUpdaterFolder = NULL;
HANDLE hProtoService[7];
HWND hAddFeedDlg;
HANDLE hChangeFeedDlgList = NULL;
XML_API xi = {0};
-struct UTF8_INTERFACE utfi;
TCHAR tszRoot[MAX_PATH] = {0};
HANDLE hUpdateMutex;
#define NUM_SERVICES 6
@@ -71,10 +69,7 @@ extern "C" __declspec(dllexport) int Load(PLUGINLINK *link) {
pluginLink = link;
mir_getLP(&pluginInfoEx);
- mir_getMMI(&mmi);
- mir_getXI(&xi);
- mir_getUTFI(&utfi);
-
+ mir_getXI(&xi);
if (ServiceExists(MS_FOLDERS_REGISTER_PATH))
{
hPackUpdaterFolder = FoldersRegisterCustomPathT("News Aggregator", "Avatars", MIRANDA_USERDATAT _T("\\Avatars\\")_T(DEFAULT_AVATARS_FOLDER));
diff --git a/protocols/Omegle/main.cpp b/protocols/Omegle/main.cpp index 14a5cb4426..c3413f38fe 100644 --- a/protocols/Omegle/main.cpp +++ b/protocols/Omegle/main.cpp @@ -24,10 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // TODO: Make following as "globals" structure?
PLUGINLINK *pluginLink;
-MM_INTERFACE mmi;
-LIST_INTERFACE li;
CLIST_INTERFACE* pcli;
-UTF8_INTERFACE utfi;
int hLangpack;
HINSTANCE g_hInstance;
@@ -126,9 +123,6 @@ static HANDLE g_hEvents[1]; extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
{
pluginLink = link;
- mir_getMMI(&mmi);
- mir_getLI(&li);
- mir_getUTFI(&utfi);
mir_getLP(&pluginInfo);
pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
diff --git a/protocols/Quotes/Forex.cpp b/protocols/Quotes/Forex.cpp index bd86956a2c..f7df776ee2 100644 --- a/protocols/Quotes/Forex.cpp +++ b/protocols/Quotes/Forex.cpp @@ -32,8 +32,6 @@ #include "version.h"
PLUGINLINK* pluginLink = NULL;
-struct MM_INTERFACE mmi;
-struct UTF8_INTERFACE utfi;
int hLangpack;
HANDLE g_hEventWorkThreadStop;
@@ -440,8 +438,6 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
{
pluginLink = link;
- mir_getMMI(&mmi);
- mir_getUTFI(&utfi);
mir_getLP(&Global_pluginInfo);
// if ((mirandaVersion >= 0x0800) && (1 == mir_getXI(&xi)))
// {
diff --git a/protocols/Twitter/main.cpp b/protocols/Twitter/main.cpp index 2c3c663156..cc9ddc95c2 100644 --- a/protocols/Twitter/main.cpp +++ b/protocols/Twitter/main.cpp @@ -24,11 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "m_updater.h"
PLUGINLINK *pluginLink;
-MD5_INTERFACE md5i;
-MM_INTERFACE mmi;
-UTF8_INTERFACE utfi;
-LIST_INTERFACE li;
-
CLIST_INTERFACE* pcli;
HINSTANCE g_hInstance;
@@ -122,10 +117,6 @@ static HANDLE g_hEvents[1]; extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
{
pluginLink = link;
- mir_getMMI(&mmi);
- mir_getMD5I(&md5i);
- mir_getUTFI(&utfi);
- mir_getLI(&li);
mir_getLP(&pluginInfo);
pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
diff --git a/protocols/Weather/weather.cpp b/protocols/Weather/weather.cpp index 6fc059caa6..94d2e77881 100644 --- a/protocols/Weather/weather.cpp +++ b/protocols/Weather/weather.cpp @@ -57,8 +57,6 @@ BOOL ThreadRunning; // variable to determine if module loaded
BOOL ModuleLoaded;
-struct MM_INTERFACE mmi;
-struct UTF8_INTERFACE utfi;
PLUGINLINK *pluginLink;
@@ -221,9 +219,6 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) DWORD lastver;
pluginLink = link;
-
- mir_getMMI(&mmi);
- mir_getUTFI(&utfi);
mir_getLP(&pluginInfoEx);
// initialize global variables
diff --git a/protocols/YAMN/main.cpp b/protocols/YAMN/main.cpp index 7ea9386c4c..f2385036a8 100644 --- a/protocols/YAMN/main.cpp +++ b/protocols/YAMN/main.cpp @@ -37,7 +37,6 @@ PLUGINLINK *pluginLink; YAMN_VARIABLES YAMNVar;
int hLangpack;
-MM_INTERFACE mmi;
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
@@ -404,9 +403,7 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) int i, k;
pluginLink = link;
- mir_getLP(&pluginInfo);
- mir_getMMI(&mmi);
-
+ mir_getLP(&pluginInfo);
YAMN_STATUS = ID_STATUS_OFFLINE;
// we get the Miranda Root Path
diff --git a/protocols/Yahoo/libyahoo2/config.h b/protocols/Yahoo/libyahoo2/config.h index c512971fa6..53ef7ca7cf 100644 --- a/protocols/Yahoo/libyahoo2/config.h +++ b/protocols/Yahoo/libyahoo2/config.h @@ -56,16 +56,4 @@ */
#include <m_utils.h>
-#define md5_byte_t mir_md5_byte_t
-#define md5_state_t mir_md5_state_t
-
-#define md5_init(A) md5i.md5_init(A)
-#define md5_append(A,B,C) md5i.md5_append(A,B,C)
-#define md5_finish(A,B) md5i.md5_finish(A,B)
-
-#define sha1_ctx mir_sha1_ctx
-#define sha1_init(A) sha1i.sha1_init(A)
-#define sha1_append(A,B,C) sha1i.sha1_append(A,B,C)
-#define sha1_finish(A,B) sha1i.sha1_finish(A,B)
-
#endif
diff --git a/protocols/Yahoo/libyahoo2/crypt.c b/protocols/Yahoo/libyahoo2/crypt.c index d84ecd0644..d8c50a08f6 100644 --- a/protocols/Yahoo/libyahoo2/crypt.c +++ b/protocols/Yahoo/libyahoo2/crypt.c @@ -50,9 +50,9 @@ char *yahoo_crypt(char *key, char *salt) int buflen = 0;
int needed = 3 + strlen (salt) + 1 + 26 + 1;
- md5_byte_t alt_result[16];
- md5_state_t ctx;
- md5_state_t alt_ctx;
+ mir_md5_byte_t alt_result[16];
+ mir_md5_state_t ctx;
+ mir_md5_state_t alt_ctx;
int salt_len;
int key_len;
int cnt;
@@ -74,41 +74,41 @@ char *yahoo_crypt(char *key, char *salt) key_len = (int)strlen (key);
/* Prepare for the real work. */
- md5_init(&ctx);
+ mir_md5_init(&ctx);
/* Add the key string. */
- md5_append(&ctx, (md5_byte_t *)key, (int)key_len);
+ mir_md5_append(&ctx, (mir_md5_byte_t *)key, (int)key_len);
/* Because the SALT argument need not always have the salt prefix we
add it separately. */
- md5_append(&ctx, (md5_byte_t *)md5_salt_prefix, sizeof (md5_salt_prefix) - 1);
+ mir_md5_append(&ctx, (mir_md5_byte_t *)md5_salt_prefix, sizeof (md5_salt_prefix) - 1);
/* The last part is the salt string. This must be at most 8
characters and it ends at the first `$' character (for
compatibility which existing solutions). */
- md5_append(&ctx, (md5_byte_t *)salt, (int)salt_len);
+ mir_md5_append(&ctx, (mir_md5_byte_t *)salt, (int)salt_len);
/* Compute alternate MD5 sum with input KEY, SALT, and KEY. The
final result will be added to the first context. */
- md5_init(&alt_ctx);
+ mir_md5_init(&alt_ctx);
/* Add key. */
- md5_append(&alt_ctx, (md5_byte_t *)key, key_len);
+ mir_md5_append(&alt_ctx, (mir_md5_byte_t *)key, key_len);
/* Add salt. */
- md5_append(&alt_ctx, (md5_byte_t *)salt, salt_len);
+ mir_md5_append(&alt_ctx, (mir_md5_byte_t *)salt, salt_len);
/* Add key again. */
- md5_append(&alt_ctx, (md5_byte_t *)key, key_len);
+ mir_md5_append(&alt_ctx, (mir_md5_byte_t *)key, key_len);
/* Now get result of this (16 bytes) and add it to the other
context. */
- md5_finish(&alt_ctx, alt_result);
+ mir_md5_finish(&alt_ctx, alt_result);
/* Add for any character in the key one byte of the alternate sum. */
for (cnt = key_len; cnt > 16; cnt -= 16)
- md5_append(&ctx, alt_result, 16);
- md5_append(&ctx, alt_result, cnt);
+ mir_md5_append(&ctx, alt_result, 16);
+ mir_md5_append(&ctx, alt_result, cnt);
/* For the following code we need a NUL byte. */
alt_result[0] = '\0';
@@ -118,40 +118,40 @@ char *yahoo_crypt(char *key, char *salt) bit the first character of the key. This does not seem to be
what was intended but we have to follow this to be compatible. */
for (cnt = key_len; cnt > 0; cnt >>= 1)
- md5_append(&ctx, (cnt & 1) != 0 ? alt_result : (md5_byte_t *)key, 1);
+ mir_md5_append(&ctx, (cnt & 1) != 0 ? alt_result : (mir_md5_byte_t *)key, 1);
/* Create intermediate result. */
- md5_finish(&ctx, alt_result);
+ mir_md5_finish(&ctx, alt_result);
/* Now comes another weirdness. In fear of password crackers here
comes a quite long loop which just processes the output of the
previous round again. We cannot ignore this here. */
for (cnt = 0; cnt < 1000; ++cnt) {
/* New context. */
- md5_init(&ctx);
+ mir_md5_init(&ctx);
/* Add key or last result. */
if ((cnt & 1) != 0)
- md5_append(&ctx, (md5_byte_t *)key, key_len);
+ mir_md5_append(&ctx, (mir_md5_byte_t *)key, key_len);
else
- md5_append(&ctx, alt_result, 16);
+ mir_md5_append(&ctx, alt_result, 16);
/* Add salt for numbers not divisible by 3. */
if (cnt % 3 != 0)
- md5_append(&ctx, (md5_byte_t *)salt, salt_len);
+ mir_md5_append(&ctx, (mir_md5_byte_t *)salt, salt_len);
/* Add key for numbers not divisible by 7. */
if (cnt % 7 != 0)
- md5_append(&ctx, (md5_byte_t *)key, key_len);
+ mir_md5_append(&ctx, (mir_md5_byte_t *)key, key_len);
/* Add key or last result. */
if ((cnt & 1) != 0)
- md5_append(&ctx, alt_result, 16);
+ mir_md5_append(&ctx, alt_result, 16);
else
- md5_append(&ctx, (md5_byte_t *)key, key_len);
+ mir_md5_append(&ctx, (mir_md5_byte_t *)key, key_len);
/* Create intermediate result. */
- md5_finish(&ctx, alt_result);
+ mir_md5_finish(&ctx, alt_result);
}
/* Now we can construct the result string. It consists of three
@@ -196,8 +196,8 @@ char *yahoo_crypt(char *key, char *salt) attaching to processes or reading core dumps cannot get any
information. We do it in this way to clear correct_words[]
inside the MD5 implementation as well. */
- md5_init(&ctx);
- md5_finish(&ctx, alt_result);
+ mir_md5_init(&ctx);
+ mir_md5_finish(&ctx, alt_result);
memset (&ctx, '\0', sizeof (ctx));
memset (&alt_ctx, '\0', sizeof (alt_ctx));
diff --git a/protocols/Yahoo/libyahoo2/libyahoo2.c b/protocols/Yahoo/libyahoo2/libyahoo2.c index 77802f4ca2..f51475a5ca 100644 --- a/protocols/Yahoo/libyahoo2/libyahoo2.c +++ b/protocols/Yahoo/libyahoo2/libyahoo2.c @@ -2393,14 +2393,14 @@ static void yahoo_process_auth_0x0f(struct yahoo_input_data *yid, const char *se struct yahoo_data *yd = yid->yd;
struct yahoo_server_settings *yss;
- char *crumb=NULL;
- char *response = NULL;
- char url[1024];
- char *c, *t;
- md5_byte_t result[16];
- md5_state_t ctx;
- unsigned char *magic_hash = (unsigned char*) malloc(50); /* this one is like 26 bytes? */
- int i;
+ char *crumb=NULL;
+ char *response = NULL;
+ char url[1024];
+ char *c, *t;
+ mir_md5_byte_t result[16];
+ mir_md5_state_t ctx;
+ unsigned char *magic_hash = (unsigned char*) malloc(50); /* this one is like 26 bytes? */
+ int i;
/**
case 2: Totally Cracked... Yay.. no more crypt tables.. just need some SSL magic.
@@ -2655,11 +2655,11 @@ LBL_FAILED: 278:z=xUvdFBxaEeFBfOaVlmk3RSXNDMxBjU2MjQyNjFPNTE-&a=QAE&sk=DAAWDRZBoXexNr&d=c2wBTXpRMkFUSXhOVE0xTVRZNE1qWS0BYQFRQUUBenoBeFV2ZEZCZ1dBAXRpcAFNSVlVN0Q-; path=/; domain=.yahoo.com
307:VATg29jzHSXlp_2LL7J4Fw--
*/
- md5_init(&ctx);
+ mir_md5_init(&ctx);
- md5_append(&ctx, (md5_byte_t *)crumb, strlen(crumb));
- md5_append(&ctx, (md5_byte_t *)seed, strlen(seed));
- md5_finish(&ctx, result);
+ mir_md5_append(&ctx, (mir_md5_byte_t *)crumb, strlen(crumb));
+ mir_md5_append(&ctx, (mir_md5_byte_t *)seed, strlen(seed));
+ mir_md5_finish(&ctx, result);
to_y64(magic_hash, result, 16);
LOG(("Y64 Hash: %s", magic_hash));
@@ -6477,18 +6477,18 @@ char *yahoo_ft7dc_send(int id, const char *buddy, YList *files) struct yahoo_packet *pkt = NULL;
char ft_token[32]; // we only need 23 chars actually
YList *l=files;
- md5_byte_t result[16];
- md5_state_t ctx;
+ mir_md5_byte_t result[16];
+ mir_md5_state_t ctx;
if (!yid)
return NULL;
- md5_init(&ctx);
- md5_append(&ctx, (md5_byte_t *)buddy, strlen(buddy));
+ mir_md5_init(&ctx);
+ mir_md5_append(&ctx, (mir_md5_byte_t *)buddy, strlen(buddy));
snprintf(ft_token, 32, "%lu", time(NULL));
- md5_append(&ctx, (md5_byte_t *)ft_token, strlen(ft_token));
- md5_finish(&ctx, result);
+ mir_md5_append(&ctx, (mir_md5_byte_t *)ft_token, strlen(ft_token));
+ mir_md5_finish(&ctx, result);
to_y64((unsigned char *)ft_token, result, 16);
yd = yid->yd;
diff --git a/protocols/Yahoo/main.cpp b/protocols/Yahoo/main.cpp index 6f37098361..222c4d6723 100644 --- a/protocols/Yahoo/main.cpp +++ b/protocols/Yahoo/main.cpp @@ -25,10 +25,6 @@ PLUGINLINK* pluginLink; HANDLE g_hNetlibUser;
-MM_INTERFACE mmi;
-UTF8_INTERFACE utfi;
-MD5_INTERFACE md5i;
-LIST_INTERFACE li;
int hLangpack;
PLUGININFOEX pluginInfo={
@@ -106,16 +102,6 @@ extern "C" int __declspec(dllexport)Load(PLUGINLINK *link) /**
* Grab the interface handles (through pluginLink)
*/
- int i = mir_getLI( &li );
-
- if (i) {
- MessageBox(NULL, _T("Can not retrieve the core List Interface."), _T("Yahoo Plugin Load Failed"), MB_ICONERROR | MB_OK);
- return 1;
- }
-
- mir_getMMI( &mmi );
- mir_getUTFI( &utfi );
- mir_getMD5I( &md5i );
mir_getLP( &pluginInfo );
PROTOCOLDESCRIPTOR pd = { 0 };
diff --git a/protocols/Yahoo/yahoo.h b/protocols/Yahoo/yahoo.h index ec11ecb520..552f40cc46 100644 --- a/protocols/Yahoo/yahoo.h +++ b/protocols/Yahoo/yahoo.h @@ -17,7 +17,6 @@ extern "C"
{
- extern struct MD5_INTERFACE md5i;
extern struct tagPLUGINLINK* pluginLink;
};
|