diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2014-12-27 12:27:45 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2014-12-27 13:39:26 +0100 |
commit | e18f3cf381223680973b5161b97312b4f12f9426 (patch) | |
tree | ec600a9c3ce1e3ebc562aef7597fc516665589d4 | |
parent | f4c864e88e7d1c2229abb4a454b769a08390abae (diff) | |
download | VeraCrypt-e18f3cf381223680973b5161b97312b4f12f9426.tar.gz VeraCrypt-e18f3cf381223680973b5161b97312b4f12f9426.zip |
Windows: use the correct parent window when changing the password of the encrypted system partition.
-rw-r--r-- | src/Common/BootEncryption.cpp | 12 | ||||
-rw-r--r-- | src/Common/BootEncryption.h | 2 | ||||
-rw-r--r-- | src/Mount/Mount.c | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/Common/BootEncryption.cpp b/src/Common/BootEncryption.cpp index a974c47d..b1fd5e94 100644 --- a/src/Common/BootEncryption.cpp +++ b/src/Common/BootEncryption.cpp @@ -2117,7 +2117,7 @@ namespace VeraCrypt }
- int BootEncryption::ChangePassword (Password *oldPassword, int old_pkcs5,Password *newPassword, int pkcs5, int wipePassCount)
+ int BootEncryption::ChangePassword (Password *oldPassword, int old_pkcs5,Password *newPassword, int pkcs5, int wipePassCount, HWND hwndDlg)
{
BootEncryptionStatus encStatus = GetStatus();
@@ -2164,7 +2164,7 @@ namespace VeraCrypt if (status != 0)
{
- handleError (ParentWindow, status);
+ handleError (hwndDlg, status);
return status;
}
@@ -2182,7 +2182,7 @@ namespace VeraCrypt SetRandomPoolEnrichedByUserStatus (FALSE);
NormalCursor();
- UserEnrichRandomPool (ParentWindow);
+ UserEnrichRandomPool (hwndDlg);
WaitCursor();
/* The header will be re-encrypted wipePassCount times to prevent adversaries from using
@@ -2209,7 +2209,7 @@ namespace VeraCrypt {
PCRYPTO_INFO tmpCryptoInfo = NULL;
- status = CreateVolumeHeaderInMemory (ParentWindow, !encStatus.HiddenSystem,
+ status = CreateVolumeHeaderInMemory (hwndDlg, !encStatus.HiddenSystem,
header,
cryptoInfo->ea,
cryptoInfo->mode,
@@ -2231,7 +2231,7 @@ namespace VeraCrypt if (status != 0)
{
- handleError (ParentWindow, status);
+ handleError (hwndDlg, status);
return status;
}
@@ -2249,7 +2249,7 @@ namespace VeraCrypt }
catch (Exception &e)
{
- e.Show (ParentWindow);
+ e.Show (hwndDlg);
result = ERR_OS_ERROR;
}
diff --git a/src/Common/BootEncryption.h b/src/Common/BootEncryption.h index 585b8425..ccd68bca 100644 --- a/src/Common/BootEncryption.h +++ b/src/Common/BootEncryption.h @@ -141,7 +141,7 @@ namespace VeraCrypt void AbortSetup ();
void AbortSetupWait ();
void CallDriver (DWORD ioctl, void *input = nullptr, DWORD inputSize = 0, void *output = nullptr, DWORD outputSize = 0);
- int ChangePassword (Password *oldPassword, int old_pkcs5, Password *newPassword, int pkcs5, int wipePassCount);
+ int ChangePassword (Password *oldPassword, int old_pkcs5, Password *newPassword, int pkcs5, int wipePassCount, HWND hwndDlg);
void CheckDecoyOSWipeResult ();
void CheckEncryptionSetupResult ();
void CheckRequirements ();
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 030a1184..75a9287c 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -1470,7 +1470,7 @@ void CALLBACK ChangePwdWaitThreadProc(void* pArg, HWND hwndDlg) try
{
- *pThreadParam->pnStatus = BootEncObj->ChangePassword (pThreadParam->oldPassword, pThreadParam->old_pkcs5, pThreadParam->newPassword, pThreadParam->pkcs5, pThreadParam->wipePassCount);
+ *pThreadParam->pnStatus = BootEncObj->ChangePassword (pThreadParam->oldPassword, pThreadParam->old_pkcs5, pThreadParam->newPassword, pThreadParam->pkcs5, pThreadParam->wipePassCount, hwndDlg);
}
catch (Exception &e)
{
|