VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/TextUserInterface.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2014-12-11 17:27:08 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2014-12-11 17:31:41 (GMT)
commitd32826949213d2dada7759bc7641df370875c8ec (patch)
treecc08259847353d889180c401cedfc39dafb98d81 /src/Main/TextUserInterface.cpp
parent134ef041406c78283db0b82760d41248266d481d (diff)
downloadVeraCrypt-d32826949213d2dada7759bc7641df370875c8ec.zip
VeraCrypt-d32826949213d2dada7759bc7641df370875c8ec.tar.gz
Linux/macOSX: always display random gathering dialog/interface before performing sensitive operations that needs good quality random.
Diffstat (limited to 'src/Main/TextUserInterface.cpp')
-rw-r--r--src/Main/TextUserInterface.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp
index a48470b..f9693cb 100644
--- a/src/Main/TextUserInterface.cpp
+++ b/src/Main/TextUserInterface.cpp
@@ -330,6 +330,8 @@ namespace VeraCrypt
backupFile.Open (filePath, File::CreateWrite);
RandomNumberGenerator::Start();
+ /* force the display of the random enriching interface */
+ RandomNumberGenerator::SetEnrichedByUserStatus (false);
UserEnrichRandomPool();
// Re-encrypt volume header
@@ -443,6 +445,8 @@ namespace VeraCrypt
newKeyfiles = AskKeyfiles (_("Enter new keyfile"));
}
+ /* force the display of the random enriching interface */
+ RandomNumberGenerator::SetEnrichedByUserStatus (false);
UserEnrichRandomPool();
Core->ChangePassword (volume, newPassword, newKeyfiles,
@@ -456,6 +460,8 @@ namespace VeraCrypt
FilePath path;
RandomNumberGenerator::Start();
+ /* force the display of the random enriching interface */
+ RandomNumberGenerator::SetEnrichedByUserStatus (false);
UserEnrichRandomPool();
if (keyfilePath)
@@ -742,6 +748,8 @@ namespace VeraCrypt
// Random data
RandomNumberGenerator::Start();
+ /* force the display of the random enriching interface */
+ RandomNumberGenerator::SetEnrichedByUserStatus (false);
UserEnrichRandomPool();
ShowString (L"\n");
@@ -1294,6 +1302,9 @@ namespace VeraCrypt
default:
throw UserAbort (SRC_POS);
}
+
+ /* force the display of the random enriching interface */
+ RandomNumberGenerator::SetEnrichedByUserStatus (false);
if (restoreInternalBackup)
{