giving 30 secs of time to create identity before clearing PGP passphrase cache

This commit is contained in:
csoler 2021-01-13 23:13:37 +01:00
parent af696639cc
commit 1bbde46c4a

View File

@ -659,8 +659,10 @@ void GenCertDialog::genPerson()
RsInit::LoadPassword(sslPasswd); RsInit::LoadPassword(sslPasswd);
if (Rshare::loadCertificate(sslId, false)) { if (Rshare::loadCertificate(sslId, false)) {
// Now clear the cached passphrase // Normally we should clear the cached passphrase as soon as possible. However,some other GUI components may still need it at start.
rsNotify->clearPgpPassphrase(); // (csoler) This is really bad: we have to guess that 30 secs will be enough. I have no better way to do this.
QTimer::singleShot(30000, []() { rsNotify->clearPgpPassphrase(); } );
accept(); accept();
} }