fixed message in pgphandler when signing a post

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5547 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-09-13 19:18:55 +00:00
parent f4b13bbed3
commit 70b0733a32
2 changed files with 7 additions and 2 deletions

View File

@ -991,7 +991,12 @@ bool PGPHandler::SignDataBin(const PGPIdType& id,const void *data, const uint32_
return false ;
}
std::string passphrase = _passphrase_callback(NULL,PGPIdType(key->key_id).toStdString().c_str(),"Please enter passwd for encrypting your key : ",false) ;
std::string uid_hint ;
if(key->nuids > 0)
uid_hint = std::string((const char *)key->uids[0].user_id) ;
uid_hint += "(" + PGPIdType(key->key_id).toStdString()+")" ;
std::string passphrase = _passphrase_callback(NULL,uid_hint.c_str(),"Please enter passwd for encrypting your key : ",false) ;
ops_secret_key_t *secret_key = ops_decrypt_secret_key_from_data(key,passphrase.c_str()) ;

View File

@ -152,7 +152,7 @@ bool NotifyQt::askForPassword(const std::string& key_details, bool prev_is_bad,
QInputDialog dialog;
dialog.setWindowTitle(tr("GPG key passphrase"));
dialog.setLabelText((prev_is_bad?tr("Wrong password !") + "\n\n" : QString()) +
tr("Please enter the password to unlock the following GPG key:") + "\n" + QString::fromUtf8(key_details.c_str()));
tr("To sign, please enter the password that unlocks your PGP key:") + "\n" + QString::fromUtf8(key_details.c_str()));
dialog.setTextEchoMode(QLineEdit::Password);
dialog.setWindowIcon(QIcon(":/images/rstray3.png"));