mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-19 14:30:43 -04:00
added pgp passphrase temporary caching in order to avoid re-asking for password at location creation time
This commit is contained in:
parent
f3824f2348
commit
ccacba797f
5 changed files with 45 additions and 1 deletions
|
@ -36,6 +36,7 @@
|
|||
|
||||
#include <retroshare/rsidentity.h>
|
||||
#include <retroshare/rsinit.h>
|
||||
#include <retroshare/rsnotify.h>
|
||||
#include <rsserver/rsaccounts.h>
|
||||
#include <util/rsrandom.h>
|
||||
|
||||
|
@ -469,6 +470,10 @@ void GenCertDialog::genPerson()
|
|||
err_string);
|
||||
|
||||
setCursor(Qt::ArrowCursor) ;
|
||||
|
||||
// now cache the PGP password so that it's not asked again for immediately signing the key
|
||||
|
||||
rsNotify->cachePgpPassphrase(ui.password_input->text().toUtf8().constData()) ;
|
||||
}
|
||||
|
||||
//generate a random ssl password
|
||||
|
@ -484,6 +489,8 @@ void GenCertDialog::genPerson()
|
|||
std::cout << "RsAccounts::GenerateSSLCertificate" << std::endl;
|
||||
bool okGen = RsAccounts::GenerateSSLCertificate(PGPId, "", genLoc, "", isHiddenLoc, sslPasswd, sslId, err);
|
||||
|
||||
rsNotify->clearPgpPassphrase() ;
|
||||
|
||||
if (okGen)
|
||||
{
|
||||
/* complete the process */
|
||||
|
|
|
@ -278,7 +278,7 @@ bool NotifyQt::askForPassword(const std::string& title, const std::string& key_d
|
|||
dialog.setWindowTitle(QString::fromStdString(title));
|
||||
}
|
||||
|
||||
dialog.setLabelText((prev_is_bad ? QString("%1\n\n").arg(tr("Wrong password !")) : QString()) + QString("%1:\n %2").arg(tr("Please enter your PGP password for key"), QString::fromUtf8(key_details.c_str())));
|
||||
dialog.setLabelText((prev_is_bad ? QString("%1\n\n").arg(tr("Wrong password !")) : QString()) + QString("%1:\n\n (%2)\n\n").arg(tr("Please enter your Retroshare password"), QString::fromUtf8(key_details.c_str())));
|
||||
dialog.setTextEchoMode(QLineEdit::Password);
|
||||
dialog.setModal(true);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue