mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed clearing of PGP passphrase after creation of default identity
This commit is contained in:
parent
6f7e656d6c
commit
345f24eb5f
@ -587,8 +587,6 @@ 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 */
|
||||
|
@ -117,8 +117,6 @@ void StartDialog::loadPerson()
|
||||
|
||||
bool res = Rshare::loadCertificate(accountId, ui.autologin_checkbox->isChecked()) ;
|
||||
|
||||
rsNotify->clearPgpPassphrase();
|
||||
|
||||
if(res)
|
||||
accept();
|
||||
}
|
||||
|
@ -785,6 +785,13 @@ void NotifyQt::notifyListPreChange(int list, int /*type*/)
|
||||
* uses Flags, to detect changes
|
||||
*/
|
||||
|
||||
void NotifyQt::resetCachedPassphrases()
|
||||
{
|
||||
std::cerr << "Clearing PGP passphrase." << std::endl;
|
||||
|
||||
rsNotify->clearPgpPassphrase() ;
|
||||
}
|
||||
|
||||
void NotifyQt::enable()
|
||||
{
|
||||
QMutexLocker m(&_mutex) ;
|
||||
|
@ -155,6 +155,7 @@ class NotifyQt: public QObject, public NotifyClient
|
||||
public slots:
|
||||
void UpdateGUI(); /* called by timer */
|
||||
void SetDisableAll(bool bValue);
|
||||
void resetCachedPassphrases() ;
|
||||
|
||||
private slots:
|
||||
void runningTick();
|
||||
|
@ -397,7 +397,6 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
||||
uint32_t token = 0;
|
||||
rsIdentity->createIdentity(token, params);
|
||||
}
|
||||
|
||||
// I'm using a signal to transfer the hashing info to the mainwindow, because Qt schedules signals properly to
|
||||
// avoid clashes between infos from threads.
|
||||
//
|
||||
@ -443,6 +442,11 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
||||
WebuiPage::checkStartWebui();
|
||||
#endif // ENABLE_WEBUI
|
||||
|
||||
// This is done using a timer, because the passphrase request from notify is asynchrouneous and therefore clearing the
|
||||
// passphrase here makes it request for a passphrase when creating the default chat identity.
|
||||
|
||||
QTimer::singleShot(10000, Qt::CoarseTimer, notify, SLOT(resetCachedPassphrases())) ;
|
||||
|
||||
/* dive into the endless loop */
|
||||
int ti = rshare.exec();
|
||||
delete w ;
|
||||
|
Loading…
Reference in New Issue
Block a user