From adfbd68fc806c2c1fa79e0e878d2ff76a76bee8b Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Tue, 31 Aug 2010 02:33:46 +0300 Subject: modified: gpg_wrapper.cpp modified: messages.cpp --- gpg_wrapper.cpp | 4 ++-- messages.cpp | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gpg_wrapper.cpp b/gpg_wrapper.cpp index 1907ed1..de34f2c 100644 --- a/gpg_wrapper.cpp +++ b/gpg_wrapper.cpp @@ -89,7 +89,7 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD mir_free(home_dir); } - debuglog<<"in: "<c_str()<<"\n"; + debuglog<<"gpg out: "<c_str()<<"\n"; WaitForSingleObject(pri.hProcess,INFINITE); diff --git a/messages.cpp b/messages.cpp index 15972e4..a73205d 100644 --- a/messages.cpp +++ b/messages.cpp @@ -156,12 +156,14 @@ int RecvMsgSvc(WPARAM w, LPARAM l) pass = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", _T("")); if(_tcslen(pass) > 0) { + debuglog<<"info: found password in database, trying to decrypt message from "<<(TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)<<"\n"; cmd += _T("--passphrase \""); cmd += pass; cmd += _T("\" "); } else if(password) { + debuglog<<"info: found password in memory, trying to decrypt message from "<<(TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)<<"\n"; cmd += _T("--passphrase \""); cmd += password; cmd += _T("\" "); @@ -197,6 +199,7 @@ int RecvMsgSvc(WPARAM w, LPARAM l) _terminate = false; while(out.find("public key decryption failed: bad passphrase") != string::npos) { + debuglog<<"info: failed to decrypt messaage from "<<(TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)<<" password needed, trying to get one\n"; if(_terminate) break; { //save inkey id @@ -214,6 +217,7 @@ int RecvMsgSvc(WPARAM w, LPARAM l) wstring cmd2 = cmd; if(password) { + debuglog<<"info: found password in memory, trying to decrypt message from "<<(TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR)<<"\n"; wstring tmp = _T("--passphrase \""); tmp += password; tmp += _T("\" "); -- cgit v1.2.3