summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-08-31 02:33:46 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-08-31 02:33:46 +0300
commitadfbd68fc806c2c1fa79e0e878d2ff76a76bee8b (patch)
tree0109706396bfb5899524ce17ae65e0ba99a2d5b5
parentafe644994d365883bb683cdaf79e383259632d6e (diff)
modified: gpg_wrapper.cpp
modified: messages.cpp
-rw-r--r--gpg_wrapper.cpp4
-rw-r--r--messages.cpp4
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: "<<commandline<<"\n";
+ debuglog<<"gpg in: "<<commandline<<"\n";
gpg_mutex = CreateMutex(NULL, FALSE, NULL);
@@ -127,7 +127,7 @@ pxResult pxExecute(wstring *acommandline, char *ainput, string *aoutput, LPDWORD
storeOutput(readstdout,aoutput);
- debuglog<<"out: "<<aoutput->c_str()<<"\n";
+ debuglog<<"gpg out: "<<aoutput->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("\" ");