VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Format
diff options
context:
space:
mode:
Diffstat (limited to 'src/Format')
-rw-r--r--src/Format/Format.manifest8
-rw-r--r--src/Format/Format.rc555
-rw-r--r--src/Format/Format.vcproj1028
-rw-r--r--src/Format/Format.vcxproj487
-rw-r--r--src/Format/Format.vcxproj.filters414
-rw-r--r--src/Format/Format.vcxproj.user3
-rw-r--r--src/Format/FormatCom.cpp104
-rw-r--r--src/Format/FormatCom.h4
-rw-r--r--src/Format/FormatCom.idl11
-rw-r--r--src/Format/InPlace.c221
-rw-r--r--src/Format/InPlace.h2
-rw-r--r--src/Format/Resource.h6
-rw-r--r--src/Format/Tcformat.c863
-rw-r--r--src/Format/Tcformat.h6
-rw-r--r--src/Format/VeraCrypt_Wizard.bmpbin166518 -> 193446 bytes
15 files changed, 1444 insertions, 2268 deletions
diff --git a/src/Format/Format.manifest b/src/Format/Format.manifest
index 5d4cb896..79d86799 100644
--- a/src/Format/Format.manifest
+++ b/src/Format/Format.manifest
@@ -13,9 +13,15 @@
</asmv3:windowsSettings>
</asmv3:application>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
- <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+ <!-- Windows 10 and Windows 11 -->
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+ <!-- Windows 8.1 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+ <!-- Windows 8 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+ <!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
</application>
</compatibility>
<dependency>
diff --git a/src/Format/Format.rc b/src/Format/Format.rc
index 6b1578fd..0f908e2c 100644
--- a/src/Format/Format.rc
+++ b/src/Format/Format.rc
@@ -6,9 +6,9 @@
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
-#include "afxres.h"
+#include "winres.h"
#include "..\\common\\resource.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -27,10 +27,10 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// Version
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,20,2,0
- PRODUCTVERSION 1,20,2,0
+ FILEVERSION 1,26,17,2
+ PRODUCTVERSION 1,26,17,2
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
@@ -45,13 +45,13 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "IDRIX"
VALUE "FileDescription", "VeraCrypt Format"
- VALUE "FileVersion", "1.20-BETA2"
+ VALUE "FileVersion", "1.26.17"
VALUE "LegalTrademarks", "VeraCrypt"
VALUE "OriginalFilename", "VeraCrypt Format.exe"
VALUE "ProductName", "VeraCrypt"
- VALUE "ProductVersion", "1.20-BETA2"
+ VALUE "ProductVersion", "1.26.17"
END
END
BLOCK "VarFileInfo"
BEGIN
@@ -78,379 +78,380 @@ IDR_FORMAT_TLB TYPELIB "Format.tlb"
//
// Dialog
//
-IDD_VOL_CREATION_WIZARD_DLG DIALOGEX 0, 0, 400, 229
+IDD_VOL_CREATION_WIZARD_DLG DIALOGEX 0, 0, 450, 250
STYLE DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "VeraCrypt Volume Creation Wizard"
CLASS "VeraCryptCustomDlg"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- PUSHBUTTON "&Help",IDHELP,176,209,50,14
- PUSHBUTTON "",IDC_PREV,235,209,50,14
- DEFPUSHBUTTON "",IDC_NEXT,285,209,50,14
- PUSHBUTTON "Cancel",IDCANCEL,343,209,50,14
- LTEXT "",IDC_BOX_TITLE,160,8,233,17
- GROUPBOX "",IDC_STATIC,4,0,392,203
- CONTROL 116,IDC_BITMAP_WIZARD,"Static",SS_BITMAP | SS_SUNKEN,10,9,137,169
- LTEXT "",IDC_POS_BOX,160,24,231,172
+ PUSHBUTTON "&Help",IDHELP,166,234,60,14
+ PUSHBUTTON "",IDC_PREV,238,234,60,14
+ DEFPUSHBUTTON "",IDC_NEXT,310,234,60,14
+ PUSHBUTTON "Cancel",IDCANCEL,382,234,60,14
+ LTEXT "",IDC_BOX_TITLE,160,8,283,17
+ GROUPBOX "",IDC_STATIC,4,0,439,230
+ CONTROL 116,IDC_BITMAP_WIZARD,"Static",SS_BITMAP | SS_SUNKEN,10,9,137,193
+ LTEXT "",IDC_POS_BOX,160,24,281,193
END
-IDD_CIPHER_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_CIPHER_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- COMBOBOX IDC_COMBO_BOX,7,23,137,126,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "&Test",IDC_CIPHER_TEST,149,22,59,14
- PUSHBUTTON "&Benchmark",IDC_BENCHMARK,149,100,59,14
- COMBOBOX IDC_COMBO_BOX_HASH_ALGO,7,137,83,126,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "",IDC_BOX_HELP,7,40,205,58
- GROUPBOX "Encryption Algorithm",IDT_ENCRYPTION_ALGO,0,10,217,111
- GROUPBOX "Hash Algorithm",IDT_HASH_ALGO,0,124,217,35
- LTEXT "More information",IDC_LINK_MORE_INFO_ABOUT_CIPHER,7,102,135,10,SS_NOTIFY
- LTEXT "Information on hash algorithms",IDC_LINK_HASH_INFO,97,139,115,8,SS_NOTIFY
+ COMBOBOX IDC_COMBO_BOX,7,23,172,126,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "&Test",IDC_CIPHER_TEST,191,22,81,14
+ PUSHBUTTON "&Benchmark",IDC_BENCHMARK,191,122,81,14
+ COMBOBOX IDC_COMBO_BOX_HASH_ALGO,7,169,95,126,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ LTEXT "",IDC_BOX_HELP,7,40,266,78
+ GROUPBOX "Encryption Algorithm",IDT_ENCRYPTION_ALGO,0,10,273,131
+ GROUPBOX "Hash Algorithm",IDT_HASH_ALGO,0,156,273,35
+ LTEXT "More information",IDC_LINK_MORE_INFO_ABOUT_CIPHER,7,124,176,10,SS_NOTIFY
+ LTEXT "Information on hash algorithms",IDC_LINK_HASH_INFO,121,171,148,8,SS_NOTIFY
END
-IDD_PASSWORD_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_PASSWORD_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- EDITTEXT IDC_PASSWORD,53,3,170,14,ES_PASSWORD | ES_AUTOHSCROLL
- EDITTEXT IDC_VERIFY,53,19,170,14,ES_PASSWORD | ES_AUTOHSCROLL
- CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,35,95,10
- PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,152,36,71,14,WS_DISABLED
- CONTROL "&Display password",IDC_SHOW_PASSWORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,45,95,11,WS_EX_TRANSPARENT
- CONTROL "Use P&IM",IDC_PIM_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,56,97,10
- RTEXT "Password:",IDT_PASSWORD,1,6,50,8
- RTEXT "&Confirm:",IDT_CONFIRM,1,23,50,8
- LTEXT "",IDC_BOX_HELP,0,71,225,97
+ EDITTEXT IDC_PASSWORD,71,3,202,14,ES_PASSWORD | ES_AUTOHSCROLL
+ EDITTEXT IDC_VERIFY,71,19,202,14,ES_PASSWORD | ES_AUTOHSCROLL
+ CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,71,35,103,10
+ PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,182,36,91,14,WS_DISABLED
+ CONTROL "&Display password",IDC_SHOW_PASSWORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,71,45,108,11,WS_EX_TRANSPARENT
+ CONTROL "Use P&IM",IDC_PIM_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,71,56,114,10
+ RTEXT "Password:",IDT_PASSWORD,1,6,68,8
+ RTEXT "&Confirm:",IDT_CONFIRM,1,23,68,8
+ LTEXT "",IDC_BOX_HELP,0,71,273,121
END
-IDD_SIZE_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_SIZE_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- EDITTEXT IDC_SIZEBOX,0,22,71,14,ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "&KB",IDC_KB,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,80,25,27,10
- CONTROL "&MB",IDC_MB,"Button",BS_AUTORADIOBUTTON,115,25,27,10
- CONTROL "&GB",IDC_GB,"Button",BS_AUTORADIOBUTTON,150,25,27,10
- LTEXT "",IDC_BOX_HELP,0,84,214,75
- LTEXT "",IDC_SPACE_LEFT,0,44,214,33
- CONTROL "&TB",IDC_TB,"Button",BS_AUTORADIOBUTTON,185,25,27,10
+ EDITTEXT IDC_SIZEBOX,0,22,96,14,ES_AUTOHSCROLL | ES_NUMBER
+ CONTROL "&KB",IDC_KB,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,105,25,27,10
+ CONTROL "&MB",IDC_MB,"Button",BS_AUTORADIOBUTTON,140,25,27,10
+ CONTROL "&GB",IDC_GB,"Button",BS_AUTORADIOBUTTON,175,25,27,10
+ LTEXT "",IDC_BOX_HELP,0,65,273,123
+ LTEXT "",IDC_SPACE_LEFT,0,44,273,18
+ CONTROL "&TB",IDC_TB,"Button",BS_AUTORADIOBUTTON,210,25,27,10
END
-IDD_VOLUME_LOCATION_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_VOLUME_LOCATION_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- COMBOBOX IDC_COMBO_BOX,0,9,148,80,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
- CONTROL "&Never save history",IDC_NO_HISTORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,3,28,213,10
- PUSHBUTTON "",IDC_SELECT_VOLUME_LOCATION,155,9,62,14
- LTEXT "",IDC_BOX_HELP,0,42,219,125
+ COMBOBOX IDC_COMBO_BOX,0,9,174,80,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+ CONTROL "&Never save history",IDC_NO_HISTORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,3,28,270,10
+ PUSHBUTTON "",IDC_SELECT_VOLUME_LOCATION,181,9,92,14
+ LTEXT "",IDC_BOX_HELP,0,45,273,143
END
-IDD_FORMAT_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_FORMAT_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- COMBOBOX IDC_FILESYS,43,13,36,90,CBS_DROPDOWNLIST | WS_TABSTOP
- COMBOBOX IDC_CLUSTERSIZE,112,13,42,90,CBS_DROPDOWNLIST | WS_TABSTOP
- CONTROL "Quick Format",IDC_QUICKFORMAT,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,163,11,60,18
- CONTROL "",IDC_SHOW_KEYS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,214,38,9,8
- PUSHBUTTON "Abort",IDC_ABORT_BUTTON,169,75,50,14
- RTEXT "Header Key: ",IDT_HEADER_KEY,2,47,54,8
- CONTROL "",IDC_HEADER_KEY,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,57,46,163,8,WS_EX_TRANSPARENT
- RTEXT "Master Key: ",IDT_MASTER_KEY,2,55,54,8
- LTEXT "",IDC_DISK_KEY,57,54,163,8,0,WS_EX_TRANSPARENT
- RTEXT "Cluster ",IDT_CLUSTER,80,15,32,8
- LTEXT "",IDC_BOX_HELP,1,112,224,40
- GROUPBOX "Options",IDT_FORMAT_OPTIONS,0,3,225,29
- CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,6,76,158,12
- RTEXT "",IDC_TIMEREMAIN,177,93,42,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
- RTEXT "",IDC_WRITESPEED,106,93,42,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
+ COMBOBOX IDC_FILESYS,50,13,36,90,CBS_DROPDOWNLIST | WS_TABSTOP
+ COMBOBOX IDC_CLUSTERSIZE,135,13,42,90,CBS_DROPDOWNLIST | WS_TABSTOP
+ COMBOBOX IDC_FORMAT_TYPE,181,8,93,131,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ CONTROL "Dynamic",SPARSE_FILE,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,181,22,92,8
+ CONTROL "",IDC_SHOW_KEYS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,265,38,9,8
+ PUSHBUTTON "Abort",IDC_ABORT_BUTTON,200,75,64,14
+ RTEXT "Header Key: ",IDT_HEADER_KEY,2,47,76,8
+ CONTROL "",IDC_HEADER_KEY,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,83,46,190,8,WS_EX_TRANSPARENT
+ RTEXT "Master Key: ",IDT_MASTER_KEY,2,55,76,8
+ LTEXT "",IDC_DISK_KEY,83,54,190,8,0,WS_EX_TRANSPARENT
+ RTEXT "Cluster ",IDT_CLUSTER,91,15,44,8
+ LTEXT "",IDC_BOX_HELP,1,112,274,58
+ GROUPBOX "Options",IDT_FORMAT_OPTIONS,0,3,276,29
+ CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,6,76,189,12
+ RTEXT "",IDC_TIMEREMAIN,217,93,46,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
+ RTEXT "",IDC_WRITESPEED,128,93,42,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
LTEXT "",IDC_BYTESWRITTEN,29,93,39,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
RTEXT "Done",IDT_DONE,5,94,22,8
- RTEXT "Speed",IDT_SPEED,70,94,34,8
- RTEXT "Left",IDT_LEFT,150,94,25,8
- GROUPBOX "",IDC_STATIC,0,67,225,41
- RTEXT "Filesystem ",IDT_FILESYSTEM,1,15,41,8,0,WS_EX_RIGHT
- RTEXT "Random Pool: ",IDT_RANDOM_POOL,2,39,54,8
- GROUPBOX "",IDC_STATIC,0,32,225,35
- CONTROL "",IDC_RANDOM_BYTES,"Static",SS_SIMPLE | WS_GROUP,57,38,155,8,WS_EX_TRANSPARENT
- GROUPBOX "Randomness Collected From Mouse Movements",IDT_ENTROPY_BAR,0,153,224,18
- CONTROL "",IDC_ENTROPY_BAR,"msctls_progress32",WS_BORDER,11,162,202,6
-END
-
-IDD_INTRO_PAGE_DLG DIALOGEX 0, 0, 226, 172
+ RTEXT "Speed",IDT_SPEED,81,94,45,8
+ RTEXT "Left",IDT_LEFT,177,94,35,8
+ GROUPBOX "",IDC_STATIC,0,67,276,41
+ RTEXT "Filesystem ",IDT_FILESYSTEM,1,15,46,8,0,WS_EX_RIGHT
+ RTEXT "Random Pool: ",IDT_RANDOM_POOL,2,39,76,8
+ GROUPBOX "",IDC_STATIC,0,32,276,35
+ CONTROL "",IDC_RANDOM_BYTES,"Static",SS_SIMPLE | WS_GROUP,83,38,177,8,WS_EX_TRANSPARENT
+ GROUPBOX "Randomness Collected From Mouse Movements",IDT_ENTROPY_BAR,0,175,276,18
+ CONTROL "",IDC_ENTROPY_BAR,"msctls_progress32",WS_BORDER,20,184,235,6
+END
+
+IDD_INTRO_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "Create an encrypted file container",IDC_FILE_CONTAINER,
- "Button",BS_AUTORADIOBUTTON,0,7,217,10
- LTEXT "More information",IDC_MORE_INFO_ON_CONTAINERS,16,40,165,10,SS_NOTIFY
+ "Button",BS_AUTORADIOBUTTON,0,7,269,10
+ LTEXT "More information",IDC_MORE_INFO_ON_CONTAINERS,16,40,253,10,SS_NOTIFY
CONTROL "Encrypt a non-system partition/drive",IDC_NONSYS_DEVICE,
- "Button",BS_AUTORADIOBUTTON,0,53,217,10
+ "Button",BS_AUTORADIOBUTTON,0,55,269,10
CONTROL "Encrypt the system partition or entire system drive",IDC_SYS_DEVICE,
- "Button",BS_AUTORADIOBUTTON,0,89,217,10
- LTEXT "More information about system encryption",IDC_MORE_INFO_ON_SYS_ENCRYPTION,16,153,190,10,SS_NOTIFY
- LTEXT "Creates a virtual encrypted disk within a file. Recommended for inexperienced users.",IDT_FILE_CONTAINER,16,20,205,16
- LTEXT "Encrypts a non-system partition on any internal or external drive (e.g. a flash drive). Optionally, creates a hidden volume.",IDT_NON_SYS_DEVICE,16,66,205,20
- LTEXT "Encrypts the partition/drive where Windows is installed. Anyone who wants to gain access and use the system, read and write files, etc., will need to enter the correct password each time before Windows boots. Optionally, creates a hidden system.",IDT_SYS_DEVICE,16,102,205,47
+ "Button",BS_AUTORADIOBUTTON,0,98,269,10
+ LTEXT "More information about system encryption",IDC_MORE_INFO_ON_SYS_ENCRYPTION,16,177,253,10,SS_NOTIFY
+ LTEXT "Creates a virtual encrypted disk within a file. Recommended for inexperienced users.",IDT_FILE_CONTAINER,16,20,253,16
+ LTEXT "Encrypts a non-system partition on any internal or external drive (e.g. a flash drive). Optionally, creates a hidden volume.",IDT_NON_SYS_DEVICE,16,68,253,26
+ LTEXT "Encrypts the partition/drive where Windows is installed. Anyone who wants to gain access and use the system, read and write files, etc., will need to enter the correct password each time before Windows boots. Optionally, creates a hidden system.",IDT_SYS_DEVICE,16,112,253,59
END
-IDD_INFO_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_INFO_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- LTEXT "",IDC_BOX_HELP,0,10,225,155
+ LTEXT "",IDC_BOX_HELP,0,31,269,155
END
-IDD_HIDVOL_HOST_FILL_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_HIDVOL_HOST_FILL_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- LTEXT "",IDC_BOX_HELP,0,6,226,138
- PUSHBUTTON "Open Outer Volume",IDC_OPEN_OUTER_VOLUME,0,146,85,14
+ LTEXT "",IDC_BOX_HELP,0,6,269,167
+ PUSHBUTTON "Open Outer Volume",IDC_OPEN_OUTER_VOLUME,0,176,85,14
END
-IDD_HIDDEN_VOL_WIZARD_MODE_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_HIDDEN_VOL_WIZARD_MODE_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- CONTROL "Normal mode",IDC_HIDVOL_WIZ_MODE_FULL,"Button",BS_AUTORADIOBUTTON,0,7,217,10
- CONTROL "Direct mode",IDC_HIDVOL_WIZ_MODE_DIRECT,"Button",BS_AUTORADIOBUTTON,0,87,217,10
- LTEXT "",IDC_BOX_HELP,16,20,205,63
- LTEXT "",IDC_BOX_HELP2,16,101,205,59
+ CONTROL "Normal mode",IDC_HIDVOL_WIZ_MODE_FULL,"Button",BS_AUTORADIOBUTTON,0,7,269,10
+ CONTROL "Direct mode",IDC_HIDVOL_WIZ_MODE_DIRECT,"Button",BS_AUTORADIOBUTTON,0,97,269,10
+ LTEXT "",IDC_BOX_HELP,16,20,253,72
+ LTEXT "",IDC_BOX_HELP2,16,110,253,72
END
-IDD_PASSWORD_ENTRY_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_PASSWORD_ENTRY_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- EDITTEXT IDC_PASSWORD_DIRECT,50,2,173,14,ES_PASSWORD | ES_AUTOHSCROLL
- COMBOBOX IDC_PKCS5_PRF_ID,50,17,104,90,CBS_DROPDOWNLIST | WS_TABSTOP
- EDITTEXT IDC_PIM,50,32,42,14,ES_RIGHT | ES_PASSWORD | ES_AUTOHSCROLL | ES_NUMBER | NOT WS_VISIBLE
- LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,96,34,127,8,NOT WS_VISIBLE
- CONTROL "&Display password",IDC_SHOW_PASSWORD_SINGLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,50,46,84,11,WS_EX_TRANSPARENT
- CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,50,57,94,11
- PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,149,54,74,14
- LTEXT "",IDC_BOX_HELP,0,74,225,94
- RTEXT "Password:",IDT_PASSWORD,0,6,48,8
- RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,0,19,48,8
- RTEXT "Volume PIM:",IDT_PIM,0,35,48,8,NOT WS_VISIBLE
- CONTROL "Use P&IM",IDC_PIM_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,50,35,97,10
-END
-
-IDD_VOLUME_TYPE_PAGE_DLG DIALOGEX 0, 0, 226, 172
+ EDITTEXT IDC_PASSWORD_DIRECT,75,2,198,14,ES_PASSWORD | ES_AUTOHSCROLL
+ COMBOBOX IDC_PKCS5_PRF_ID,75,17,131,90,CBS_DROPDOWNLIST | WS_TABSTOP
+ EDITTEXT IDC_PIM,75,32,42,14,ES_RIGHT | ES_PASSWORD | ES_AUTOHSCROLL | ES_NUMBER | NOT WS_VISIBLE
+ LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,121,34,152,8,NOT WS_VISIBLE
+ CONTROL "&Display password",IDC_SHOW_PASSWORD_SINGLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,75,46,109,11,WS_EX_TRANSPARENT
+ CONTROL "U&se keyfiles",IDC_KEYFILES_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,75,57,106,11
+ PUSHBUTTON "&Keyfiles...",IDC_KEY_FILES,188,54,85,14
+ LTEXT "",IDC_BOX_HELP,0,74,273,119
+ RTEXT "Password:",IDT_PASSWORD,0,6,71,8
+ RTEXT "PKCS-5 PRF:",IDT_PKCS5_PRF,0,19,71,8
+ RTEXT "Volume PIM:",IDT_PIM,0,35,71,8,NOT WS_VISIBLE
+ CONTROL "Use P&IM",IDC_PIM_ENABLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,75,35,97,10
+END
+
+IDD_VOLUME_TYPE_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- CONTROL "Standard VeraCrypt volume",IDC_STD_VOL,"Button",BS_AUTORADIOBUTTON,0,7,212,10
- CONTROL "Hi&dden VeraCrypt volume ",IDC_HIDDEN_VOL,"Button",BS_AUTORADIOBUTTON,0,68,212,10
- LTEXT "More information about hidden volumes",IDC_HIDDEN_VOL_HELP,16,151,205,10,SS_NOTIFY
- LTEXT "",IDC_BOX_HELP_NORMAL_VOL,16,20,205,41
- LTEXT "",IDC_BOX_HELP,16,83,205,62
+ CONTROL "Standard VeraCrypt volume",IDC_STD_VOL,"Button",BS_AUTORADIOBUTTON,0,7,269,10
+ CONTROL "Hi&dden VeraCrypt volume ",IDC_HIDDEN_VOL,"Button",BS_AUTORADIOBUTTON,0,76,269,10
+ LTEXT "More information about hidden volumes",IDC_HIDDEN_VOL_HELP,16,173,253,10,SS_NOTIFY
+ LTEXT "",IDC_BOX_HELP_NORMAL_VOL,16,20,253,52
+ LTEXT "",IDC_BOX_HELP,16,93,253,70
END
-IDD_SYSENC_SPAN_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_SYSENC_SPAN_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "Encrypt the Windows system partition",IDC_SYS_PARTITION,
- "Button",BS_AUTORADIOBUTTON,0,7,212,10
- CONTROL "Encrypt the whole drive",IDC_WHOLE_SYS_DRIVE,"Button",BS_AUTORADIOBUTTON,0,53,212,10
- LTEXT "Select this option to encrypt the partition where the currently running Windows operating system is installed.",IDT_SYS_PARTITION,16,20,205,32
- LTEXT "",IDT_WHOLE_SYS_DRIVE,16,70,205,95
+ "Button",BS_AUTORADIOBUTTON,0,7,269,10
+ CONTROL "Encrypt the whole drive",IDC_WHOLE_SYS_DRIVE,"Button",BS_AUTORADIOBUTTON,0,67,269,10
+ LTEXT "Select this option to encrypt the partition where the currently running Windows operating system is installed.",IDT_SYS_PARTITION,16,20,253,42
+ LTEXT "",IDT_WHOLE_SYS_DRIVE,16,82,253,104
END
-IDD_SYSENC_RESCUE_DISK_CREATION_DLG DIALOGEX 0, 0, 226, 172
+IDD_SYSENC_RESCUE_DISK_CREATION_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- EDITTEXT IDC_RESCUE_DISK_ISO_PATH,0,159,163,13,ES_AUTOHSCROLL
- PUSHBUTTON "Bro&wse...",IDC_BROWSE,166,158,59,14
- LTEXT "",IDT_RESCUE_DISK_INFO,0,1,225,137
+ EDITTEXT IDC_RESCUE_DISK_ISO_PATH,0,180,201,13,ES_AUTOHSCROLL
+ PUSHBUTTON "Bro&wse...",IDC_BROWSE,204,179,70,14
+ LTEXT "",IDT_RESCUE_DISK_INFO,0,1,273,137
CONTROL "Skip Rescue Disk verification",IDC_SKIP_RESCUE_VERIFICATION,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,145,106,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,166,273,10
END
-IDD_SYSENC_COLLECTING_RANDOM_DATA_DLG DIALOGEX 0, 0, 226, 172
+IDD_SYSENC_COLLECTING_RANDOM_DATA_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- CONTROL "Display pool content",IDC_DISPLAY_POOL_CONTENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,1,98,122,10
- CONTROL "",IDC_SYS_POOL_CONTENTS,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,8,14,205,72,WS_EX_TRANSPARENT
- LTEXT "IMPORTANT: Move your mouse as randomly as possible within this window. The longer you move it, the better. This significantly increases the cryptographic strength of the encryption keys. Then click Next to continue.",IDT_COLLECTING_RANDOM_DATA_NOTE,1,112,224,40
- GROUPBOX "Current pool content (partial)",IDT_PARTIAL_POOL_CONTENTS,0,5,222,88
- GROUPBOX "Randomness Collected From Mouse Movements",IDT_ENTROPY_BAR,0,154,224,18
- CONTROL "",IDC_ENTROPY_BAR,"msctls_progress32",WS_BORDER,11,163,202,6
+ CONTROL "Display pool content",IDC_DISPLAY_POOL_CONTENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,93,266,10
+ CONTROL "",IDC_SYS_POOL_CONTENTS,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,33,17,209,63,WS_EX_TRANSPARENT
+ LTEXT "IMPORTANT: Move your mouse as randomly as possible within this window. The longer you move it, the better. This significantly increases the cryptographic strength of the encryption keys. Then click Next to continue.",IDT_COLLECTING_RANDOM_DATA_NOTE,10,107,265,63
+ GROUPBOX "Current pool content (partial)",IDT_PARTIAL_POOL_CONTENTS,0,5,276,83
+ GROUPBOX "Randomness Collected From Mouse Movements",IDT_ENTROPY_BAR,0,174,276,18
+ CONTROL "",IDC_ENTROPY_BAR,"msctls_progress32",WS_BORDER,11,183,254,6
END
-IDD_SYSENC_MULTI_BOOT_MODE_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_SYSENC_MULTI_BOOT_MODE_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- CONTROL "Single-boot",IDC_SINGLE_BOOT,"Button",BS_AUTORADIOBUTTON,0,7,212,10
- CONTROL "Multi-boot",IDC_MULTI_BOOT,"Button",BS_AUTORADIOBUTTON,0,53,217,10
- LTEXT "Select this option if there is only one operating system installed on this computer (even if it has multiple users).",IDT_SINGLE_BOOT,16,20,205,32
- LTEXT "Select this option if there are two or more operating systems installed on this computer.\n\nFor example:\n- Windows XP and Windows XP\n- Windows XP and Windows Vista\n- Windows and Mac OS X\n- Windows and Linux\n- Windows, Linux and Mac OS X",IDT_MULTI_BOOT,16,66,205,72
+ CONTROL "Single-boot",IDC_SINGLE_BOOT,"Button",BS_AUTORADIOBUTTON,0,7,269,10
+ CONTROL "Multi-boot",IDC_MULTI_BOOT,"Button",BS_AUTORADIOBUTTON,0,75,217,10
+ LTEXT "Select this option if there is only one operating system installed on this computer (even if it has multiple users).",IDT_SINGLE_BOOT,16,20,253,48
+ LTEXT "Select this option if there are two or more operating systems installed on this computer.\n\nFor example:\n- Windows XP and Windows XP\n- Windows XP and Windows Vista\n- Windows and Mac OS X\n- Windows and Linux\n- Windows, Linux and Mac OS X",IDT_MULTI_BOOT,16,89,253,90
END
-IDD_SYSENC_RESCUE_DISK_BURN_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_SYSENC_RESCUE_DISK_BURN_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- LTEXT "Download CD/DVD recording software",IDC_DOWNLOAD_CD_BURN_SOFTWARE,0,136,217,10,SS_NOTIFY
- LTEXT "",IDT_RESCUE_DISK_BURN_INFO,0,4,225,128
+ LTEXT "Download CD/DVD recording software",IDC_DOWNLOAD_CD_BURN_SOFTWARE,0,159,273,10,SS_NOTIFY
+ LTEXT "",IDT_RESCUE_DISK_BURN_INFO,0,4,273,148
END
-IDD_SYSENC_WIPE_MODE_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_SYSENC_WIPE_MODE_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- COMBOBOX IDC_WIPE_MODE,61,0,127,90,CBS_DROPDOWNLIST | WS_TABSTOP
- RTEXT "Wipe mode:",IDT_WIPE_MODE,0,2,59,8,0,WS_EX_RIGHT
- LTEXT "",IDT_WIPE_MODE_INFO,0,19,225,128
+ COMBOBOX IDC_WIPE_MODE,88,0,138,90,CBS_DROPDOWNLIST | WS_TABSTOP
+ RTEXT "Wipe mode:",IDT_WIPE_MODE,0,2,83,8,0,WS_EX_RIGHT
+ LTEXT "",IDT_WIPE_MODE_INFO,0,19,269,167
END
-IDD_INPLACE_ENCRYPTION_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_INPLACE_ENCRYPTION_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- COMBOBOX IDC_WIPE_MODE,67,13,125,90,CBS_DROPDOWNLIST | WS_TABSTOP
- PUSHBUTTON "&Pause",IDC_PAUSE,169,40,50,14
- LTEXT "More information",IDC_MORE_INFO_SYS_ENCRYPTION,1,150,202,10,SS_NOTIFY
+ COMBOBOX IDC_WIPE_MODE,96,13,125,90,CBS_DROPDOWNLIST | WS_TABSTOP
+ PUSHBUTTON "&Pause",IDC_PAUSE,204,40,63,14
+ LTEXT "More information",IDC_MORE_INFO_SYS_ENCRYPTION,1,176,266,10,SS_NOTIFY
LTEXT "",IDC_BYTESWRITTEN,29,58,39,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
- RTEXT "",IDC_WRITESPEED,103,58,46,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
- RTEXT "",IDC_TIMEREMAIN,177,58,42,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
- RTEXT "Wipe mode:",IDT_WIPE_MODE,6,15,59,8,0,WS_EX_RIGHT
- CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,6,41,158,12
+ RTEXT "",IDC_WRITESPEED,110,58,56,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
+ RTEXT "",IDC_TIMEREMAIN,212,58,54,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
+ RTEXT "Wipe mode:",IDT_WIPE_MODE,6,15,85,8,0,WS_EX_RIGHT
+ CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,6,41,192,12
RTEXT "Done",IDT_DONE,5,59,22,8
- RTEXT "Status",IDT_STATUS,72,59,29,8
- RTEXT "Left",IDT_LEFT,151,59,24,8
- LTEXT "",IDC_BOX_HELP,1,77,224,70
- GROUPBOX "Options",IDT_FORMAT_OPTIONS,0,3,225,29
- GROUPBOX "",IDC_STATIC,0,32,225,41
+ RTEXT "Status",IDT_STATUS,73,59,33,8
+ RTEXT "Left",IDT_LEFT,172,59,35,8
+ LTEXT "",IDC_BOX_HELP,1,77,266,95
+ GROUPBOX "Options",IDT_FORMAT_OPTIONS,0,3,267,29
+ GROUPBOX "",IDC_STATIC,0,32,267,41
END
-IDD_SYSENC_KEYS_GEN_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_SYSENC_KEYS_GEN_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
CONTROL "Display generated keys (their portions)",IDC_DISPLAY_KEYS,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,1,94,216,10
- CONTROL "",IDC_HEADER_KEY,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,57,71,163,8,WS_EX_TRANSPARENT
- LTEXT "",IDC_DISK_KEY,57,79,163,8,0,WS_EX_TRANSPARENT
- LTEXT "The keys, salt, and other data have been successfully generated. If you want to generate new keys, click Back and then Next. Otherwise, click Next to continue.",IDT_SYSENC_KEYS_GEN_INFO,1,23,224,41
- RTEXT "Header Key: ",IDT_HEADER_KEY,2,72,54,8
- RTEXT "Master Key: ",IDT_MASTER_KEY,2,80,54,8
- GROUPBOX "",-1,0,65,225,26
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,51,110,216,10
+ CONTROL "",IDC_HEADER_KEY,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,100,87,163,8,WS_EX_TRANSPARENT
+ LTEXT "",IDC_DISK_KEY,100,95,163,8,0,WS_EX_TRANSPARENT
+ LTEXT "The keys, salt, and other data have been successfully generated. If you want to generate new keys, click Back and then Next. Otherwise, click Next to continue.",IDT_SYSENC_KEYS_GEN_INFO,1,23,266,57
+ RTEXT "Header Key: ",IDT_HEADER_KEY,2,88,93,8
+ RTEXT "Master Key: ",IDT_MASTER_KEY,2,96,93,8
+ GROUPBOX "",-1,0,81,267,26
END
-IDD_UNIVERSAL_DUAL_CHOICE_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_UNIVERSAL_DUAL_CHOICE_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- CONTROL "",IDC_CHOICE1,"Button",BS_AUTORADIOBUTTON,0,7,212,10
- CONTROL "",IDC_CHOICE2,"Button",BS_AUTORADIOBUTTON,0,17,217,10
- LTEXT "",IDC_BOX_HELP,1,34,220,112
+ CONTROL "",IDC_CHOICE1,"Button",BS_AUTORADIOBUTTON,0,7,269,10
+ CONTROL "",IDC_CHOICE2,"Button",BS_AUTORADIOBUTTON,0,17,269,10
+ LTEXT "",IDC_BOX_HELP,1,34,268,152
END
-IDD_SYSENC_DRIVE_ANALYSIS_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_SYSENC_DRIVE_ANALYSIS_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- LTEXT "",IDT_SYSENC_DRIVE_ANALYSIS_INFO,2,10,215,88
- CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,1,115,216,12
- LTEXT "Progress:",IDT_PROGRESS,2,104,57,8
+ LTEXT "",IDT_SYSENC_DRIVE_ANALYSIS_INFO,0,10,267,109
+ CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,0,135,267,12
+ LTEXT "Progress:",IDT_PROGRESS,2,124,172,8
END
-IDD_SYSENC_TYPE_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_SYSENC_TYPE_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- CONTROL "Normal",IDC_SYSENC_NORMAL,"Button",BS_AUTORADIOBUTTON,0,7,212,10
- CONTROL "Hi&dden",IDC_SYSENC_HIDDEN,"Button",BS_AUTORADIOBUTTON,0,53,212,10
- LTEXT "More information",IDC_HIDDEN_SYSENC_INFO_LINK,16,148,205,10,SS_NOTIFY
- LTEXT "",IDC_BOX_HELP_SYSENC_NORMAL,16,20,205,25
- LTEXT "",IDC_BOX_HELP,16,67,205,72
+ CONTROL "Normal",IDC_SYSENC_NORMAL,"Button",BS_AUTORADIOBUTTON,0,7,269,10
+ CONTROL "Hi&dden",IDC_SYSENC_HIDDEN,"Button",BS_AUTORADIOBUTTON,0,64,269,10
+ LTEXT "More information",IDC_HIDDEN_SYSENC_INFO_LINK,16,173,253,10,SS_NOTIFY
+ LTEXT "",IDC_BOX_HELP_SYSENC_NORMAL,16,20,253,41
+ LTEXT "",IDC_BOX_HELP,16,78,253,90
END
-IDD_SYSENC_HIDDEN_OS_REQ_CHECK_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_SYSENC_HIDDEN_OS_REQ_CHECK_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- LTEXT "More information",IDC_HIDDEN_SYSENC_INFO_LINK,0,150,217,10,SS_NOTIFY
- LTEXT "",IDC_BOX_HELP,0,2,225,142
+ LTEXT "More information",IDC_HIDDEN_SYSENC_INFO_LINK,0,172,273,10,SS_NOTIFY
+ LTEXT "",IDC_BOX_HELP,0,2,273,166
END
-IDD_DEVICE_WIPE_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_DEVICE_WIPE_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- PUSHBUTTON "Abort",IDC_ABORT_BUTTON,169,48,50,14
+ PUSHBUTTON "Abort",IDC_ABORT_BUTTON,217,48,50,14
LTEXT "",IDC_BYTESWRITTEN,29,66,39,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
- RTEXT "",IDC_WRITESPEED,103,66,46,11,SS_CENTERIMAGE | NOT WS_VISIBLE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
- RTEXT "",IDC_TIMEREMAIN,177,66,42,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
- RTEXT "Wipe mode:",IDT_WIPE_MODE,6,22,59,8,0,WS_EX_RIGHT
- CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,6,49,158,12
+ RTEXT "",IDC_WRITESPEED,119,66,46,11,SS_CENTERIMAGE | NOT WS_VISIBLE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
+ RTEXT "",IDC_TIMEREMAIN,219,66,48,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_RIGHT | WS_EX_STATICEDGE
+ RTEXT "Wipe mode:",IDT_WIPE_MODE,6,22,92,8,0,WS_EX_RIGHT
+ CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,6,49,208,12
RTEXT "Done",IDT_DONE,5,67,22,8
- RTEXT "Pass",IDT_PASS,72,67,29,8,NOT WS_VISIBLE
- RTEXT "Left",IDT_LEFT,151,67,24,8
- LTEXT "",IDC_BOX_HELP,1,86,224,80
- GROUPBOX "",IDT_FORMAT_OPTIONS,0,10,225,29
- GROUPBOX "",IDC_STATIC,0,40,225,42
- LTEXT "",IDC_WIPE_MODE,67,21,125,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_STATICEDGE
+ RTEXT "Pass",IDT_PASS,73,67,44,8,NOT WS_VISIBLE
+ RTEXT "Left",IDT_LEFT,180,67,34,8
+ LTEXT "",IDC_BOX_HELP,1,96,266,91
+ GROUPBOX "",IDT_FORMAT_OPTIONS,0,10,267,29
+ GROUPBOX "",IDC_STATIC,0,40,267,42
+ LTEXT "",IDC_WIPE_MODE,101,21,125,11,SS_CENTERIMAGE,WS_EX_TRANSPARENT | WS_EX_STATICEDGE
END
-IDD_DEVICE_WIPE_MODE_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_DEVICE_WIPE_MODE_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- COMBOBOX IDC_WIPE_MODE,61,9,127,90,CBS_DROPDOWNLIST | WS_TABSTOP
- RTEXT "Wipe mode:",IDT_WIPE_MODE,0,11,59,8,0,WS_EX_RIGHT
- LTEXT "",IDT_WIPE_MODE_INFO,0,29,225,122
+ COMBOBOX IDC_WIPE_MODE,89,9,127,90,CBS_DROPDOWNLIST | WS_TABSTOP
+ RTEXT "Wipe mode:",IDT_WIPE_MODE,0,11,86,8,0,WS_EX_RIGHT
+ LTEXT "",IDT_WIPE_MODE_INFO,0,29,269,157
END
-IDD_DEVICE_TRANSFORM_MODE_DLG DIALOGEX 0, 0, 226, 172
+IDD_DEVICE_TRANSFORM_MODE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CONTROL "Create encrypted volume and format it",IDC_DEVICE_TRANSFORM_MODE_FORMAT,
- "Button",BS_AUTORADIOBUTTON,0,8,217,10
+ "Button",BS_AUTORADIOBUTTON,0,8,269,10
CONTROL "Encrypt partition in place",IDC_DEVICE_TRANSFORM_MODE_INPLACE,
- "Button",BS_AUTORADIOBUTTON,0,98,217,10
- LTEXT "",IDC_BOX_HELP,16,21,205,74
- LTEXT "",IDC_BOX_HELP2,16,112,205,53
+ "Button",BS_AUTORADIOBUTTON,0,111,269,10
+ LTEXT "",IDC_BOX_HELP,16,21,253,84
+ LTEXT "",IDC_BOX_HELP2,16,125,253,61
END
-IDD_EXPANDED_LIST_SELECT_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_EXPANDED_LIST_SELECT_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- LTEXT "",IDC_BOX_HELP,0,107,225,58
- LISTBOX IDC_LIST_BOX,0,3,222,100,LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL
+ LTEXT "",IDC_BOX_HELP,0,117,269,69
+ LISTBOX IDC_LIST_BOX,0,3,269,107,LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_VSCROLL
END
-IDD_DRIVE_LETTER_SELECTION_PAGE DIALOGEX 0, 0, 226, 172
+IDD_DRIVE_LETTER_SELECTION_PAGE DIALOGEX 0, 0, 277, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- LTEXT "",IDC_BOX_HELP,0,40,225,118
- COMBOBOX IDC_DRIVE_LETTER_LIST,94,15,38,69,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- RTEXT "Drive letter:",IDT_DRIVE_LETTER,5,17,86,8
+ LTEXT "",IDC_BOX_HELP,0,40,270,146
+ COMBOBOX IDC_DRIVE_LETTER_LIST,115,15,38,69,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Drive letter:",IDT_DRIVE_LETTER,5,17,106,8
END
-IDD_PIM_PAGE_DLG DIALOGEX 0, 0, 226, 172
+IDD_PIM_PAGE_DLG DIALOGEX 0, 0, 276, 193
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- EDITTEXT IDC_PIM,53,0,42,14,ES_RIGHT | ES_PASSWORD | ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "",IDC_BOX_HELP,0,32,225,126
- RTEXT "Volume PIM:",IDT_PIM,1,3,50,8
- LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,97,3,126,8
- LTEXT "Information on PIM",IDC_LINK_PIM_INFO,0,161,213,8,SS_NOTIFY
- CONTROL "Display PIM",IDC_SHOW_PIM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,53,17,150,10
+ EDITTEXT IDC_PIM,74,0,42,14,ES_RIGHT | ES_PASSWORD | ES_AUTOHSCROLL | ES_NUMBER
+ LTEXT "",IDC_BOX_HELP,0,32,273,142
+ RTEXT "Volume PIM:",IDT_PIM,1,3,69,8
+ LTEXT "(Empty or 0 for default iterations)",IDC_PIM_HELP,120,3,153,8
+ LTEXT "Information on PIM",IDC_LINK_PIM_INFO,0,179,273,8,SS_NOTIFY
+ CONTROL "Display PIM",IDC_SHOW_PIM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,74,17,196,10
END
#ifdef APSTUDIO_INVOKED
@@ -485,230 +486,226 @@ END
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
+GUIDELINES DESIGNINFO
BEGIN
IDD_VOL_CREATION_WIZARD_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 393
+ RIGHTMARGIN, 443
TOPMARGIN, 1
- BOTTOMMARGIN, 227
- HORZGUIDE, 216
+ BOTTOMMARGIN, 248
+ HORZGUIDE, 241
END
IDD_CIPHER_PAGE_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 223
- BOTTOMMARGIN, 161
+ RIGHTMARGIN, 273
+ BOTTOMMARGIN, 182
END
IDD_PASSWORD_PAGE_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 223
- BOTTOMMARGIN, 143
+ RIGHTMARGIN, 273
+ BOTTOMMARGIN, 192
END
IDD_SIZE_PAGE_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 223
- BOTTOMMARGIN, 165
+ RIGHTMARGIN, 273
+ BOTTOMMARGIN, 186
END
IDD_VOLUME_LOCATION_PAGE_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 223
- BOTTOMMARGIN, 167
+ RIGHTMARGIN, 273
+ BOTTOMMARGIN, 188
END
IDD_FORMAT_PAGE_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 217
- BOTTOMMARGIN, 153
HORZGUIDE, 80
HORZGUIDE, 96
END
IDD_INTRO_PAGE_DLG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 219
+ RIGHTMARGIN, 269
TOPMARGIN, 7
- BOTTOMMARGIN, 165
+ BOTTOMMARGIN, 186
END
IDD_INFO_PAGE_DLG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 219
+ RIGHTMARGIN, 269
TOPMARGIN, 7
- BOTTOMMARGIN, 165
+ BOTTOMMARGIN, 186
END
IDD_HIDVOL_HOST_FILL_PAGE_DLG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 219
+ RIGHTMARGIN, 269
TOPMARGIN, 7
- BOTTOMMARGIN, 165
+ BOTTOMMARGIN, 186
END
IDD_HIDDEN_VOL_WIZARD_MODE_PAGE_DLG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 219
+ RIGHTMARGIN, 269
TOPMARGIN, 7
- BOTTOMMARGIN, 165
+ BOTTOMMARGIN, 186
END
IDD_PASSWORD_ENTRY_PAGE_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 223
- BOTTOMMARGIN, 143
+ RIGHTMARGIN, 273
END
IDD_VOLUME_TYPE_PAGE_DLG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 219
+ RIGHTMARGIN, 269
TOPMARGIN, 7
- BOTTOMMARGIN, 165
+ BOTTOMMARGIN, 186
END
IDD_SYSENC_SPAN_PAGE_DLG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 219
+ RIGHTMARGIN, 269
TOPMARGIN, 7
- BOTTOMMARGIN, 165
+ BOTTOMMARGIN, 186
END
IDD_SYSENC_RESCUE_DISK_CREATION_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 223
- BOTTOMMARGIN, 167
+ RIGHTMARGIN, 273
+ BOTTOMMARGIN, 188
END
IDD_SYSENC_COLLECTING_RANDOM_DATA_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 217
- BOTTOMMARGIN, 153
+ BOTTOMMARGIN, 174
HORZGUIDE, 80
HORZGUIDE, 96
END
IDD_SYSENC_MULTI_BOOT_MODE_PAGE_DLG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 219
+ RIGHTMARGIN, 269
TOPMARGIN, 7
- BOTTOMMARGIN, 165
+ BOTTOMMARGIN, 186
END
IDD_SYSENC_RESCUE_DISK_BURN_PAGE_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 223
- BOTTOMMARGIN, 167
+ RIGHTMARGIN, 273
+ BOTTOMMARGIN, 188
END
IDD_SYSENC_WIPE_MODE_PAGE_DLG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 219
+ RIGHTMARGIN, 269
TOPMARGIN, 7
- BOTTOMMARGIN, 165
+ BOTTOMMARGIN, 186
END
IDD_INPLACE_ENCRYPTION_PAGE_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 217
- BOTTOMMARGIN, 166
+ RIGHTMARGIN, 267
+ BOTTOMMARGIN, 187
HORZGUIDE, 80
HORZGUIDE, 96
END
IDD_SYSENC_KEYS_GEN_PAGE_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 217
- BOTTOMMARGIN, 153
+ RIGHTMARGIN, 267
+ BOTTOMMARGIN, 174
HORZGUIDE, 80
HORZGUIDE, 96
END
IDD_UNIVERSAL_DUAL_CHOICE_PAGE_DLG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 219
+ RIGHTMARGIN, 269
TOPMARGIN, 7
- BOTTOMMARGIN, 165
+ BOTTOMMARGIN, 186
END
IDD_SYSENC_DRIVE_ANALYSIS_PAGE_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 217
- BOTTOMMARGIN, 153
+ RIGHTMARGIN, 267
+ BOTTOMMARGIN, 174
HORZGUIDE, 80
HORZGUIDE, 96
END
IDD_SYSENC_TYPE_PAGE_DLG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 219
+ RIGHTMARGIN, 269
TOPMARGIN, 7
- BOTTOMMARGIN, 165
+ BOTTOMMARGIN, 186
END
IDD_SYSENC_HIDDEN_OS_REQ_CHECK_PAGE_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 223
- BOTTOMMARGIN, 167
+ RIGHTMARGIN, 273
+ BOTTOMMARGIN, 188
END
IDD_DEVICE_WIPE_PAGE_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 217
- BOTTOMMARGIN, 166
+ RIGHTMARGIN, 267
+ BOTTOMMARGIN, 187
HORZGUIDE, 80
HORZGUIDE, 96
END
IDD_DEVICE_WIPE_MODE_PAGE_DLG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 219
+ RIGHTMARGIN, 269
TOPMARGIN, 7
- BOTTOMMARGIN, 165
+ BOTTOMMARGIN, 186
END
IDD_DEVICE_TRANSFORM_MODE_DLG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 219
+ RIGHTMARGIN, 269
TOPMARGIN, 7
- BOTTOMMARGIN, 165
+ BOTTOMMARGIN, 186
END
IDD_EXPANDED_LIST_SELECT_PAGE_DLG, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 219
+ RIGHTMARGIN, 269
TOPMARGIN, 7
- BOTTOMMARGIN, 165
+ BOTTOMMARGIN, 186
END
IDD_DRIVE_LETTER_SELECTION_PAGE, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 219
+ RIGHTMARGIN, 270
TOPMARGIN, 7
- BOTTOMMARGIN, 165
+ BOTTOMMARGIN, 186
END
IDD_PIM_PAGE_DLG, DIALOG
BEGIN
- RIGHTMARGIN, 223
- BOTTOMMARGIN, 171
+ RIGHTMARGIN, 273
+ BOTTOMMARGIN, 192
END
END
#endif // APSTUDIO_INVOKED
@@ -724,9 +721,9 @@ IDB_WIZARD BITMAP "VeraCrypt_wizard.bmp"
//
// String Table
//
-STRINGTABLE
+STRINGTABLE
BEGIN
IDS_UACSTRING_FMT "VeraCrypt"
END
diff --git a/src/Format/Format.vcproj b/src/Format/Format.vcproj
deleted file mode 100644
index 9fa108bc..00000000
--- a/src/Format/Format.vcproj
+++ /dev/null
@@ -1,1028 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9.00"
- Name="Format"
- ProjectGUID="{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}"
- RootNamespace="Format"
- Keyword="Win32Proj"
- TargetFrameworkVersion="131072"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- <Platform
- Name="x64"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="Debug"
- IntermediateDirectory="Debug"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11"
- PreprocessorDefinitions="VOLFORMAT;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- BufferSecurityCheck="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="4"
- DisableSpecificWarnings="4057;4100;4127;4201;4204;4701;4706"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\Crypto\Debug\crypto.lib mpr.lib"
- OutputFile="$(OutDir)/VeraCryptFormat.exe"
- LinkIncremental="2"
- GenerateManifest="false"
- IgnoreAllDefaultLibraries="false"
- DelayLoadDLLs="mpr.dll"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/Format.pdb"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- AdditionalManifestFiles="Format.manifest"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="md &quot;..\Debug\Setup Files&quot; 2&gt;NUL:&#x0D;&#x0A;copy Debug\VeraCryptFormat.exe &quot;..\Debug\Setup Files\VeraCrypt Format.exe&quot; &gt;NUL:&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11"
- PreprocessorDefinitions="VOLFORMAT;WIN32;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- BufferSecurityCheck="true"
- UsePrecompiledHeader="0"
- WarningLevel="4"
- DebugInformationFormat="3"
- DisableSpecificWarnings="4057;4100;4127;4201;4204;4701;4706"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\Crypto\x64\Debug\crypto.lib mpr.lib"
- OutputFile="$(OutDir)/VeraCryptFormat.exe"
- LinkIncremental="2"
- GenerateManifest="false"
- IgnoreAllDefaultLibraries="false"
- DelayLoadDLLs="mpr.dll"
- GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)/Format.pdb"
- SubSystem="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- AdditionalManifestFiles="Format.manifest"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="md &quot;..\Debug\Setup Files&quot; 2&gt;NUL:&#x0D;&#x0A;copy $(TargetPath) &quot;..\Debug\Setup Files\VeraCrypt Format-x64.exe&quot; &gt;NUL:&#x0D;&#x0A;"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="Release"
- IntermediateDirectory="Release"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/w34189"
- Optimization="2"
- AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11"
- PreprocessorDefinitions="VOLFORMAT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS"
- RuntimeLibrary="0"
- BufferSecurityCheck="true"
- UsePrecompiledHeader="0"
- AssemblerOutput="2"
- AssemblerListingLocation="$(IntDir)/"
- WarningLevel="4"
- DebugInformationFormat="0"
- DisableSpecificWarnings="4057;4100;4127;4201;4204;4701;4706"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\Crypto\Release\crypto.lib mpr.lib"
- OutputFile="$(OutDir)/VeraCryptFormat.exe"
- LinkIncremental="1"
- GenerateManifest="false"
- IgnoreAllDefaultLibraries="false"
- DelayLoadDLLs="mpr.dll"
- GenerateDebugInformation="false"
- GenerateMapFile="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- AdditionalManifestFiles="Format.manifest"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy Release\VeraCryptFormat.exe &quot;..\Release\Setup Files\VeraCrypt Format.exe&quot;"
- />
- </Configuration>
- <Configuration
- Name="Release|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
- ConfigurationType="1"
- InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- TargetEnvironment="3"
- TypeLibraryName="$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalOptions="/w34189"
- Optimization="2"
- AdditionalIncludeDirectories="..\Common;..\Crypto;..\;..\PKCS11"
- PreprocessorDefinitions="VOLFORMAT;WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS"
- RuntimeLibrary="0"
- BufferSecurityCheck="true"
- UsePrecompiledHeader="0"
- AssemblerOutput="2"
- AssemblerListingLocation="$(IntDir)/"
- WarningLevel="4"
- DebugInformationFormat="0"
- DisableSpecificWarnings="4057;4100;4127;4201;4204;4701;4706"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\Crypto\x64\Release\crypto.lib mpr.lib"
- OutputFile="$(OutDir)/VeraCryptFormat.exe"
- LinkIncremental="1"
- GenerateManifest="false"
- IgnoreAllDefaultLibraries="false"
- DelayLoadDLLs="mpr.dll"
- GenerateDebugInformation="false"
- GenerateMapFile="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- RandomizedBaseAddress="1"
- DataExecutionPrevention="2"
- TargetMachine="17"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- AdditionalManifestFiles="Format.manifest"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- CommandLine="copy $(TargetPath) &quot;..\Release\Setup Files\VeraCrypt Format-x64.exe&quot;"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\FormatCom.cpp"
- >
- </File>
- <File
- RelativePath=".\FormatCom.idl"
- >
- </File>
- <File
- RelativePath=".\InPlace.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\Tcformat.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- </File>
- <Filter
- Name="Common"
- >
- <File
- RelativePath="..\Common\BaseCom.cpp"
- >
- </File>
- <File
- RelativePath="..\Common\BootEncryption.cpp"
- >
- </File>
- <File
- RelativePath="..\Common\Cmdline.c"
- >
- </File>
- <File
- RelativePath="..\Common\Combo.c"
- >
- </File>
- <File
- RelativePath="..\Common\Crc.c"
- >
- </File>
- <File
- RelativePath="..\Common\Crypto.c"
- >
- </File>
- <File
- RelativePath="..\Common\Dictionary.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\Common\Dlgcode.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\Common\EncryptionThreadPool.c"
- >
- </File>
- <File
- RelativePath="..\Common\Endian.c"
- >
- </File>
- <File
- RelativePath="..\Common\Fat.c"
- >
- </File>
- <File
- RelativePath="..\Common\Format.c"
- >
- </File>
- <File
- RelativePath="..\Common\GfMul.c"
- >
- </File>
- <File
- RelativePath="..\Common\Keyfiles.c"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- >
- <Tool
- Name="VCCLCompilerTool"
- CompileAs="2"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\Common\Language.c"
- >
- </File>
- <File
- RelativePath="..\Common\Password.c"
- >
- </File>
- <File
- RelativePath="..\Common\Pkcs5.c"
- >
- </File>
- <File
- RelativePath="..\Common\Progress.c"
- >
- </File>
- <File
- RelativePath="..\Common\Random.c"
- >
- </File>
- <File
- RelativePath="..\Common\Registry.c"
- >
- </File>
- <File
- RelativePath="..\Common\SecurityToken.cpp"
- >
- </File>
- <File
- RelativePath="..\Common\Tests.c"
- >
- </File>
- <File
- RelativePath="..\Common\Volumes.c"
- >
- </File>
- <File
- RelativePath="..\Common\Wipe.c"
- >
- </File>
- <File
- RelativePath="..\Common\Xml.c"
- >
- </File>
- <File
- RelativePath="..\Common\Xts.c"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\Common\BaseCom.h"
- >
- </File>
- <File
- RelativePath="..\Common\Common.h"
- >
- </File>
- <File
- RelativePath="..\Common\Crc.h"
- >
- </File>
- <File
- RelativePath="..\Common\Crypto.h"
- >
- </File>
- <File
- RelativePath="..\Common\Dictionary.h"
- >
- </File>
- <File
- RelativePath="..\Common\Dlgcode.h"
- >
- </File>
- <File
- RelativePath="..\Common\EncryptionThreadPool.h"
- >
- </File>
- <File
- RelativePath="..\Common\Endian.h"
- >
- </File>
- <File
- RelativePath="..\Common\Exception.h"
- >
- </File>
- <File
- RelativePath="..\Common\Fat.h"
- >
- </File>
- <File
- RelativePath="..\Common\Format.h"
- >
- </File>
- <File
- RelativePath=".\FormatCom.h"
- >
- </File>
- <File
- RelativePath="..\Common\GfMul.h"
- >
- </File>
- <File
- RelativePath=".\InPlace.h"
- >
- </File>
- <File
- RelativePath="..\Common\Keyfiles.h"
- >
- </File>
- <File
- RelativePath="..\Common\Language.h"
- >
- </File>
- <File
- RelativePath="..\Mount\Mount.h"
- >
- </File>
- <File
- RelativePath="..\Common\Pkcs5.h"
- >
- </File>
- <File
- RelativePath="..\Common\Progress.h"
- >
- </File>
- <File
- RelativePath="..\Common\Random.h"
- >
- </File>
- <File
- RelativePath="..\Common\Registry.h"
- >
- </File>
- <File
- RelativePath=".\resource.h"
- >
- </File>
- <File
- RelativePath="..\Common\Resource.h"
- >
- </File>
- <File
- RelativePath="..\Common\SecurityToken.h"
- >
- </File>
- <File
- RelativePath="..\Common\Tcdefs.h"
- >
- </File>
- <File
- RelativePath=".\Tcformat.h"
- >
- </File>
- <File
- RelativePath="..\Common\Tests.h"
- >
- </File>
- <File
- RelativePath="..\Common\Volumes.h"
- >
- </File>
- <File
- RelativePath="..\Common\Wipe.h"
- >
- </File>
- <File
- RelativePath="..\Common\Xml.h"
- >
- </File>
- <File
- RelativePath="..\Common\Xts.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- <File
- RelativePath="..\Boot\Windows\Release_Serpent_SHA2\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue_Twofish_SHA2\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue_Serpent_SHA2\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue_AES_SHA2\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue_SHA2\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Release_SHA2\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Release_AES_SHA2\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Release_Twofish_SHA2\BootSector.bin"
- >
- </File>
- <File
- RelativePath=".\Format.manifest"
- >
- </File>
- <File
- RelativePath=".\Format.rc"
- >
- </File>
- <File
- RelativePath=".\Format.tlb"
- SubType="Designer"
- >
- </File>
- <File
- RelativePath="..\Common\VeraCrypt_mounted.ico"
- >
- </File>
- <File
- RelativePath="..\Common\VeraCrypt_Volume.ico"
- >
- </File>
- <File
- RelativePath=".\VeraCrypt_wizard.bmp"
- >
- </File>
- <Filter
- Name="Common"
- >
- <File
- RelativePath="..\Boot\Windows\Release_AES\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Release\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Release_Twofish\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue_Serpent\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue_AES\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue_Twofish\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Release_Serpent\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue_AES\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Release\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Release_Serpent\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue_Serpent\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue_Twofish\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Release_Twofish\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Release_AES\BootSector.bin"
- >
- </File>
- <File
- RelativePath="..\Common\Common.rc"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCResourceCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCResourceCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCResourceCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|x64"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCResourceCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\Boot\Windows\Release\Decompressor.com"
- >
- </File>
- <File
- RelativePath="..\Common\Language.xml"
- >
- </File>
- <File
- RelativePath="..\Resources\Texts\License.rtf"
- >
- </File>
- <File
- RelativePath="..\Common\Textual_logo_288dpi.bmp"
- >
- </File>
- <File
- RelativePath="..\Common\Textual_logo_96dpi.bmp"
- >
- </File>
- <File
- RelativePath="..\Common\Textual_logo_background.bmp"
- >
- </File>
- <File
- RelativePath="..\Common\VeraCrypt.ico"
- >
- </File>
- </Filter>
- </Filter>
- <File
- RelativePath="..\Boot\Windows\Release_Serpent_SHA2\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Release_Twofish_SHA2\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue_SHA2\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue_AES_SHA2\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue_Serpent_SHA2\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Rescue_Twofish_SHA2\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Release_SHA2\BootLoader.com.gz"
- >
- </File>
- <File
- RelativePath="..\Boot\Windows\Release_AES_SHA2\BootLoader.com.gz"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/src/Format/Format.vcxproj b/src/Format/Format.vcxproj
index 6665594b..1ffac006 100644
--- a/src/Format/Format.vcxproj
+++ b/src/Format/Format.vcxproj
@@ -1,18 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
+ <ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
+ <Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
+ <ProjectConfiguration Include="ReleaseCustomEFI|ARM64">
+ <Configuration>ReleaseCustomEFI</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseCustomEFI|x64">
+ <Configuration>ReleaseCustomEFI</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
- <Platform>Win32</Platform>
+ <Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
@@ -21,120 +29,156 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}</ProjectGuid>
<RootNamespace>Format</RootNamespace>
<Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ <ProjectName>Format</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
+ <SpectreMitigation>Spectre</SpectreMitigation>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
+ <SpectreMitigation>Spectre</SpectreMitigation>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
</ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</GenerateManifest>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">$(ProjectDir)$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptFormat</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptFormat</TargetName>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</GenerateManifest>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VeraCryptFormat</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">VeraCryptFormat</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VeraCryptFormat</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">VeraCryptFormat</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">VeraCryptFormat</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">VeraCryptFormat</TargetName>
</PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
- <AdditionalDependencies>..\Crypto\Debug\crypto.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>..\Crypto\x64\Debug\crypto.lib;..\Common\x64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Format.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
+ <TargetMachine>MachineX64</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
</Link>
<Manifest>
<AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
<PostBuildEvent>
<Command>md "..\Debug\Setup Files" 2&gt;NUL:
-copy Debug\VeraCryptFormat.exe "..\Debug\Setup Files\VeraCrypt Format.exe" &gt;NUL:
+copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" &gt;NUL:
</Command>
</PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<Midl>
- <TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@@ -145,36 +189,39 @@ copy Debug\VeraCryptFormat.exe "..\Debug\Setup Files\VeraCrypt Format.exe" &gt;N
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
- <AdditionalDependencies>..\Crypto\x64\Debug\crypto.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>..\Crypto\ARM64\Debug\crypto.lib;..\Common\ARM64\Debug\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)Format.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
- <TargetMachine>MachineX64</TargetMachine>
+ <GenerateMapFile>true</GenerateMapFile>
</Link>
<Manifest>
<AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
<PostBuildEvent>
<Command>md "..\Debug\Setup Files" 2&gt;NUL:
-copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" &gt;NUL:
+copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" &gt;NUL:
</Command>
</PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName>
</Midl>
<ClCompile>
<AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
<Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<PrecompiledHeader>
@@ -183,62 +230,108 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" &gt;NUL:
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <ControlFlowGuard>Guard</ControlFlowGuard>
</ClCompile>
<Link>
- <AdditionalDependencies>..\Crypto\Release\crypto.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
+ <TargetMachine>MachineX64</TargetMachine>
</Link>
<Manifest>
<AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
<PostBuildEvent>
- <Command>copy Release\VeraCryptFormat.exe "..\Release\Setup Files\VeraCrypt Format.exe"</Command>
+ <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-x64.exe"</Command>
</PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<Midl>
- <TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName>
</Midl>
<ClCompile>
<AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
<Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>VOLFORMAT;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<PrecompiledHeader>
</PrecompiledHeader>
<AssemblerOutput>All</AssemblerOutput>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>
- </DebugInformationFormat>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <ControlFlowGuard>Guard</ControlFlowGuard>
</ClCompile>
<Link>
- <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>..\Crypto\ARM64\Release\crypto.lib;..\Common\ARM64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
- <DelayLoadDLLs>mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
- <GenerateDebugInformation>false</GenerateDebugInformation>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateMapFile>true</GenerateMapFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-arm64.exe"</Command>
+ </PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>VOLFORMAT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
<DataExecutionPrevention>true</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
<Manifest>
@@ -246,193 +339,117 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" &gt;NUL:
</Manifest>
<PostBuildEvent>
<Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-x64.exe"</Command>
</PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
</ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Common\libzip\mkstemp.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add.c" />
- <ClCompile Include="..\Common\libzip\zip_add_dir.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add_entry.c" />
- <ClCompile Include="..\Common\libzip\zip_buffer.c" />
- <ClCompile Include="..\Common\libzip\zip_close.c" />
- <ClCompile Include="..\Common\libzip\zip_delete.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_dirent.c" />
- <ClCompile Include="..\Common\libzip\zip_dir_add.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_discard.c" />
- <ClCompile Include="..\Common\libzip\zip_entry.c" />
- <ClCompile Include="..\Common\libzip\zip_error.c" />
- <ClCompile Include="..\Common\libzip\zip_error_clear.c" />
- <ClCompile Include="..\Common\libzip\zip_error_get.c" />
- <ClCompile Include="..\Common\libzip\zip_error_get_sys_type.c" />
- <ClCompile Include="..\Common\libzip\zip_error_strerror.c" />
- <ClCompile Include="..\Common\libzip\zip_error_to_str.c" />
- <ClCompile Include="..\Common\libzip\zip_err_str.c" />
- <ClCompile Include="..\Common\libzip\zip_extra_field.c" />
- <ClCompile Include="..\Common\libzip\zip_extra_field_api.c" />
- <ClCompile Include="..\Common\libzip\zip_fclose.c" />
- <ClCompile Include="..\Common\libzip\zip_fdopen.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_filerange_crc.c" />
- <ClCompile Include="..\Common\libzip\zip_file_add.c" />
- <ClCompile Include="..\Common\libzip\zip_file_error_clear.c" />
- <ClCompile Include="..\Common\libzip\zip_file_error_get.c" />
- <ClCompile Include="..\Common\libzip\zip_file_get_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_file_get_external_attributes.c" />
- <ClCompile Include="..\Common\libzip\zip_file_get_offset.c" />
- <ClCompile Include="..\Common\libzip\zip_file_rename.c" />
- <ClCompile Include="..\Common\libzip\zip_file_replace.c" />
- <ClCompile Include="..\Common\libzip\zip_file_set_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_file_set_external_attributes.c" />
- <ClCompile Include="..\Common\libzip\zip_file_set_mtime.c" />
- <ClCompile Include="..\Common\libzip\zip_file_strerror.c" />
- <ClCompile Include="..\Common\libzip\zip_fopen.c" />
- <ClCompile Include="..\Common\libzip\zip_fopen_encrypted.c" />
- <ClCompile Include="..\Common\libzip\zip_fopen_index.c" />
- <ClCompile Include="..\Common\libzip\zip_fopen_index_encrypted.c" />
- <ClCompile Include="..\Common\libzip\zip_fread.c" />
- <ClCompile Include="..\Common\libzip\zip_get_archive_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_get_archive_flag.c" />
- <ClCompile Include="..\Common\libzip\zip_get_compression_implementation.c" />
- <ClCompile Include="..\Common\libzip\zip_get_encryption_implementation.c" />
- <ClCompile Include="..\Common\libzip\zip_get_file_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_get_name.c" />
- <ClCompile Include="..\Common\libzip\zip_get_num_entries.c" />
- <ClCompile Include="..\Common\libzip\zip_get_num_files.c" />
- <ClCompile Include="..\Common\libzip\zip_hash.c" />
- <ClCompile Include="..\Common\libzip\zip_io_util.c" />
- <ClCompile Include="..\Common\libzip\zip_memdup.c" />
- <ClCompile Include="..\Common\libzip\zip_name_locate.c" />
- <ClCompile Include="..\Common\libzip\zip_new.c" />
- <ClCompile Include="..\Common\libzip\zip_open.c" />
- <ClCompile Include="..\Common\libzip\zip_rename.c" />
- <ClCompile Include="..\Common\libzip\zip_replace.c" />
- <ClCompile Include="..\Common\libzip\zip_set_archive_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_set_archive_flag.c" />
- <ClCompile Include="..\Common\libzip\zip_set_default_password.c" />
- <ClCompile Include="..\Common\libzip\zip_set_file_comment.c" />
- <ClCompile Include="..\Common\libzip\zip_set_file_compression.c" />
- <ClCompile Include="..\Common\libzip\zip_set_name.c" />
- <ClCompile Include="..\Common\libzip\zip_source_begin_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_buffer.c" />
- <ClCompile Include="..\Common\libzip\zip_source_call.c" />
- <ClCompile Include="..\Common\libzip\zip_source_close.c" />
- <ClCompile Include="..\Common\libzip\zip_source_commit_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_crc.c" />
- <ClCompile Include="..\Common\libzip\zip_source_deflate.c" />
- <ClCompile Include="..\Common\libzip\zip_source_error.c" />
- <ClCompile Include="..\Common\libzip\zip_source_filep.c">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">
+ <Midl>
+ <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;..\Common\lzma;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>VOLFORMAT;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <AssemblerOutput>All</AssemblerOutput>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <WarningLevel>Level4</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4057;4100;4127;4201;4204;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_free.c" />
- <ClCompile Include="..\Common\libzip\zip_source_function.c" />
- <ClCompile Include="..\Common\libzip\zip_source_is_deleted.c" />
- <ClCompile Include="..\Common\libzip\zip_source_layered.c" />
- <ClCompile Include="..\Common\libzip\zip_source_open.c" />
- <ClCompile Include="..\Common\libzip\zip_source_pkware.c" />
- <ClCompile Include="..\Common\libzip\zip_source_read.c" />
- <ClCompile Include="..\Common\libzip\zip_source_remove.c" />
- <ClCompile Include="..\Common\libzip\zip_source_rollback_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_seek.c" />
- <ClCompile Include="..\Common\libzip\zip_source_seek_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_stat.c" />
- <ClCompile Include="..\Common\libzip\zip_source_supports.c" />
- <ClCompile Include="..\Common\libzip\zip_source_tell.c" />
- <ClCompile Include="..\Common\libzip\zip_source_tell_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_win32a.c" />
- <ClCompile Include="..\Common\libzip\zip_source_win32handle.c" />
- <ClCompile Include="..\Common\libzip\zip_source_win32utf8.c" />
- <ClCompile Include="..\Common\libzip\zip_source_win32w.c" />
- <ClCompile Include="..\Common\libzip\zip_source_window.c" />
- <ClCompile Include="..\Common\libzip\zip_source_write.c" />
- <ClCompile Include="..\Common\libzip\zip_source_zip.c" />
- <ClCompile Include="..\Common\libzip\zip_source_zip_new.c" />
- <ClCompile Include="..\Common\libzip\zip_stat.c" />
- <ClCompile Include="..\Common\libzip\zip_stat_index.c" />
- <ClCompile Include="..\Common\libzip\zip_stat_init.c" />
- <ClCompile Include="..\Common\libzip\zip_strerror.c" />
- <ClCompile Include="..\Common\libzip\zip_string.c" />
- <ClCompile Include="..\Common\libzip\zip_unchange.c" />
- <ClCompile Include="..\Common\libzip\zip_unchange_all.c" />
- <ClCompile Include="..\Common\libzip\zip_unchange_archive.c" />
- <ClCompile Include="..\Common\libzip\zip_unchange_data.c" />
- <ClCompile Include="..\Common\libzip\zip_utf-8.c" />
- <ClCompile Include="..\Common\zlib\adler32.c" />
- <ClCompile Include="..\Common\zlib\crc32.c" />
- <ClCompile Include="..\Common\zlib\deflate.c" />
- <ClCompile Include="..\Common\zlib\inffast.c" />
- <ClCompile Include="..\Common\zlib\inflate.c" />
- <ClCompile Include="..\Common\zlib\inftrees.c" />
- <ClCompile Include="..\Common\zlib\trees.c" />
- <ClCompile Include="..\Common\zlib\zutil.c" />
+ <Link>
+ <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <DelayLoadDLLs>mpr.dll;bcrypt.dll;user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;shlwapi.dll;setupapi.dll;wintrust.dll;comctl32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
+ <DataExecutionPrevention>true</DataExecutionPrevention>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-arm64.exe"</Command>
+ </PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;WIN64;ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\Common\CommandAPDU.cpp" />
+ <ClCompile Include="..\Common\EMVCard.cpp" />
+ <ClCompile Include="..\Common\EMVToken.cpp" />
+ <ClCompile Include="..\Common\PCSCException.cpp" />
+ <ClCompile Include="..\Common\ResponseAPDU.cpp" />
+ <ClCompile Include="..\Common\SCard.cpp" />
+ <ClCompile Include="..\Common\SCardLoader.cpp" />
+ <ClCompile Include="..\Common\SCardManager.cpp" />
+ <ClCompile Include="..\Common\SCardReader.cpp" />
+ <ClCompile Include="..\Common\TLVParser.cpp" />
+ <ClCompile Include="..\Common\Token.cpp" />
<ClCompile Include="FormatCom.cpp" />
<ClCompile Include="InPlace.c">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="Tcformat.c">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\BaseCom.cpp" />
<ClCompile Include="..\Common\BootEncryption.cpp" />
<ClCompile Include="..\Common\Cmdline.c" />
<ClCompile Include="..\Common\Combo.c" />
<ClCompile Include="..\Common\Crc.c" />
<ClCompile Include="..\Common\Crypto.c" />
<ClCompile Include="..\Common\Dictionary.c">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Dlgcode.c">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\EncryptionThreadPool.c" />
<ClCompile Include="..\Common\Endian.c" />
<ClCompile Include="..\Common\Fat.c" />
<ClCompile Include="..\Common\Format.c" />
<ClCompile Include="..\Common\GfMul.c" />
<ClCompile Include="..\Common\Keyfiles.c">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Language.c" />
<ClCompile Include="..\Common\Password.c" />
<ClCompile Include="..\Common\Pkcs5.c" />
@@ -450,36 +467,29 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" &gt;NUL:
<Midl Include="FormatCom.idl" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\Common\BaseCom.h" />
+ <ClInclude Include="..\Common\CommandAPDU.h" />
<ClInclude Include="..\Common\Common.h" />
<ClInclude Include="..\Common\Crc.h" />
<ClInclude Include="..\Common\Crypto.h" />
<ClInclude Include="..\Common\Dictionary.h" />
<ClInclude Include="..\Common\Dlgcode.h" />
+ <ClInclude Include="..\Common\EMVCard.h" />
+ <ClInclude Include="..\Common\EMVToken.h" />
<ClInclude Include="..\Common\EncryptionThreadPool.h" />
<ClInclude Include="..\Common\Endian.h" />
<ClInclude Include="..\Common\Exception.h" />
<ClInclude Include="..\Common\Fat.h" />
<ClInclude Include="..\Common\Format.h" />
- <ClInclude Include="..\Common\libzip\compat.h" />
- <ClInclude Include="..\Common\libzip\config.h" />
- <ClInclude Include="..\Common\libzip\zconf.h" />
- <ClInclude Include="..\Common\libzip\zip.h" />
- <ClInclude Include="..\Common\libzip\zipint.h" />
- <ClInclude Include="..\Common\libzip\zipwin32.h" />
- <ClInclude Include="..\Common\XUnzip.h" />
- <ClInclude Include="..\Common\XZip.h" />
- <ClInclude Include="..\Common\zlib\crc32.h" />
- <ClInclude Include="..\Common\zlib\deflate.h" />
- <ClInclude Include="..\Common\zlib\inffast.h" />
- <ClInclude Include="..\Common\zlib\inffixed.h" />
- <ClInclude Include="..\Common\zlib\inflate.h" />
- <ClInclude Include="..\Common\zlib\inftrees.h" />
- <ClInclude Include="..\Common\zlib\trees.h" />
- <ClInclude Include="..\Common\zlib\zconf.h" />
- <ClInclude Include="..\Common\zlib\zlib.h" />
- <ClInclude Include="..\Common\zlib\zutil.h" />
+ <ClInclude Include="..\Common\PCSCException.h" />
+ <ClInclude Include="..\Common\ResponseAPDU.h" />
+ <ClInclude Include="..\Common\SCard.h" />
+ <ClInclude Include="..\Common\SCardLoader.h" />
+ <ClInclude Include="..\Common\SCardManager.h" />
+ <ClInclude Include="..\Common\SCardReader.h" />
+ <ClInclude Include="..\Common\TLVParser.h" />
+ <ClInclude Include="..\Common\Token.h" />
<ClInclude Include="FormatCom.h" />
<ClInclude Include="..\Common\GfMul.h" />
<ClInclude Include="InPlace.h" />
<ClInclude Include="..\Common\Keyfiles.h" />
@@ -548,26 +558,25 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" &gt;NUL:
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Format.rc" />
<ResourceCompile Include="..\Common\Common.rc">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|ARM64'">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\Boot\Windows\Boot.vcxproj">
- <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ <ProjectReference Include="..\Common\Lzma.vcxproj">
+ <Project>{b896fe1f-6bf3-4f75-9148-f841829073d9}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\Common\Zip.vcxproj">
+ <Project>{6316ee71-0210-4ca4-bcc7-cfb7a3c090fc}</Project>
</ProjectReference>
<ProjectReference Include="..\Crypto\Crypto.vcxproj">
<Project>{993245cf-6b70-47ee-91bb-39f8fc6dc0e7}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="..\Driver\Driver.vcxproj">
- <Project>{ef5ef444-18d0-40d7-8dfa-775ec4448602}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/src/Format/Format.vcxproj.filters b/src/Format/Format.vcxproj.filters
index 07e68e58..dbba0b57 100644
--- a/src/Format/Format.vcxproj.filters
+++ b/src/Format/Format.vcxproj.filters
@@ -18,14 +18,8 @@
</Filter>
<Filter Include="Resource Files\Common">
<UniqueIdentifier>{881fda51-0ca5-4603-9de7-c618932554b4}</UniqueIdentifier>
</Filter>
- <Filter Include="Source Files\Common\libzip">
- <UniqueIdentifier>{89e6575e-aa9c-47e4-8280-47d282b11228}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files\Common\zlib">
- <UniqueIdentifier>{1ebcc85d-1ce3-488c-89e5-f8605df170e2}</UniqueIdentifier>
- </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="FormatCom.cpp">
<Filter>Source Files</Filter>
@@ -113,343 +107,40 @@
</ClCompile>
<ClCompile Include="..\Common\Xts.c">
<Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\mkstemp.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add_dir.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_add_entry.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_buffer.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_close.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_delete.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_dir_add.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_dirent.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_discard.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_entry.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_err_str.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_clear.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_get.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_get_sys_type.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_strerror.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_error_to_str.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_extra_field.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_extra_field_api.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fclose.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fdopen.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_add.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_error_clear.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_error_get.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_get_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_get_external_attributes.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_get_offset.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_rename.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_replace.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_set_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_set_external_attributes.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_set_mtime.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_file_strerror.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_filerange_crc.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fopen.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fopen_encrypted.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fopen_index.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fopen_index_encrypted.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_fread.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_archive_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_archive_flag.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_compression_implementation.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_encryption_implementation.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_file_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_name.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_num_entries.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_get_num_files.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_hash.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_io_util.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_memdup.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_name_locate.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_new.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_open.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_rename.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_replace.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_archive_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_archive_flag.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_default_password.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_file_comment.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_file_compression.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_set_name.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_begin_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_buffer.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_call.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_close.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_commit_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_crc.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_deflate.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_error.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_filep.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_free.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_function.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_is_deleted.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_layered.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_open.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_pkware.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_read.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_remove.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_rollback_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_seek.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_seek_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_stat.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_supports.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_tell.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_tell_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_win32a.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_win32handle.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_win32utf8.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_win32w.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_window.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_write.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_zip.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_source_zip_new.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_stat.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_stat_index.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_stat_init.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_strerror.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_string.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_unchange.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_unchange_all.c">
- <Filter>Source Files\Common\libzip</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\libzip\zip_unchange_archive.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Common\EMVToken.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_unchange_data.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Common\Token.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\libzip\zip_utf-8.c">
- <Filter>Source Files\Common\libzip</Filter>
+ <ClCompile Include="..\Common\TLVParser.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\zlib\adler32.c">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClCompile Include="..\Common\CommandAPDU.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\zlib\crc32.c">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClCompile Include="..\Common\PCSCException.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\zlib\deflate.c">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClCompile Include="..\Common\ResponseAPDU.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\zlib\inffast.c">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClCompile Include="..\Common\SCardLoader.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\zlib\inflate.c">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClCompile Include="..\Common\SCardManager.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\zlib\inftrees.c">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClCompile Include="..\Common\SCardReader.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\zlib\trees.c">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClCompile Include="..\Common\EMVCard.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
- <ClCompile Include="..\Common\zlib\zutil.c">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClCompile Include="..\Common\SCard.cpp">
+ <Filter>Source Files\Common</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Midl Include="FormatCom.idl">
@@ -549,61 +240,40 @@
</ClInclude>
<ClInclude Include="..\Common\Xts.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\XZip.h">
+ <ClInclude Include="..\Common\EMVToken.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\XUnzip.h">
+ <ClInclude Include="..\Common\Token.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\libzip\compat.h">
- <Filter>Source Files\Common\libzip</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\libzip\config.h">
- <Filter>Source Files\Common\libzip</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\libzip\zconf.h">
- <Filter>Source Files\Common\libzip</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\libzip\zip.h">
- <Filter>Source Files\Common\libzip</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\libzip\zipint.h">
- <Filter>Source Files\Common\libzip</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\libzip\zipwin32.h">
- <Filter>Source Files\Common\libzip</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\crc32.h">
- <Filter>Source Files\Common\zlib</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\zlib\deflate.h">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClInclude Include="..\Common\TLVParser.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\zlib\inffast.h">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClInclude Include="..\Common\CommandAPDU.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\zlib\inffixed.h">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClInclude Include="..\Common\PCSCException.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\zlib\inflate.h">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClInclude Include="..\Common\ResponseAPDU.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\zlib\inftrees.h">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClInclude Include="..\Common\SCardLoader.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\zlib\trees.h">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClInclude Include="..\Common\SCardManager.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\zlib\zconf.h">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClInclude Include="..\Common\SCardReader.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\zlib\zlib.h">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClInclude Include="..\Common\EMVCard.h">
+ <Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="..\Common\zlib\zutil.h">
- <Filter>Source Files\Common\zlib</Filter>
+ <ClInclude Include="..\Common\SCard.h">
+ <Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\Boot\Windows\Release_Serpent_SHA2\BootSector.bin">
diff --git a/src/Format/Format.vcxproj.user b/src/Format/Format.vcxproj.user
index ace9a86a..88a55094 100644
--- a/src/Format/Format.vcxproj.user
+++ b/src/Format/Format.vcxproj.user
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup />
</Project> \ No newline at end of file
diff --git a/src/Format/FormatCom.cpp b/src/Format/FormatCom.cpp
index 2aa5cea9..90333f23 100644
--- a/src/Format/FormatCom.cpp
+++ b/src/Format/FormatCom.cpp
@@ -3,9 +3,9 @@
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
@@ -91,13 +91,13 @@ public:
}
virtual BOOL STDMETHODCALLTYPE FormatNtfs (int driveNo, int clusterSize)
{
- return ::FormatNtfs (driveNo, clusterSize);
+ return ::FormatNtfs (driveNo, clusterSize, TRUE);
}
virtual int STDMETHODCALLTYPE AnalyzeHiddenVolumeHost (
- LONG_PTR hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters)
+ __int64 hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters)
{
return ::AnalyzeHiddenVolumeHost (
(HWND) hwndDlg, driveNo, hiddenVolHostSize, realClusterSize, nbrFreeClusters);
}
@@ -133,9 +133,9 @@ public:
}
virtual BOOL STDMETHODCALLTYPE FormatFs (int driveNo, int clusterSize, int fsType)
{
- return ::FormatFs (driveNo, clusterSize, fsType);
+ return ::FormatFs (driveNo, clusterSize, fsType, TRUE);
}
virtual DWORD STDMETHODCALLTYPE GetFileSize (BSTR filePath, unsigned __int64 *pSize)
{
@@ -166,18 +166,33 @@ public:
{
return BaseCom::GetEfiBootDeviceNumber (pSdn);
}
- virtual DWORD STDMETHODCALLTYPE ReadEfiConfig (BSTR* pContent, DWORD *pcbRead)
+ virtual DWORD STDMETHODCALLTYPE GetSecureBootConfig (BOOL* pSecureBootEnabled, BOOL *pVeraCryptKeysLoaded)
{
- return BaseCom::ReadEfiConfig (pContent, pcbRead);
+ return BaseCom::GetSecureBootConfig (pSecureBootEnabled, pVeraCryptKeysLoaded);
}
virtual DWORD STDMETHODCALLTYPE WriteEfiBootSectorUserConfig (DWORD userConfig, BSTR customUserMessage, int pim, int hashAlg)
{
return BaseCom::WriteEfiBootSectorUserConfig (userConfig, customUserMessage,pim, hashAlg);
}
+ virtual DWORD STDMETHODCALLTYPE UpdateSetupConfigFile (BOOL bForInstall)
+ {
+ return BaseCom::UpdateSetupConfigFile (bForInstall);
+ }
+
+ virtual DWORD STDMETHODCALLTYPE NotifyService (DWORD dwNotifyCode)
+ {
+ return BaseCom::NotifyService (dwNotifyCode);
+ }
+
+ virtual DWORD STDMETHODCALLTYPE FastFileResize (BSTR filePath, __int64 fileSize)
+ {
+ return BaseCom::FastFileResize (filePath, fileSize);
+ }
+
protected:
DWORD MessageThreadId;
LONG RefCount;
ITrueCryptFormatCom *CallBack;
@@ -239,14 +254,14 @@ extern "C" int UacFormatNtfs (HWND hWnd, int driveNo, int clusterSize)
{
CComPtr<ITrueCryptFormatCom> tc;
int r;
- CoInitialize (NULL);
+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
if (ComGetInstance (hWnd, &tc))
r = tc->FormatNtfs (driveNo, clusterSize);
else
- r = 0;
+ r = (int) GetLastError();
CoUninitialize ();
return r;
@@ -256,14 +271,14 @@ extern "C" int UacFormatFs (HWND hWnd, int driveNo, int clusterSize, int fsType)
{
CComPtr<ITrueCryptFormatCom> tc;
int r;
- CoInitialize (NULL);
+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
if (ComGetInstance (hWnd, &tc))
r = tc->FormatFs (driveNo, clusterSize, fsType);
else
- r = 0;
+ r = (int) GetLastError();
CoUninitialize ();
return r;
@@ -274,15 +289,80 @@ extern "C" int UacAnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 h
{
CComPtr<ITrueCryptFormatCom> tc;
int r;
- CoInitialize (NULL);
+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
if (ComGetInstance (hwndDlg, &tc))
- r = tc->AnalyzeHiddenVolumeHost ((LONG_PTR) hwndDlg, driveNo, hiddenVolHostSize, realClusterSize, nbrFreeClusters);
+ r = tc->AnalyzeHiddenVolumeHost ((__int64) hwndDlg, driveNo, hiddenVolHostSize, realClusterSize, nbrFreeClusters);
else
r = 0;
CoUninitialize ();
return r;
}
+
+extern "C" BOOL UacWriteLocalMachineRegistryDword (HWND hwndDlg, wchar_t *keyPath, wchar_t *valueName, DWORD value)
+{
+ CComPtr<ITrueCryptFormatCom> tc;
+ int r = 0;
+
+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
+
+ if (ComGetInstance (hwndDlg, &tc))
+ {
+ CComBSTR keyPathBstr, valueNameBstr;
+ BSTR bstr = W2BSTR(keyPath);
+ if (bstr)
+ {
+ keyPathBstr.Attach (bstr);
+ bstr = W2BSTR(valueName);
+ if (bstr)
+ {
+ valueNameBstr.Attach (bstr);
+ r = tc->WriteLocalMachineRegistryDwordValue (keyPathBstr, valueNameBstr, value);
+ }
+ else
+ r = ERROR_OUTOFMEMORY;
+ }
+ else
+ r = ERROR_OUTOFMEMORY;
+ }
+
+ CoUninitialize ();
+
+ if (r == ERROR_SUCCESS)
+ return TRUE;
+ else
+ {
+ SetLastError (r);
+ return FALSE;
+ }
+}
+
+extern "C" DWORD UacFastFileCreation (HWND hWnd, wchar_t* filePath, __int64 fileSize)
+{
+ CComPtr<ITrueCryptFormatCom> tc;
+ DWORD r;
+
+ CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
+
+ if (ComGetInstance (hWnd, &tc))
+ {
+ CComBSTR filePathBstr;
+ BSTR bstr = W2BSTR(filePath);
+ if (bstr)
+ {
+ filePathBstr.Attach (bstr);
+ r = tc->FastFileResize (filePathBstr, fileSize);
+ }
+ else
+ r = ERROR_OUTOFMEMORY;
+ }
+ else
+ r = GetLastError();
+
+ CoUninitialize ();
+
+ return r;
+}
diff --git a/src/Format/FormatCom.h b/src/Format/FormatCom.h
index 65fadbe9..e474608d 100644
--- a/src/Format/FormatCom.h
+++ b/src/Format/FormatCom.h
@@ -3,9 +3,9 @@
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
@@ -28,8 +28,10 @@ int UacFormatNtfs (HWND hWnd, int driveNo, int clusterSize);
int UacFormatFs (HWND hWnd, int driveNo, int clusterSize, int fsType);
int UacAnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters);
int UacFormatVolume (char *cvolumePath , BOOL bDevice , unsigned __int64 size , unsigned __int64 hiddenVolHostSize , Password *password , int cipher , int pkcs5 , BOOL quickFormat, BOOL sparseFileSwitch, int fileSystem , int clusterSize, HWND hwndDlg , BOOL hiddenVol , int *realClusterSize);
BOOL UacUpdateProgressBar (__int64 nSecNo, BOOL *bVolTransformThreadCancel);
+BOOL UacWriteLocalMachineRegistryDword (HWND hwndDlg, wchar_t *keyPath, wchar_t *valueName, DWORD value);
+DWORD UacFastFileCreation (HWND hWnd, wchar_t* filePath, __int64 fileSize);
#ifdef __cplusplus
}
#endif
diff --git a/src/Format/FormatCom.idl b/src/Format/FormatCom.idl
index 1eb09b43..7276de81 100644
--- a/src/Format/FormatCom.idl
+++ b/src/Format/FormatCom.idl
@@ -3,9 +3,9 @@
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
@@ -15,9 +15,9 @@ import "..\Common\Password.h";
[
uuid(56327DDA-F1A7-4e13-B128-520D129BDEF6),
helpstring("VeraCrypt Format UAC Support Library"),
- version(2.6) // Update ComSetup.cpp when changing version number
+ version(2.10) // Update ComSetup.cpp when changing version number
]
library TrueCryptFormatCom
{
[
@@ -27,9 +27,9 @@ library TrueCryptFormatCom
helpstring("VeraCrypt Format UAC Support Interface")
]
interface ITrueCryptFormatCom : IUnknown
{
- int AnalyzeHiddenVolumeHost (LONG_PTR hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters);
+ int AnalyzeHiddenVolumeHost (__int64 hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *nbrFreeClusters);
DWORD CallDriver (DWORD ioctl, BSTR input, BSTR *output);
DWORD CopyFile (BSTR sourceFile, BSTR destinationFile);
DWORD DeleteFile (BSTR file);
BOOL FormatNtfs (int driveNo, int clusterSize);
@@ -45,10 +45,13 @@ library TrueCryptFormatCom
DWORD InstallEfiBootLoader (BOOL preserveUserConfig, BOOL hiddenOSCreation, int pim, int hashAlg);
DWORD BackupEfiSystemLoader ();
DWORD RestoreEfiSystemLoader ();
DWORD GetEfiBootDeviceNumber (BSTR* pSdn);
- DWORD ReadEfiConfig (BSTR* pContent, DWORD *pcbRead);
DWORD WriteEfiBootSectorUserConfig (DWORD userConfig, BSTR customUserMessage, int pim, int hashAlg);
+ DWORD UpdateSetupConfigFile (BOOL bForInstall);
+ DWORD GetSecureBootConfig (BOOL* pSecureBootEnabled, BOOL *pVeraCryptKeysLoaded);
+ DWORD NotifyService (DWORD dwNotifyCode);
+ DWORD FastFileResize (BSTR filePath, __int64 fileSize);
};
[
uuid(A96D3797-9F31-49f4-A0CE-9657392CF789),
diff --git a/src/Format/InPlace.c b/src/Format/InPlace.c
index f37cb8be..873ae067 100644
--- a/src/Format/InPlace.c
+++ b/src/Format/InPlace.c
@@ -3,9 +3,9 @@
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
@@ -88,8 +88,10 @@ static __int64 NewFileSysSizeAfterShrink (HANDLE dev, const wchar_t *devicePath,
return -1;
}
if ( (ntfsVolData.NumberSectors.QuadPart <= 0)
+ || (ntfsVolData.BytesPerSector == 0)
+ || (ntfsVolData.BytesPerSector >= (DWORD) UINT_MAX)
|| (ntfsVolData.NumberSectors.QuadPart > (INT64_MAX / (__int64) ntfsVolData.BytesPerSector)) // overflow test
)
{
SetLastError (ERROR_INTERNAL_ERROR);
@@ -372,9 +374,9 @@ int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, vol
PCRYPTO_INFO cryptoInfo = NULL;
PCRYPTO_INFO cryptoInfo2 = NULL;
HANDLE dev = INVALID_HANDLE_VALUE;
DWORD dwError;
- char *header;
+ unsigned char *header;
WCHAR dosDev[TC_MAX_PATH] = {0};
WCHAR devName[MAX_PATH] = {0};
int driveLetter = -1;
WCHAR deviceName[MAX_PATH];
@@ -390,9 +392,9 @@ int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, vol
if (!CheckRequirementsForNonSysInPlaceEnc (hwndDlg, volParams->volumePath, FALSE))
return ERR_DONT_REPORT;
- header = (char *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE);
+ header = (unsigned char *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE);
if (!header)
return ERR_OUTOFMEMORY;
VirtualLock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
@@ -590,16 +592,16 @@ int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, vol
goto closing_seq;
offset.QuadPart = TC_VOLUME_DATA_OFFSET + dataAreaSize;
- if (!SetFilePointerEx (dev, offset, NULL, FILE_BEGIN))
+ if (!MoveFilePointer (dev, offset))
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
// Write the backup header to the partition
- if (!WriteEffectiveVolumeHeader (TRUE, dev, (byte *) header))
+ if (!WriteEffectiveVolumeHeader (TRUE, dev, header))
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
@@ -636,16 +638,16 @@ int EncryptPartitionInPlaceBegin (volatile FORMAT_VOL_PARAMETERS *volParams, vol
crypto_close (dummyInfo);
offset.QuadPart += TC_HIDDEN_VOLUME_HEADER_OFFSET;
- if (!SetFilePointerEx (dev, offset, NULL, FILE_BEGIN))
+ if (!MoveFilePointer (dev, offset))
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
// Write the fake hidden backup header to the partition
- if (!WriteEffectiveVolumeHeader (TRUE, dev, (byte *) header))
+ if (!WriteEffectiveVolumeHeader (TRUE, dev, (uint8 *) header))
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
@@ -750,12 +752,12 @@ int EncryptPartitionInPlaceResume (HANDLE dev,
volatile BOOL *bTryToCorrectReadErrors)
{
PCRYPTO_INFO masterCryptoInfo = NULL, headerCryptoInfo = NULL, tmpCryptoInfo = NULL;
UINT64_STRUCT unitNo;
- char *buf = NULL, *header = NULL;
- byte *wipeBuffer = NULL;
- byte wipeRandChars [TC_WIPE_RAND_CHAR_COUNT];
- byte wipeRandCharsUpdate [TC_WIPE_RAND_CHAR_COUNT];
+ unsigned char *buf = NULL, *header = NULL;
+ uint8 *wipeBuffer = NULL;
+ uint8 wipeRandChars [TC_WIPE_RAND_CHAR_COUNT];
+ uint8 wipeRandCharsUpdate [TC_WIPE_RAND_CHAR_COUNT];
WCHAR dosDev[TC_MAX_PATH] = {0};
WCHAR devName[MAX_PATH] = {0};
WCHAR deviceName[MAX_PATH];
int nStatus = ERR_SUCCESS;
@@ -773,20 +775,21 @@ int EncryptPartitionInPlaceResume (HANDLE dev,
int pkcs5_prf = volParams->pkcs5;
int pim = volParams->pim;
DISK_GEOMETRY driveGeometry;
HWND hwndDlg = volParams->hwndDlg;
+ BOOL bIsRamEncryptionEnabled = IsRamEncryptionEnabled();
bInPlaceEncNonSysResumed = TRUE;
- buf = (char *) TCalloc (TC_MAX_NONSYS_INPLACE_ENC_WORK_CHUNK_SIZE);
+ buf = (unsigned char *) TCalloc (TC_MAX_NONSYS_INPLACE_ENC_WORK_CHUNK_SIZE);
if (!buf)
{
nStatus = ERR_OUTOFMEMORY;
goto closing_seq;
}
- header = (char *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE);
+ header = (unsigned char *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE);
if (!header)
{
nStatus = ERR_OUTOFMEMORY;
goto closing_seq;
@@ -795,9 +798,9 @@ int EncryptPartitionInPlaceResume (HANDLE dev,
VirtualLock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
if (wipeAlgorithm != TC_WIPE_NONE)
{
- wipeBuffer = (byte *) TCalloc (TC_MAX_NONSYS_INPLACE_ENC_WORK_CHUNK_SIZE);
+ wipeBuffer = (uint8 *) TCalloc (TC_MAX_NONSYS_INPLACE_ENC_WORK_CHUNK_SIZE);
if (!wipeBuffer)
{
nStatus = ERR_OUTOFMEMORY;
goto closing_seq;
@@ -868,8 +871,13 @@ int EncryptPartitionInPlaceResume (HANDLE dev,
if (nStatus != ERR_SUCCESS)
goto closing_seq;
+ if (bIsRamEncryptionEnabled)
+ {
+ VcProtectKeys (masterCryptoInfo, VcGetEncryptionID (masterCryptoInfo));
+ VcProtectKeys (headerCryptoInfo, VcGetEncryptionID (headerCryptoInfo));
+ }
remainingBytes = masterCryptoInfo->VolumeSize.Value - masterCryptoInfo->EncryptedAreaLength.Value;
@@ -903,9 +911,9 @@ int EncryptPartitionInPlaceResume (HANDLE dev,
inplace_enc_read:
offset.QuadPart = masterCryptoInfo->EncryptedAreaStart.Value - workChunkSize - TC_VOLUME_DATA_OFFSET;
- if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0)
+ if (MoveFilePointer (dev, offset) == 0)
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
@@ -961,16 +969,16 @@ inplace_enc_read:
// Encrypt the plaintext in RAM
- EncryptDataUnits ((byte *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo);
+ EncryptDataUnits ((uint8 *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo);
// If enabled, wipe the area to which we will write the ciphertext
if (wipeAlgorithm != TC_WIPE_NONE)
{
- byte wipePass;
+ uint8 wipePass;
int wipePassCount = GetWipePassCount (wipeAlgorithm);
if (wipePassCount <= 0)
{
@@ -984,28 +992,28 @@ inplace_enc_read:
for (wipePass = 1; wipePass <= wipePassCount; ++wipePass)
{
if (!WipeBuffer (wipeAlgorithm, wipeRandChars, wipePass, wipeBuffer, workChunkSize))
{
- ULONG i;
- for (i = 0; i < workChunkSize; ++i)
+ ULONG index;
+ for (index = 0; index < workChunkSize; ++index)
{
- wipeBuffer[i] = buf[i] + wipePass;
+ wipeBuffer[index] = buf[index] + wipePass;
}
EncryptDataUnits (wipeBuffer, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo);
memcpy (wipeRandCharsUpdate, wipeBuffer, sizeof (wipeRandCharsUpdate));
}
- if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0
+ if (MoveFilePointer (dev, offset) == 0
|| WriteFile (dev, wipeBuffer, workChunkSize, &n, NULL) == 0)
{
// Write error
dwError = GetLastError();
// Undo failed write operation
- if (workChunkSize > TC_VOLUME_DATA_OFFSET && SetFilePointerEx (dev, offset, NULL, FILE_BEGIN))
+ if (workChunkSize > TC_VOLUME_DATA_OFFSET && MoveFilePointer (dev, offset))
{
- DecryptDataUnits ((byte *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo);
+ DecryptDataUnits ((uint8 *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo);
WriteFile (dev, buf + TC_VOLUME_DATA_OFFSET, workChunkSize - TC_VOLUME_DATA_OFFSET, &n, NULL);
}
SetLastError (dwError);
@@ -1021,9 +1029,9 @@ inplace_enc_read:
// Write the ciphertext
offset.QuadPart = masterCryptoInfo->EncryptedAreaStart.Value - workChunkSize;
- if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0)
+ if (MoveFilePointer (dev, offset) == 0)
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
@@ -1033,11 +1041,11 @@ inplace_enc_read:
// Write error
dwError = GetLastError();
// Undo failed write operation
- if (workChunkSize > TC_VOLUME_DATA_OFFSET && SetFilePointerEx (dev, offset, NULL, FILE_BEGIN))
+ if (workChunkSize > TC_VOLUME_DATA_OFFSET && MoveFilePointer (dev, offset))
{
- DecryptDataUnits ((byte *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo);
+ DecryptDataUnits ((uint8 *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo);
WriteFile (dev, buf + TC_VOLUME_DATA_OFFSET, workChunkSize - TC_VOLUME_DATA_OFFSET, &n, NULL);
}
SetLastError (dwError);
@@ -1089,8 +1097,19 @@ inplace_enc_read:
for (int wipePass = 0; wipePass < (wipeAlgorithm == TC_WIPE_NONE ? 1 : PRAND_HEADER_WIPE_PASSES); wipePass++)
{
PCRYPTO_INFO dummyInfo = NULL;
+ CRYPTO_INFO tmpCI;
+ PCRYPTO_INFO cryptoInfoBackup = NULL;
+ if (bIsRamEncryptionEnabled)
+ {
+ VirtualLock (&tmpCI, sizeof(tmpCI));
+ memcpy (&tmpCI, masterCryptoInfo, sizeof (CRYPTO_INFO));
+ VcUnprotectKeys (&tmpCI, VcGetEncryptionID (masterCryptoInfo));
+ cryptoInfoBackup = masterCryptoInfo;
+ masterCryptoInfo = &tmpCI;
+ }
+
nStatus = CreateVolumeHeaderInMemory (hwndDlg, FALSE,
header,
headerCryptoInfo->ea,
headerCryptoInfo->mode,
@@ -1107,24 +1126,47 @@ inplace_enc_read:
masterCryptoInfo->HeaderFlags | TC_HEADER_FLAG_NONSYS_INPLACE_ENC,
masterCryptoInfo->SectorSize,
wipeAlgorithm == TC_WIPE_NONE ? FALSE : (wipePass < PRAND_HEADER_WIPE_PASSES - 1));
+ if (bIsRamEncryptionEnabled)
+ {
+ masterCryptoInfo = cryptoInfoBackup;
+ burn (&tmpCI, sizeof (CRYPTO_INFO));
+ VirtualUnlock (&tmpCI, sizeof(tmpCI));
+ }
+
if (nStatus != ERR_SUCCESS)
goto closing_seq;
offset.QuadPart = TC_VOLUME_HEADER_OFFSET;
- if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0
- || !WriteEffectiveVolumeHeader (TRUE, dev, (byte *) header))
+ if (MoveFilePointer (dev, offset) == 0
+ || !WriteEffectiveVolumeHeader (TRUE, dev, (uint8 *) header))
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
+ if (bIsRamEncryptionEnabled)
+ {
+ VirtualLock (&tmpCI, sizeof(tmpCI));
+ memcpy (&tmpCI, headerCryptoInfo, sizeof (CRYPTO_INFO));
+ VcUnprotectKeys (&tmpCI, VcGetEncryptionID (headerCryptoInfo));
+ cryptoInfoBackup = headerCryptoInfo;
+ headerCryptoInfo = &tmpCI;
+ }
+
// Fill the reserved sectors of the header area with random data
nStatus = WriteRandomDataToReservedHeaderAreas (hwndDlg, dev, headerCryptoInfo, masterCryptoInfo->VolumeSize.Value, TRUE, FALSE);
+ if (bIsRamEncryptionEnabled)
+ {
+ headerCryptoInfo = cryptoInfoBackup;
+ burn (&tmpCI, sizeof (CRYPTO_INFO));
+ VirtualUnlock (&tmpCI, sizeof(tmpCI));
+ }
+
if (nStatus != ERR_SUCCESS)
goto closing_seq;
// write fake hidden volume header to protect against attacks that use statistical entropy
@@ -1153,10 +1195,10 @@ inplace_enc_read:
crypto_close (dummyInfo);
offset.QuadPart += TC_HIDDEN_VOLUME_HEADER_OFFSET;
- if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0
- || !WriteEffectiveVolumeHeader (TRUE, dev, (byte *) header))
+ if (MoveFilePointer (dev, offset) == 0
+ || !WriteEffectiveVolumeHeader (TRUE, dev, (uint8 *) header))
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
@@ -1262,9 +1304,9 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile
HANDLE dev = INVALID_HANDLE_VALUE;
PCRYPTO_INFO masterCryptoInfo = NULL, headerCryptoInfo = NULL;
UINT64_STRUCT unitNo;
char *buf = NULL;
- byte *tmpSectorBuf = NULL;
+ uint8 *tmpSectorBuf = NULL;
WCHAR dosDev[TC_MAX_PATH] = {0};
WCHAR devName[MAX_PATH] = {0};
WCHAR deviceName[MAX_PATH];
int nStatus = ERR_SUCCESS;
@@ -1282,8 +1324,9 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile
HWND hwndDlg = volParams->hwndDlg;
int pkcs5_prf = volParams->pkcs5;
int pim = volParams->pim;
DISK_GEOMETRY driveGeometry;
+ BOOL bIsRamEncryptionEnabled = IsRamEncryptionEnabled();
buf = (char *) TCalloc (TC_MAX_NONSYS_INPLACE_ENC_WORK_CHUNK_SIZE);
if (!buf)
@@ -1375,9 +1418,9 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile
sectorSize = driveGeometry.BytesPerSector;
- tmpSectorBuf = (byte *) TCalloc (sectorSize);
+ tmpSectorBuf = (uint8 *) TCalloc (sectorSize);
if (!tmpSectorBuf)
{
nStatus = ERR_OUTOFMEMORY;
goto closing_seq;
@@ -1388,8 +1431,13 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile
if (nStatus != ERR_SUCCESS)
goto closing_seq;
+ if (bIsRamEncryptionEnabled)
+ {
+ VcProtectKeys (masterCryptoInfo, VcGetEncryptionID (masterCryptoInfo));
+ VcProtectKeys (headerCryptoInfo, VcGetEncryptionID (headerCryptoInfo));
+ }
if (masterCryptoInfo->LegacyVolume)
{
Error ("NONSYS_INPLACE_DECRYPTION_BAD_VOL_FORMAT", hwndDlg);
@@ -1480,9 +1528,9 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile
// Read the ciphertext into RAM
offset.QuadPart = workChunkStartByteOffset;
- if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0)
+ if (MoveFilePointer (dev, offset) == 0)
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
@@ -1514,9 +1562,9 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile
tmpSectorOffset.QuadPart = offset.QuadPart;
for (tmpSectorCount = workChunkSize / sectorSize; tmpSectorCount > 0; --tmpSectorCount)
{
- if (SetFilePointerEx (dev, tmpSectorOffset, NULL, FILE_BEGIN) == 0)
+ if (MoveFilePointer (dev, tmpSectorOffset) == 0)
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
@@ -1556,9 +1604,9 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile
}
// Decrypt the ciphertext in RAM
- DecryptDataUnits ((byte *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo);
+ DecryptDataUnits ((uint8 *) buf, &unitNo, workChunkSize / ENCRYPTION_DATA_UNIT_SIZE, masterCryptoInfo);
// Conceal initial portion of the filesystem
@@ -1576,9 +1624,9 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile
// Write the plaintext
offset.QuadPart = workChunkStartByteOffset - TC_VOLUME_DATA_OFFSET;
- if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0)
+ if (MoveFilePointer (dev, offset) == 0)
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
@@ -1660,9 +1708,9 @@ int DecryptPartitionInPlace (volatile FORMAT_VOL_PARAMETERS *volParams, volatile
for (offset.QuadPart = masterCryptoInfo->VolumeSize.Value;
offset.QuadPart <= deviceSize - sectorSize;
offset.QuadPart += sectorSize)
{
- if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0)
+ if (MoveFilePointer (dev, offset) == 0)
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
@@ -1779,34 +1827,49 @@ int FastVolumeHeaderUpdate (HANDLE dev, CRYPTO_INFO *headerCryptoInfo, CRYPTO_IN
{
LARGE_INTEGER offset;
DWORD n;
int nStatus = ERR_SUCCESS;
- byte *header;
+ uint8 *header;
DWORD dwError;
uint32 headerCrc32;
- byte *fieldPos;
+ uint8 *fieldPos;
+ PCRYPTO_INFO pCryptoInfo = headerCryptoInfo;
+ BOOL bIsRamEncryptionEnabled = IsRamEncryptionEnabled();
- header = (byte *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE);
+ header = (uint8 *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE);
if (!header)
return ERR_OUTOFMEMORY;
VirtualLock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
- fieldPos = (byte *) header + TC_HEADER_OFFSET_ENCRYPTED_AREA_START;
+ fieldPos = (uint8 *) header + TC_HEADER_OFFSET_ENCRYPTED_AREA_START;
offset.QuadPart = deviceSize - TC_VOLUME_HEADER_GROUP_SIZE;
- if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0
+ if (MoveFilePointer (dev, offset) == 0
|| !ReadEffectiveVolumeHeader (TRUE, dev, header, &n) || n < TC_VOLUME_HEADER_EFFECTIVE_SIZE)
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
+ if (bIsRamEncryptionEnabled)
+ {
+ pCryptoInfo = crypto_open();
+ if (!pCryptoInfo)
+ {
+ nStatus = ERR_OUTOFMEMORY;
+ goto closing_seq;
+ }
+
+ memcpy (pCryptoInfo, headerCryptoInfo, sizeof (CRYPTO_INFO));
+ VcUnprotectKeys (pCryptoInfo, VcGetEncryptionID (headerCryptoInfo));
+ }
+
- DecryptBuffer (header + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, headerCryptoInfo);
+ DecryptBuffer (header + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, pCryptoInfo);
if (GetHeaderField32 (header, TC_HEADER_OFFSET_MAGIC) != 0x56455241)
{
nStatus = ERR_PARAMETER_INCORRECT;
@@ -1819,20 +1882,20 @@ int FastVolumeHeaderUpdate (HANDLE dev, CRYPTO_INFO *headerCryptoInfo, CRYPTO_IN
// We need to ensure the TC_HEADER_FLAG_NONSYS_INPLACE_ENC flag bit is set, because if volumes created by TC-format
// were decrypted in place, it would be possible to mount them partially encrypted and it wouldn't be possible
// to resume interrupted decryption after the wizard exits.
masterCryptoInfo->HeaderFlags |= TC_HEADER_FLAG_NONSYS_INPLACE_ENC;
- fieldPos = (byte *) header + TC_HEADER_OFFSET_FLAGS;
+ fieldPos = (uint8 *) header + TC_HEADER_OFFSET_FLAGS;
mputLong (fieldPos, (masterCryptoInfo->HeaderFlags));
headerCrc32 = GetCrc32 (header + TC_HEADER_OFFSET_MAGIC, TC_HEADER_OFFSET_HEADER_CRC - TC_HEADER_OFFSET_MAGIC);
- fieldPos = (byte *) header + TC_HEADER_OFFSET_HEADER_CRC;
+ fieldPos = (uint8 *) header + TC_HEADER_OFFSET_HEADER_CRC;
mputLong (fieldPos, headerCrc32);
- EncryptBuffer (header + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, headerCryptoInfo);
+ EncryptBuffer (header + HEADER_ENCRYPTED_DATA_OFFSET, HEADER_ENCRYPTED_DATA_SIZE, pCryptoInfo);
- if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0
+ if (MoveFilePointer (dev, offset) == 0
|| !WriteEffectiveVolumeHeader (TRUE, dev, header))
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
@@ -1842,8 +1905,13 @@ int FastVolumeHeaderUpdate (HANDLE dev, CRYPTO_INFO *headerCryptoInfo, CRYPTO_IN
closing_seq:
dwError = GetLastError();
+ if (bIsRamEncryptionEnabled && pCryptoInfo)
+ {
+ crypto_close(pCryptoInfo);
+ }
+
burn (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
VirtualUnlock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
TCfree (header);
@@ -2002,9 +2070,9 @@ static int ConcealNTFS (HANDLE dev)
DWORD dwError;
offset.QuadPart = 0;
- if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0)
+ if (MoveFilePointer (dev, offset) == 0)
return ERR_OS_ERROR;
if (ReadFile (dev, buf, TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE, &nbrBytesProcessed, NULL) == 0)
return ERR_OS_ERROR;
@@ -2013,9 +2081,9 @@ static int ConcealNTFS (HANDLE dev)
buf[i] ^= TC_NTFS_CONCEAL_CONSTANT;
offset.QuadPart = 0;
- if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0)
+ if (MoveFilePointer (dev, offset) == 0)
return ERR_OS_ERROR;
if (WriteFile (dev, buf, TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE, &nbrBytesProcessed, NULL) == 0)
{
@@ -2032,9 +2100,9 @@ static int ConcealNTFS (HANDLE dev)
do
{
Sleep (1);
}
- while (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0
+ while (MoveFilePointer (dev, offset) == 0
|| WriteFile (dev, buf, TC_INITIAL_NTFS_CONCEAL_PORTION_SIZE, &nbrBytesProcessed2, NULL) == 0);
SetLastError (dwError);
@@ -2108,8 +2176,40 @@ BOOL SaveNonSysInPlaceEncSettings (int delta, WipeAlgorithmId newWipeAlgorithm,
return SaveBufferToFile (str, GetConfigPath (TC_APPD_FILENAME_NONSYS_INPLACE_ENC), (DWORD) strlen(str), FALSE, FALSE);
}
+// This function moves the file pointer to the given offset. It first retrieves the current
+// file position using SetFilePointerEx() with FILE_CURRENT as the reference point, and then
+// calculates the difference between the current position and the desired position. Subsequently,
+// it moves the file pointer by the difference calculated using SetFilePointerEx() again.
+//
+// This approach of moving the file pointer relatively (instead of absolutely) was implemented
+// as a workaround to address the performance issues related to in-place encryption. When using
+// SetFilePointerEx() with FILE_BEGIN as the reference point, reaching the end of large drives
+// during in-place encryption can cause significant slowdowns. By moving the file pointer
+// relatively, these performance issues are mitigated.
+//
+// We fall back to absolute positioning if the relative positioning fails.
+BOOL MoveFilePointer (HANDLE dev, LARGE_INTEGER offset)
+{
+ LARGE_INTEGER currOffset;
+ LARGE_INTEGER diffOffset;
+
+ currOffset.QuadPart = 0;
+ if (SetFilePointerEx (dev, currOffset, &currOffset, FILE_CURRENT))
+ {
+ diffOffset.QuadPart = offset.QuadPart - currOffset.QuadPart;
+ if (diffOffset.QuadPart == 0)
+ return TRUE;
+
+ // Moves the file pointer by the difference between current and desired positions
+ if (SetFilePointerEx (dev, diffOffset, NULL, FILE_CURRENT))
+ return TRUE;
+ }
+
+ // An error occurred, fallback to absolute positioning
+ return SetFilePointerEx (dev, offset, NULL, FILE_BEGIN);
+}
// Repairs damaged sectors (i.e. those with read errors) by zeroing them.
// Note that this operating fails if there are any write errors.
int ZeroUnreadableSectors (HANDLE dev, LARGE_INTEGER startOffset, int64 size, int sectorSize, uint64 *zeroedSectorCount)
@@ -2117,19 +2217,19 @@ int ZeroUnreadableSectors (HANDLE dev, LARGE_INTEGER startOffset, int64 size, in
int nStatus;
DWORD n;
int64 sectorCount;
LARGE_INTEGER workOffset;
- byte *sectorBuffer = NULL;
+ uint8 *sectorBuffer = NULL;
DWORD dwError;
workOffset.QuadPart = startOffset.QuadPart;
- sectorBuffer = (byte *) TCalloc (sectorSize);
+ sectorBuffer = (uint8 *) TCalloc (sectorSize);
if (!sectorBuffer)
return ERR_OUTOFMEMORY;
- if (SetFilePointerEx (dev, startOffset, NULL, FILE_BEGIN) == 0)
+ if (!MoveFilePointer(dev, workOffset))
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
@@ -2140,9 +2240,10 @@ int ZeroUnreadableSectors (HANDLE dev, LARGE_INTEGER startOffset, int64 size, in
if (ReadFile (dev, sectorBuffer, sectorSize, &n, NULL) == 0)
{
memset (sectorBuffer, 0, sectorSize);
- if (SetFilePointerEx (dev, workOffset, NULL, FILE_BEGIN) == 0)
+ // If ReadFile failed, move back to start of the unreadable sector
+ if (MoveFilePointer (dev, workOffset) == 0)
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
@@ -2178,12 +2279,12 @@ static int OpenBackupHeader (HANDLE dev, const wchar_t *devicePath, Password *pa
{
LARGE_INTEGER offset;
DWORD n;
int nStatus = ERR_SUCCESS;
- char *header;
+ unsigned char *header;
DWORD dwError;
- header = (char *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE);
+ header = (unsigned char *) TCalloc (TC_VOLUME_HEADER_EFFECTIVE_SIZE);
if (!header)
return ERR_OUTOFMEMORY;
VirtualLock (header, TC_VOLUME_HEADER_EFFECTIVE_SIZE);
@@ -2191,17 +2292,17 @@ static int OpenBackupHeader (HANDLE dev, const wchar_t *devicePath, Password *pa
offset.QuadPart = deviceSize - TC_VOLUME_HEADER_GROUP_SIZE;
- if (SetFilePointerEx (dev, offset, NULL, FILE_BEGIN) == 0
- || !ReadEffectiveVolumeHeader (TRUE, dev, (byte *) header, &n) || n < TC_VOLUME_HEADER_EFFECTIVE_SIZE)
+ if (MoveFilePointer (dev, offset) == 0
+ || !ReadEffectiveVolumeHeader (TRUE, dev, header, &n) || n < TC_VOLUME_HEADER_EFFECTIVE_SIZE)
{
nStatus = ERR_OS_ERROR;
goto closing_seq;
}
- nStatus = ReadVolumeHeader (FALSE, header, password, pkcs5, pim, FALSE, retMasterCryptoInfo, headerCryptoInfo);
+ nStatus = ReadVolumeHeader (FALSE, header, password, pkcs5, pim, retMasterCryptoInfo, headerCryptoInfo);
if (nStatus != ERR_SUCCESS)
goto closing_seq;
@@ -2224,9 +2325,9 @@ closing_seq:
static BOOL GetFreeClusterBeforeThreshold (HANDLE volumeHandle, int64 *freeCluster, int64 clusterThreshold)
{
const int bitmapSize = 65536;
- byte bitmapBuffer[bitmapSize + sizeof (VOLUME_BITMAP_BUFFER)];
+ uint8 bitmapBuffer[bitmapSize + sizeof (VOLUME_BITMAP_BUFFER)];
VOLUME_BITMAP_BUFFER *bitmap = (VOLUME_BITMAP_BUFFER *) bitmapBuffer;
STARTING_LCN_INPUT_BUFFER startLcn;
startLcn.StartingLcn.QuadPart = 0;
diff --git a/src/Format/InPlace.h b/src/Format/InPlace.h
index ed24cb89..717a8ed3 100644
--- a/src/Format/InPlace.h
+++ b/src/Format/InPlace.h
@@ -3,9 +3,9 @@
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
by the TrueCrypt License 3.0.
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Format/Resource.h b/src/Format/Resource.h
index 1bdc2f5c..d8fb8dc4 100644
--- a/src/Format/Resource.h
+++ b/src/Format/Resource.h
@@ -144,16 +144,18 @@
#define IDC_LINK_PIM_INFO 1105
#define IDC_SHOW_PIM 1106
#define IDC_TB 1107
#define IDC_SKIP_RESCUE_VERIFICATION 1108
+#define SPARSE_FILE 1109
+#define IDC_FORMAT_TYPE 1110
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
#define _APS_NEXT_RESOURCE_VALUE 134
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1109
+#define _APS_NEXT_CONTROL_VALUE 1111
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c
index 02210b15..dd7ff18b 100644
--- a/src/Format/Tcformat.c
+++ b/src/Format/Tcformat.c
@@ -5,9 +5,9 @@
governed by the TrueCrypt License 3.0, also from the source code of
Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
and which is governed by the 'License Agreement for Encryption for the Masses'
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */
@@ -177,8 +177,9 @@ volatile BOOL bSysEncDriveAnalysisTimeOutOccurred = FALSE;
int SysEncDetectHiddenSectors = -1; /* Whether the user wants us to detect and encrypt the Host Protect Area (if any): -1 = Undecided or error, 0 = No, 1 = Yes */
int SysEncDriveAnalysisStart;
BOOL bDontVerifyRescueDisk = FALSE;
BOOL bFirstSysEncResumeDone = FALSE;
+BOOL bDontCheckFileContainerSize = FALSE; /* If true, we don't check if the given size of file container is smaller than the available size on the hosting disk */
int nMultiBoot = 0; /* The number of operating systems installed on the computer, according to the user. 0: undetermined, 1: one, 2: two or more */
volatile BOOL bHiddenVol = FALSE; /* If true, we are (or will be) creating a hidden volume. */
volatile BOOL bHiddenVolHost = FALSE; /* If true, we are (or will be) creating the host volume (called "outer") for a hidden volume. */
volatile BOOL bHiddenVolDirect = FALSE; /* If true, the wizard omits creating a host volume in the course of the process of hidden volume creation. */
@@ -218,9 +219,9 @@ volatile HWND hPasswordInputField = NULL; /* Password input field */
volatile HWND hVerifyPasswordInputField = NULL; /* Verify-password input field */
HBITMAP hbmWizardBitmapRescaled = NULL;
-wchar_t OrigKeyboardLayout [8+1] = L"00000409";
+wchar_t OrigKeyboardLayout [KL_NAMELENGTH] = L"00000409";
BOOL bKeyboardLayoutChanged = FALSE; /* TRUE if the keyboard layout was changed to the standard US keyboard layout (from any other layout). */
BOOL bKeybLayoutAltKeyWarningShown = FALSE; /* TRUE if the user has been informed that it is not possible to type characters by pressing keys while the right Alt key is held down. */
#ifndef _DEBUG
@@ -231,12 +232,14 @@ BOOL bKeybLayoutAltKeyWarningShown = FALSE; /* TRUE if the user has been informe
BOOL bWarnOuterVolSuitableFileSys = TRUE;
Password volumePassword; /* User password */
+Password outerVolumePassword; /* Outer volume user password */
char szVerify[MAX_PASSWORD + 1]; /* Tmp password buffer */
char szRawPassword[MAX_PASSWORD + 1]; /* Password before keyfile was applied to it */
int volumePim = 0;
+int outerVolumePim = 0;
BOOL bHistoryCmdLine = FALSE; /* History control is always disabled */
BOOL ComServerMode = FALSE;
@@ -247,8 +250,10 @@ int CmdVolumePkcs5 = 0;
int CmdVolumePim = 0;
int CmdVolumeFilesystem = FILESYS_NONE;
unsigned __int64 CmdVolumeFileSize = 0;
BOOL CmdSparseFileSwitch = FALSE;
+BOOL CmdQuickFormat = FALSE;
+BOOL CmdFastCreateFile = FALSE;
BOOL bForceOperation = FALSE;
BOOL bOperationSuccess = FALSE;
@@ -256,8 +261,10 @@ BOOL bOperationSuccess = FALSE;
BOOL bGuiMode = TRUE;
BOOL bSystemIsGPT = FALSE;
+KeyFile *FirstCmdKeyFile = NULL;
+
int nPbar = 0; /* Control ID of progress bar:- for format code */
wchar_t HeaderKeyGUIView [KEY_GUI_VIEW_SIZE];
wchar_t MasterKeyGUIView [KEY_GUI_VIEW_SIZE];
@@ -278,18 +285,26 @@ static HWND hEntropyBar = NULL;
wchar_t outRandPoolDispBuffer [RANDPOOL_DISPLAY_SIZE];
BOOL bDisplayPoolContents = TRUE;
volatile BOOL bSparseFileSwitch = FALSE;
-volatile BOOL quickFormat = FALSE; /* WARNING: Meaning of this variable depends on bSparseFileSwitch. If bSparseFileSwitch is TRUE, this variable represents the sparse file flag. */
+volatile BOOL quickFormat = FALSE;
+volatile BOOL fastCreateFile = FALSE;
+volatile BOOL dynamicFormat = FALSE; /* this variable represents the sparse file flag. */
volatile int fileSystem = FILESYS_NONE;
+volatile int formatType = FORMAT_TYPE_FULL;
volatile int clusterSize = 0;
SYSENC_MULTIBOOT_CFG SysEncMultiBootCfg;
wchar_t SysEncMultiBootCfgOutcome [4096] = {L'N',L'/',L'A',0};
volatile int NonSysInplaceEncStatus = NONSYS_INPLACE_ENC_STATUS_NONE;
+LONGLONG nAvailableFreeSpace = -1;
+BOOL bIsSparseFilesSupportedByHost = FALSE;
+
vector <HostDevice> DeferredNonSysInPlaceEncDevices;
+int iMaxPasswordLength = MAX_PASSWORD;
+
// specific definitions and implementation for support of resume operation
// in wait dialog mechanism
void CALLBACK ResumeInPlaceEncWaitThreadProc(void* pArg, HWND hwndDlg)
@@ -309,9 +324,9 @@ void CALLBACK ResumeInPlaceEncWaitThreadProc(void* pArg, HWND hwndDlg)
{
if (device.Path == szDevicePath)
{
OpenVolumeContext volume;
- int status = OpenVolume (&volume, device.Path.c_str(), &volumePassword, hash_algo, volumePim, FALSE, FALSE, FALSE, TRUE);
+ int status = OpenVolume (&volume, device.Path.c_str(), &volumePassword, hash_algo, volumePim, FALSE, FALSE, TRUE);
if ( status == ERR_SUCCESS)
{
if ((volume.CryptoInfo->HeaderFlags & TC_HEADER_FLAG_NONSYS_INPLACE_ENC) != 0
@@ -355,9 +370,9 @@ void CALLBACK ResumeInPlaceEncWaitThreadProc(void* pArg, HWND hwndDlg)
{
OpenVolumeContext volume;
- if (OpenVolume (&volume, device.Path.c_str(), &volumePassword, hash_algo, volumePim, FALSE, FALSE, FALSE, TRUE) == ERR_SUCCESS)
+ if (OpenVolume (&volume, device.Path.c_str(), &volumePassword, hash_algo, volumePim, FALSE, FALSE, TRUE) == ERR_SUCCESS)
{
if ((volume.CryptoInfo->HeaderFlags & TC_HEADER_FLAG_NONSYS_INPLACE_ENC) != 0
&& volume.CryptoInfo->EncryptedAreaLength.Value != volume.CryptoInfo->VolumeSize.Value)
{
@@ -385,9 +400,9 @@ static BOOL ElevateWholeWizardProcess (wstring arguments)
GetModuleFileName (NULL, modPath, ARRAYSIZE (modPath));
while (true)
{
- if ((int)ShellExecute (MainDlg, L"runas", modPath, (wstring(L"/q UAC ") + arguments).c_str(), NULL, SW_SHOWNORMAL) > 32)
+ if ((intptr_t)ShellExecute (MainDlg, L"runas", modPath, (wstring(L"/q UAC ") + arguments).c_str(), NULL, SW_SHOWNORMAL) > 32)
{
exit (0);
}
else
@@ -398,27 +413,37 @@ static BOOL ElevateWholeWizardProcess (wstring arguments)
}
}
}
-static void WipePasswordsAndKeyfiles (void)
+static void WipePasswordsAndKeyfiles (bool bFull)
{
wchar_t tmp[MAX_PASSWORD+1];
// Attempt to wipe passwords stored in the input field buffers
wmemset (tmp, L'X', MAX_PASSWORD);
tmp [MAX_PASSWORD] = 0;
- SetWindowText (hPasswordInputField, tmp);
- SetWindowText (hVerifyPasswordInputField, tmp);
+ if (hPasswordInputField)
+ SetWindowText (hPasswordInputField, tmp);
+ if (hVerifyPasswordInputField)
+ SetWindowText (hVerifyPasswordInputField, tmp);
burn (&szVerify[0], sizeof (szVerify));
burn (&volumePassword, sizeof (volumePassword));
burn (&szRawPassword[0], sizeof (szRawPassword));
burn (&volumePim, sizeof (volumePim));
burn (&CmdVolumePassword, sizeof (CmdVolumePassword));
burn (&CmdVolumePim, sizeof (CmdVolumePim));
- SetWindowText (hPasswordInputField, L"");
- SetWindowText (hVerifyPasswordInputField, L"");
+ if (bFull)
+ {
+ burn (&outerVolumePassword, sizeof (outerVolumePassword));
+ burn (&outerVolumePim, sizeof (outerVolumePim));
+ }
+
+ if (hPasswordInputField)
+ SetWindowText (hPasswordInputField, L"");
+ if (hVerifyPasswordInputField)
+ SetWindowText (hVerifyPasswordInputField, L"");
KeyFileRemoveAll (&FirstKeyFile);
KeyFileRemoveAll (&defaultKeyFilesParam.FirstKeyFile);
}
@@ -462,9 +487,9 @@ static void localcleanup (void)
if (bDeviceWipeInProgress)
WipeAbort();
- WipePasswordsAndKeyfiles ();
+ WipePasswordsAndKeyfiles (true);
RandStop (TRUE);
burn (HeaderKeyGUIView, sizeof(HeaderKeyGUIView));
@@ -477,8 +502,10 @@ static void localcleanup (void)
burn (maskRandPool, sizeof(maskRandPool));
burn (szFileName, sizeof(szFileName));
burn (szDiskFile, sizeof(szDiskFile));
+ KeyFileRemoveAll (&FirstCmdKeyFile);
+
// Attempt to wipe the GUI fields showing portions of randpool, of the master and header keys
wmemset (tmp, L'X', ARRAYSIZE(tmp));
tmp [ARRAYSIZE(tmp)-1] = 0;
SetWindowText (hRandPool, tmp);
@@ -694,9 +721,9 @@ static BOOL ChangeWizardMode (int newWizardMode)
// If the previous mode was different, the password may have been typed using a different
// keyboard layout (which might confuse the user and cause other problems if system encryption
// was or will be involved).
- WipePasswordsAndKeyfiles();
+ WipePasswordsAndKeyfiles(true);
}
if (newWizardMode != WIZARD_MODE_NONSYS_DEVICE)
{
@@ -772,8 +799,12 @@ static void LoadSettingsAndCheckModified (HWND hwndDlg, BOOL bOnlyCheckModified,
ConfigReadCompareInt ("HideWaitingDialog", FALSE, &bHideWaitingDialog, bOnlyCheckModified, pbSettingsModified);
ConfigReadCompareInt ("SaveVolumeHistory", FALSE, &bHistory, bOnlyCheckModified, pbSettingsModified);
+ ConfigReadCompareInt ("UseLegacyMaxPasswordLength", FALSE, &bUseLegacyMaxPasswordLength, bOnlyCheckModified, pbSettingsModified);
+
+ ConfigReadCompareInt ("EMVSupportEnabled", 0, &EMVSupportEnabled, bOnlyCheckModified, pbSettingsModified);
+
{
char szTmp[MAX_PATH] = {0};
WideCharToMultiByte (CP_UTF8, 0, SecurityTokenLibraryPath, -1, szTmp, MAX_PATH, NULL, NULL);
ConfigReadCompareString ("SecurityTokenLibrary", "", szTmp, sizeof (szTmp) - 1, bOnlyCheckModified, pbSettingsModified);
@@ -817,9 +848,9 @@ static void LoadSettings (HWND hwndDlg)
{
LoadSettingsAndCheckModified (hwndDlg, FALSE, NULL, NULL);
}
-static void SaveSettings (HWND hwndDlg)
+void SaveSettings (HWND hwndDlg)
{
WaitCursor ();
// Check first if modifications ocurred before writing to the settings and history files
@@ -1074,26 +1105,8 @@ BOOL SwitchWizardToSysEncMode (void)
{
if (AskWarnYesNoString ((wstring (GetString ("SYSDRIVE_NON_STANDARD_PARTITIONS")) + L"\n\n" + GetString ("ASK_ENCRYPT_PARTITION_INSTEAD_OF_DRIVE")).c_str(), MainDlg) == IDYES)
bWholeSysDrive = FALSE;
}
-
- if (!IsOSAtLeast (WIN_VISTA) && bWholeSysDrive)
- {
- if (BootEncObj->SystemDriveContainsExtendedPartition())
- {
- bWholeSysDrive = FALSE;
-
- Error ("WDE_UNSUPPORTED_FOR_EXTENDED_PARTITIONS", MainDlg);
-
- if (AskYesNo ("ASK_ENCRYPT_PARTITION_INSTEAD_OF_DRIVE", MainDlg) == IDNO)
- {
- ChangeWizardMode (WIZARD_MODE_NONSYS_DEVICE);
- return FALSE;
- }
- }
- else
- Warning ("WDE_EXTENDED_PARTITIONS_WARNING", MainDlg);
- }
}
else if (BootEncObj->SystemPartitionCoversWholeDrive()
&& !bWholeSysDrive)
bWholeSysDrive = (AskYesNo ("WHOLE_SYC_DEVICE_RECOM", MainDlg) == IDYES);
@@ -1396,9 +1409,9 @@ void ComboSelChangeEA (HWND hwndDlg)
int cipherIDs[5];
int i, cnt = 0;
nIndex = (int) SendMessage (GetDlgItem (hwndDlg, IDC_COMBO_BOX), CB_GETITEMDATA, nIndex, 0);
- EAGetName (name, nIndex, 0);
+ EAGetName (name, ARRAYSIZE(name),nIndex, 0);
if (wcscmp (name, L"AES") == 0)
{
StringCbPrintfW (hyperLink, sizeof(hyperLink) / 2, GetString ("MORE_INFO_ABOUT"), name);
@@ -1416,14 +1429,8 @@ void ComboSelChangeEA (HWND hwndDlg)
StringCbPrintfW (hyperLink, sizeof(hyperLink) / 2, GetString ("MORE_INFO_ABOUT"), name);
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("TWOFISH_HELP"));
}
- else if (wcsncmp (name, L"GOST89", 6) == 0)
- {
- StringCbPrintfW (hyperLink, sizeof(hyperLink) / 2, GetString ("MORE_INFO_ABOUT"), L"GOST89");
-
- SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("GOST89_HELP"));
- }
else if (wcscmp (name, L"Kuznyechik") == 0)
{
StringCbPrintfW (hyperLink, sizeof(hyperLink) / 2, GetString ("MORE_INFO_ABOUT"), name);
@@ -1543,8 +1550,14 @@ static void VerifySizeAndUpdate (HWND hwndDlg, BOOL bUpdate)
else
{
if (lTmp * i > (bHiddenVolHost ? TC_MAX_HIDDEN_VOLUME_HOST_SIZE : TC_MAX_VOLUME_SIZE))
bEnable = FALSE;
+ else if (!bDevice && (lTmp * i > nAvailableFreeSpace) && !bDontCheckFileContainerSize && (!bIsSparseFilesSupportedByHost || bHiddenVolHost))
+ {
+ // we check container size against available free space only when creating dynamic volume is not possible
+ // which is the case if filesystem doesn't allow sparce file or if we are creating outer volume of a hidden volume
+ bEnable = FALSE;
+ }
}
}
if (bUpdate)
@@ -1604,12 +1617,8 @@ static void RefreshMultiBootControls (HWND hwndDlg)
if (nMultiBoot == 0)
nMultiBoot = 1;
#endif
- // For now, we force single configuration in wizard
- if (bSystemIsGPT && nMultiBoot == 0)
- nMultiBoot = 1;
-
SendMessage (GetDlgItem (hwndDlg, IDC_SINGLE_BOOT),
BM_SETCHECK,
nMultiBoot == 1 ? BST_CHECKED : BST_UNCHECKED,
0);
@@ -2555,9 +2564,9 @@ static void __cdecl volTransformThreadFunction (void *hwndDlgArg)
// Check administrator privileges
if (!IsAdmin () && !IsUacSupported ())
{
- if (fileSystem == FILESYS_NTFS || fileSystem == FILESYS_EXFAT)
+ if (fileSystem == FILESYS_NTFS || fileSystem == FILESYS_EXFAT || fileSystem == FILESYS_REFS)
{
if (Silent || (MessageBoxW (hwndDlg, GetString ("ADMIN_PRIVILEGES_WARN_NTFS"), lpszTitle, MB_OKCANCEL|MB_ICONWARNING|MB_DEFBUTTON2) == IDCANCEL))
goto cancel;
}
@@ -2626,10 +2635,11 @@ static void __cdecl volTransformThreadFunction (void *hwndDlgArg)
volParams->pkcs5 = hash_algo;
volParams->headerFlags = (CreatingHiddenSysVol() ? TC_HEADER_FLAG_ENCRYPTED_SYSTEM : 0);
volParams->fileSystem = fileSystem;
volParams->clusterSize = clusterSize;
- volParams->sparseFileSwitch = bSparseFileSwitch;
+ volParams->sparseFileSwitch = dynamicFormat;
volParams->quickFormat = quickFormat;
+ volParams->fastCreateFile = fastCreateFile;
volParams->sectorSize = GetFormatSectorSize();
volParams->realClusterSize = &realClusterSize;
volParams->password = &volumePassword;
volParams->pim = volumePim;
@@ -2815,9 +2825,9 @@ static void __cdecl volTransformThreadFunction (void *hwndDlgArg)
else
{
Info("FORMAT_FINISHED_INFO", hwndDlg);
- if (bSparseFileSwitch && quickFormat)
+ if (dynamicFormat)
Warning("SPARSE_FILE_SIZE_NOTE", hwndDlg);
}
}
else
@@ -3176,50 +3186,50 @@ static void LoadPage (HWND hwndDlg, int nPageNo)
__int64 PrintFreeSpace (HWND hwndTextBox, wchar_t *lpszDrive, PLARGE_INTEGER lDiskFree)
{
char *nResourceString;
- __int64 nMultiplier;
+ __int64 nPrintMultiplier;
wchar_t szTmp2[256];
if (lDiskFree->QuadPart < BYTES_PER_KB)
- nMultiplier = 1;
+ nPrintMultiplier = 1;
else if (lDiskFree->QuadPart < BYTES_PER_MB)
- nMultiplier = BYTES_PER_KB;
+ nPrintMultiplier = BYTES_PER_KB;
else if (lDiskFree->QuadPart < BYTES_PER_GB)
- nMultiplier = BYTES_PER_MB;
+ nPrintMultiplier = BYTES_PER_MB;
else if (lDiskFree->QuadPart < BYTES_PER_TB)
- nMultiplier = BYTES_PER_GB;
+ nPrintMultiplier = BYTES_PER_GB;
else
- nMultiplier = BYTES_PER_TB;
+ nPrintMultiplier = BYTES_PER_TB;
- if (nMultiplier == 1)
+ if (nPrintMultiplier == 1)
{
if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume
nResourceString = "MAX_HIDVOL_SIZE_BYTES";
else if (bDevice)
nResourceString = "DEVICE_FREE_BYTES";
else
nResourceString = "DISK_FREE_BYTES";
}
- else if (nMultiplier == BYTES_PER_KB)
+ else if (nPrintMultiplier == BYTES_PER_KB)
{
if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume
nResourceString = "MAX_HIDVOL_SIZE_KB";
else if (bDevice)
nResourceString = "DEVICE_FREE_KB";
else
nResourceString = "DISK_FREE_KB";
}
- else if (nMultiplier == BYTES_PER_MB)
+ else if (nPrintMultiplier == BYTES_PER_MB)
{
if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume
nResourceString = "MAX_HIDVOL_SIZE_MB";
else if (bDevice)
nResourceString = "DEVICE_FREE_MB";
else
nResourceString = "DISK_FREE_MB";
}
- else if (nMultiplier == BYTES_PER_GB)
+ else if (nPrintMultiplier == BYTES_PER_GB)
{
if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume
nResourceString = "MAX_HIDVOL_SIZE_GB";
else if (bDevice)
@@ -3238,22 +3248,22 @@ __int64 PrintFreeSpace (HWND hwndTextBox, wchar_t *lpszDrive, PLARGE_INTEGER lDi
}
if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume
{
- StringCbPrintfW (szTmp2, sizeof szTmp2, GetString (nResourceString), ((double) lDiskFree->QuadPart) / nMultiplier);
+ StringCbPrintfW (szTmp2, sizeof szTmp2, GetString (nResourceString), ((double) lDiskFree->QuadPart) / nPrintMultiplier);
SetWindowTextW (GetDlgItem (hwndTextBox, IDC_SIZEBOX), szTmp2);
}
else if (lpszDrive)
- StringCbPrintfW (szTmp2, sizeof szTmp2, GetString (nResourceString), lpszDrive, ((double) lDiskFree->QuadPart) / nMultiplier);
+ StringCbPrintfW (szTmp2, sizeof szTmp2, GetString (nResourceString), lpszDrive, ((double) lDiskFree->QuadPart) / nPrintMultiplier);
else
szTmp2 [0] = 0;
SetWindowTextW (hwndTextBox, szTmp2);
if (lDiskFree->QuadPart % (__int64) BYTES_PER_MB != 0)
- nMultiplier = BYTES_PER_KB;
+ nPrintMultiplier = BYTES_PER_KB;
- return nMultiplier;
+ return nPrintMultiplier;
}
void DisplaySizingErrorText (HWND hwndTextBox)
{
@@ -3306,8 +3316,13 @@ BOOL IsSparseFile (HWND hwndDlg)
}
if (bPreserveTimestamp)
{
+ ftLastAccessTime.dwHighDateTime = 0xFFFFFFFF;
+ ftLastAccessTime.dwLowDateTime = 0xFFFFFFFF;
+
+ SetFileTime (hFile, NULL, &ftLastAccessTime, NULL);
+
if (GetFileTime (hFile, NULL, &ftLastAccessTime, NULL) == 0)
bTimeStampValid = FALSE;
else
bTimeStampValid = TRUE;
@@ -3345,8 +3360,13 @@ BOOL GetFileVolSize (HWND hwndDlg, unsigned __int64 *size)
}
if (bPreserveTimestamp)
{
+ ftLastAccessTime.dwHighDateTime = 0xFFFFFFFF;
+ ftLastAccessTime.dwLowDateTime = 0xFFFFFFFF;
+
+ SetFileTime (hFile, NULL, &ftLastAccessTime, NULL);
+
if (GetFileTime (hFile, NULL, &ftLastAccessTime, NULL) == 0)
bTimeStampValid = FALSE;
else
bTimeStampValid = TRUE;
@@ -3371,32 +3391,50 @@ BOOL GetFileVolSize (HWND hwndDlg, unsigned __int64 *size)
return TRUE;
}
-BOOL QueryFreeSpace (HWND hwndDlg, HWND hwndTextBox, BOOL display)
+BOOL QueryFreeSpace (HWND hwndDlg, HWND hwndTextBox, BOOL display, LONGLONG *pFreeSpaceValue, BOOL* pbIsSparceFilesSupported)
{
+ if (pFreeSpaceValue)
+ *pFreeSpaceValue = 0;
+
+ if (pbIsSparceFilesSupported)
+ *pbIsSparceFilesSupported = FALSE;
+
if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume
{
LARGE_INTEGER lDiskFree;
lDiskFree.QuadPart = nMaximumHiddenVolSize;
+ if (pFreeSpaceValue)
+ *pFreeSpaceValue = nMaximumHiddenVolSize;
+
if (display)
PrintFreeSpace (hwndTextBox, NULL, &lDiskFree);
return TRUE;
}
else if (bDevice == FALSE)
{
wchar_t root[TC_MAX_PATH];
+ DWORD fileSystemFlags = 0;
ULARGE_INTEGER free;
if (!GetVolumePathName (szFileName, root, ARRAYSIZE (root)))
{
handleWin32Error (hwndDlg, SRC_POS);
return FALSE;
}
+ if ( pbIsSparceFilesSupported
+ && GetVolumeInformation (root, NULL, 0, NULL, NULL, &fileSystemFlags, NULL, 0)
+ && (fileSystemFlags & FILE_SUPPORTS_SPARSE_FILES)
+ )
+ {
+ *pbIsSparceFilesSupported = TRUE;
+ }
+
if (!GetDiskFreeSpaceEx (root, &free, 0, 0))
{
if (display)
DisplaySizingErrorText (hwndTextBox);
@@ -3405,19 +3443,29 @@ BOOL QueryFreeSpace (HWND hwndDlg, HWND hwndTextBox, BOOL display)
}
else
{
LARGE_INTEGER lDiskFree;
+ // if the file pointed by szFileName already exists, we must add its size to the free space since it will be overwritten durig the volume creation
+ __int64 lFileSize = GetFileSize64(szFileName);
+ if (lFileSize != -1)
+ {
+ free.QuadPart += lFileSize;
+ }
+
lDiskFree.QuadPart = free.QuadPart;
+ if (pFreeSpaceValue)
+ *pFreeSpaceValue = free.QuadPart;
+
if (display)
PrintFreeSpace (hwndTextBox, root, &lDiskFree);
return TRUE;
}
}
else
{
- DISK_GEOMETRY driveInfo;
+ DISK_GEOMETRY_EX driveInfo;
PARTITION_INFORMATION diskInfo;
BOOL piValid = FALSE;
BOOL gValid = FALSE;
@@ -3464,13 +3512,15 @@ BOOL QueryFreeSpace (HWND hwndDlg, HWND hwndTextBox, BOOL display)
{
LARGE_INTEGER lDiskFree;
// Drive geometry info is used only when GetPartitionInfo() fails
- lDiskFree.QuadPart = driveInfo.Cylinders.QuadPart * driveInfo.BytesPerSector *
- driveInfo.SectorsPerTrack * driveInfo.TracksPerCylinder;
+ lDiskFree.QuadPart = driveInfo.DiskSize.QuadPart;
nVolumeSize = lDiskFree.QuadPart;
+ if (pFreeSpaceValue)
+ *pFreeSpaceValue = lDiskFree.QuadPart;
+
if (display)
nMultiplier = PrintFreeSpace (hwndTextBox, szDiskFile, &lDiskFree);
nUIVolumeSize = lDiskFree.QuadPart / nMultiplier;
@@ -3611,9 +3661,9 @@ void HandleOldAssignedDriveLetter (void)
if (!Silent && !bHiddenVolHost
&& !bHiddenOS
&& driveLetter >= 0)
{
- wchar_t rootPath[] = { (wchar_t) driveLetter + L'A', L':', L'\\', 0 };
+ wchar_t rootPath[] = { (wchar_t) (driveLetter + L'A'), L':', L'\\', 0 };
wchar_t szTmp[8192];
StringCbPrintfW (szTmp, sizeof(szTmp), GetString ("AFTER_FORMAT_DRIVE_LETTER_WARN"), rootPath[0], rootPath[0], rootPath[0], rootPath[0]);
MessageBoxW (MainDlg, szTmp, lpszTitle, MB_ICONWARNING);
@@ -3638,8 +3688,58 @@ void DisableIfGpt(HWND control)
EnableWindow(control, FALSE);
}
}
+static void UpdateClusterSizeList (HWND hwndDlg, int fsType)
+{
+ SendMessage (GetDlgItem (hwndDlg, IDC_CLUSTERSIZE), CB_RESETCONTENT, 0, 0);
+ AddComboPair (GetDlgItem (hwndDlg, IDC_CLUSTERSIZE), GetString ("DEFAULT"), 0);
+
+ for (int i = 1; i <= 65536; i *= 2)
+ {
+ wstringstream s;
+ DWORD size = GetFormatSectorSize() * i;
+
+ /* cluster size makes sense only when there is a filesystem */
+ if (fsType == FILESYS_NONE)
+ break;
+
+ /* FAT supports at maximum 64K when sector size is 512, and at maximum 256K when sector size is larger than 512 */
+ /* For now we set maximum cluster size to 64K in all cases for compatibility with exiting FAT code in VeraCrypt */
+ if ((fsType == FILESYS_FAT) && (size > 64*BYTES_PER_KB))
+ break;
+
+ /* ReFS supports only 4KiB and 64KiB clusters */
+ if ((fsType == FILESYS_REFS) && (size != 4*BYTES_PER_KB) && (size != 64*BYTES_PER_KB))
+ continue;
+
+ /* NTFS supports at maximum 2M cluster */
+ if ((fsType == FILESYS_NTFS) && (size > 2*BYTES_PER_MB))
+ break;
+
+ /* exFAT supports at maximum 32M cluster */
+ if ((fsType == FILESYS_EXFAT) && (size > 32*BYTES_PER_MB))
+ break;
+
+ if (size == 512)
+ s << L"0.5 " << GetString ("KB");
+ else if (size < BYTES_PER_MB)
+ {
+ s << size / BYTES_PER_KB;
+ s << L" " << GetString ("KB");
+ }
+ else
+ {
+ s << size / BYTES_PER_MB;
+ s << L" " << GetString ("MB");
+ }
+
+ AddComboPair (GetDlgItem (hwndDlg, IDC_CLUSTERSIZE), s.str().c_str(), i);
+ }
+
+ SendMessage (GetDlgItem (hwndDlg, IDC_CLUSTERSIZE), CB_SETCURSEL, 0, 0);
+}
+
/* Except in response to the WM_INITDIALOG message, the dialog box procedure
should return nonzero if it processes the message, and zero if it does
not. - see DialogProc */
BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -3814,9 +3914,8 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDCANCEL), GetString ("CANCEL"));
RefreshMultiBootControls (hwndDlg);
- DisableIfGpt(GetDlgItem(hwndDlg, IDC_MULTI_BOOT));
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), nMultiBoot > 0);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), TRUE);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDCANCEL), TRUE);
break;
@@ -4077,9 +4176,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
for (ea = EAGetFirst (); ea != 0; ea = EAGetNext (ea))
{
if (EAIsFormatEnabled (ea) && (!SysEncInEffect () || bSystemIsGPT || EAIsMbrSysEncEnabled (ea)))
- AddComboPair (GetDlgItem (hwndDlg, IDC_COMBO_BOX), EAGetName (buf, ea, 1), ea);
+ AddComboPair (GetDlgItem (hwndDlg, IDC_COMBO_BOX), EAGetName (buf, ARRAYSIZE(buf),ea, 1), ea);
}
SelectAlgo (GetDlgItem (hwndDlg, IDC_COMBO_BOX), &nVolumeEA);
ComboSelChangeEA (hwndDlg);
@@ -4095,10 +4194,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
RandSetHashFunction (hash_algo);
for (hid = FIRST_PRF_ID; hid <= LAST_PRF_ID; hid++)
{
- // For now, we keep RIPEMD160 for system encryption
- if (((hid == RIPEMD160) || !HashIsDeprecated (hid)) && (bSystemIsGPT || HashForSystemEncryption (hid)))
+ if ((!HashIsDeprecated (hid)) && (bSystemIsGPT || HashForSystemEncryption (hid)))
AddComboPair (GetDlgItem (hwndDlg, IDC_COMBO_BOX_HASH_ALGO), HashGetName(hid), hid);
}
}
else
@@ -4145,9 +4243,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
SendMessage (GetDlgItem (hwndDlg, IDC_SPACE_LEFT), WM_SETFONT, (WPARAM) hBoldFont, (LPARAM) TRUE);
SendMessage (GetDlgItem (hwndDlg, IDC_SIZEBOX), EM_LIMITTEXT, 12, 0);
- if(!QueryFreeSpace (hwndDlg, GetDlgItem (hwndDlg, IDC_SPACE_LEFT), TRUE))
+ if(!QueryFreeSpace (hwndDlg, GetDlgItem (hwndDlg, IDC_SPACE_LEFT), TRUE, &nAvailableFreeSpace, &bIsSparseFilesSupportedByHost))
{
nUIVolumeSize=0;
nVolumeSize=0;
SetWindowTextW (GetDlgItem (hwndDlg, IDC_SIZEBOX), GetString ("UNKNOWN"));
@@ -4241,9 +4339,11 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
/* make autodetection the default */
SendMessage (hComboBox, CB_SETCURSEL, 0, 0);
- SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD_DIRECT), EM_LIMITTEXT, MAX_PASSWORD, 0);
+ hPasswordInputField = GetDlgItem (hwndDlg, IDC_PASSWORD_DIRECT);
+ hVerifyPasswordInputField = NULL;
+ ToNormalPwdField (hwndDlg, IDC_PASSWORD_DIRECT);
SetPassword (hwndDlg, IDC_PASSWORD_DIRECT, szRawPassword);
SetFocus (GetDlgItem (hwndDlg, IDC_PASSWORD_DIRECT));
@@ -4277,18 +4377,24 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
hPasswordInputField = GetDlgItem (hwndDlg, IDC_PASSWORD);
hVerifyPasswordInputField = GetDlgItem (hwndDlg, IDC_VERIFY);
+ ToNormalPwdField (hwndDlg, IDC_PASSWORD);
+ ToNormalPwdField (hwndDlg, IDC_VERIFY);
+
if (SysEncInEffect ())
{
ToBootPwdField (hwndDlg, IDC_PASSWORD);
ToBootPwdField (hwndDlg, IDC_VERIFY);
- StringCbPrintfW (OrigKeyboardLayout, sizeof(OrigKeyboardLayout), L"%08X", (DWORD) GetKeyboardLayout (NULL) & 0xFFFF);
+ if (!GetKeyboardLayoutNameW(OrigKeyboardLayout))
+ {
+ StringCbPrintfW(OrigKeyboardLayout, sizeof(OrigKeyboardLayout), L"%08X", (DWORD)(DWORD_PTR)GetKeyboardLayout(NULL) & 0xFFFF);
+ }
- if ((DWORD) GetKeyboardLayout (NULL) != 0x00000409 && (DWORD) GetKeyboardLayout (NULL) != 0x04090409)
+ if ((DWORD)(DWORD_PTR)GetKeyboardLayout (NULL) != 0x00000409 && (DWORD)(DWORD_PTR)GetKeyboardLayout (NULL) != 0x04090409)
{
- DWORD keybLayout = (DWORD) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE);
+ DWORD keybLayout = (DWORD)(DWORD_PTR)LoadKeyboardLayout (L"00000409", KLF_ACTIVATE);
if (keybLayout != 0x00000409 && keybLayout != 0x04090409)
{
Error ("CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION", MainDlg);
@@ -4321,20 +4427,18 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
StringCbCopyW (str, sizeof(str), GetString ("PASSWORD_HELP"));
}
- SendMessage (GetDlgItem (hwndDlg, IDC_PASSWORD), EM_LIMITTEXT, MAX_PASSWORD, 0);
- SendMessage (GetDlgItem (hwndDlg, IDC_VERIFY), EM_LIMITTEXT, MAX_PASSWORD, 0);
-
SetPassword (hwndDlg, IDC_PASSWORD, szRawPassword);
SetPassword (hwndDlg, IDC_VERIFY, szVerify);
SetFocus (GetDlgItem (hwndDlg, IDC_PASSWORD));
SetCheckBox (hwndDlg, IDC_PIM_ENABLE, PimEnable);
SetCheckBox (hwndDlg, IDC_KEYFILES_ENABLE, KeyFilesEnable && !SysEncInEffect());
- EnableWindow (GetDlgItem (hwndDlg, IDC_KEY_FILES), KeyFilesEnable);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_KEY_FILES), KeyFilesEnable && !SysEncInEffect());
+ EnableWindow (GetDlgItem (hwndDlg, IDC_KEYFILES_ENABLE), !SysEncInEffect());
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), str);
if (CreatingHiddenSysVol())
@@ -4373,11 +4477,13 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
SetDlgItemTextW (hwndDlg, IDC_PIM_HELP, GetString (SysEncInEffect ()? "PIM_SYSENC_CHANGE_WARNING" : "PIM_CHANGE_WARNING"));
}
SetFocus (GetDlgItem (hwndDlg, IDC_PIM));
-
- SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString (SysEncInEffect ()? "PIM_SYSENC_HELP" : "PIM_HELP"));
-
+ #ifndef WOLFCRYPT_BACKEND
+ SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString (SysEncInEffect () && hash_algo != SHA512 && hash_algo != WHIRLPOOL? "PIM_SYSENC_HELP" : "PIM_HELP"));
+ #else
+ SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString (SysEncInEffect () && hash_algo != SHA512? "PIM_SYSENC_HELP" : "PIM_HELP"));
+ #endif
ToHyperlink (hwndDlg, IDC_LINK_PIM_INFO);
if (CreatingHiddenSysVol())
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("PIM_HIDDEN_OS_TITLE"));
@@ -4487,8 +4593,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("RESCUE_DISK"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("NEXT"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
SetWindowTextW (GetDlgItem (hwndDlg, IDT_RESCUE_DISK_INFO), bSystemIsGPT? GetString ("RESCUE_DISK_EFI_INFO"): GetString ("RESCUE_DISK_INFO"));
+ SetCheckBox (hwndDlg, IDC_SKIP_RESCUE_VERIFICATION, bDontVerifyRescueDisk);
SetDlgItemText (hwndDlg, IDC_RESCUE_DISK_ISO_PATH, szRescueDiskISO);
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), (GetWindowTextLength (GetDlgItem (hwndDlg, IDC_RESCUE_DISK_ISO_PATH)) > 1));
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_PREV), TRUE);
@@ -4835,8 +4942,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
BOOL bNTFSallowed = FALSE;
BOOL bFATallowed = FALSE;
BOOL bEXFATallowed = FALSE;
+ BOOL bReFSallowed = FALSE;
BOOL bNoFSallowed = FALSE;
HCRYPTPROV hRngProv;
mouseEntropyGathered = 0xFFFFFFFF;
@@ -4869,34 +4977,59 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString (bHiddenVolHost ? "FORMAT_HIDVOL_HOST_TITLE" : "FORMAT_HIDVOL_TITLE"));
else
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_BOX_TITLE), GetString ("FORMAT_TITLE"));
+ /* Fill the format type combobox */
+ SendMessage (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), CB_RESETCONTENT, 0, 0);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), TRUE);
+
+ AddComboPair (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), GetString("FULL_FORMAT"), FORMAT_TYPE_FULL);
+ AddComboPair (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), GetString("IDC_QUICKFORMAT"), FORMAT_TYPE_QUICK);
+ if (!bDevice) // Fast Create only makes sens for file containers
+ AddComboPair (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), GetString("FAST_CREATE"), FORMAT_TYPE_FAST);
+ SendMessage (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), CB_SETCURSEL, 0, 0);
+
+ formatType = FORMAT_TYPE_FULL;
+
/* Quick/Dynamic */
if (bHiddenVol)
{
quickFormat = !bHiddenVolHost;
+ dynamicFormat = FALSE;
bSparseFileSwitch = FALSE;
- SetCheckBox (hwndDlg, IDC_QUICKFORMAT, quickFormat);
- SetWindowTextW (GetDlgItem (hwndDlg, IDC_QUICKFORMAT), GetString ((bDevice || !bHiddenVolHost) ? "IDC_QUICKFORMAT" : "SPARSE_FILE"));
- EnableWindow (GetDlgItem (hwndDlg, IDC_QUICKFORMAT), bDevice && bHiddenVolHost);
+ SetCheckBox (hwndDlg, SPARSE_FILE, FALSE);
+ EnableWindow (GetDlgItem (hwndDlg, SPARSE_FILE), FALSE);
+
+ if (quickFormat)
+ {
+ formatType = FORMAT_TYPE_QUICK;
+ SelectAlgo (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), (int *) &formatType);
+ }
+ else if (!bDevice && fastCreateFile)
+ {
+ formatType = FORMAT_TYPE_FAST;
+ quickFormat = TRUE;
+ SelectAlgo (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), (int *) &formatType);
+ }
+ EnableWindow (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), bHiddenVolHost);
}
else
{
if (bDevice)
{
+ dynamicFormat = FALSE;
bSparseFileSwitch = FALSE;
- SetWindowTextW (GetDlgItem (hwndDlg, IDC_QUICKFORMAT), GetString("IDC_QUICKFORMAT"));
- EnableWindow (GetDlgItem (hwndDlg, IDC_QUICKFORMAT), TRUE);
+ SetCheckBox (hwndDlg, SPARSE_FILE, FALSE);
+ EnableWindow (GetDlgItem (hwndDlg, SPARSE_FILE), FALSE);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), TRUE);
}
else
{
wchar_t root[TC_MAX_PATH];
DWORD fileSystemFlags = 0;
- SetWindowTextW (GetDlgItem (hwndDlg, IDC_QUICKFORMAT), GetString("SPARSE_FILE"));
-
/* Check if the host file system supports sparse files */
if (GetVolumePathName (szFileName, root, array_capacity (root)))
{
@@ -4904,41 +5037,30 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bSparseFileSwitch = fileSystemFlags & FILE_SUPPORTS_SPARSE_FILES;
}
else
bSparseFileSwitch = FALSE;
+ if (!bSparseFileSwitch)
+ {
+ dynamicFormat = FALSE;
+ SetCheckBox (hwndDlg, SPARSE_FILE, FALSE);
+ }
- EnableWindow (GetDlgItem (hwndDlg, IDC_QUICKFORMAT), bSparseFileSwitch);
+ if (fastCreateFile)
+ {
+ formatType = FORMAT_TYPE_FAST;
+ quickFormat = TRUE;
+ SelectAlgo (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), (int *) &formatType);
+ }
+ EnableWindow (GetDlgItem (hwndDlg, SPARSE_FILE), bSparseFileSwitch);
+ EnableWindow (GetDlgItem (hwndDlg, IDC_FORMAT_TYPE), TRUE);
}
}
SendMessage (GetDlgItem (hwndDlg, IDC_SHOW_KEYS), BM_SETCHECK, showKeys ? BST_CHECKED : BST_UNCHECKED, 0);
SetWindowText (GetDlgItem (hwndDlg, IDC_RANDOM_BYTES), showKeys ? L"" : L"******************************** ");
SetWindowText (GetDlgItem (hwndDlg, IDC_HEADER_KEY), showKeys ? L"" : L"******************************** ");
SetWindowText (GetDlgItem (hwndDlg, IDC_DISK_KEY), showKeys ? L"" : L"******************************** ");
- SendMessage (GetDlgItem (hwndDlg, IDC_CLUSTERSIZE), CB_RESETCONTENT, 0, 0);
- AddComboPair (GetDlgItem (hwndDlg, IDC_CLUSTERSIZE), GetString ("DEFAULT"), 0);
-
- for (int i = 1; i <= 128; i *= 2)
- {
- wstringstream s;
- DWORD size = GetFormatSectorSize() * i;
-
- if (size > TC_MAX_FAT_CLUSTER_SIZE)
- break;
-
- if (size == 512)
- s << L"0.5";
- else
- s << size / BYTES_PER_KB;
-
- s << L" " << GetString ("KB");
-
- AddComboPair (GetDlgItem (hwndDlg, IDC_CLUSTERSIZE), s.str().c_str(), i);
- }
-
- SendMessage (GetDlgItem (hwndDlg, IDC_CLUSTERSIZE), CB_SETCURSEL, 0, 0);
-
EnableWindow (GetDlgItem (hwndDlg, IDC_CLUSTERSIZE), TRUE);
/* Filesystems */
@@ -4966,13 +5088,21 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bFATallowed = TRUE;
}
//exFAT support added starting from Vista SP1
- if (IsOSVersionAtLeast (WIN_VISTA, 1) && dataAreaSize >= TC_MIN_EXFAT_FS_SIZE && dataAreaSize <= TC_MAX_EXFAT_FS_SIZE)
+ if (dataAreaSize >= TC_MIN_EXFAT_FS_SIZE && dataAreaSize <= TC_MAX_EXFAT_FS_SIZE)
{
AddComboPair (GetDlgItem (hwndDlg, IDC_FILESYS), L"exFAT", FILESYS_EXFAT);
bEXFATallowed = TRUE;
}
+
+ //ReFS write support activated by default starting from Windows 10
+ //We don't support it yet for the creation of hidden volumes
+ if ((!bHiddenVolHost) && IsOSVersionAtLeast (WIN_10, 0) && dataAreaSize >= TC_MIN_REFS_FS_SIZE && dataAreaSize <= TC_MAX_REFS_FS_SIZE)
+ {
+ AddComboPair (GetDlgItem (hwndDlg, IDC_FILESYS), L"ReFS", FILESYS_REFS);
+ bReFSallowed = TRUE;
+ }
}
else
{
// We're creating a hidden volume for a hidden OS, so we don't need to format it with
@@ -4992,14 +5122,16 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (fileSystem == FILESYS_NONE) // If no file system has been previously selected
{
// Set default file system
- if (bFATallowed && !(nNeedToStoreFilesOver4GB == 1 && (bNTFSallowed || bEXFATallowed)))
+ if (bFATallowed && !(nNeedToStoreFilesOver4GB == 1 && (bNTFSallowed || bEXFATallowed || bReFSallowed)))
fileSystem = FILESYS_FAT;
else if (bEXFATallowed)
fileSystem = FILESYS_EXFAT;
else if (bNTFSallowed)
fileSystem = FILESYS_NTFS;
+ else if (bReFSallowed)
+ fileSystem = FILESYS_REFS;
else if (bNoFSallowed)
fileSystem = FILESYS_NONE;
else
{
@@ -5010,8 +5142,10 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
SendMessage (GetDlgItem (hwndDlg, IDC_FILESYS), CB_SETCURSEL, 0, 0);
SelectAlgo (GetDlgItem (hwndDlg, IDC_FILESYS), (int *) &fileSystem);
+ UpdateClusterSizeList (hwndDlg, fileSystem);
+
EnableWindow (GetDlgItem (hwndDlg, IDC_ABORT_BUTTON), FALSE);
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_NEXT), GetString ("FORMAT"));
SetWindowTextW (GetDlgItem (GetParent (hwndDlg), IDC_PREV), GetString ("PREV"));
@@ -5187,9 +5321,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
// set the text colour in (HDC)lParam
SetBkMode((HDC)wParam,TRANSPARENT);
SetTextColor((HDC)wParam, RGB(255,0,0));
// NOTE: per documentation as pointed out by selbie, GetSolidBrush would leak a GDI handle.
- return (BOOL)GetSysColorBrush(COLOR_MENU);
+ return (BOOL) (INT_PTR)GetSysColorBrush(COLOR_MENU);
}
}
return 0;
@@ -5211,13 +5345,13 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
UpdateWizardModeControls (hwndDlg, WIZARD_MODE_SYS_DEVICE);
return 1;
case IDC_MORE_INFO_ON_CONTAINERS:
- Applink ("introcontainer", TRUE, "");
+ Applink ("introcontainer");
return 1;
case IDC_MORE_INFO_ON_SYS_ENCRYPTION:
- Applink ("introsysenc", TRUE, "");
+ Applink ("introsysenc");
return 1;
}
}
@@ -5237,16 +5371,16 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bHiddenVolHost = FALSE;
return 1;
case IDC_HIDDEN_SYSENC_INFO_LINK:
- Applink ("hiddensysenc", TRUE, "");
+ Applink ("hiddensysenc");
return 1;
}
}
if (nCurPageNo == SYSENC_HIDDEN_OS_REQ_CHECK_PAGE && lw == IDC_HIDDEN_SYSENC_INFO_LINK)
{
- Applink ("hiddensysenc", TRUE, "");
+ Applink ("hiddensysenc");
return 1;
}
if (nCurPageNo == SYSENC_SPAN_PAGE)
@@ -5367,9 +5501,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
break;
case IDC_MORE_INFO_SYS_ENCRYPTION:
- Applink ("sysencprogressinfo", TRUE, "");
+ Applink ("sysencprogressinfo");
return 1;
}
}
@@ -5458,9 +5592,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
if (lw == IDC_HIDDEN_VOL_HELP && nCurPageNo == VOLUME_TYPE_PAGE)
{
- Applink ("hiddenvolume", TRUE, "");
+ Applink ("hiddenvolume");
return 1;
}
if (lw == IDC_ABORT_BUTTON && nCurPageNo == FORMAT_PAGE)
@@ -5507,44 +5641,58 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
wchar_t name[100];
int nIndex = (int) SendMessage (GetDlgItem (hCurPage, IDC_COMBO_BOX), CB_GETCURSEL, 0, 0);
nIndex = (int) SendMessage (GetDlgItem (hCurPage, IDC_COMBO_BOX), CB_GETITEMDATA, nIndex, 0);
- EAGetName (name, nIndex, 0);
+ EAGetName (name, ARRAYSIZE(name),nIndex, 0);
if (wcscmp (name, L"AES") == 0)
- Applink ("aes", FALSE, "");
+ Applink ("aes");
else if (wcscmp (name, L"Serpent") == 0)
- Applink ("serpent", FALSE, "");
+ Applink ("serpent");
else if (wcscmp (name, L"Twofish") == 0)
- Applink ("twofish", FALSE, "");
- else if (wcscmp (name, L"GOST89") == 0)
- Applink ("gost89", FALSE, "");
+ Applink ("twofish");
else if (wcscmp (name, L"Kuznyechik") == 0)
- Applink ("kuznyechik", FALSE, "");
+ Applink ("kuznyechik");
else if (wcscmp (name, L"Camellia") == 0)
- Applink ("camellia", FALSE, "");
+ Applink ("camellia");
else if (EAGetCipherCount (nIndex) > 1)
- Applink ("cascades", TRUE, "");
+ Applink ("cascades");
return 1;
}
if (lw == IDC_LINK_HASH_INFO && nCurPageNo == CIPHER_PAGE)
{
- Applink ("hashalgorithms", TRUE, "");
+ Applink ("hashalgorithms");
return 1;
}
if (lw == IDC_LINK_PIM_INFO && nCurPageNo == PIM_PAGE)
{
- Applink ("pim", TRUE, "");
+ Applink ("pim");
return 1;
}
if (hw == CBN_EDITCHANGE && nCurPageNo == VOLUME_LOCATION_PAGE)
{
+ BOOL bValidEntry = (GetWindowTextLength (GetDlgItem (hCurPage, IDC_COMBO_BOX)) > 0)? TRUE : FALSE;
+
+ if (bValidEntry && !bDevice)
+ {
+ /* check that the entered path is not for an existing directory */
+ WCHAR szEnteredFilePath[TC_MAX_PATH + 1] = {0};
+ GetWindowTextW (GetDlgItem (hCurPage, IDC_COMBO_BOX), szEnteredFilePath, ARRAYSIZE (szEnteredFilePath));
+ RelativePath2Absolute (szEnteredFilePath);
+
+ DWORD dwAttr = GetFileAttributes (szEnteredFilePath);
+ if ((dwAttr != INVALID_FILE_ATTRIBUTES) && (dwAttr & FILE_ATTRIBUTE_DIRECTORY))
+ {
+ /* this is a directory. Consider it as invalid */
+ bValidEntry = FALSE;
+ }
+ }
EnableWindow (GetDlgItem (GetParent (hwndDlg), IDC_NEXT),
- GetWindowTextLength (GetDlgItem (hCurPage, IDC_COMBO_BOX)) > 0);
+ bValidEntry);
bDeviceTransformModeChoiceMade = FALSE;
bInPlaceEncNonSys = FALSE;
@@ -5591,9 +5739,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (hw == EN_CHANGE && nCurPageNo == PIM_PAGE)
{
if (lw == IDC_PIM)
{
- if(GetPim (hwndDlg, IDC_PIM) != 0)
+ if(GetPim (hwndDlg, IDC_PIM, 0) != 0)
{
PimValueChangedWarning = TRUE;
SetDlgItemTextW (hwndDlg, IDC_PIM_HELP, GetString (SysEncInEffect ()? "PIM_SYSENC_CHANGE_WARNING" : "PIM_CHANGE_WARNING"));
}
@@ -5702,9 +5850,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|| nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
{
if (hw == EN_CHANGE)
{
- GetPassword (hCurPage, IDC_PASSWORD_DIRECT, (char*) volumePassword.Text, MAX_PASSWORD + 1, FALSE);
+ GetPassword (hCurPage, IDC_PASSWORD_DIRECT, (char*) volumePassword.Text, iMaxPasswordLength + 1, FALSE, FALSE);
volumePassword.Length = (unsigned __int32) strlen ((char *) volumePassword.Text);
return 1;
}
@@ -5759,9 +5907,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (!bDevice)
{
// Select file
- if (BrowseFiles (hwndDlg, "OPEN_TITLE", szFileName, bHistory, !bHiddenVolDirect, NULL) == FALSE)
+ if (BrowseFiles (hwndDlg, "OPEN_TITLE", szFileName, bHistory, !bHiddenVolDirect) == FALSE)
return 1;
AddComboItem (GetDlgItem (hwndDlg, IDC_COMBO_BOX), szFileName, bHistory);
@@ -5817,8 +5965,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bHiddenVolDirect = FALSE;
bHiddenVolHost = FALSE;
bSparseFileSwitch = FALSE;
quickFormat = FALSE;
+ dynamicFormat = FALSE;
return 1;
}
}
@@ -5855,19 +6004,52 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
return 1;
}
- if (lw == IDC_QUICKFORMAT && IsButtonChecked (GetDlgItem (hCurPage, IDC_QUICKFORMAT)))
+ if (lw == IDC_FORMAT_TYPE && hw == CBN_SELCHANGE)
{
- if (bSparseFileSwitch)
+ formatType = (int) SendMessage (GetDlgItem (hCurPage, IDC_FORMAT_TYPE), CB_GETITEMDATA,
+ SendMessage (GetDlgItem (hCurPage, IDC_FORMAT_TYPE), CB_GETCURSEL, 0, 0) , 0);
+
+ if (formatType == FORMAT_TYPE_QUICK)
+ {
+ if (AskWarnYesNo("WARN_QUICK_FORMAT", MainDlg) == IDNO)
+ {
+ formatType = FORMAT_TYPE_FULL;
+ SelectAlgo(GetDlgItem (hCurPage, IDC_FORMAT_TYPE), (int *) &formatType);
+ }
+ }
+ else if (formatType == FORMAT_TYPE_FAST)
+ {
+ if (AskWarnYesNo("WARN_FAST_CREATE", MainDlg) == IDNO)
+ {
+ formatType = FORMAT_TYPE_FULL;
+ SelectAlgo(GetDlgItem (hCurPage, IDC_FORMAT_TYPE), (int *) &formatType);
+ }
+ }
+
+ return 1;
+ }
+
+ if (lw == SPARSE_FILE)
+ {
+ if (IsButtonChecked (GetDlgItem (hCurPage, SPARSE_FILE)))
{
if (AskWarnYesNo("CONFIRM_SPARSE_FILE", MainDlg) == IDNO)
- SetCheckBox (hwndDlg, IDC_QUICKFORMAT, FALSE);
+ SetCheckBox (hwndDlg, SPARSE_FILE, FALSE);
+ else
+ {
+ /* sparse file require quick format */
+ formatType = FORMAT_TYPE_QUICK;
+ SelectAlgo(GetDlgItem (hCurPage, IDC_FORMAT_TYPE), (int *) &formatType);
+ EnableWindow(GetDlgItem (hCurPage, IDC_FORMAT_TYPE), FALSE);
+ }
}
else
{
- if (AskWarnYesNo("WARN_QUICK_FORMAT", MainDlg) == IDNO)
- SetCheckBox (hwndDlg, IDC_QUICKFORMAT, FALSE);
+ EnableWindow(GetDlgItem (hCurPage, IDC_FORMAT_TYPE), TRUE);
+ formatType = FORMAT_TYPE_FULL;
+ SelectAlgo(GetDlgItem (hCurPage, IDC_FORMAT_TYPE), (int *) &formatType);
}
return 1;
}
@@ -5875,8 +6057,13 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
fileSystem = (int) SendMessage (GetDlgItem (hCurPage, IDC_FILESYS), CB_GETITEMDATA,
SendMessage (GetDlgItem (hCurPage, IDC_FILESYS), CB_GETCURSEL, 0, 0) , 0);
+ if (nCurPageNo == FORMAT_PAGE)
+ {
+ UpdateClusterSizeList (hCurPage, fileSystem);
+ }
+
return 1;
}
if (lw == IDC_SHOW_KEYS && nCurPageNo == FORMAT_PAGE)
@@ -5911,9 +6098,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (lw == IDC_BROWSE)
{
wchar_t tmpszRescueDiskISO [TC_MAX_PATH+1];
- if (!BrowseFiles (hwndDlg, "OPEN_TITLE", tmpszRescueDiskISO, FALSE, TRUE, NULL))
+ if (!BrowseFiles (hwndDlg, "OPEN_TITLE", tmpszRescueDiskISO, FALSE, TRUE))
return 1;
StringCbCopyW (szRescueDiskISO, sizeof(szRescueDiskISO), tmpszRescueDiskISO);
@@ -5934,9 +6121,9 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
if (IsWindowsIsoBurnerAvailable())
LaunchWindowsIsoBurner (hwndDlg, szRescueDiskISO);
else
- Applink ("isoburning", TRUE, "");
+ Applink ("isoburning");
return 1;
}
@@ -6008,8 +6195,19 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
LoadSettings (hwndDlg);
+ // set the maximum password length based on configuration setting
+ if (bUseLegacyMaxPasswordLength)
+ iMaxPasswordLength = MAX_LEGACY_PASSWORD;
+ else
+ iMaxPasswordLength = MAX_PASSWORD;
+
+ // Save language to XML configuration file if it has been selected in the setup
+ // so that other VeraCrypt programs will pick it up
+ if (bLanguageSetInSetup)
+ SaveSettings (hwndDlg);
+
LoadDefaultKeyFilesParam ();
RestoreDefaultKeyFilesParam ();
SysEncMultiBootCfg.NumberOfSysDrives = -1;
@@ -6042,8 +6240,14 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
SetWindowTextW (hwndDlg, lpszTitle);
ExtractCommandLine (hwndDlg, (wchar_t *) lParam);
+ if (EnableMemoryProtection)
+ {
+ /* Protect this process memory from being accessed by non-admin users */
+ ActivateMemoryProtection ();
+ }
+
if (ComServerMode)
{
InitDialog (hwndDlg);
@@ -6054,8 +6258,10 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
exit (0);
}
+ fastCreateFile = CmdFastCreateFile;
+
if (DirectCreationMode)
{
wchar_t root[TC_MAX_PATH];
DWORD fileSystemFlags = 0;
@@ -6065,9 +6271,9 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
showKeys = FALSE;
bGuiMode = FALSE;
- if (CmdVolumePassword.Length == 0)
+ if (CmdVolumePassword.Length == 0 && !FirstCmdKeyFile)
AbortProcess ("ERR_PASSWORD_MISSING");
if (CmdVolumeFileSize == 0)
AbortProcess ("ERR_SIZE_MISSING");
@@ -6109,10 +6315,10 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
if (nVolumeSize < (bHiddenVolHost ? TC_MIN_HIDDEN_VOLUME_HOST_SIZE : (bHiddenVol ? TC_MIN_HIDDEN_VOLUME_SIZE : TC_MIN_VOLUME_SIZE)))
AbortProcess ("ERR_VOLUME_SIZE_TOO_SMALL");
- if ( ((!bHiddenVolHost && bHiddenVol) && (nVolumeSize > nMaximumHiddenVolSize))
- || (nVolumeSize > (bHiddenVolHost ? TC_MAX_HIDDEN_VOLUME_HOST_SIZE : TC_MAX_VOLUME_SIZE))
+ if ( ((!bHiddenVolHost && bHiddenVol) && (nVolumeSize > (unsigned __int64) nMaximumHiddenVolSize))
+ || (nVolumeSize > (unsigned __int64) (bHiddenVolHost ? TC_MAX_HIDDEN_VOLUME_HOST_SIZE : TC_MAX_VOLUME_SIZE))
)
{
AbortProcess ("ERR_VOLUME_SIZE_TOO_BIG");
}
@@ -6134,9 +6340,10 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
AbortProcess ("ERR_DYNAMIC_NOT_SUPPORTED");
}
}
- quickFormat = TRUE;
+ quickFormat = CmdQuickFormat;
+ dynamicFormat = CmdSparseFileSwitch;
if (!GetDiskFreeSpaceEx (root, &free, 0, 0))
{
wchar_t szTmp[1024];
@@ -6155,9 +6362,9 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
exit (1);
}
else
{
- if (!bSparseFileSwitch && (nVolumeSize > free.QuadPart))
+ if (!dynamicFormat && !bDontCheckFileContainerSize && (nVolumeSize > free.QuadPart))
{
AbortProcess ("ERR_CONTAINER_SIZE_TOO_BIG");
}
}
@@ -6177,8 +6384,15 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
AbortProcess ("ERR_EXFAT_INVALID_VOLUME_SIZE");
}
+ if ( (fileSystem == FILESYS_REFS) &&
+ (dataAreaSize < TC_MIN_REFS_FS_SIZE || dataAreaSize > TC_MAX_REFS_FS_SIZE)
+ )
+ {
+ AbortProcess ("ERR_REFS_INVALID_VOLUME_SIZE");
+ }
+
if ( (fileSystem == FILESYS_FAT) &&
(dataAreaSize < TC_MIN_FAT_FS_SIZE || dataAreaSize > (TC_MAX_FAT_SECTOR_COUNT * GetFormatSectorSize()))
)
{
@@ -6196,24 +6410,22 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
AbortProcess ("VOLUME_TOO_LARGE_FOR_FAT32");
}
}
- /* Verify that the volume would not be too large for the operating system */
- if (!IsOSAtLeast (WIN_VISTA)
- && nVolumeSize > 2 * BYTES_PER_TB)
- {
- AbortProcess ("VOLUME_TOO_LARGE_FOR_WINXP");
- }
-
if (volumePassword.Length > 0)
{
// Check password length (check also done for outer volume which is not the case in TrueCrypt).
- if (!CheckPasswordLength (NULL, volumePassword.Length, volumePim, FALSE, Silent, Silent))
+ if (!CheckPasswordLength (NULL, volumePassword.Length, volumePim, FALSE, 0, Silent, Silent))
{
exit (1);
}
}
+ if (!KeyFilesApply (hwndDlg, &volumePassword, FirstCmdKeyFile, NULL))
+ {
+ exit (1);
+ }
+
volTransformThreadFunction (hwndDlg);
exit (bOperationSuccess? 0 : 1);
}
@@ -6223,21 +6435,26 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
StringCbCatW (szRescueDiskISO, sizeof(szRescueDiskISO), L"\\VeraCrypt Rescue Disk.zip");
else
StringCbCatW (szRescueDiskISO, sizeof(szRescueDiskISO), L"\\VeraCrypt Rescue Disk.iso");
- if (IsOSAtLeast (WIN_VISTA))
- {
- // Availability of in-place encryption (which is pre-selected by default whenever
- // possible) makes partition-hosted volume creation safer.
- bWarnDeviceFormatAdvanced = FALSE;
- }
+ // Availability of in-place encryption (which is pre-selected by default whenever
+ // possible) makes partition-hosted volume creation safer.
+ bWarnDeviceFormatAdvanced = FALSE;
#ifdef _DEBUG
// For faster testing
- strcpy (szVerify, "q");
- strcpy (szRawPassword, "q");
+ StringCchCopyA (szVerify, ARRAYSIZE(szVerify), "q");
+ StringCchCopyA (szRawPassword, ARRAYSIZE(szRawPassword), "q");
#endif
+ PasswordEditDropTarget* pTarget = new PasswordEditDropTarget ();
+ if (pTarget->Register (hwndDlg))
+ {
+ SetWindowLongPtr (hwndDlg, DWLP_USER, (LONG_PTR) pTarget);
+ }
+ else
+ delete pTarget;
+
PostMessage (hwndDlg, TC_APPMSG_PERFORM_POST_WMINIT_TASKS, 0, 0);
}
return 0;
@@ -6483,22 +6700,22 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
case TIMER_ID_KEYB_LAYOUT_GUARD:
if (SysEncInEffect ())
{
- DWORD keybLayout = (DWORD) GetKeyboardLayout (NULL);
+ DWORD keybLayout = (DWORD)(DWORD_PTR) GetKeyboardLayout (NULL);
/* Watch the keyboard layout */
if (keybLayout != 0x00000409 && keybLayout != 0x04090409)
{
// Keyboard layout is not standard US
- WipePasswordsAndKeyfiles ();
+ WipePasswordsAndKeyfiles (true);
SetPassword (hCurPage, IDC_PASSWORD, szRawPassword);
SetPassword (hCurPage, IDC_VERIFY, szVerify);
- keybLayout = (DWORD) LoadKeyboardLayout (L"00000409", KLF_ACTIVATE);
+ keybLayout = (DWORD)(DWORD_PTR)LoadKeyboardLayout (L"00000409", KLF_ACTIVATE);
if (keybLayout != 0x00000409 && keybLayout != 0x04090409)
{
KillTimer (hwndDlg, TIMER_ID_KEYB_LAYOUT_GUARD);
@@ -6735,9 +6952,10 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
else
{
// Format has been aborted (did not finish)
- EnableWindow (GetDlgItem (hCurPage, IDC_QUICKFORMAT), (bDevice || bSparseFileSwitch) && !(bHiddenVol && !bHiddenVolHost));
+ EnableWindow (GetDlgItem (hCurPage, IDC_FORMAT_TYPE), !(bHiddenVol && !bHiddenVolHost));
+ EnableWindow (GetDlgItem (hCurPage, SPARSE_FILE), (bSparseFileSwitch) && !(bHiddenVol && !bHiddenVolHost));
EnableWindow (GetDlgItem (hCurPage, IDC_FILESYS), TRUE);
EnableWindow (GetDlgItem (hCurPage, IDC_CLUSTERSIZE), TRUE);
EnableWindow (GetDlgItem (hwndDlg, IDC_PREV), TRUE);
EnableWindow (GetDlgItem (hwndDlg, IDHELP), TRUE);
@@ -6996,23 +7214,8 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
if (AskWarnYesNoString ((wstring (GetString ("SYSDRIVE_NON_STANDARD_PARTITIONS")) + L"\n\n" + GetString ("ASK_ENCRYPT_PARTITION_INSTEAD_OF_DRIVE")).c_str(), MainDlg) == IDYES)
bWholeSysDrive = FALSE;
}
-
- if (!IsOSAtLeast (WIN_VISTA) && bWholeSysDrive)
- {
- if (BootEncObj->SystemDriveContainsExtendedPartition())
- {
- Error ("WDE_UNSUPPORTED_FOR_EXTENDED_PARTITIONS", MainDlg);
-
- if (AskYesNo ("ASK_ENCRYPT_PARTITION_INSTEAD_OF_DRIVE", MainDlg) == IDNO)
- return 1;
-
- bWholeSysDrive = FALSE;
- }
- else
- Warning ("WDE_EXTENDED_PARTITIONS_WARNING", hwndDlg);
- }
}
if (!bWholeSysDrive && BootEncObj->SystemPartitionCoversWholeDrive())
bWholeSysDrive = (AskYesNo ("WHOLE_SYC_DEVICE_RECOM", hwndDlg) == IDYES);
@@ -7068,10 +7271,9 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
if (bHiddenOS)
{
- if (IsOSAtLeast (WIN_7)
- && BootEncObj->GetSystemDriveConfiguration().ExtraBootPartitionPresent
+ if (BootEncObj->GetSystemDriveConfiguration().ExtraBootPartitionPresent
&& AskWarnYesNo ("CONFIRM_HIDDEN_OS_EXTRA_BOOT_PARTITION", hwndDlg) == IDNO)
{
TextInfoDialogBox (TC_TBXID_EXTRA_BOOT_PARTITION_REMOVAL_INSTRUCTIONS);
NormalCursor ();
@@ -7092,11 +7294,12 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
// Skip irrelevant pages
nNewPageNo = HIDDEN_VOL_HOST_PRE_CIPHER_PAGE - 1;
}
- else if (nMultiBoot <= 1)
+ else if ((nMultiBoot <= 1) || bSystemIsGPT)
{
// Single-boot (not creating a hidden OS)
+ // Multi-boot in case of GPT
// Skip irrelevant pages
nNewPageNo = CIPHER_PAGE - 1;
}
@@ -7164,9 +7367,9 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
else
{
// Either a standard Windows boot manager or no boot manager
- wcscpy_s (SysEncMultiBootCfgOutcome, sizeof(SysEncMultiBootCfgOutcome) / 2, GetString ("WINDOWS_BOOT_LOADER_HINTS"));
+ StringCchCopyW (SysEncMultiBootCfgOutcome, sizeof(SysEncMultiBootCfgOutcome) / 2, GetString ("WINDOWS_BOOT_LOADER_HINTS"));
}
}
else if (nCurPageNo == SYSENC_MULTI_BOOT_OUTCOME_PAGE)
@@ -7322,9 +7525,9 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
nNewPageNo = HIDDEN_VOL_HOST_PASSWORD_PAGE - 1;
if (bDevice)
{
- if(!QueryFreeSpace (hwndDlg, GetDlgItem (hwndDlg, IDC_SPACE_LEFT), FALSE))
+ if(!QueryFreeSpace (hwndDlg, GetDlgItem (hwndDlg, IDC_SPACE_LEFT), FALSE, NULL, NULL))
{
MessageBoxW (hwndDlg, GetString ("CANT_GET_VOLSIZE"), lpszTitle, ICON_HAND);
NormalCursor ();
return 1;
@@ -7437,15 +7640,8 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
return 1;
}
}
- /* Verify that the volume would not be too large for the operating system */
-
- if (!IsOSAtLeast (WIN_VISTA)
- && nUIVolumeSize * nMultiplier > 2 * BYTES_PER_TB)
- {
- Warning ("VOLUME_TOO_LARGE_FOR_WINXP", hwndDlg);
- }
}
if (bHiddenVol && !bHiddenVolHost) // If it's a hidden volume
{
@@ -7482,16 +7678,16 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
Error ("UNSUPPORTED_CHARS_IN_PWD", hwndDlg);
return 1;
}
// Check password length (check also done for outer volume which is not the case in TrueCrypt).
- else if (!CheckPasswordLength (hwndDlg, volumePassword.Length, 0, SysEncInEffect(), FALSE, FALSE))
+ else if (!CheckPasswordLength (hwndDlg, volumePassword.Length, 0, SysEncInEffect(), SysEncInEffect()? hash_algo : 0, FALSE, FALSE))
{
return 1;
}
}
// Store the password in case we need to restore it after keyfile is applied to it
- if (!GetPassword (hCurPage, IDC_PASSWORD, szRawPassword, sizeof (szRawPassword), TRUE))
+ if (!GetPassword (hCurPage, IDC_PASSWORD, szRawPassword, iMaxPasswordLength + 1, FALSE, TRUE))
return 1;
if (!SysEncInEffect ())
{
@@ -7529,8 +7725,20 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
// PIM not activated. Skip PIM page
nNewPageNo = PIM_PAGE;
volumePim = 0;
+ if (!CreatingHiddenSysVol() && bHiddenVol && !bHiddenVolHost)
+ {
+ if ( (volumePim == outerVolumePim)
+ && (volumePassword.Length == outerVolumePassword.Length)
+ && (0 == memcmp (volumePassword.Text, outerVolumePassword.Text, volumePassword.Length))
+ )
+ {
+ Warning ("HIDDEN_CREDS_SAME_AS_OUTER", hwndDlg);
+ return 1;
+ }
+ }
+
if (SysEncInEffect ())
{
nNewPageNo = SYSENC_COLLECTING_RANDOM_DATA_PAGE - 1; // Skip irrelevant pages
}
@@ -7550,17 +7758,29 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
else if (nCurPageNo == PIM_PAGE)
{
- volumePim = GetPim (hCurPage, IDC_PIM);
+ volumePim = GetPim (hCurPage, IDC_PIM, 0);
if (!SysEncInEffect() && (volumePim > MAX_PIM_VALUE))
{
SetFocus (GetDlgItem(hCurPage, IDC_PIM));
Error ("PIM_TOO_BIG", hwndDlg);
return 1;
}
+ if (!CreatingHiddenSysVol() && bHiddenVol && !bHiddenVolHost)
+ {
+ if ( (volumePim == outerVolumePim)
+ && (volumePassword.Length == outerVolumePassword.Length)
+ && (0 == memcmp (volumePassword.Text, outerVolumePassword.Text, volumePassword.Length))
+ )
+ {
+ Warning ("HIDDEN_CREDS_SAME_AS_OUTER", hwndDlg);
+ return 1;
+ }
+ }
+
if (volumePassword.Length > 0)
{
// Password character encoding
if (SysEncInEffect() && (volumePim > MAX_BOOT_PIM_VALUE))
@@ -7569,9 +7789,9 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
Error ("PIM_SYSENC_TOO_BIG", hwndDlg);
return 1;
}
// Check password length (check also done for outer volume which is not the case in TrueCrypt).
- else if (!CheckPasswordLength (hwndDlg, volumePassword.Length, volumePim, SysEncInEffect(), TRUE, FALSE))
+ else if (!CheckPasswordLength (hwndDlg, volumePassword.Length, volumePim, SysEncInEffect(), SysEncInEffect()? hash_algo : 0, TRUE, FALSE))
{
return 1;
}
}
@@ -7598,21 +7818,21 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|| nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
{
WaitCursor ();
- if (!GetPassword (hCurPage, IDC_PASSWORD_DIRECT, (char*) volumePassword.Text, MAX_PASSWORD + 1, TRUE))
+ if (!GetPassword (hCurPage, IDC_PASSWORD_DIRECT, (char*) volumePassword.Text, iMaxPasswordLength + 1, FALSE, TRUE))
{
NormalCursor ();
return 1;
}
volumePassword.Length = (unsigned __int32) strlen ((char *) volumePassword.Text);
hash_algo = (int) SendMessage (GetDlgItem (hCurPage, IDC_PKCS5_PRF_ID), CB_GETITEMDATA, SendMessage (GetDlgItem (hCurPage, IDC_PKCS5_PRF_ID), CB_GETCURSEL, 0, 0), 0);
- volumePim = GetPim (hCurPage, IDC_PIM);
+ volumePim = GetPim (hCurPage, IDC_PIM, 0);
// Store the password in case we need to restore it after keyfile is applied to it
- if (!GetPassword (hCurPage, IDC_PASSWORD_DIRECT, szRawPassword, sizeof (szRawPassword), TRUE))
+ if (!GetPassword (hCurPage, IDC_PASSWORD_DIRECT, szRawPassword, iMaxPasswordLength + 1, FALSE, TRUE))
{
NormalCursor ();
return 1;
}
@@ -7664,10 +7884,8 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
case 0:
/* Hidden volume host successfully mounted as read-only */
- WaitCursor ();
-
// Verify that the outer volume contains a suitable file system, retrieve cluster size, and
// scan the volume bitmap
if (!IsAdmin () && IsUacSupported ())
retCode = UacAnalyzeHiddenVolumeHost (hwndDlg, &hiddenVolHostDriveNo, GetVolumeDataAreaSize (FALSE, nHiddenVolHostSize), &realClusterSize, &nbrFreeClusters);
@@ -7728,10 +7946,14 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bHiddenVolHost = FALSE;
bHiddenVolFinished = FALSE;
+ // save the outer volume password to use it for comparison with hidden volume one
+ memcpy (&outerVolumePassword, &volumePassword, sizeof (volumePassword));
+ outerVolumePim = volumePim;
+
// Clear the outer volume password
- WipePasswordsAndKeyfiles ();
+ WipePasswordsAndKeyfiles (false);
RestoreDefaultKeyFilesParam ();
EnableWindow (GetDlgItem (MainDlg, IDC_NEXT), TRUE);
@@ -7818,9 +8040,9 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
mountOptions.Removable = ConfigReadInt ("MountVolumesRemovable", FALSE);
// Check that it is not a hidden or legacy volume
- if (MountVolume (hwndDlg, driveNo, szFileName, &volumePassword, hash_algo, volumePim, FALSE, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1)
+ if (MountVolume (hwndDlg, driveNo, szFileName, &volumePassword, hash_algo, volumePim, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1)
{
NormalCursor();
return 1;
}
@@ -7860,9 +8082,9 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
mountOptions.UseBackupHeader = TRUE; // This must be TRUE at this point (we won't be using the regular header, which will be lost soon after the decryption process starts)
- if (MountVolume (hwndDlg, driveNo, szFileName, &volumePassword, hash_algo, volumePim, FALSE, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1)
+ if (MountVolume (hwndDlg, driveNo, szFileName, &volumePassword, hash_algo, volumePim, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1)
{
NormalCursor();
return 1;
}
@@ -8156,9 +8378,9 @@ retryCDDriveCheck:
EndMainDlg (MainDlg);
try
{
- BootEncObj->RestartComputer (bSystemIsGPT);
+ BootEncObj->RestartComputer ();
}
catch (Exception &e)
{
e.Show (hwndDlg);
@@ -8275,30 +8497,58 @@ retryCDDriveCheck:
}
else if (nCurPageNo == FORMAT_PAGE)
{
/* Format start (the 'Next' button has been clicked on the Format page) */
+ static BOOL g_bFastStartupCheckDone = FALSE;
if (bVolTransformThreadRunning || bVolTransformThreadToRun)
return 1;
bVolTransformThreadCancel = FALSE;
bVolTransformThreadToRun = TRUE;
+ // check if Fast Startup is enabled and if yes then offer to disable it
+ if (!g_bFastStartupCheckDone)
+ {
+ BOOL bHibernateEnabled = FALSE, bHiberbootEnabled = FALSE;
+ if (GetHibernateStatus (bHibernateEnabled, bHiberbootEnabled) && bHiberbootEnabled)
+ {
+ if (AskWarnYesNo ("CONFIRM_DISABLE_FAST_STARTUP", hwndDlg) == IDYES)
+ {
+ if (!IsAdmin () && IsUacSupported ())
+ UacWriteLocalMachineRegistryDword (hwndDlg, L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power", L"HiberbootEnabled", 0);
+ else
+ WriteLocalMachineRegistryDword (L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power", L"HiberbootEnabled", 0);
+ }
+ }
+ g_bFastStartupCheckDone = true;
+ }
+
fileSystem = (int) SendMessage (GetDlgItem (hCurPage, IDC_FILESYS), CB_GETITEMDATA,
SendMessage (GetDlgItem (hCurPage, IDC_FILESYS), CB_GETCURSEL, 0, 0) , 0);
clusterSize = (int) SendMessage (GetDlgItem (hCurPage, IDC_CLUSTERSIZE), CB_GETITEMDATA,
SendMessage (GetDlgItem (hCurPage, IDC_CLUSTERSIZE), CB_GETCURSEL, 0, 0) , 0);
- quickFormat = IsButtonChecked (GetDlgItem (hCurPage, IDC_QUICKFORMAT));
+ formatType = (int) SendMessage (GetDlgItem (hCurPage, IDC_FORMAT_TYPE), CB_GETITEMDATA,
+ SendMessage (GetDlgItem (hCurPage, IDC_FORMAT_TYPE), CB_GETCURSEL, 0, 0) , 0);
+ quickFormat = (formatType == FORMAT_TYPE_QUICK) || (formatType == FORMAT_TYPE_FAST);
+ fastCreateFile = (formatType == FORMAT_TYPE_FAST);
+ dynamicFormat = IsButtonChecked (GetDlgItem (hCurPage, SPARSE_FILE));
+ if (!dynamicFormat && !bDevice && !(bHiddenVol && !bHiddenVolHost) && (nVolumeSize > (ULONGLONG) nAvailableFreeSpace))
+ {
+ Error("VOLUME_TOO_LARGE_FOR_HOST", hwndDlg);
+ bVolTransformThreadToRun = FALSE;
+ return 1;
+ }
if (!bHiddenVol && IsHiddenOSRunning())
{
// Creating a non-hidden volume under a hidden OS
- if (fileSystem == FILESYS_NTFS || fileSystem == FILESYS_EXFAT)
+ if (fileSystem == FILESYS_NTFS || fileSystem == FILESYS_EXFAT || fileSystem == FILESYS_REFS)
{
WarningDirect ((wstring (GetString ("CANNOT_CREATE_NON_HIDDEN_NTFS_VOLUMES_UNDER_HIDDEN_OS"))
+ L"\n\n"
+ GetString ("NOTE_BEGINNING")
@@ -8352,15 +8602,9 @@ retryCDDriveCheck:
}
if (fileSystem == FILESYS_NTFS || fileSystem == FILESYS_EXFAT) // The file system may have been changed in the previous block
{
- if (nCurrentOS == WIN_2000)
- {
- Error("HIDDEN_VOL_HOST_UNSUPPORTED_FILESYS_WIN2000", hwndDlg);
- bVolTransformThreadToRun = FALSE;
- return 1;
- }
- else if ((fileSystem == FILESYS_NTFS) && (GetVolumeDataAreaSize (FALSE, nVolumeSize) <= TC_MAX_FAT_SECTOR_COUNT * GetFormatSectorSize())
+ if ((fileSystem == FILESYS_NTFS) && (GetVolumeDataAreaSize (FALSE, nVolumeSize) <= TC_MAX_FAT_SECTOR_COUNT * GetFormatSectorSize())
&& AskYesNo("HIDDEN_VOL_HOST_NTFS_ASK", hwndDlg) == IDNO)
{
bVolTransformThreadToRun = FALSE;
return 1;
@@ -8369,11 +8613,11 @@ retryCDDriveCheck:
}
}
else if (bHiddenVol)
{
- // Hidden volume is always quick-formatted (if, however, the meaning of quickFormat is
- // whether to create a sparse file, it must be set to FALSE).
- quickFormat = !bSparseFileSwitch;
+ // Hidden volume is always quick-formatted.
+ quickFormat = TRUE;
+ dynamicFormat = FALSE;
}
if (fileSystem == FILESYS_FAT
@@ -8387,9 +8631,10 @@ retryCDDriveCheck:
EnableWindow (GetDlgItem (hwndDlg, IDC_PREV), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDC_NEXT), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDHELP), FALSE);
EnableWindow (GetDlgItem (hwndDlg, IDCANCEL), FALSE);
- EnableWindow (GetDlgItem (hCurPage, IDC_QUICKFORMAT), FALSE);
+ EnableWindow (GetDlgItem (hCurPage, IDC_FORMAT_TYPE), FALSE);
+ EnableWindow (GetDlgItem (hCurPage, SPARSE_FILE), FALSE);
EnableWindow (GetDlgItem (hCurPage, IDC_CLUSTERSIZE), FALSE);
EnableWindow (GetDlgItem (hCurPage, IDC_FILESYS), FALSE);
EnableWindow (GetDlgItem (hCurPage, IDC_ABORT_BUTTON), TRUE);
SetFocus (GetDlgItem (hCurPage, IDC_ABORT_BUTTON));
@@ -8451,9 +8696,9 @@ retryCDDriveCheck:
LoadPage (hwndDlg, INTRO_PAGE);
SetWindowTextW (GetDlgItem (MainDlg, IDCANCEL), GetString ("CANCEL"));
bHiddenVolFinished = FALSE;
- WipePasswordsAndKeyfiles ();
+ WipePasswordsAndKeyfiles (true);
return 1;
}
else
@@ -8553,10 +8798,14 @@ retryCDDriveCheck:
hiddenVolHostDriveNo = -1;
nNewPageNo = HIDDEN_VOL_HOST_PRE_CIPHER_PAGE;
+ // save the outer volume password to use it for comparison with hidden volume one
+ memcpy (&outerVolumePassword, &volumePassword, sizeof (volumePassword));
+ outerVolumePim = volumePim;
+
// Clear the outer volume password
- WipePasswordsAndKeyfiles ();
+ WipePasswordsAndKeyfiles (false);
EnableWindow (GetDlgItem (MainDlg, IDC_NEXT), TRUE);
NormalCursor ();
@@ -8670,9 +8919,9 @@ ovf_end:
RandSetHashFunction (hash_algo);
if (WizardMode == WIZARD_MODE_SYS_DEVICE)
{
- if (nMultiBoot > 1)
+ if ((nMultiBoot > 1) && !bSystemIsGPT)
nNewPageNo = SYSENC_MULTI_BOOT_OUTCOME_PAGE + 1; // Skip irrelevant pages
else
nNewPageNo = SYSENC_MULTI_BOOT_MODE_PAGE + 1; // Skip irrelevant pages
}
@@ -8699,9 +8948,9 @@ ovf_end:
else if (nCurPageNo == PASSWORD_PAGE)
{
// Store the password in case we need to restore it after keyfile is applied to it
- GetPassword (hCurPage, IDC_PASSWORD, szRawPassword, sizeof (szRawPassword), FALSE);
+ GetPassword (hCurPage, IDC_PASSWORD, szRawPassword, iMaxPasswordLength + 1, FALSE, FALSE);
VerifyPasswordAndUpdate (hwndDlg, GetDlgItem (MainDlg, IDC_NEXT),
GetDlgItem (hCurPage, IDC_PASSWORD),
GetDlgItem (hCurPage, IDC_VERIFY),
@@ -8734,18 +8983,18 @@ ovf_end:
}
else if (nCurPageNo == PIM_PAGE)
{
- volumePim = GetPim (hCurPage, IDC_PIM);
+ volumePim = GetPim (hCurPage, IDC_PIM, 0);
}
else if (nCurPageNo == HIDDEN_VOL_HOST_PASSWORD_PAGE
|| nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
{
// Store the password in case we need to restore it after keyfile is applied to it
- GetPassword (hCurPage, IDC_PASSWORD_DIRECT, szRawPassword, MAX_PASSWORD + 1, FALSE);
+ GetPassword (hCurPage, IDC_PASSWORD_DIRECT, szRawPassword, iMaxPasswordLength + 1, FALSE, FALSE);
- memcpy (volumePassword.Text, szRawPassword, MAX_PASSWORD + 1);
+ memcpy (volumePassword.Text, szRawPassword, iMaxPasswordLength + 1);
volumePassword.Length = (unsigned __int32) strlen ((char *) volumePassword.Text);
if (!bInPlaceEncNonSys)
nNewPageNo = VOLUME_LOCATION_PAGE + 1;
@@ -8825,8 +9074,24 @@ ovf_end:
case WM_CLOSE:
PostMessage (hwndDlg, TC_APPMSG_FORMAT_USER_QUIT, 0, 0);
return 1;
+
+ case WM_NCDESTROY:
+ {
+ hPasswordInputField = NULL;
+ hVerifyPasswordInputField = NULL;
+
+ /* unregister drap-n-drop support */
+ PasswordEditDropTarget* pTarget = (PasswordEditDropTarget*) GetWindowLongPtr (hwndDlg, DWLP_USER);
+ if (pTarget)
+ {
+ SetWindowLongPtr (hwndDlg, DWLP_USER, (LONG_PTR) 0);
+ pTarget->Revoke ();
+ pTarget->Release();
+ }
+ }
+ return 0;
}
return 0;
}
@@ -8877,8 +9142,14 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
OptionCreate,
OptionSilent,
OptionDynamic,
OptionForce,
+ OptionNoSizeCheck,
+ OptionQuickFormat,
+ OptionFastCreateFile,
+ OptionEnableMemoryProtection,
+ OptionKeyfile,
+ OptionSecureDesktop,
};
argument args[]=
{
@@ -8897,8 +9168,14 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
{ OptionCreate, L"/create", NULL, FALSE },
{ OptionSilent, L"/silent", NULL, FALSE },
{ OptionDynamic, L"/dynamic", NULL, FALSE },
{ OptionForce, L"/force", NULL, FALSE },
+ { OptionNoSizeCheck, L"/nosizecheck", NULL, FALSE },
+ { OptionQuickFormat, L"/quick", NULL, FALSE },
+ { OptionFastCreateFile, L"/fastcreatefile", NULL, FALSE },
+ { OptionEnableMemoryProtection, L"/protectMemory", NULL, FALSE },
+ { OptionKeyfile, L"/keyfile", L"/k", FALSE },
+ { OptionSecureDesktop, L"/secureDesktop", NULL, FALSE },
// Internal
{ CommandResumeSysEncLogOn, L"/acsysenc", L"/a", TRUE },
{ CommandResumeSysEnc, L"/csysenc", L"/c", TRUE },
@@ -8965,10 +9242,12 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
else if (_wcsicmp(szTmp, L"FAT32") == 0 || _wcsicmp(szTmp, L"FAT") == 0)
CmdVolumeFilesystem = FILESYS_FAT;
else if (_wcsicmp(szTmp, L"NTFS") == 0)
CmdVolumeFilesystem = FILESYS_NTFS;
- else if (IsOSVersionAtLeast (WIN_VISTA, 1) && _wcsicmp(szTmp, L"EXFAT") == 0)
+ else if (_wcsicmp(szTmp, L"EXFAT") == 0)
CmdVolumeFilesystem = FILESYS_EXFAT;
+ else if (IsOSVersionAtLeast (WIN_10, 0) && _wcsicmp(szTmp, L"ReFS") == 0)
+ CmdVolumeFilesystem = FILESYS_REFS;
else
{
AbortProcess ("COMMAND_LINE_ERROR");
}
@@ -8982,9 +9261,9 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
wchar_t szTmp[MAX_PASSWORD + 1];
if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs, &i, nNoCommandLineArgs,
szTmp, ARRAYSIZE (szTmp)))
{
- int iLen = WideCharToMultiByte (CP_UTF8, 0, szTmp, -1, (LPSTR) CmdVolumePassword.Text, MAX_PASSWORD + 1, NULL, NULL);
+ int iLen = WideCharToMultiByte (CP_UTF8, 0, szTmp, -1, (LPSTR) CmdVolumePassword.Text, iMaxPasswordLength + 1, NULL, NULL);
burn (szTmp, sizeof (szTmp));
if (iLen > 0)
CmdVolumePassword.Length = (unsigned __int32) (iLen - 1);
else
@@ -9004,10 +9283,10 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
if (_wcsicmp(szTmp, L"sha512") == 0)
CmdVolumePkcs5 = SHA512;
else if (_wcsicmp(szTmp, L"sha256") == 0)
CmdVolumePkcs5 = SHA256;
- else if (_wcsicmp(szTmp, L"ripemd160") == 0)
- CmdVolumePkcs5 = RIPEMD160;
+ else if ((_wcsicmp(szTmp, L"blake2s") == 0) || (_wcsicmp(szTmp, L"blake2s-256") == 0))
+ CmdVolumePkcs5 = BLAKE2S;
else
{
/* match using internal hash names */
CmdVolumePkcs5 = HashGetIdByName (szTmp);
@@ -9243,8 +9522,24 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
case OptionNoIsoCheck:
bDontVerifyRescueDisk = TRUE;
break;
+ case OptionNoSizeCheck:
+ bDontCheckFileContainerSize = TRUE;
+ break;
+
+ case OptionQuickFormat:
+ CmdQuickFormat = TRUE;
+ break;
+
+ case OptionFastCreateFile:
+ CmdFastCreateFile = TRUE;
+ break;
+
+ case OptionEnableMemoryProtection:
+ EnableMemoryProtection = TRUE;
+ break;
+
case OptionHistory:
{
wchar_t szTmp[8] = {0};
bHistory = bHistoryCmdLine = TRUE;
@@ -9276,9 +9571,9 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
break;
case OptionTokenPin:
{
- wchar_t szTmp[SecurityToken::MaxPasswordLength + 1] = {0};
+ wchar_t szTmp[SecurityToken::MaxPasswordLength + 1] = {0}; // TODO Use Token
if (GetArgumentValue (lpszCommandLineArgs, &i, nNoCommandLineArgs, szTmp, ARRAYSIZE (szTmp)) == HAS_ARGUMENT)
{
if (0 == WideCharToMultiByte (CP_UTF8, 0, szTmp, -1, CmdTokenPin, TC_MAX_PATH, nullptr, nullptr))
AbortProcess ("COMMAND_LINE_ERROR");
@@ -9297,8 +9592,48 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine)
AbortProcess ("COMMAND_LINE_ERROR");
}
break;
+ case OptionKeyfile:
+ {
+ wchar_t tmpPath [2 * TC_MAX_PATH] = {0};
+ if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs, &i,
+ nNoCommandLineArgs, tmpPath, ARRAYSIZE (tmpPath)))
+ {
+ KeyFile *kf;
+ RelativePath2Absolute (tmpPath);
+ kf = (KeyFile *) malloc (sizeof (KeyFile));
+ if (kf)
+ {
+ StringCchCopyW (kf->FileName, ARRAYSIZE(kf->FileName), tmpPath);
+ FirstCmdKeyFile = KeyFileAdd (FirstCmdKeyFile, kf);
+ }
+ }
+ else
+ AbortProcess ("COMMAND_LINE_ERROR");
+ }
+
+ break;
+
+ case OptionSecureDesktop:
+ {
+ wchar_t szTmp[16] = {0};
+ bCmdUseSecureDesktop = TRUE;
+ bCmdUseSecureDesktopValid = TRUE;
+
+ if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs, &i, nNoCommandLineArgs,
+ szTmp, ARRAYSIZE (szTmp)))
+ {
+ if (!_wcsicmp(szTmp,L"n") || !_wcsicmp(szTmp,L"no"))
+ bCmdUseSecureDesktop = FALSE;
+ else if (!_wcsicmp(szTmp,L"y") || !_wcsicmp(szTmp,L"yes"))
+ bCmdUseSecureDesktop = TRUE;
+ else
+ AbortProcess ("COMMAND_LINE_ERROR");
+ }
+ }
+ break;
+
default:
DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_COMMANDHELP_DLG), hwndDlg, (DLGPROC)
CommandHelpDlgProc, (LPARAM) &as);
@@ -9367,18 +9702,18 @@ int DetermineMaxHiddenVolSize (HWND hwndDlg)
// Tests whether the file system of the given volume is suitable to host a hidden volume,
// retrieves the cluster size, and scans the volume cluster bitmap. In addition, checks
// the TrueCrypt volume format version and the type of volume.
-int AnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *realClusterSize, __int64 *pnbrFreeClusters)
+int AnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSize, int *pRealClusterSize, __int64 *pnbrFreeClusters)
{
HANDLE hDevice;
DWORD bytesReturned;
DWORD dwSectorsPerCluster, dwBytesPerSector, dwNumberOfFreeClusters, dwTotalNumberOfClusters;
DWORD dwResult;
int result;
wchar_t szFileSystemNameBuffer[256];
- wchar_t tmpPath[7] = {L'\\',L'\\',L'.',L'\\',(wchar_t) *driveNo + L'A',L':',0};
- wchar_t szRootPathName[4] = {(wchar_t) *driveNo + L'A', L':', L'\\', 0};
+ wchar_t tmpPath[7] = {L'\\',L'\\',L'.',L'\\',(wchar_t) (*driveNo + L'A'),L':',0};
+ wchar_t szRootPathName[4] = {(wchar_t) (*driveNo + L'A'), L':', L'\\', 0};
BYTE readBuffer[TC_MAX_VOLUME_SECTOR_SIZE * 2];
LARGE_INTEGER offset, offsetNew;
VOLUME_PROPERTIES_STRUCT volProp;
@@ -9451,31 +9786,32 @@ int AnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSi
{
// FAT12/FAT16/FAT32
// Retrieve the cluster size
- *realClusterSize = ((int) readBuffer[0xb] + ((int) readBuffer[0xc] << 8)) * (int) readBuffer[0xd];
+ *pRealClusterSize = ((int) readBuffer[0xb] + ((int) readBuffer[0xc] << 8)) * (int) readBuffer[0xd];
// Get the map of the clusters that are free and in use on the outer volume.
// The map will be scanned to determine the size of the uninterrupted block of free
// space (provided there is any) whose end is aligned with the end of the volume.
// The value will then be used to determine the maximum possible size of the hidden volume.
-
- return ScanVolClusterBitmap (hwndDlg,
- driveNo,
- hiddenVolHostSize / *realClusterSize,
- pnbrFreeClusters);
+ if (*pRealClusterSize > 0)
+ {
+ return ScanVolClusterBitmap (hwndDlg,
+ driveNo,
+ hiddenVolHostSize / *pRealClusterSize,
+ pnbrFreeClusters);
+ }
+ else
+ {
+ // should never happen
+ return -1;
+ }
}
else if (!wcsncmp (szFileSystemNameBuffer, L"NTFS", 4) || !_wcsnicmp (szFileSystemNameBuffer, L"exFAT", 5))
{
// NTFS
bool bIsNtfs = (0 == wcsncmp (szFileSystemNameBuffer, L"NTFS", 4));
- if (nCurrentOS == WIN_2000)
- {
- Error("HIDDEN_VOL_HOST_UNSUPPORTED_FILESYS_WIN2000", hwndDlg);
- return 0;
- }
-
if (bIsNtfs && bHiddenVolDirect && GetVolumeDataAreaSize (FALSE, hiddenVolHostSize) <= TC_MAX_FAT_SECTOR_COUNT * GetFormatSectorSize())
Info ("HIDDEN_VOL_HOST_NTFS", hwndDlg);
if (!GetDiskFreeSpace(szRootPathName,
@@ -9488,25 +9824,25 @@ int AnalyzeHiddenVolumeHost (HWND hwndDlg, int *driveNo, __int64 hiddenVolHostSi
Error ("CANT_GET_OUTER_VOL_INFO", hwndDlg);
return -1;
};
- *realClusterSize = dwBytesPerSector * dwSectorsPerCluster;
+ *pRealClusterSize = dwBytesPerSector * dwSectorsPerCluster;
// Get the map of the clusters that are free and in use on the outer volume.
// The map will be scanned to determine the size of the uninterrupted block of free
// space (provided there is any) whose end is aligned with the end of the volume.
// The value will then be used to determine the maximum possible size of the hidden volume.
return ScanVolClusterBitmap (hwndDlg,
driveNo,
- hiddenVolHostSize / *realClusterSize,
+ hiddenVolHostSize / *pRealClusterSize,
pnbrFreeClusters);
}
else
{
// Unsupported file system
- Error ((nCurrentOS == WIN_2000) ? "HIDDEN_VOL_HOST_UNSUPPORTED_FILESYS_WIN2000" : "HIDDEN_VOL_HOST_UNSUPPORTED_FILESYS", hwndDlg);
+ Error ("HIDDEN_VOL_HOST_UNSUPPORTED_FILESYS", hwndDlg);
return 0;
}
efs_error:
@@ -9539,9 +9875,9 @@ int MountHiddenVolHost (HWND hwndDlg, wchar_t *volumePath, int *driveNo, Passwor
mountOptions.PreserveTimestamp = bPreserveTimestamp;
mountOptions.PartitionInInactiveSysEncScope = FALSE;
mountOptions.UseBackupHeader = FALSE;
- if (MountVolume (hwndDlg, *driveNo, volumePath, password, pkcs5_prf, pim, FALSE, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1)
+ if (MountVolume (hwndDlg, *driveNo, volumePath, password, pkcs5_prf, pim, FALSE, FALSE, TRUE, &mountOptions, FALSE, TRUE) < 1)
{
*driveNo = -3;
return ERR_VOL_MOUNT_FAILED;
}
@@ -9553,17 +9889,17 @@ int MountHiddenVolHost (HWND hwndDlg, wchar_t *volumePath, int *driveNo, Passwor
a hidden volume. The map is scanned to determine the size of the uninterrupted
area of free space (provided there is any) whose end is aligned with the end
of the volume. The value will then be used to determine the maximum possible size
of the hidden volume. */
-int ScanVolClusterBitmap (HWND hwndDlg, int *driveNo, __int64 nbrClusters, __int64 *nbrFreeClusters)
+int ScanVolClusterBitmap (HWND hwndDlg, int *driveNo, __int64 nbrClusters, __int64 *pnbrFreeClusters)
{
PVOLUME_BITMAP_BUFFER lpOutBuffer;
STARTING_LCN_INPUT_BUFFER lpInBuffer;
HANDLE hDevice;
DWORD lBytesReturned;
BYTE rmnd;
- wchar_t tmpPath[7] = {L'\\',L'\\',L'.',L'\\', (wchar_t) *driveNo + L'A', L':', 0};
+ wchar_t tmpPath[7] = {L'\\',L'\\',L'.',L'\\', (wchar_t) (*driveNo + L'A'), L':', 0};
DWORD bufLen;
__int64 bitmapCnt;
@@ -9607,13 +9943,13 @@ int ScanVolClusterBitmap (HWND hwndDlg, int *driveNo, __int64 nbrClusters, __int
if ((rmnd != 0)
&& ((lpOutBuffer->Buffer[lpOutBuffer->BitmapSize.QuadPart / 8] & ((1 << rmnd)-1) ) != 0))
{
- *nbrFreeClusters = 0;
+ *pnbrFreeClusters = 0;
}
else
{
- *nbrFreeClusters = lpOutBuffer->BitmapSize.QuadPart;
+ *pnbrFreeClusters = lpOutBuffer->BitmapSize.QuadPart;
bitmapCnt = lpOutBuffer->BitmapSize.QuadPart / 8;
// Scan the bitmap from the end
while (--bitmapCnt >= 0)
@@ -9621,9 +9957,9 @@ int ScanVolClusterBitmap (HWND hwndDlg, int *driveNo, __int64 nbrClusters, __int
if (lpOutBuffer->Buffer[bitmapCnt] != 0)
{
// There might be up to 7 extra free clusters in this byte of the bitmap.
// These are ignored because there is always a cluster reserve added anyway.
- *nbrFreeClusters = lpOutBuffer->BitmapSize.QuadPart - ((bitmapCnt + 1) * 8);
+ *pnbrFreeClusters = lpOutBuffer->BitmapSize.QuadPart - ((bitmapCnt + 1) * 8);
break;
}
}
}
@@ -10113,9 +10449,9 @@ static void AfterWMInitTasks (HWND hwndDlg)
EndMainDlg (MainDlg);
try
{
- BootEncObj->RestartComputer (bSystemIsGPT);
+ BootEncObj->RestartComputer ();
}
catch (Exception &e)
{
e.Show (hwndDlg);
@@ -10231,11 +10567,13 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
int status;
atexit (localcleanup);
VirtualLock (&volumePassword, sizeof(volumePassword));
+ VirtualLock (&outerVolumePassword, sizeof(outerVolumePassword));
VirtualLock (szVerify, sizeof(szVerify));
VirtualLock (szRawPassword, sizeof(szRawPassword));
VirtualLock (&volumePim, sizeof(volumePim));
+ VirtualLock (&outerVolumePim, sizeof(outerVolumePim));
VirtualLock (&CmdVolumePassword, sizeof (CmdVolumePassword));
VirtualLock (MasterKeyGUIView, sizeof(MasterKeyGUIView));
VirtualLock (HeaderKeyGUIView, sizeof(HeaderKeyGUIView));
@@ -10265,12 +10603,8 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
AbortProcess ("INIT_SYS_ENC");
InitApp (hInstance, lpszCommandLine);
- // Write block size greater than 64 KB causes a performance drop when writing to files on XP/Vista
- if (!IsOSAtLeast (WIN_7))
- FormatWriteBufferSize = 64 * 1024;
-
#if TC_MAX_VOLUME_SECTOR_SIZE > 64 * 1024
#error TC_MAX_VOLUME_SECTOR_SIZE > 64 * 1024
#endif
@@ -10309,9 +10643,8 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
/* Create the main dialog box */
DialogBoxParamW (hInstance, MAKEINTRESOURCEW (IDD_VOL_CREATION_WIZARD_DLG), NULL, (DLGPROC) MainDialogProc,
(LPARAM)lpszCommandLine);
- FinalizeApp ();
return 0;
}
@@ -10319,14 +10652,14 @@ static DWORD GetFormatSectorSize ()
{
if (!bDevice)
return TC_SECTOR_SIZE_FILE_HOSTED_VOLUME;
- DISK_GEOMETRY geometry;
+ DISK_GEOMETRY_EX geometry;
if (!GetDriveGeometry (szDiskFile, &geometry))
{
handleWin32Error (MainDlg, SRC_POS);
AbortProcessSilent();
}
- return geometry.BytesPerSector;
+ return geometry.Geometry.BytesPerSector;
}
diff --git a/src/Format/Tcformat.h b/src/Format/Tcformat.h
index 14b0ff1c..f9328afd 100644
--- a/src/Format/Tcformat.h
+++ b/src/Format/Tcformat.h
@@ -5,9 +5,9 @@
governed by the TrueCrypt License 3.0, also from the source code of
Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
and which is governed by the 'License Agreement for Encryption for the Masses'
Modifications and additions to the original source code (contained in this file)
- and all other portions of this file are Copyright (c) 2013-2016 IDRIX
+ and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */
@@ -31,9 +31,9 @@ enum timer_ids
};
static void localcleanup ( void );
static void LoadSettings ( HWND hwndDlg );
-static void SaveSettings ( HWND hwndDlg );
+void SaveSettings ( HWND hwndDlg );
static void EndMainDlg ( HWND hwndDlg );
void ComboSelChangeEA ( HWND hwndDlg );
static void VerifySizeAndUpdate ( HWND hwndDlg , BOOL bUpdate );
static void __cdecl sysEncDriveAnalysisThread (void *hwndDlgArg);
@@ -41,9 +41,9 @@ static void __cdecl volTransformThreadFunction ( void *hwndDlg );
static void LoadPage ( HWND hwndDlg , int nPageNo );
__int64 PrintFreeSpace ( HWND hwndTextBox , wchar_t *lpszDrive , PLARGE_INTEGER lDiskFree );
void DisplaySizingErrorText ( HWND hwndTextBox );
void EnableDisableFileNext ( HWND hComboBox , HWND hMainButton );
-BOOL QueryFreeSpace ( HWND hwndDlg , HWND hwndTextBox , BOOL display );
+BOOL QueryFreeSpace (HWND hwndDlg, HWND hwndTextBox, BOOL display, LONGLONG *pFreeSpaceValue, BOOL* pbIsSparseFilesSupported);
static BOOL FinalPreTransformPrompts (void);
void UpdateLastDialogId (void);
void HandleOldAssignedDriveLetter (void);
void AddCipher ( HWND hComboBox , char *lpszCipher , int nCipher );
diff --git a/src/Format/VeraCrypt_Wizard.bmp b/src/Format/VeraCrypt_Wizard.bmp
index 27b4b0bd..24f3028e 100644
--- a/src/Format/VeraCrypt_Wizard.bmp
+++ b/src/Format/VeraCrypt_Wizard.bmp
Binary files differ