diff options
Diffstat (limited to 'src/ExpandVolume/ExpandVolume.c')
-rw-r--r-- | src/ExpandVolume/ExpandVolume.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/ExpandVolume/ExpandVolume.c b/src/ExpandVolume/ExpandVolume.c index 34184dda..084de5f3 100644 --- a/src/ExpandVolume/ExpandVolume.c +++ b/src/ExpandVolume/ExpandVolume.c @@ -520,11 +520,9 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas BOOL backupHeader; uint8 *wipeBuffer = NULL; uint32 workChunkSize = TC_VOLUME_HEADER_GROUP_SIZE; -#ifdef _WIN64 CRYPTO_INFO tmpCI; PCRYPTO_INFO cryptoInfoBackup = NULL; BOOL bIsRamEncryptionEnabled = IsRamEncryptionEnabled(); -#endif if (pVolumePassword->Length == 0) return -1; @@ -703,12 +701,10 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas goto error; } -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { VcProtectKeys (cryptoInfo, VcGetEncryptionID (cryptoInfo)); } -#endif if (cryptoInfo->HeaderFlags & TC_HEADER_FLAG_ENCRYPTED_SYSTEM) { @@ -875,7 +871,6 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas else DebugAddProgressDlgStatus(hwndDlg, GetString("EXPANDER_WRITING_ENCRYPTED_PRIMARY")); -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { VirtualLock (&tmpCI, sizeof (CRYPTO_INFO)); @@ -884,7 +879,6 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas cryptoInfoBackup = cryptoInfo; cryptoInfo = &tmpCI; } -#endif // Prepare new volume header nStatus = CreateVolumeHeaderInMemory (hwndDlg, FALSE, @@ -905,14 +899,12 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas cryptoInfo->SectorSize, FALSE ); // use slow poll -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { cryptoInfo = cryptoInfoBackup; burn (&tmpCI, sizeof (CRYPTO_INFO)); VirtualUnlock (&tmpCI, sizeof (CRYPTO_INFO)); } -#endif if (ci != NULL) crypto_close (ci); @@ -945,7 +937,6 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas PCRYPTO_INFO dummyInfo = NULL; LARGE_INTEGER hiddenOffset; -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { VirtualLock (&tmpCI, sizeof (CRYPTO_INFO)); @@ -954,17 +945,14 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas cryptoInfoBackup = cryptoInfo; cryptoInfo = &tmpCI; } -#endif nStatus = WriteRandomDataToReservedHeaderAreas (hwndDlg, dev, cryptoInfo, newDataAreaSize, !backupHeader, backupHeader); -#ifdef _WIN64 if (bIsRamEncryptionEnabled) { cryptoInfo = cryptoInfoBackup; burn (&tmpCI, sizeof (CRYPTO_INFO)); VirtualUnlock (&tmpCI, sizeof (CRYPTO_INFO)); } -#endif if (nStatus != ERR_SUCCESS) goto error; |