mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-28 05:53:29 +01:00
Linux/macOSX: always display random gathering dialog/interface before performing sensitive operations that needs good quality random.
This commit is contained in:
parent
134ef04140
commit
d328269492
@ -102,6 +102,8 @@ namespace VeraCrypt
|
|||||||
else if (DialogMode != Mode::RemoveAllKeyfiles)
|
else if (DialogMode != Mode::RemoveAllKeyfiles)
|
||||||
newKeyfiles = CurrentPasswordPanel->GetKeyfiles();
|
newKeyfiles = CurrentPasswordPanel->GetKeyfiles();
|
||||||
|
|
||||||
|
/* force the display of the random enriching interface */
|
||||||
|
RandomNumberGenerator::SetEnrichedByUserStatus (false);
|
||||||
Gui->UserEnrichRandomPool (this, NewPasswordPanel->GetPkcs5Kdf() ? NewPasswordPanel->GetPkcs5Kdf()->GetHash() : shared_ptr <Hash>());
|
Gui->UserEnrichRandomPool (this, NewPasswordPanel->GetPkcs5Kdf() ? NewPasswordPanel->GetPkcs5Kdf()->GetHash() : shared_ptr <Hash>());
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -252,6 +252,8 @@ namespace VeraCrypt
|
|||||||
backupFile.Open (*files.front(), File::CreateWrite);
|
backupFile.Open (*files.front(), File::CreateWrite);
|
||||||
|
|
||||||
RandomNumberGenerator::Start();
|
RandomNumberGenerator::Start();
|
||||||
|
/* force the display of the random enriching interface */
|
||||||
|
RandomNumberGenerator::SetEnrichedByUserStatus (false);
|
||||||
UserEnrichRandomPool (nullptr);
|
UserEnrichRandomPool (nullptr);
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -1234,6 +1236,9 @@ namespace VeraCrypt
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* force the display of the random enriching interface */
|
||||||
|
RandomNumberGenerator::SetEnrichedByUserStatus (false);
|
||||||
|
|
||||||
if (restoreInternalBackup)
|
if (restoreInternalBackup)
|
||||||
{
|
{
|
||||||
// Restore header from the internal backup
|
// Restore header from the internal backup
|
||||||
@ -1282,6 +1287,7 @@ namespace VeraCrypt
|
|||||||
UserEnrichRandomPool (nullptr);
|
UserEnrichRandomPool (nullptr);
|
||||||
|
|
||||||
// Re-encrypt volume header
|
// Re-encrypt volume header
|
||||||
|
wxBusyCursor busy;
|
||||||
SecureBuffer newHeaderBuffer (volume->GetLayout()->GetHeaderSize());
|
SecureBuffer newHeaderBuffer (volume->GetLayout()->GetHeaderSize());
|
||||||
Core->ReEncryptVolumeHeaderWithNewSalt (newHeaderBuffer, volume->GetHeader(), options.Password, options.Keyfiles);
|
Core->ReEncryptVolumeHeaderWithNewSalt (newHeaderBuffer, volume->GetHeader(), options.Password, options.Keyfiles);
|
||||||
|
|
||||||
@ -1390,6 +1396,7 @@ namespace VeraCrypt
|
|||||||
UserEnrichRandomPool (nullptr);
|
UserEnrichRandomPool (nullptr);
|
||||||
|
|
||||||
// Re-encrypt volume header
|
// Re-encrypt volume header
|
||||||
|
wxBusyCursor busy;
|
||||||
SecureBuffer newHeaderBuffer (decryptedLayout->GetHeaderSize());
|
SecureBuffer newHeaderBuffer (decryptedLayout->GetHeaderSize());
|
||||||
Core->ReEncryptVolumeHeaderWithNewSalt (newHeaderBuffer, decryptedLayout->GetHeader(), options.Password, options.Keyfiles);
|
Core->ReEncryptVolumeHeaderWithNewSalt (newHeaderBuffer, decryptedLayout->GetHeader(), options.Password, options.Keyfiles);
|
||||||
|
|
||||||
|
@ -330,6 +330,8 @@ namespace VeraCrypt
|
|||||||
backupFile.Open (filePath, File::CreateWrite);
|
backupFile.Open (filePath, File::CreateWrite);
|
||||||
|
|
||||||
RandomNumberGenerator::Start();
|
RandomNumberGenerator::Start();
|
||||||
|
/* force the display of the random enriching interface */
|
||||||
|
RandomNumberGenerator::SetEnrichedByUserStatus (false);
|
||||||
UserEnrichRandomPool();
|
UserEnrichRandomPool();
|
||||||
|
|
||||||
// Re-encrypt volume header
|
// Re-encrypt volume header
|
||||||
@ -443,6 +445,8 @@ namespace VeraCrypt
|
|||||||
newKeyfiles = AskKeyfiles (_("Enter new keyfile"));
|
newKeyfiles = AskKeyfiles (_("Enter new keyfile"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* force the display of the random enriching interface */
|
||||||
|
RandomNumberGenerator::SetEnrichedByUserStatus (false);
|
||||||
UserEnrichRandomPool();
|
UserEnrichRandomPool();
|
||||||
|
|
||||||
Core->ChangePassword (volume, newPassword, newKeyfiles,
|
Core->ChangePassword (volume, newPassword, newKeyfiles,
|
||||||
@ -456,6 +460,8 @@ namespace VeraCrypt
|
|||||||
FilePath path;
|
FilePath path;
|
||||||
|
|
||||||
RandomNumberGenerator::Start();
|
RandomNumberGenerator::Start();
|
||||||
|
/* force the display of the random enriching interface */
|
||||||
|
RandomNumberGenerator::SetEnrichedByUserStatus (false);
|
||||||
UserEnrichRandomPool();
|
UserEnrichRandomPool();
|
||||||
|
|
||||||
if (keyfilePath)
|
if (keyfilePath)
|
||||||
@ -742,6 +748,8 @@ namespace VeraCrypt
|
|||||||
|
|
||||||
// Random data
|
// Random data
|
||||||
RandomNumberGenerator::Start();
|
RandomNumberGenerator::Start();
|
||||||
|
/* force the display of the random enriching interface */
|
||||||
|
RandomNumberGenerator::SetEnrichedByUserStatus (false);
|
||||||
UserEnrichRandomPool();
|
UserEnrichRandomPool();
|
||||||
|
|
||||||
ShowString (L"\n");
|
ShowString (L"\n");
|
||||||
@ -1295,6 +1303,9 @@ namespace VeraCrypt
|
|||||||
throw UserAbort (SRC_POS);
|
throw UserAbort (SRC_POS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* force the display of the random enriching interface */
|
||||||
|
RandomNumberGenerator::SetEnrichedByUserStatus (false);
|
||||||
|
|
||||||
if (restoreInternalBackup)
|
if (restoreInternalBackup)
|
||||||
{
|
{
|
||||||
// Restore header from the internal backup
|
// Restore header from the internal backup
|
||||||
|
Loading…
Reference in New Issue
Block a user