VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Boot/EFI/DcsBoot.efibin24088 -> 24088 bytes
-rw-r--r--src/Boot/EFI/DcsBoot32.efibin20472 -> 20472 bytes
-rw-r--r--src/Boot/EFI/DcsCfg.efibin953528 -> 952824 bytes
-rw-r--r--src/Boot/EFI/DcsCfg32.efibin816152 -> 816440 bytes
-rw-r--r--src/Boot/EFI/DcsInfo.efibin37144 -> 37168 bytes
-rw-r--r--src/Boot/EFI/DcsInfo32.efibin33880 -> 33880 bytes
-rw-r--r--src/Boot/EFI/DcsInt.efibin912184 -> 911352 bytes
-rw-r--r--src/Boot/EFI/DcsInt32.efibin795160 -> 795664 bytes
-rw-r--r--src/Boot/EFI/DcsRe.efibin28472 -> 28472 bytes
-rw-r--r--src/Boot/EFI/DcsRe32.efibin24056 -> 24056 bytes
-rw-r--r--src/Boot/EFI/LegacySpeaker.efibin9816 -> 9816 bytes
-rw-r--r--src/Boot/EFI/LegacySpeaker32.efibin9560 -> 9560 bytes
-rw-r--r--src/Boot/EFI/Readme.txt5
-rw-r--r--src/Boot/Windows/BootCommon.h4
-rw-r--r--src/Boot/Windows/BootConsoleIo.cpp2
-rw-r--r--src/Boot/Windows/Makefile2
-rw-r--r--src/Boot/Windows/Release/BootLoader.com.gzbin0 -> 17290 bytes
-rw-r--r--src/Boot/Windows/Release/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Release/Decompressor.combin0 -> 1974 bytes
-rw-r--r--src/Boot/Windows/Release_AES/BootLoader.com.gzbin0 -> 11562 bytes
-rw-r--r--src/Boot/Windows/Release_AES/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Release_AES_SHA2/BootLoader.com.gzbin0 -> 11738 bytes
-rw-r--r--src/Boot/Windows/Release_AES_SHA2/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Release_Camellia/BootLoader.com.gzbin0 -> 12488 bytes
-rw-r--r--src/Boot/Windows/Release_Camellia/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Release_Camellia_SHA2/BootLoader.com.gzbin0 -> 12632 bytes
-rw-r--r--src/Boot/Windows/Release_Camellia_SHA2/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Release_SHA2/BootLoader.com.gzbin0 -> 17483 bytes
-rw-r--r--src/Boot/Windows/Release_SHA2/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Release_Serpent/BootLoader.com.gzbin0 -> 11881 bytes
-rw-r--r--src/Boot/Windows/Release_Serpent/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Release_Serpent_SHA2/BootLoader.com.gzbin0 -> 12051 bytes
-rw-r--r--src/Boot/Windows/Release_Serpent_SHA2/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Release_Twofish/BootLoader.com.gzbin0 -> 11525 bytes
-rw-r--r--src/Boot/Windows/Release_Twofish/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Release_Twofish_SHA2/BootLoader.com.gzbin0 -> 11721 bytes
-rw-r--r--src/Boot/Windows/Release_Twofish_SHA2/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Rescue/BootLoader.com.gzbin0 -> 17853 bytes
-rw-r--r--src/Boot/Windows/Rescue/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Rescue_AES/BootLoader.com.gzbin0 -> 12093 bytes
-rw-r--r--src/Boot/Windows/Rescue_AES/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Rescue_AES_SHA2/BootLoader.com.gzbin0 -> 12278 bytes
-rw-r--r--src/Boot/Windows/Rescue_AES_SHA2/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Rescue_Camellia/BootLoader.com.gzbin0 -> 13039 bytes
-rw-r--r--src/Boot/Windows/Rescue_Camellia/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Rescue_Camellia_SHA2/BootLoader.com.gzbin0 -> 13183 bytes
-rw-r--r--src/Boot/Windows/Rescue_Camellia_SHA2/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Rescue_SHA2/BootLoader.com.gzbin0 -> 18031 bytes
-rw-r--r--src/Boot/Windows/Rescue_SHA2/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Rescue_Serpent/BootLoader.com.gzbin0 -> 12420 bytes
-rw-r--r--src/Boot/Windows/Rescue_Serpent/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Rescue_Serpent_SHA2/BootLoader.com.gzbin0 -> 12598 bytes
-rw-r--r--src/Boot/Windows/Rescue_Serpent_SHA2/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Rescue_Twofish/BootLoader.com.gzbin0 -> 12085 bytes
-rw-r--r--src/Boot/Windows/Rescue_Twofish/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Boot/Windows/Rescue_Twofish_SHA2/BootLoader.com.gzbin0 -> 12276 bytes
-rw-r--r--src/Boot/Windows/Rescue_Twofish_SHA2/BootSector.binbin0 -> 512 bytes
-rw-r--r--src/Build/CMakeLists.txt12
-rw-r--r--src/Build/Include/Makefile.inc4
-rw-r--r--src/Build/Resources/MacOSX/Info.plist.legacy.xml2
-rw-r--r--src/Build/Resources/MacOSX/Info.plist.xml2
-rwxr-xr-xsrc/Build/build_cmake_deb.sh15
-rw-r--r--src/Build/build_cmake_opensuse.sh2
-rw-r--r--src/Build/build_cmake_rpm_gtk2.sh2
-rw-r--r--src/Build/build_cmake_rpm_gtk3.sh2
-rwxr-xr-xsrc/Build/build_veracrypt_freebsd.sh2
-rwxr-xr-xsrc/Build/build_veracrypt_linux.sh2
-rw-r--r--src/Build/build_veracrypt_linux_gtk3.sh47
-rwxr-xr-xsrc/Build/build_veracrypt_linux_no_sse2.sh2
-rwxr-xr-xsrc/Build/build_veracrypt_macosx.sh2
-rw-r--r--src/Common/Apidrvr.h13
-rw-r--r--src/Common/BootEncryption.cpp6
-rw-r--r--src/Common/BootEncryption.h10
-rw-r--r--src/Common/Common.rc2
-rw-r--r--src/Common/Crypto.c35
-rw-r--r--src/Common/Crypto.h4
-rw-r--r--src/Common/Dlgcode.c398
-rw-r--r--src/Common/Dlgcode.h27
-rw-r--r--src/Common/EncryptionThreadPool.c79
-rw-r--r--src/Common/EncryptionThreadPool.h4
-rw-r--r--src/Common/Language.c2
-rw-r--r--src/Common/Language.xml17
-rw-r--r--src/Common/Password.c3
-rw-r--r--src/Common/Tcdefs.h18
-rw-r--r--src/Common/Tests.c4
-rw-r--r--src/Common/Volumes.c151
-rw-r--r--src/Common/Xml.c21
-rw-r--r--src/Core/Unix/CoreService.cpp3
-rw-r--r--src/Core/Unix/CoreUnix.cpp98
-rw-r--r--src/Core/Unix/OpenBSD/CoreOpenBSD.cpp166
-rw-r--r--src/Core/Unix/OpenBSD/CoreOpenBSD.h44
-rw-r--r--src/Core/Unix/OpenBSD/System.h19
-rw-r--r--src/Crypto/cpu.h1
-rw-r--r--src/Crypto/jitterentropy-base.c4
-rw-r--r--src/Driver/DriveFilter.c4
-rw-r--r--src/Driver/Driver.rc8
-rw-r--r--src/Driver/DumpFilter.c2
-rw-r--r--src/Driver/EncryptedIoQueue.c97
-rw-r--r--src/Driver/EncryptedIoQueue.h3
-rw-r--r--src/Driver/Fuse/FuseService.cpp13
-rw-r--r--src/Driver/Ntdriver.c146
-rw-r--r--src/Driver/Ntdriver.h3
-rw-r--r--src/Driver/veracrypt_vs2019.vcxproj138
-rw-r--r--src/ExpandVolume/ExpandVolume.c3
-rw-r--r--src/ExpandVolume/ExpandVolume.rc8
-rw-r--r--src/ExpandVolume/ExpandVolume.vcxproj144
-rw-r--r--src/Format/Format.rc8
-rw-r--r--src/Format/Format.vcxproj132
-rw-r--r--src/Format/Tcformat.c12
-rw-r--r--src/Main/CommandLineInterface.cpp69
-rw-r--r--src/Main/FatalErrorHandler.cpp6
-rw-r--r--src/Main/Forms/AboutDialog.cpp4
-rw-r--r--src/Main/Forms/Forms.cpp8
-rw-r--r--src/Main/Forms/Forms.h2
-rw-r--r--src/Main/Forms/MainFrame.cpp70
-rw-r--r--src/Main/Forms/MainFrame.h19
-rw-r--r--src/Main/Forms/TrueCrypt.fbp98
-rw-r--r--src/Main/Forms/VolumeSizeWizardPage.cpp58
-rw-r--r--src/Main/Forms/VolumeSizeWizardPage.h4
-rw-r--r--src/Main/Forms/international.h2
-rw-r--r--[-rwxr-xr-x]src/Main/GraphicUserInterface.cpp6
-rw-r--r--src/Main/LanguageStrings.cpp6
-rwxr-xr-xsrc/Main/Main.make14
-rw-r--r--src/Main/Resources.cpp27
-rw-r--r--src/Main/TextUserInterface.cpp102
-rw-r--r--src/Main/UserInterface.cpp3
-rw-r--r--src/Makefile57
-rw-r--r--src/Mount/Mount.c106
-rw-r--r--src/Mount/Mount.rc8
-rw-r--r--src/Mount/Mount.vcxproj136
-rw-r--r--src/Platform/Unix/File.cpp44
-rw-r--r--src/Platform/Unix/FilesystemPath.cpp9
-rw-r--r--src/Platform/Unix/SystemInfo.cpp2
-rw-r--r--src/Readme.txt75
-rw-r--r--src/Release/Setup Files/Product64.wxs8
-rw-r--r--src/Release/Setup Files/build_msi_x64.bat8
-rw-r--r--src/Release/Setup Files/veracrypt-arm64.catbin10593 -> 11689 bytes
-rw-r--r--src/Release/Setup Files/veracrypt-arm64.sysbin449112 -> 443376 bytes
-rw-r--r--src/Release/Setup Files/veracrypt-x64.catbin10649 -> 11742 bytes
-rw-r--r--src/Release/Setup Files/veracrypt-x64.sysbin830608 -> 817184 bytes
-rw-r--r--src/Release/Setup Files/veracrypt.Inf2
-rw-r--r--src/Release/Setup Files/veracrypt.catbin10585 -> 11649 bytes
-rw-r--r--src/Release/Setup Files/veracrypt.sysbin797328 -> 782584 bytes
-rw-r--r--src/Setup/Linux/mount.veracrypt23
-rw-r--r--src/Setup/Linux/veracrypt.desktop13
-rw-r--r--src/Setup/Linux/veracrypt.xml11
-rwxr-xr-xsrc/Setup/MacOSX/postinstall.sh10
-rwxr-xr-xsrc/Setup/MacOSX/veracrypt.pkgproj16
-rwxr-xr-xsrc/Setup/MacOSX/veracrypt_Legacy.pkgproj8
-rw-r--r--src/Setup/Portable.rc8
-rw-r--r--src/Setup/Portable.vcxproj61
-rw-r--r--src/Setup/Setup.c81
-rw-r--r--src/Setup/Setup.rc12
-rw-r--r--src/Setup/Setup.vcxproj75
-rw-r--r--src/Setup/Setup.vcxproj.filters14
-rw-r--r--src/SetupDLL/Portable.manifest33
-rw-r--r--src/SetupDLL/Portable.rc291
-rw-r--r--src/SetupDLL/Portable.vcxproj281
-rw-r--r--src/SetupDLL/Portable.vcxproj.filters154
-rw-r--r--src/SetupDLL/Portable.vcxproj.user3
-rw-r--r--src/SetupDLL/Setup.c60
-rw-r--r--src/SetupDLL/Setup.rc8
-rw-r--r--src/SetupDLL/SetupDLL.vcxproj6
-rw-r--r--src/Signing/DigiCert_Assured_ID_Code_Signing_CA.cerbin1703 -> 0 bytes
-rw-r--r--src/Signing/DigiCert_Assured_ID_MS_Cross_Cert.crt30
-rw-r--r--src/Signing/GlobalSign_R1Cross.cer26
-rw-r--r--src/Signing/GlobalSign_Root_CA_MS_Cross_Cert.crt30
-rw-r--r--src/Signing/GlobalSign_SHA256_EV_CodeSigning_CA.cerbin1195 -> 1772 bytes
-rw-r--r--src/Signing/sign-sha256.bat68
-rw-r--r--src/Signing/sign.bat30
-rw-r--r--src/Signing/sign_TESTSIGNING.bat59
-rw-r--r--src/Signing/sign_test.bat6
-rw-r--r--src/Signing/sign_test_debug.bat12
-rw-r--r--src/VeraCrypt.sln37
-rw-r--r--src/Volume/Cipher.cpp5
-rw-r--r--src/Volume/Cipher.h7
-rw-r--r--src/Volume/Pkcs5Kdf.cpp4
177 files changed, 2943 insertions, 1451 deletions
diff --git a/src/Boot/EFI/DcsBoot.efi b/src/Boot/EFI/DcsBoot.efi
index 0fcd48e3..8586811b 100644
--- a/src/Boot/EFI/DcsBoot.efi
+++ b/src/Boot/EFI/DcsBoot.efi
Binary files differ
diff --git a/src/Boot/EFI/DcsBoot32.efi b/src/Boot/EFI/DcsBoot32.efi
index 48db0ca5..74aa566d 100644
--- a/src/Boot/EFI/DcsBoot32.efi
+++ b/src/Boot/EFI/DcsBoot32.efi
Binary files differ
diff --git a/src/Boot/EFI/DcsCfg.efi b/src/Boot/EFI/DcsCfg.efi
index 03c9761e..00bc092b 100644
--- a/src/Boot/EFI/DcsCfg.efi
+++ b/src/Boot/EFI/DcsCfg.efi
Binary files differ
diff --git a/src/Boot/EFI/DcsCfg32.efi b/src/Boot/EFI/DcsCfg32.efi
index 22cc0d5a..2b128f6c 100644
--- a/src/Boot/EFI/DcsCfg32.efi
+++ b/src/Boot/EFI/DcsCfg32.efi
Binary files differ
diff --git a/src/Boot/EFI/DcsInfo.efi b/src/Boot/EFI/DcsInfo.efi
index 6be1cb8f..734a37a1 100644
--- a/src/Boot/EFI/DcsInfo.efi
+++ b/src/Boot/EFI/DcsInfo.efi
Binary files differ
diff --git a/src/Boot/EFI/DcsInfo32.efi b/src/Boot/EFI/DcsInfo32.efi
index 006adfb6..ccb535a4 100644
--- a/src/Boot/EFI/DcsInfo32.efi
+++ b/src/Boot/EFI/DcsInfo32.efi
Binary files differ
diff --git a/src/Boot/EFI/DcsInt.efi b/src/Boot/EFI/DcsInt.efi
index a0c2975a..b99dc7e9 100644
--- a/src/Boot/EFI/DcsInt.efi
+++ b/src/Boot/EFI/DcsInt.efi
Binary files differ
diff --git a/src/Boot/EFI/DcsInt32.efi b/src/Boot/EFI/DcsInt32.efi
index 991885f9..ec17389b 100644
--- a/src/Boot/EFI/DcsInt32.efi
+++ b/src/Boot/EFI/DcsInt32.efi
Binary files differ
diff --git a/src/Boot/EFI/DcsRe.efi b/src/Boot/EFI/DcsRe.efi
index 070cc97c..4805129e 100644
--- a/src/Boot/EFI/DcsRe.efi
+++ b/src/Boot/EFI/DcsRe.efi
Binary files differ
diff --git a/src/Boot/EFI/DcsRe32.efi b/src/Boot/EFI/DcsRe32.efi
index c4f2013b..841c1497 100644
--- a/src/Boot/EFI/DcsRe32.efi
+++ b/src/Boot/EFI/DcsRe32.efi
Binary files differ
diff --git a/src/Boot/EFI/LegacySpeaker.efi b/src/Boot/EFI/LegacySpeaker.efi
index a1d14eb2..2164ad57 100644
--- a/src/Boot/EFI/LegacySpeaker.efi
+++ b/src/Boot/EFI/LegacySpeaker.efi
Binary files differ
diff --git a/src/Boot/EFI/LegacySpeaker32.efi b/src/Boot/EFI/LegacySpeaker32.efi
index 1ec5ba69..2b6e8cbd 100644
--- a/src/Boot/EFI/LegacySpeaker32.efi
+++ b/src/Boot/EFI/LegacySpeaker32.efi
Binary files differ
diff --git a/src/Boot/EFI/Readme.txt b/src/Boot/EFI/Readme.txt
index 43e29986..a43b0589 100644
--- a/src/Boot/EFI/Readme.txt
+++ b/src/Boot/EFI/Readme.txt
@@ -1,17 +1,16 @@
The source code for VeraCrypt EFI bootloader files is available at: https://github.com/veracrypt/VeraCrypt-DCS
-VeraCrypt-DCS uses EDK II as its UEFI development environement.
+VeraCrypt-DCS uses EDK II as its UEFI development environment.
VeraCrypt-DCS is licensed under LGPL: https://github.com/veracrypt/VeraCrypt-DCS/blob/master/LICENSE
Here the steps to build VeraCrypt-DCS (Visual Studio 2010 SP1 should be installed)
* Clone EDK: git clone https://github.com/tianocore/tianocore.github.io.git edk2
* Switch to UDK2015 branche: git checkout UDK2015
- * Clone VeraCrypt-DCS as DcsPkg inside edk2 folder: git clone https://github.com/veracrypt/VeraCrypt-DCS.git DcsPkg
+ * Clone VeraCrypt-DCS as DcsPkg inside edk2 folder: git clone https://github.com/veracrypt/VeraCrypt-DCS.git DcsPkg
* Switch to VeraCrypt_1.18 branche: git checkout VeraCrypt_1.18
* Setup EDK by typing edksetup.bat at the root of folder edk2
* change directoty to DcsPkg and then type setenv.bat.
* change directory to DcsPkg\Library\VeraCryptLib and then type mklinks_src.bat: you will be asked to provide the path to VeraCrypt src folder.
* change directory to DcsPkg and then type dcs_bld.bat X64Rel
* After the build is finished, EFI bootloader files will be present at edk2\Build\DcsPkg\RELEASE_VS2010x86\X64
- \ No newline at end of file
diff --git a/src/Boot/Windows/BootCommon.h b/src/Boot/Windows/BootCommon.h
index b77b8802..78bf55d8 100644
--- a/src/Boot/Windows/BootCommon.h
+++ b/src/Boot/Windows/BootCommon.h
@@ -3,7 +3,7 @@
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)
+ Modifications and additions to the original source code (contained in this file)
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
@@ -178,7 +178,7 @@ CSTATIC_ASSERT(FIELD_OFFSET(DCS_DISK_ENTRY, Length) == FIELD_OFFSET(DCS_DISK_ENT
CSTATIC_ASSERT(FIELD_OFFSET(DCS_DISK_ENTRY, Offset) == FIELD_OFFSET(DCS_DISK_ENTRY_SECTORS, Offset), Wrong_Offset_offset);
CSTATIC_ASSERT(FIELD_OFFSET(DCS_DISK_ENTRY, Offset) == FIELD_OFFSET(DCS_DISK_ENTRY_PARAMS, Offset), Wrong_Offset_offset);
-// DE type specific data
+// DE type specific data
// DE List
typedef struct _DCS_DISK_ENTRY_LIST {
// EFI_TABLE_HEADER
diff --git a/src/Boot/Windows/BootConsoleIo.cpp b/src/Boot/Windows/BootConsoleIo.cpp
index 9148f5c9..706e36f6 100644
--- a/src/Boot/Windows/BootConsoleIo.cpp
+++ b/src/Boot/Windows/BootConsoleIo.cpp
@@ -260,7 +260,7 @@ byte GetKeyboardChar (byte *scanCode)
{
// reduce CPU usage by halting CPU until the next external interrupt is fired
__asm
- {
+ {
hlt
}
}
diff --git a/src/Boot/Windows/Makefile b/src/Boot/Windows/Makefile
index 1966a3cb..9689b7cf 100644
--- a/src/Boot/Windows/Makefile
+++ b/src/Boot/Windows/Makefile
@@ -196,7 +196,7 @@ $(LIBS)
$(LD) $(LFLAGS) @$(PROJ).crf
del $(PROJ).crf $(PROJ).crf2
-# Compress the Rescue Disk botloader for Cascades and Serpent since it is too big (size > 31232 bytes)
+# Compress the Rescue Disk bootloader for Cascades and Serpent since it is too big (size > 31232 bytes)
#!if DEFINED(RESCUE_DISK) && (!DEFINED (SINGLE_CIPHER) || ("$(SINGLE_CIPHER)" == "SERPENT") || ("$(SINGLE_CIPHER)" == "CAMELLIA"))
upx $(PROJ).$(TARGETEXT)
#!endif
diff --git a/src/Boot/Windows/Release/BootLoader.com.gz b/src/Boot/Windows/Release/BootLoader.com.gz
new file mode 100644
index 00000000..9f1db6e6
--- /dev/null
+++ b/src/Boot/Windows/Release/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Release/BootSector.bin b/src/Boot/Windows/Release/BootSector.bin
new file mode 100644
index 00000000..556a2036
--- /dev/null
+++ b/src/Boot/Windows/Release/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Release/Decompressor.com b/src/Boot/Windows/Release/Decompressor.com
new file mode 100644
index 00000000..14b4e5d4
--- /dev/null
+++ b/src/Boot/Windows/Release/Decompressor.com
Binary files differ
diff --git a/src/Boot/Windows/Release_AES/BootLoader.com.gz b/src/Boot/Windows/Release_AES/BootLoader.com.gz
new file mode 100644
index 00000000..4599e36a
--- /dev/null
+++ b/src/Boot/Windows/Release_AES/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Release_AES/BootSector.bin b/src/Boot/Windows/Release_AES/BootSector.bin
new file mode 100644
index 00000000..7d041a36
--- /dev/null
+++ b/src/Boot/Windows/Release_AES/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Release_AES_SHA2/BootLoader.com.gz b/src/Boot/Windows/Release_AES_SHA2/BootLoader.com.gz
new file mode 100644
index 00000000..e851a608
--- /dev/null
+++ b/src/Boot/Windows/Release_AES_SHA2/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Release_AES_SHA2/BootSector.bin b/src/Boot/Windows/Release_AES_SHA2/BootSector.bin
new file mode 100644
index 00000000..7d041a36
--- /dev/null
+++ b/src/Boot/Windows/Release_AES_SHA2/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Release_Camellia/BootLoader.com.gz b/src/Boot/Windows/Release_Camellia/BootLoader.com.gz
new file mode 100644
index 00000000..bd7f976f
--- /dev/null
+++ b/src/Boot/Windows/Release_Camellia/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Release_Camellia/BootSector.bin b/src/Boot/Windows/Release_Camellia/BootSector.bin
new file mode 100644
index 00000000..9ff1b39e
--- /dev/null
+++ b/src/Boot/Windows/Release_Camellia/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Release_Camellia_SHA2/BootLoader.com.gz b/src/Boot/Windows/Release_Camellia_SHA2/BootLoader.com.gz
new file mode 100644
index 00000000..fe4b76de
--- /dev/null
+++ b/src/Boot/Windows/Release_Camellia_SHA2/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Release_Camellia_SHA2/BootSector.bin b/src/Boot/Windows/Release_Camellia_SHA2/BootSector.bin
new file mode 100644
index 00000000..9ff1b39e
--- /dev/null
+++ b/src/Boot/Windows/Release_Camellia_SHA2/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Release_SHA2/BootLoader.com.gz b/src/Boot/Windows/Release_SHA2/BootLoader.com.gz
new file mode 100644
index 00000000..81412de3
--- /dev/null
+++ b/src/Boot/Windows/Release_SHA2/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Release_SHA2/BootSector.bin b/src/Boot/Windows/Release_SHA2/BootSector.bin
new file mode 100644
index 00000000..556a2036
--- /dev/null
+++ b/src/Boot/Windows/Release_SHA2/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Release_Serpent/BootLoader.com.gz b/src/Boot/Windows/Release_Serpent/BootLoader.com.gz
new file mode 100644
index 00000000..81784fcc
--- /dev/null
+++ b/src/Boot/Windows/Release_Serpent/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Release_Serpent/BootSector.bin b/src/Boot/Windows/Release_Serpent/BootSector.bin
new file mode 100644
index 00000000..8020da87
--- /dev/null
+++ b/src/Boot/Windows/Release_Serpent/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Release_Serpent_SHA2/BootLoader.com.gz b/src/Boot/Windows/Release_Serpent_SHA2/BootLoader.com.gz
new file mode 100644
index 00000000..e7ccf708
--- /dev/null
+++ b/src/Boot/Windows/Release_Serpent_SHA2/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Release_Serpent_SHA2/BootSector.bin b/src/Boot/Windows/Release_Serpent_SHA2/BootSector.bin
new file mode 100644
index 00000000..8020da87
--- /dev/null
+++ b/src/Boot/Windows/Release_Serpent_SHA2/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Release_Twofish/BootLoader.com.gz b/src/Boot/Windows/Release_Twofish/BootLoader.com.gz
new file mode 100644
index 00000000..13a43c0e
--- /dev/null
+++ b/src/Boot/Windows/Release_Twofish/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Release_Twofish/BootSector.bin b/src/Boot/Windows/Release_Twofish/BootSector.bin
new file mode 100644
index 00000000..eff8e12a
--- /dev/null
+++ b/src/Boot/Windows/Release_Twofish/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Release_Twofish_SHA2/BootLoader.com.gz b/src/Boot/Windows/Release_Twofish_SHA2/BootLoader.com.gz
new file mode 100644
index 00000000..5aedbb85
--- /dev/null
+++ b/src/Boot/Windows/Release_Twofish_SHA2/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Release_Twofish_SHA2/BootSector.bin b/src/Boot/Windows/Release_Twofish_SHA2/BootSector.bin
new file mode 100644
index 00000000..eff8e12a
--- /dev/null
+++ b/src/Boot/Windows/Release_Twofish_SHA2/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Rescue/BootLoader.com.gz b/src/Boot/Windows/Rescue/BootLoader.com.gz
new file mode 100644
index 00000000..29da4d15
--- /dev/null
+++ b/src/Boot/Windows/Rescue/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Rescue/BootSector.bin b/src/Boot/Windows/Rescue/BootSector.bin
new file mode 100644
index 00000000..556a2036
--- /dev/null
+++ b/src/Boot/Windows/Rescue/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Rescue_AES/BootLoader.com.gz b/src/Boot/Windows/Rescue_AES/BootLoader.com.gz
new file mode 100644
index 00000000..da0c096c
--- /dev/null
+++ b/src/Boot/Windows/Rescue_AES/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Rescue_AES/BootSector.bin b/src/Boot/Windows/Rescue_AES/BootSector.bin
new file mode 100644
index 00000000..9ff1b39e
--- /dev/null
+++ b/src/Boot/Windows/Rescue_AES/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Rescue_AES_SHA2/BootLoader.com.gz b/src/Boot/Windows/Rescue_AES_SHA2/BootLoader.com.gz
new file mode 100644
index 00000000..fbda8050
--- /dev/null
+++ b/src/Boot/Windows/Rescue_AES_SHA2/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Rescue_AES_SHA2/BootSector.bin b/src/Boot/Windows/Rescue_AES_SHA2/BootSector.bin
new file mode 100644
index 00000000..9ff1b39e
--- /dev/null
+++ b/src/Boot/Windows/Rescue_AES_SHA2/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Rescue_Camellia/BootLoader.com.gz b/src/Boot/Windows/Rescue_Camellia/BootLoader.com.gz
new file mode 100644
index 00000000..fa5f04c8
--- /dev/null
+++ b/src/Boot/Windows/Rescue_Camellia/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Rescue_Camellia/BootSector.bin b/src/Boot/Windows/Rescue_Camellia/BootSector.bin
new file mode 100644
index 00000000..9ff1b39e
--- /dev/null
+++ b/src/Boot/Windows/Rescue_Camellia/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Rescue_Camellia_SHA2/BootLoader.com.gz b/src/Boot/Windows/Rescue_Camellia_SHA2/BootLoader.com.gz
new file mode 100644
index 00000000..1c55524b
--- /dev/null
+++ b/src/Boot/Windows/Rescue_Camellia_SHA2/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Rescue_Camellia_SHA2/BootSector.bin b/src/Boot/Windows/Rescue_Camellia_SHA2/BootSector.bin
new file mode 100644
index 00000000..9ff1b39e
--- /dev/null
+++ b/src/Boot/Windows/Rescue_Camellia_SHA2/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Rescue_SHA2/BootLoader.com.gz b/src/Boot/Windows/Rescue_SHA2/BootLoader.com.gz
new file mode 100644
index 00000000..ba34bf3b
--- /dev/null
+++ b/src/Boot/Windows/Rescue_SHA2/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Rescue_SHA2/BootSector.bin b/src/Boot/Windows/Rescue_SHA2/BootSector.bin
new file mode 100644
index 00000000..556a2036
--- /dev/null
+++ b/src/Boot/Windows/Rescue_SHA2/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Rescue_Serpent/BootLoader.com.gz b/src/Boot/Windows/Rescue_Serpent/BootLoader.com.gz
new file mode 100644
index 00000000..bb52b491
--- /dev/null
+++ b/src/Boot/Windows/Rescue_Serpent/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Rescue_Serpent/BootSector.bin b/src/Boot/Windows/Rescue_Serpent/BootSector.bin
new file mode 100644
index 00000000..8020da87
--- /dev/null
+++ b/src/Boot/Windows/Rescue_Serpent/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Rescue_Serpent_SHA2/BootLoader.com.gz b/src/Boot/Windows/Rescue_Serpent_SHA2/BootLoader.com.gz
new file mode 100644
index 00000000..78c246e8
--- /dev/null
+++ b/src/Boot/Windows/Rescue_Serpent_SHA2/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Rescue_Serpent_SHA2/BootSector.bin b/src/Boot/Windows/Rescue_Serpent_SHA2/BootSector.bin
new file mode 100644
index 00000000..8020da87
--- /dev/null
+++ b/src/Boot/Windows/Rescue_Serpent_SHA2/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Rescue_Twofish/BootLoader.com.gz b/src/Boot/Windows/Rescue_Twofish/BootLoader.com.gz
new file mode 100644
index 00000000..81e2a072
--- /dev/null
+++ b/src/Boot/Windows/Rescue_Twofish/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Rescue_Twofish/BootSector.bin b/src/Boot/Windows/Rescue_Twofish/BootSector.bin
new file mode 100644
index 00000000..eff8e12a
--- /dev/null
+++ b/src/Boot/Windows/Rescue_Twofish/BootSector.bin
Binary files differ
diff --git a/src/Boot/Windows/Rescue_Twofish_SHA2/BootLoader.com.gz b/src/Boot/Windows/Rescue_Twofish_SHA2/BootLoader.com.gz
new file mode 100644
index 00000000..958228cb
--- /dev/null
+++ b/src/Boot/Windows/Rescue_Twofish_SHA2/BootLoader.com.gz
Binary files differ
diff --git a/src/Boot/Windows/Rescue_Twofish_SHA2/BootSector.bin b/src/Boot/Windows/Rescue_Twofish_SHA2/BootSector.bin
new file mode 100644
index 00000000..eff8e12a
--- /dev/null
+++ b/src/Boot/Windows/Rescue_Twofish_SHA2/BootSector.bin
Binary files differ
diff --git a/src/Build/CMakeLists.txt b/src/Build/CMakeLists.txt
index a9b7967f..52b12c54 100644
--- a/src/Build/CMakeLists.txt
+++ b/src/Build/CMakeLists.txt
@@ -11,8 +11,8 @@ elseif ( NOT DEFINED NOGUI )
endif()
# - Set version of the package
-set( FULL_VERSION "1.24-Update9" )
-set( VERSION "1.24.25" )
+set( FULL_VERSION "1.25.7" )
+set( VERSION "1.25.7" )
set( RELEASE "1" )
# - Set PROJECT_NAME and CONFLICT_PACKAGE values
@@ -194,6 +194,9 @@ MESSAGE ( STATUS "Architecture = ${ARCHITECTURE}" )
install(DIRECTORY ${VERACRYPT_BUILD_DIR}/usr/bin
DESTINATION .
USE_SOURCE_PERMISSIONS)
+install(DIRECTORY ${VERACRYPT_BUILD_DIR}/usr/sbin
+ DESTINATION .
+ USE_SOURCE_PERMISSIONS)
install(DIRECTORY ${VERACRYPT_BUILD_DIR}/usr/share
DESTINATION .
USE_SOURCE_PERMISSIONS)
@@ -251,7 +254,7 @@ if ( ( PLATFORM STREQUAL "Debian" ) OR ( PLATFORM STREQUAL "Ubuntu" ) )
if ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "10" ) )
OR ( ( PLATFORM STREQUAL "Ubuntu" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "18.04" ) ) )
- set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-gtk3-0v5, libfuse2, dmsetup, sudo" )
+ set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-gtk3-0v5, libayatana-appindicator3-1, libfuse2, dmsetup, sudo" )
else ()
# Link against statically built wxWidgets on Ubuntu 14.04 and older, and Debian 8 and older
@@ -317,9 +320,12 @@ elseif ( ( PLATFORM STREQUAL "CentOS" ) OR ( PLATFORM STREQUAL "openSUSE" ) )
# This is to avoid having %dir of these directories in the .spec file
set( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr" )
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/bin" )
+ list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/sbin" )
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/share" )
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/share/applications" )
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/share/doc" )
+ list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/share/mime" )
+ list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/share/mime/packages" )
list(APPEND CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "/usr/share/pixmaps" )
set( CPACK_RPM_PACKAGE_RELOCATABLE "OFF" )
diff --git a/src/Build/Include/Makefile.inc b/src/Build/Include/Makefile.inc
index ba166b69..4c153657 100644
--- a/src/Build/Include/Makefile.inc
+++ b/src/Build/Include/Makefile.inc
@@ -51,7 +51,11 @@ endif
# Embedded files
+ifeq "$(PLATFORM)" "OpenBSD"
+OD_BIN := ggod -v -t u1 -A n
+else
OD_BIN := od -v -t u1 -A n
+endif
TR_SED_BIN := tr '\n' ' ' | tr -s ' ' ',' | sed -e 's/^,//g' -e 's/,$$/n/' | tr 'n' '\n'
%.xml.h: %.xml
diff --git a/src/Build/Resources/MacOSX/Info.plist.legacy.xml b/src/Build/Resources/MacOSX/Info.plist.legacy.xml
index 41321c05..2c59b751 100644
--- a/src/Build/Resources/MacOSX/Info.plist.legacy.xml
+++ b/src/Build/Resources/MacOSX/Info.plist.legacy.xml
@@ -74,7 +74,7 @@
<string>TRUE</string>
<key>CFBundleVersion</key>
- <string>1.24.25</string>
+ <string>1.25.7</string>
<key>CFBundleShortVersionString</key>
<string>_VERSION_</string>
diff --git a/src/Build/Resources/MacOSX/Info.plist.xml b/src/Build/Resources/MacOSX/Info.plist.xml
index 3d20696d..53e2045a 100644
--- a/src/Build/Resources/MacOSX/Info.plist.xml
+++ b/src/Build/Resources/MacOSX/Info.plist.xml
@@ -74,7 +74,7 @@
<string>TRUE</string>
<key>CFBundleVersion</key>
- <string>1.24.25</string>
+ <string>1.25.7</string>
<key>CFBundleShortVersionString</key>
<string>_VERSION_</string>
diff --git a/src/Build/build_cmake_deb.sh b/src/Build/build_cmake_deb.sh
index f54d67bd..e02edf2f 100755
--- a/src/Build/build_cmake_deb.sh
+++ b/src/Build/build_cmake_deb.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2013-2020 IDRIX
+# Copyright (c) 2013-2022 IDRIX
# 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.
@@ -41,11 +41,22 @@ else
echo "Building GUI version of VeraCrypt for DEB using system wxWidgets"
make clean || exit 1
-make || exit 1
+
+if [ "$#" = "1" ] && [ "$1" = "INDICATOR" ]
+then
+
+make INDICATOR=1 || exit 1
+make INDICATOR=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1
+
+else
+
+make || exit 1
make install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1
fi
+fi
+
echo "Building console version of VeraCrypt for DEB using wxWidgets static libraries"
# This is to avoid " Error: Unable to initialize GTK+, is DISPLAY set properly?"
diff --git a/src/Build/build_cmake_opensuse.sh b/src/Build/build_cmake_opensuse.sh
index d1a6fd0f..81ca47cf 100644
--- a/src/Build/build_cmake_opensuse.sh
+++ b/src/Build/build_cmake_opensuse.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2013-2020 IDRIX
+# Copyright (c) 2013-2022 IDRIX
# 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/Build/build_cmake_rpm_gtk2.sh b/src/Build/build_cmake_rpm_gtk2.sh
index e7c953fc..23472356 100644
--- a/src/Build/build_cmake_rpm_gtk2.sh
+++ b/src/Build/build_cmake_rpm_gtk2.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2013-2020 IDRIX
+# Copyright (c) 2013-2022 IDRIX
# 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/Build/build_cmake_rpm_gtk3.sh b/src/Build/build_cmake_rpm_gtk3.sh
index 8b47b3db..e13b5d06 100644
--- a/src/Build/build_cmake_rpm_gtk3.sh
+++ b/src/Build/build_cmake_rpm_gtk3.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2013-2020 IDRIX
+# Copyright (c) 2013-2022 IDRIX
# 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/Build/build_veracrypt_freebsd.sh b/src/Build/build_veracrypt_freebsd.sh
index 359c797f..33f4bf48 100755
--- a/src/Build/build_veracrypt_freebsd.sh
+++ b/src/Build/build_veracrypt_freebsd.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2013-2020 IDRIX
+# Copyright (c) 2013-2022 IDRIX
# 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/Build/build_veracrypt_linux.sh b/src/Build/build_veracrypt_linux.sh
index 08ef99ad..7815e63f 100755
--- a/src/Build/build_veracrypt_linux.sh
+++ b/src/Build/build_veracrypt_linux.sh
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013-2020 IDRIX
+# Copyright (c) 2013-2022 IDRIX
# 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/Build/build_veracrypt_linux_gtk3.sh b/src/Build/build_veracrypt_linux_gtk3.sh
new file mode 100644
index 00000000..d5a7444a
--- /dev/null
+++ b/src/Build/build_veracrypt_linux_gtk3.sh
@@ -0,0 +1,47 @@
+#
+# Copyright (c) 2013-2022 IDRIX
+# 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.
+#
+
+# Absolute path to this script
+SCRIPT=$(readlink -f "$0")
+# Absolute path this script is in
+SCRIPTPATH=$(dirname "$SCRIPT")
+# source directory which contains the Makefile
+SOURCEPATH=$(readlink -f "$SCRIPTPATH/..")
+# directory where the VeraCrypt has been checked out
+PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..")
+
+# Make sure only root can run our script
+if [ "$(id -u)" != "0" ]; then
+ echo "VeraCrypt must be built by root" 1>&2
+ exit 1
+fi
+
+# the sources of wxWidgets 3.0.5 must be extracted to the parent directory
+export WX_ROOT=$PARENTDIR/wxWidgets-3.0.5
+echo "Using wxWidgets sources in $WX_ROOT"
+
+cd $SOURCEPATH
+
+echo "Building GUI version of VeraCrypt"
+
+# this will be the temporary wxWidgets directory
+export WX_BUILD_DIR=$PARENTDIR/wxBuildGui
+
+make WXSTATIC=1 WITHGTK3=1 wxbuild && make WXSTATIC=1 clean && make WXSTATIC=1 && make WXSTATIC=1 package
+
+# Uncomment below and comment line above to reuse existing wxWidgets build
+#make WXSTATIC=1 clean && make WXSTATIC=1 && make WXSTATIC=1 package
+
+echo "Building console version of VeraCrypt"
+
+# this will be the temporary wxWidgets directory
+export WX_BUILD_DIR=$PARENTDIR/wxBuildConsole
+
+make WXSTATIC=1 WITHGTK3=1 NOGUI=1 wxbuild && make WXSTATIC=1 NOGUI=1 clean && make WXSTATIC=1 NOGUI=1 && make WXSTATIC=1 NOGUI=1 package
+
+# Uncomment below and comment line above to reuse existing wxWidgets build
+#make WXSTATIC=1 NOGUI=1 clean && make WXSTATIC=1 NOGUI=1 && make WXSTATIC=1 NOGUI=1 package
diff --git a/src/Build/build_veracrypt_linux_no_sse2.sh b/src/Build/build_veracrypt_linux_no_sse2.sh
index e7629ef1..2916f846 100755
--- a/src/Build/build_veracrypt_linux_no_sse2.sh
+++ b/src/Build/build_veracrypt_linux_no_sse2.sh
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2013-2020 IDRIX
+# Copyright (c) 2013-2022 IDRIX
# 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/Build/build_veracrypt_macosx.sh b/src/Build/build_veracrypt_macosx.sh
index a30bf340..4636d27d 100755
--- a/src/Build/build_veracrypt_macosx.sh
+++ b/src/Build/build_veracrypt_macosx.sh
@@ -21,7 +21,7 @@ export WX_BUILD_DIR=$PARENTDIR/wxBuild-3.1.2
# define the SDK version to use and OSX minimum target. We target 10.9 by default
export VC_OSX_TARGET=10.9
-export VC_OSX_SDK=11.0
+export VC_OSX_SDK=11.3
echo "Using MacOSX SDK $VC_OSX_SDK with target set to $VC_OSX_TARGET"
cd $SOURCEPATH
diff --git a/src/Common/Apidrvr.h b/src/Common/Apidrvr.h
index c56d9ff7..36946e6c 100644
--- a/src/Common/Apidrvr.h
+++ b/src/Common/Apidrvr.h
@@ -127,6 +127,8 @@
#define VC_IOCTL_IS_RAM_ENCRYPTION_ENABLED TC_IOCTL (42)
+#define VC_IOCTL_ENCRYPTION_QUEUE_PARAMS TC_IOCTL (43)
+
// Legacy IOCTLs used before version 5.0
#define TC_IOCTL_LEGACY_GET_DRIVER_VERSION 466968
#define TC_IOCTL_LEGACY_GET_MOUNTED_VOLUMES 466948
@@ -390,6 +392,13 @@ typedef struct
BOOL HwEncryptionEnabled;
} GetSystemDriveDumpConfigRequest;
+typedef struct
+{
+ int EncryptionIoRequestCount;
+ int EncryptionItemCount;
+ int EncryptionFragmentSize;
+} EncryptionQueueParameters;
+
#pragma pack (pop)
#define DRIVER_STR WIDE
@@ -407,6 +416,10 @@ typedef struct
#define TC_DRIVER_CONFIG_REG_VALUE_NAME DRIVER_STR("VeraCryptConfig")
#define TC_ENCRYPTION_FREE_CPU_COUNT_REG_VALUE_NAME DRIVER_STR("VeraCryptEncryptionFreeCpuCount")
+#define VC_ENCRYPTION_IO_REQUEST_COUNT DRIVER_STR("VeraCryptEncryptionIoRequestCount")
+#define VC_ENCRYPTION_ITEM_COUNT DRIVER_STR("VeraCryptEncryptionItemCount")
+#define VC_ENCRYPTION_FRAGMENT_SIZE DRIVER_STR("VeraCryptEncryptionFragmentSize")
+
// WARNING: Modifying the following values can introduce incompatibility with previous versions.
#define TC_DRIVER_CONFIG_CACHE_BOOT_PASSWORD 0x1
#define TC_DRIVER_CONFIG_CACHE_BOOT_PASSWORD_FOR_SYS_FAVORITES 0x2
diff --git a/src/Common/BootEncryption.cpp b/src/Common/BootEncryption.cpp
index c8fc90bf..c3ce07ab 100644
--- a/src/Common/BootEncryption.cpp
+++ b/src/Common/BootEncryption.cpp
@@ -2218,7 +2218,6 @@ namespace VeraCrypt
#endif // !SETUP
- NtQuerySystemInformationFn NtQuerySystemInformationPtr = NULL;
EfiBootConf::EfiBootConf() : passwordType (0),
passwordMsg ("Password: "),
@@ -2510,14 +2509,13 @@ namespace VeraCrypt
ULONG len;
NTSTATUS res;
WCHAR tempBuf[1024];
+ NtQuerySystemInformationFn NtQuerySystemInformationPtr = (NtQuerySystemInformationFn) GetProcAddress (GetModuleHandle (L"ntdll.dll"), "NtQuerySystemInformation");
memset(tempBuf, 0, sizeof(tempBuf));
// Load NtQuerySystemInformation function point
if (!NtQuerySystemInformationPtr)
{
- NtQuerySystemInformationPtr = (NtQuerySystemInformationFn) GetProcAddress (GetModuleHandle (L"ntdll.dll"), "NtQuerySystemInformation");
- if (!NtQuerySystemInformationPtr)
- throw SystemException (SRC_POS);
+ throw SystemException (SRC_POS);
}
res = NtQuerySystemInformationPtr((SYSTEM_INFORMATION_CLASS)SYSPARTITIONINFORMATION, tempBuf, sizeof(tempBuf), &len);
diff --git a/src/Common/BootEncryption.h b/src/Common/BootEncryption.h
index decacb8b..7f5c3b16 100644
--- a/src/Common/BootEncryption.h
+++ b/src/Common/BootEncryption.h
@@ -18,16 +18,6 @@
#include "Exception.h"
#include "Platform/PlatformBase.h"
#include "Volumes.h"
-#include <Winternl.h>
-
-#define SYSPARTITIONINFORMATION 0x62
-
-typedef NTSTATUS (WINAPI *NtQuerySystemInformationFn)(
- SYSTEM_INFORMATION_CLASS SystemInformationClass,
- PVOID SystemInformation,
- ULONG SystemInformationLength,
- PULONG ReturnLength
-);
typedef ULONG (WINAPI *RtlNtStatusToDosErrorFn)(
NTSTATUS Status
diff --git a/src/Common/Common.rc b/src/Common/Common.rc
index b26a400a..6d50a1fb 100644
--- a/src/Common/Common.rc
+++ b/src/Common/Common.rc
@@ -325,7 +325,7 @@ EXSTYLE WS_EX_TOPMOST | WS_EX_TOOLWINDOW
CAPTION "VeraCrypt"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- LTEXT "Please wait. This process may take a long time...",IDT_STATIC_MODELESS_WAIT_DLG_INFO,9,8,274,9
+ LTEXT "Please wait. This process may take a long time...",IDT_STATIC_MODELESS_WAIT_DLG_INFO,9,8,274,27
END
IDD_STATIC_MODAL_WAIT_DLG DIALOGEX 0, 0, 292, 74
diff --git a/src/Common/Crypto.c b/src/Common/Crypto.c
index 4745f981..da233090 100644
--- a/src/Common/Crypto.c
+++ b/src/Common/Crypto.c
@@ -19,6 +19,13 @@
#if !defined(_UEFI)
#include <string.h>
#ifndef TC_WINDOWS_BOOT
+#ifdef TC_WINDOWS_DRIVER
+#include <ntstrsafe.h>
+#define StringCchCatW RtlStringCchCatW
+#define StringCchCopyW RtlStringCchCopyW
+#else
+#include <strsafe.h>
+#endif
#include "EncryptionThreadPool.h"
#endif
#endif
@@ -555,33 +562,35 @@ BOOL EAInitMode (PCRYPTO_INFO ci, unsigned char* key2)
return TRUE;
}
-static void EAGetDisplayName(wchar_t *buf, int ea, int i)
+static void EAGetDisplayName(wchar_t *buf, size_t bufLen, int ea, int i)
{
- wcscpy (buf, CipherGetName (i));
+ StringCchCopyW (buf, bufLen, CipherGetName (i));
if (i = EAGetPreviousCipher(ea, i))
{
- wcscat (buf, L"(");
- EAGetDisplayName (&buf[wcslen(buf)], ea, i);
- wcscat (buf, L")");
+ size_t curLen;
+ StringCchCatW (buf, bufLen, L"(");
+ curLen = wcslen(buf);
+ EAGetDisplayName (&buf[curLen], bufLen - curLen, ea, i);
+ StringCchCatW (buf, bufLen, L")");
}
}
// Returns name of EA, cascaded cipher names are separated by hyphens
-wchar_t *EAGetName (wchar_t *buf, int ea, int guiDisplay)
+wchar_t *EAGetName (wchar_t *buf, size_t bufLen, int ea, int guiDisplay)
{
if (guiDisplay)
{
- EAGetDisplayName (buf, ea, EAGetLastCipher(ea));
+ EAGetDisplayName (buf, bufLen, ea, EAGetLastCipher(ea));
}
else
{
int i = EAGetLastCipher(ea);
- wcscpy (buf, (i != 0) ? CipherGetName (i) : L"?");
+ StringCchCopyW (buf, bufLen, (i != 0) ? CipherGetName (i) : L"?");
while (i = EAGetPreviousCipher(ea, i))
{
- wcscat (buf, L"-");
- wcscat (buf, CipherGetName (i));
+ StringCchCatW (buf, bufLen, L"-");
+ StringCchCatW (buf, bufLen, CipherGetName (i));
}
}
return buf;
@@ -595,7 +604,7 @@ int EAGetByName (wchar_t *name)
do
{
- EAGetName(n, ea, 1);
+ EAGetName(n, 128, ea, 1);
#if defined(_UEFI)
if (wcscmp(n, name) == 0)
#else
@@ -785,11 +794,11 @@ const wchar_t *HashGetName (int hashId)
return pHash? pHash -> Name : L"";
}
-void HashGetName2 (wchar_t *buf, int hashId)
+void HashGetName2 (wchar_t *buf, size_t bufLen, int hashId)
{
Hash* pHash = HashGet(hashId);
if (pHash)
- wcscpy(buf, pHash -> Name);
+ StringCchCopyW (buf, bufLen, pHash -> Name);
else
buf[0] = L'\0';
}
diff --git a/src/Common/Crypto.h b/src/Common/Crypto.h
index a31152f2..95222ba6 100644
--- a/src/Common/Crypto.h
+++ b/src/Common/Crypto.h
@@ -342,7 +342,7 @@ int EAGetFirst ();
int EAGetCount (void);
int EAGetNext (int previousEA);
#ifndef TC_WINDOWS_BOOT
-wchar_t * EAGetName (wchar_t *buf, int ea, int guiDisplay);
+wchar_t * EAGetName (wchar_t *buf, size_t bufLen, int ea, int guiDisplay);
int EAGetByName (wchar_t *name);
#endif
int EAGetKeySize (int ea);
@@ -373,7 +373,7 @@ const wchar_t *HashGetName (int hash_algo_id);
int HashGetIdByName (wchar_t *name);
#endif
Hash *HashGet (int id);
-void HashGetName2 (wchar_t *buf, int hashId);
+void HashGetName2 (wchar_t *buf, size_t bufLen, int hashId);
BOOL HashIsDeprecated (int hashId);
BOOL HashForSystemEncryption (int hashId);
int GetMaxPkcs5OutSize (void);
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 8897a95e..c7185a84 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -82,6 +82,11 @@
#include <WinTrust.h>
#include <strsafe.h>
+#define _WIN32_DCOM
+#include <comdef.h>
+#include <Wbemidl.h>
+
+#pragma comment(lib, "wbemuuid.lib")
#pragma comment( lib, "setupapi.lib" )
#ifndef TTI_INFO_LARGE
@@ -166,6 +171,8 @@ BOOL bHistory = FALSE;
#ifndef SETUP
BOOL bLanguageSetInSetup = FALSE;
+#else
+extern BOOL bMakePackage;
#endif
// Status of detection of hidden sectors (whole-system-drive encryption).
@@ -406,22 +413,13 @@ static WTHELPERPROVDATAFROMSTATEDATA WTHelperProvDataFromStateDataFn = NULL;
static WTHELPERGETPROVSIGNERFROMCHAIN WTHelperGetProvSignerFromChainFn = NULL;
static WTHELPERGETPROVCERTFROMCHAIN WTHelperGetProvCertFromChainFn = NULL;
-static unsigned char gpbSha1CodeSignCertFingerprint[64] = {
- 0x97, 0xE3, 0x36, 0xE0, 0x45, 0x21, 0xE9, 0x8A, 0xA7, 0xEA, 0xE8, 0x68,
- 0x4A, 0x56, 0x02, 0xB2, 0xE7, 0x63, 0x59, 0x3A, 0x37, 0x03, 0x64, 0xC3,
- 0x7D, 0xBF, 0xF8, 0x19, 0xDB, 0x39, 0x57, 0x41, 0x55, 0x00, 0x9C, 0xBE,
- 0xFE, 0xA3, 0xBC, 0x0F, 0xE3, 0xD8, 0x34, 0x2D, 0x2F, 0xB4, 0x80, 0xBE,
- 0xDD, 0xEA, 0xA7, 0xDB, 0xAD, 0x53, 0x07, 0x71, 0x1A, 0x12, 0x42, 0xB4,
- 0xE9, 0x65, 0xA5, 0x61
-};
-
static unsigned char gpbSha256CodeSignCertFingerprint[64] = {
- 0x88, 0x60, 0xC4, 0x26, 0x6D, 0x42, 0x59, 0x1B, 0xDF, 0x89, 0x0F, 0x1A,
- 0x2F, 0x70, 0x8D, 0xBB, 0xC0, 0xF0, 0x03, 0x1F, 0x37, 0x11, 0xF9, 0x24,
- 0x78, 0xDF, 0xD3, 0x60, 0xFB, 0xF3, 0xDC, 0xCA, 0x0D, 0x95, 0x06, 0x6A,
- 0x5E, 0xAD, 0x5C, 0xA3, 0x3E, 0x75, 0x55, 0x96, 0x7B, 0xD1, 0x0D, 0xC1,
- 0x00, 0xFE, 0xA0, 0x95, 0x13, 0x23, 0x20, 0x63, 0x26, 0x57, 0xFA, 0x6C,
- 0xE4, 0x27, 0xF8, 0x36
+ 0x9C, 0xA0, 0x21, 0xD3, 0x7C, 0x90, 0x61, 0x88, 0xEF, 0x5F, 0x99, 0x3D,
+ 0x54, 0x9F, 0xB8, 0xCE, 0x72, 0x32, 0x4F, 0x57, 0x4F, 0x19, 0xD2, 0xA4,
+ 0xDC, 0x84, 0xFF, 0xE2, 0x84, 0x2B, 0xD4, 0x30, 0xAB, 0xA7, 0xE4, 0x63,
+ 0x18, 0xD1, 0xD8, 0x32, 0x0E, 0xA4, 0x81, 0x3C, 0x19, 0xBF, 0x13, 0x11,
+ 0xA4, 0x37, 0xD6, 0xDB, 0x26, 0xBA, 0xDC, 0x8F, 0x86, 0x96, 0x55, 0x96,
+ 0xDB, 0x6F, 0xC0, 0x62
};
@@ -1841,7 +1839,7 @@ BOOL CALLBACK AboutDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam
L"Based on TrueCrypt 7.1a, freely available at http://www.truecrypt.org/ .\r\n\r\n"
L"Portions of this software:\r\n"
- L"Copyright \xA9 2013-2020 IDRIX. All rights reserved.\r\n"
+ L"Copyright \xA9 2013-2022 IDRIX. All rights reserved.\r\n"
L"Copyright \xA9 2003-2012 TrueCrypt Developers Association. All Rights Reserved.\r\n"
L"Copyright \xA9 1998-2000 Paul Le Roux. All Rights Reserved.\r\n"
L"Copyright \xA9 1998-2008 Brian Gladman. All Rights Reserved.\r\n"
@@ -1853,7 +1851,7 @@ BOOL CALLBACK AboutDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam
L"Copyright \xA9 2013-2019 Stephan Mueller <smueller@chronox.de>\r\n\r\n"
L"This software as a whole:\r\n"
- L"Copyright \xA9 2013-2020 IDRIX. All rights reserved.\r\n\r\n"
+ L"Copyright \xA9 2013-2022 IDRIX. All rights reserved.\r\n\r\n"
L"An IDRIX Release");
@@ -3186,6 +3184,45 @@ void DoPostInstallTasks (HWND hwndDlg)
SavePostInstallTasksSettings (TC_POST_INSTALL_CFG_REMOVE_ALL);
}
+#ifdef SETUP_DLL
+static BOOL GetWindowVersionFromFile(DWORD* pdwMajor, DWORD* pdwMinor, DWORD* pdwBuildNumber)
+{
+ wchar_t dllPath[MAX_PATH];
+ BOOL bRet = FALSE;
+ LPBYTE versionInfo = NULL;
+ UINT size;
+ VS_FIXEDFILEINFO *vinfo;
+
+ /* Load dll explictely from System32 to avoid Dll hijacking attacks*/
+ if (!GetSystemDirectory(dllPath, MAX_PATH))
+ StringCbCopyW(dllPath, sizeof(dllPath), L"C:\\Windows\\System32");
+
+ StringCbCatW(dllPath, sizeof(dllPath), L"\\");
+ StringCbCatW(dllPath, sizeof(dllPath), L"Kernel32.dll");
+
+ size = GetFileVersionInfoSizeW(dllPath, NULL);
+ if (size)
+ {
+ versionInfo = (LPBYTE) TCalloc(size);
+ if (GetFileVersionInfo(dllPath, 0, size, versionInfo))
+ {
+
+ if (VerQueryValueW(versionInfo, L"\\", (LPVOID *)&vinfo, &size) && (size >=sizeof(VS_FIXEDFILEINFO)))
+ {
+ *pdwMajor = HIWORD(vinfo->dwProductVersionMS);
+ *pdwMinor = LOWORD(vinfo->dwProductVersionMS);
+ *pdwBuildNumber = HIWORD(vinfo->dwProductVersionLS);
+ bRet = TRUE;
+ }
+ }
+ }
+
+ if (versionInfo)
+ TCfree(versionInfo);
+ return bRet;
+}
+#endif
+
/*
* Use RtlGetVersion to get Windows version because GetVersionEx is affected by application manifestation.
*/
@@ -3194,6 +3231,9 @@ typedef NTSTATUS (WINAPI* RtlGetVersionPtr)(PRTL_OSVERSIONINFOW);
static BOOL GetWindowsVersion(LPOSVERSIONINFOW lpVersionInformation)
{
BOOL bRet = FALSE;
+#ifdef SETUP_DLL
+ DWORD dwMajor, dwMinor, dwBuildNumber;
+#endif
RtlGetVersionPtr RtlGetVersionFn = (RtlGetVersionPtr) GetProcAddress(GetModuleHandle (L"ntdll.dll"), "RtlGetVersion");
if (RtlGetVersionFn != NULL)
{
@@ -3204,6 +3244,17 @@ static BOOL GetWindowsVersion(LPOSVERSIONINFOW lpVersionInformation)
if (!bRet)
bRet = GetVersionExW (lpVersionInformation);
+#ifdef SETUP_DLL
+ // we get real version from Kernel32.dll version since MSI always sets current version to 6.0
+ // https://stackoverflow.com/questions/49335885/windows-10-not-detecting-on-installshield/49343826#49343826
+ if (GetWindowVersionFromFile(&dwMajor, &dwMinor, &dwBuildNumber))
+ {
+ lpVersionInformation->dwMajorVersion = dwMajor;
+ lpVersionInformation->dwMinorVersion = dwMinor;
+ lpVersionInformation->dwBuildNumber = dwBuildNumber;
+ }
+#endif
+
return bRet;
}
@@ -3517,37 +3568,40 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
RemoteSession = GetSystemMetrics (SM_REMOTESESSION) != 0;
- // OS version check
- if (CurrentOSMajor < 5)
+#ifndef VC_SKIP_OS_DRIVER_REQ_CHECK
+ if (!IsSupportedOS())
{
MessageBoxW (NULL, GetString ("UNSUPPORTED_OS"), lpszTitle, MB_ICONSTOP);
exit (1);
}
+#else
+ // in TESTSIGNING mode, we support only Windows Vista, Windows 7, Windows 8/8.1
+ if ( !IsOSVersionAtLeast(WIN_VISTA, 0)
+#ifndef SETUP
+ || IsOSVersionAtLeast(WIN_10, 0)
+#else
+ || (IsOSVersionAtLeast(WIN_10, 0) && !bMakePackage)
+#endif
+ )
+ {
+ MessageBoxW (NULL, L"TESTSIGNING version of VeraCrypt targets only Windows Vista, Windows 7 and Windows 8/8.1.\n\nPlease use the standard version of VeraCrypt instead.", lpszTitle, MB_ICONSTOP);
+ exit (1);
+ }
+ else if ( !IsTestSigningModeEnabled()
+#ifdef SETUP
+ && !bMakePackage
+#endif
+ )
+ {
+ MessageBoxW (NULL, L"Test-Signing Mode, which is required to run VeraCrypt TESTSIGNING binaries, is not enabled in Windows.\n\nExecution aborted!", lpszTitle, MB_ICONSTOP);
+ exit (1);
+ }
+#endif
else
{
// Service pack check & warnings about critical MS issues
switch (nCurrentOS)
{
- case WIN_2000:
- if (CurrentOSServicePack < 3)
- Warning ("LARGE_IDE_WARNING_2K", NULL);
- else
- {
- DWORD val = 0, size = sizeof(val);
- HKEY hkey;
-
- if (RegOpenKeyExW (HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Services\\Atapi\\Parameters", 0, KEY_READ, &hkey) == ERROR_SUCCESS)
- {
- if (RegQueryValueExW (hkey, L"EnableBigLba", 0, 0, (LPBYTE) &val, &size) != ERROR_SUCCESS
- || val != 1)
- {
- Warning ("LARGE_IDE_WARNING_2K_REGISTRY", NULL);
- }
- RegCloseKey (hkey);
- }
- }
- break;
-
case WIN_XP:
if (CurrentOSServicePack < 1)
{
@@ -6252,7 +6306,7 @@ static BOOL PerformBenchmark(HWND hBenchDlg, HWND hwndDlg)
benchmarkTable[benchmarkTotalItems].decSpeed = performanceCountEnd.QuadPart - performanceCountStart.QuadPart;
benchmarkTable[benchmarkTotalItems].id = ci->ea;
benchmarkTable[benchmarkTotalItems].meanBytesPerSec = ((unsigned __int64) (benchmarkBufferSize / ((float) benchmarkTable[benchmarkTotalItems].encSpeed / benchmarkPerformanceFrequency.QuadPart)) + (unsigned __int64) (benchmarkBufferSize / ((float) benchmarkTable[benchmarkTotalItems].decSpeed / benchmarkPerformanceFrequency.QuadPart))) / 2;
- EAGetName (benchmarkTable[benchmarkTotalItems].name, ci->ea, 1);
+ EAGetName (benchmarkTable[benchmarkTotalItems].name, 100, ci->ea, 1);
benchmarkTotalItems++;
}
@@ -7175,7 +7229,7 @@ CipherTestDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
for (ea = EAGetFirst (); ea != 0; ea = EAGetNext (ea))
{
if (EAGetCipherCount (ea) == 1 && EAIsFormatEnabled (ea))
- AddComboPair (GetDlgItem (hwndDlg, IDC_CIPHER), EAGetName (buf, ea, 1), EAGetFirstCipher (ea));
+ AddComboPair (GetDlgItem (hwndDlg, IDC_CIPHER), EAGetName (buf, ARRAYSIZE(buf),ea, 1), EAGetFirstCipher (ea));
}
ResetCipherTest(hwndDlg, idTestCipher);
@@ -11143,6 +11197,37 @@ BOOL IsOSVersionAtLeast (OSVersionEnum reqMinOS, int reqMinServicePack)
>= (major << 16 | minor << 8 | reqMinServicePack));
}
+BOOL IsSupportedOS ()
+{
+ BOOL bRet = FALSE;
+#ifdef SETUP
+ static const wchar_t* szWin7KBs[] = {L"KB3033929", L"KB4474419"};
+ static const wchar_t* szWinVistaKBs[] = {L"KB4039648", L"KB4474419"};
+ if (IsOSAtLeast(WIN_8))
+ bRet = TRUE;
+ else if (IsOSAtLeast(WIN_7))
+ {
+ if (OneOfKBsInstalled(szWin7KBs, 2))
+ bRet = TRUE;
+ else
+ MessageBoxW (NULL, L"SHA-2 support missing from Windows.\n\nPlease Install KB3033929 or KB4474419", lpszTitle, MB_ICONWARNING);
+ }
+ else if (IsOSAtLeast(WIN_VISTA))
+ {
+ if (OneOfKBsInstalled(szWinVistaKBs, 2))
+ bRet = TRUE;
+ else
+ MessageBoxW (NULL, L"SHA-2 support missing from Windows.\n\nPlease Install KB4039648 or KB4474419", lpszTitle, MB_ICONWARNING);
+ }
+ else if (IsOSAtLeast(WIN_XP))
+ bRet = TRUE;
+#else
+ if (IsOSAtLeast(WIN_XP))
+ bRet = TRUE;
+#endif
+
+ return bRet;
+}
BOOL Is64BitOs()
{
@@ -11210,7 +11295,7 @@ BOOL IsARM()
USHORT processMachine, nativeMachine;
if (fnIsWow64Process2(GetCurrentProcess(), &processMachine, &nativeMachine))
{
- if (IMAGE_FILE_MACHINE_ARM64 == nativeMachine || IMAGE_FILE_MACHINE_AMD64 == nativeMachine || IMAGE_FILE_MACHINE_IA64 == nativeMachine || IMAGE_FILE_MACHINE_ALPHA64 == nativeMachine)
+ if (IMAGE_FILE_MACHINE_ARM64 == nativeMachine || IMAGE_FILE_MACHINE_ARM == nativeMachine)
isARM = TRUE;
else
isARM = FALSE;
@@ -14357,7 +14442,7 @@ INT_PTR SecureDesktopDialogBoxParam(
#endif
-#ifdef NDEBUG
+#if defined(NDEBUG) && !defined(VC_SKIP_OS_DRIVER_REQ_CHECK)
static BOOL InitializeWintrust()
{
if (!hWinTrustLib)
@@ -14408,7 +14493,7 @@ static void FinalizeWintrust()
BOOL VerifyModuleSignature (const wchar_t* path)
{
-#ifdef NDEBUG
+#if defined(NDEBUG) && !defined (VC_SKIP_OS_DRIVER_REQ_CHECK)
BOOL bResult = FALSE;
HRESULT hResult;
GUID gActionID = WINTRUST_ACTION_GENERIC_VERIFY_V2;
@@ -14416,6 +14501,11 @@ BOOL VerifyModuleSignature (const wchar_t* path)
WINTRUST_DATA WVTData = {0};
wchar_t filePath [TC_MAX_PATH + 1024];
+ // we check our own authenticode signature only starting from Windows 10 since this is
+ // the minimal supported OS apart from XP where we can't verify SHA256 signatures
+ if (!IsOSAtLeast (WIN_10))
+ return TRUE;
+
// Strip quotation marks (if any)
if (path [0] == L'"')
{
@@ -14460,9 +14550,7 @@ BOOL VerifyModuleSignature (const wchar_t* path)
BYTE hashVal[64];
sha512 (hashVal, pProviderCert->pCert->pbCertEncoded, pProviderCert->pCert->cbCertEncoded);
- if ( (0 == memcmp (hashVal, gpbSha1CodeSignCertFingerprint, 64))
- || (0 == memcmp (hashVal, gpbSha256CodeSignCertFingerprint, 64))
- )
+ if (0 == memcmp (hashVal, gpbSha256CodeSignCertFingerprint, 64))
{
bResult = TRUE;
}
@@ -15551,3 +15639,219 @@ BOOL GetHibernateStatus (BOOL& bHibernateEnabled, BOOL& bHiberbootEnabled)
return bResult;
}
+
+/* return TRUE if Windows is in Test Signing mode */
+/* ref: https://social.msdn.microsoft.com/Forums/Windowsapps/en-US/e6c1be93-7003-4594-b8e4-18ab4a75d273/detecting-testsigning-onoff-via-api */
+BOOL IsTestSigningModeEnabled ()
+{
+ BOOL bEnabled = FALSE;
+ NtQuerySystemInformationFn NtQuerySystemInformationPtr = (NtQuerySystemInformationFn) GetProcAddress (GetModuleHandle (L"ntdll.dll"), "NtQuerySystemInformation");
+ if(NtQuerySystemInformationPtr)
+ {
+ SYSTEM_CODEINTEGRITY_INFORMATION info = {0};
+ ULONG cbReturnedData = 0;
+ info.Length = sizeof(info);
+ if ( (NtQuerySystemInformationPtr((SYSTEM_INFORMATION_CLASS) SYSTEMCODEINTEGRITYINFORMATION, &info, sizeof(info), &cbReturnedData) >= 0)
+ && (cbReturnedData == sizeof(info))
+ )
+ {
+ if ((info.CodeIntegrityOptions & (CODEINTEGRITY_OPTION_TESTSIGN | CODEINTEGRITY_OPTION_ENABLED)) == (CODEINTEGRITY_OPTION_TESTSIGN | CODEINTEGRITY_OPTION_ENABLED))
+ {
+ bEnabled = TRUE;
+ }
+ }
+ }
+
+ return bEnabled;
+}
+
+// Adapted from https://docs.microsoft.com/en-us/windows/win32/wmisdk/example-creating-a-wmi-application
+bool GetKbList (std::vector<std::wstring>& kbList)
+{
+ HRESULT hres;
+ kbList.clear();
+
+ // Initialize COM.
+ hres = CoInitialize(NULL);
+ if (FAILED(hres))
+ {
+ return false;
+ }
+
+ // Initialize
+ hres = CoInitializeSecurity(
+ NULL,
+ -1, // COM negotiates service
+ NULL, // Authentication services
+ NULL, // Reserved
+ RPC_C_AUTHN_LEVEL_DEFAULT, // authentication
+ RPC_C_IMP_LEVEL_IMPERSONATE, // Impersonation
+ NULL, // Authentication info
+ EOAC_NONE, // Additional capabilities
+ NULL // Reserved
+ );
+
+
+ if (FAILED(hres))
+ {
+ CoUninitialize();
+ return false;
+ }
+
+ // Obtain the initial locator to Windows Management
+ // on a particular host computer.
+ IWbemLocator *pLoc = 0;
+
+ hres = CoCreateInstance(
+ CLSID_WbemLocator,
+ 0,
+ CLSCTX_INPROC_SERVER,
+ IID_IWbemLocator, (LPVOID *) &pLoc);
+
+ if (FAILED(hres))
+ {
+ CoUninitialize();
+ return false;
+ }
+
+ IWbemServices *pSvc = 0;
+
+ // Connect to the root\cimv2 namespace with the
+ // current user and obtain pointer pSvc
+ // to make IWbemServices calls.
+
+ hres = pLoc->ConnectServer(
+
+ _bstr_t(L"ROOT\\CIMV2"), // WMI namespace
+ NULL, // User name
+ NULL, // User password
+ 0, // Locale
+ NULL, // Security flags
+ 0, // Authority
+ 0, // Context object
+ &pSvc // IWbemServices proxy
+ );
+
+ if (FAILED(hres))
+ {
+ pLoc->Release();
+ CoUninitialize();
+ return false;
+ }
+
+ // Set the IWbemServices proxy so that impersonation
+ // of the user (client) occurs.
+ hres = CoSetProxyBlanket(
+
+ pSvc, // the proxy to set
+ RPC_C_AUTHN_WINNT, // authentication service
+ RPC_C_AUTHZ_NONE, // authorization service
+ NULL, // Server principal name
+ RPC_C_AUTHN_LEVEL_CALL, // authentication level
+ RPC_C_IMP_LEVEL_IMPERSONATE, // impersonation level
+ NULL, // client identity
+ EOAC_NONE // proxy capabilities
+ );
+
+ if (FAILED(hres))
+ {
+ pSvc->Release();
+ pLoc->Release();
+ CoUninitialize();
+ return false;
+ }
+
+
+ // Use the IWbemServices pointer to make requests of WMI.
+ // Make requests here:
+
+ // query for all installed KBs
+ IEnumWbemClassObject* pEnumerator = NULL;
+ hres = pSvc->ExecQuery(
+ bstr_t("WQL"),
+ bstr_t("SELECT * FROM Win32_QuickFixEngineering"),
+ WBEM_FLAG_FORWARD_ONLY | WBEM_FLAG_RETURN_IMMEDIATELY,
+ NULL,
+ &pEnumerator);
+
+ if (FAILED(hres))
+ {
+ pSvc->Release();
+ pLoc->Release();
+ CoUninitialize();
+ return false;
+ }
+ else
+ {
+ IWbemClassObject *pclsObj;
+ ULONG uReturn = 0;
+
+ while (pEnumerator)
+ {
+ hres = pEnumerator->Next(WBEM_INFINITE, 1,
+ &pclsObj, &uReturn);
+
+ if(0 == uReturn)
+ {
+ break;
+ }
+
+ VARIANT vtProp;
+
+ // Get the value of the "hotfixid" property
+ hres = pclsObj->Get(L"hotfixid", 0, &vtProp, 0, 0);
+ if (SUCCEEDED(hres) && (V_VT(&vtProp) == VT_BSTR))
+ {
+ kbList.push_back(vtProp.bstrVal);
+ }
+ VariantClear(&vtProp);
+
+ pclsObj->Release();
+ pclsObj = NULL;
+ }
+
+ }
+
+ // Cleanup
+ // ========
+
+ pSvc->Release();
+ pLoc->Release();
+ pEnumerator->Release();
+
+ CoUninitialize();
+
+ return true;
+}
+
+bool OneOfKBsInstalled (const wchar_t* szKBs[], int count)
+{
+ std::vector<std::wstring> kbList;
+ bool bRet = GetKbList(kbList);
+ if (bRet)
+ {
+ // at least one of the given KBs must be present
+ bool bFound = false;
+
+ for (size_t j = 0; j < kbList.size(); j++)
+ {
+ for (int i = 0; i < count; i++)
+ {
+ if (_wcsicmp(szKBs[i], kbList[j].c_str()) == 0)
+ {
+ bFound = true;
+ break;
+ }
+ }
+
+ if (bFound)
+ {
+ break;
+ }
+ }
+
+ bRet = bFound;
+ }
+
+ return bRet;
+}
diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h
index 86e655a7..6e84c94f 100644
--- a/src/Common/Dlgcode.h
+++ b/src/Common/Dlgcode.h
@@ -18,6 +18,7 @@
#include "Apidrvr.h"
#include "Keyfiles.h"
#include "Wipe.h"
+#include <Winternl.h>
#ifdef __cplusplus
extern "C" {
@@ -250,6 +251,28 @@ typedef enum BitLockerEncryptionStatus
BL_Status_Protected
} BitLockerEncryptionStatus;
+#ifndef CODEINTEGRITY_OPTION_ENABLED
+
+#define CODEINTEGRITY_OPTION_ENABLED 0x01
+#define CODEINTEGRITY_OPTION_TESTSIGN 0x02
+
+typedef struct _SYSTEM_CODEINTEGRITY_INFORMATION {
+ ULONG Length;
+ ULONG CodeIntegrityOptions;
+} SYSTEM_CODEINTEGRITY_INFORMATION, *PSYSTEM_CODEINTEGRITY_INFORMATION;
+
+#endif
+
+#define SYSPARTITIONINFORMATION 0x62
+#define SYSTEMCODEINTEGRITYINFORMATION 0x67
+
+typedef NTSTATUS (WINAPI *NtQuerySystemInformationFn)(
+ SYSTEM_INFORMATION_CLASS SystemInformationClass,
+ PVOID SystemInformation,
+ ULONG SystemInformationLength,
+ PULONG ReturnLength
+);
+
#define DEFAULT_VOL_CREATION_WIZARD_MODE WIZARD_MODE_FILE_CONTAINER
@@ -479,6 +502,7 @@ void Debug (char *format, ...);
void DebugMsgBox (char *format, ...);
BOOL IsOSAtLeast (OSVersionEnum reqMinOS);
BOOL IsOSVersionAtLeast (OSVersionEnum reqMinOS, int reqMinServicePack);
+BOOL IsSupportedOS ();
BOOL Is64BitOs ();
BOOL IsARM();
BOOL IsServerOS ();
@@ -567,6 +591,7 @@ BOOL BufferHasPattern (const unsigned char* buffer, size_t bufferLen, const void
BOOL EnableProcessProtection();
void SafeOpenURL (LPCWSTR szUrl);
BitLockerEncryptionStatus GetBitLockerEncryptionStatus(WCHAR driveLetter);
+BOOL IsTestSigningModeEnabled ();
#ifdef _WIN64
void GetAppRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed);
#endif
@@ -757,6 +782,8 @@ public:
};
BOOL GetHibernateStatus (BOOL& bHibernateEnabled, BOOL& bHiberbootEnabled);
+bool GetKbList (std::vector<std::wstring>& kbList);
+bool OneOfKBsInstalled (const wchar_t* szKBs[], int count);
#endif // __cplusplus
diff --git a/src/Common/EncryptionThreadPool.c b/src/Common/EncryptionThreadPool.c
index 10052796..1401e8a0 100644
--- a/src/Common/EncryptionThreadPool.c
+++ b/src/Common/EncryptionThreadPool.c
@@ -108,6 +108,18 @@ typedef struct EncryptionThreadPoolWorkItemStruct
char *Salt;
} KeyDerivation;
+
+ struct
+ {
+ TC_EVENT *KeyDerivationCompletedEvent;
+ TC_EVENT *NoOutstandingWorkItemEvent;
+ LONG *outstandingWorkItemCount;
+ void* keyInfoBuffer;
+ int keyInfoBufferSize;
+ void* keyDerivationWorkItems;
+ int keyDerivationWorkItemsSize;
+
+ } ReadVolumeHeaderFinalization;
};
} EncryptionThreadPoolWorkItem;
@@ -275,6 +287,37 @@ static TC_THREAD_PROC EncryptionThreadProc (void *threadArg)
TC_SET_EVENT (WorkItemCompletedEvent);
continue;
+ case ReadVolumeHeaderFinalizationWork:
+ TC_WAIT_EVENT (*(workItem->ReadVolumeHeaderFinalization.NoOutstandingWorkItemEvent));
+
+ if (workItem->ReadVolumeHeaderFinalization.keyDerivationWorkItems)
+ {
+ burn (workItem->ReadVolumeHeaderFinalization.keyDerivationWorkItems, workItem->ReadVolumeHeaderFinalization.keyDerivationWorkItemsSize);
+#if !defined(DEVICE_DRIVER)
+ VirtualUnlock (workItem->ReadVolumeHeaderFinalization.keyDerivationWorkItems, workItem->ReadVolumeHeaderFinalization.keyDerivationWorkItemsSize);
+#endif
+ TCfree (workItem->ReadVolumeHeaderFinalization.keyDerivationWorkItems);
+ }
+
+ if (workItem->ReadVolumeHeaderFinalization.keyInfoBuffer)
+ {
+ burn (workItem->ReadVolumeHeaderFinalization.keyInfoBuffer, workItem->ReadVolumeHeaderFinalization.keyInfoBufferSize);
+#if !defined(DEVICE_DRIVER)
+ VirtualUnlock (workItem->ReadVolumeHeaderFinalization.keyInfoBuffer, workItem->ReadVolumeHeaderFinalization.keyInfoBufferSize);
+#endif
+ TCfree (workItem->ReadVolumeHeaderFinalization.keyInfoBuffer);
+ }
+
+#if !defined(DEVICE_DRIVER)
+ CloseHandle (*(workItem->ReadVolumeHeaderFinalization.KeyDerivationCompletedEvent));
+ CloseHandle (*(workItem->ReadVolumeHeaderFinalization.NoOutstandingWorkItemEvent));
+#endif
+ TCfree (workItem->ReadVolumeHeaderFinalization.KeyDerivationCompletedEvent);
+ TCfree (workItem->ReadVolumeHeaderFinalization.NoOutstandingWorkItemEvent);
+ TCfree (workItem->ReadVolumeHeaderFinalization.outstandingWorkItemCount);
+ SetWorkItemState (workItem, WorkItemFree);
+ TC_SET_EVENT (WorkItemCompletedEvent);
+ continue;
default:
TC_THROW_FATAL_EXCEPTION;
}
@@ -528,6 +571,40 @@ void EncryptionThreadPoolBeginKeyDerivation (TC_EVENT *completionEvent, TC_EVENT
TC_RELEASE_MUTEX (&EnqueueMutex);
}
+void EncryptionThreadPoolBeginReadVolumeHeaderFinalization (TC_EVENT *keyDerivationCompletedEvent, TC_EVENT *noOutstandingWorkItemEvent, LONG* outstandingWorkItemCount,
+ void* keyInfoBuffer, int keyInfoBufferSize,
+ void* keyDerivationWorkItems, int keyDerivationWorkItemsSize)
+{
+ EncryptionThreadPoolWorkItem *workItem;
+
+ if (!ThreadPoolRunning)
+ TC_THROW_FATAL_EXCEPTION;
+
+ TC_ACQUIRE_MUTEX (&EnqueueMutex);
+
+ workItem = &WorkItemQueue[EnqueuePosition++];
+ if (EnqueuePosition >= ThreadQueueSize)
+ EnqueuePosition = 0;
+
+ while (GetWorkItemState (workItem) != WorkItemFree)
+ {
+ TC_WAIT_EVENT (WorkItemCompletedEvent);
+ }
+
+ workItem->Type = ReadVolumeHeaderFinalizationWork;
+ workItem->ReadVolumeHeaderFinalization.NoOutstandingWorkItemEvent = noOutstandingWorkItemEvent;
+ workItem->ReadVolumeHeaderFinalization.KeyDerivationCompletedEvent = keyDerivationCompletedEvent;
+ workItem->ReadVolumeHeaderFinalization.keyInfoBuffer = keyInfoBuffer;
+ workItem->ReadVolumeHeaderFinalization.keyInfoBufferSize = keyInfoBufferSize;
+ workItem->ReadVolumeHeaderFinalization.keyDerivationWorkItems = keyDerivationWorkItems;
+ workItem->ReadVolumeHeaderFinalization.keyDerivationWorkItemsSize = keyDerivationWorkItemsSize;
+ workItem->ReadVolumeHeaderFinalization.outstandingWorkItemCount = outstandingWorkItemCount;
+
+ SetWorkItemState (workItem, WorkItemReady);
+ TC_SET_EVENT (WorkItemReadyEvent);
+ TC_RELEASE_MUTEX (&EnqueueMutex);
+}
+
void EncryptionThreadPoolDoWork (EncryptionThreadPoolWorkType type, byte *data, const UINT64_STRUCT *startUnitNo, uint32 unitCount, PCRYPTO_INFO cryptoInfo)
{
@@ -615,7 +692,7 @@ void EncryptionThreadPoolDoWork (EncryptionThreadPoolWorkType type, byte *data,
workItem->Encryption.UnitCount = unitsPerFragment;
workItem->Encryption.StartUnitNo.Value = fragmentStartUnitNo;
- fragmentData += unitsPerFragment * ENCRYPTION_DATA_UNIT_SIZE;
+ fragmentData += ((uint64)unitsPerFragment) * ENCRYPTION_DATA_UNIT_SIZE;
fragmentStartUnitNo += unitsPerFragment;
if (remainder > 0 && --remainder == 0)
diff --git a/src/Common/EncryptionThreadPool.h b/src/Common/EncryptionThreadPool.h
index 161fb7ce..053d4107 100644
--- a/src/Common/EncryptionThreadPool.h
+++ b/src/Common/EncryptionThreadPool.h
@@ -24,7 +24,8 @@ typedef enum
{
EncryptDataUnitsWork,
DecryptDataUnitsWork,
- DeriveKeyWork
+ DeriveKeyWork,
+ ReadVolumeHeaderFinalizationWork
} EncryptionThreadPoolWorkType;
#ifndef DEVICE_DRIVER
@@ -32,6 +33,7 @@ size_t GetCpuCount (WORD* pGroupCount);
#endif
void EncryptionThreadPoolBeginKeyDerivation (TC_EVENT *completionEvent, TC_EVENT *noOutstandingWorkItemEvent, LONG *completionFlag, LONG *outstandingWorkItemCount, int pkcs5Prf, char *password, int passwordLength, char *salt, int iterationCount, char *derivedKey);
+void EncryptionThreadPoolBeginReadVolumeHeaderFinalization (TC_EVENT *keyDerivationCompletedEvent, TC_EVENT *noOutstandingWorkItemEvent, LONG* outstandingWorkItemCount, void* keyInfoBuffer, int keyInfoBufferSize, void* keyDerivationWorkItems, int keyDerivationWorkItemsSize);
void EncryptionThreadPoolDoWork (EncryptionThreadPoolWorkType type, byte *data, const UINT64_STRUCT *startUnitNo, uint32 unitCount, PCRYPTO_INFO cryptoInfo);
BOOL EncryptionThreadPoolStart (size_t encryptionFreeCpuCount);
void EncryptionThreadPoolStop ();
diff --git a/src/Common/Language.c b/src/Common/Language.c
index ffccd44e..844f4dad 100644
--- a/src/Common/Language.c
+++ b/src/Common/Language.c
@@ -226,7 +226,7 @@ static BOOL LoadLanguageData (int resourceid, BOOL bForceSetPreferredLanguage, B
XmlGetAttributeText (xml, "prog-version", attr, sizeof (attr));
// Check version of external language file
- if (defaultLangParsed && strcmp (attr, VERSION_STRING VERSION_STRING_SUFFIX) && strcmp (attr, "DEBUG"))
+ if (defaultLangParsed && strcmp (attr, VERSION_STRING) && strcmp (attr, "DEBUG"))
{
wchar_t m[2048];
StringCbPrintfW (m, sizeof(m), L"The installed language pack is incompatible with this version of VeraCrypt (the language pack is for VeraCrypt %hs). A newer version may be available at www.idrix.fr.\n\nTo prevent this message from being displayed, do any of the following:\n\n- Select 'Settings' > 'Language'; then select 'English' and click 'OK'.\n\n- Remove or replace the language pack with a compatible version (the language pack may reside e.g. in 'C:\\Program Files\\VeraCrypt' or '%%LOCALAPPDATA%%\\VirtualStore\\Program Files\\VeraCrypt', etc.)", attr);
diff --git a/src/Common/Language.xml b/src/Common/Language.xml
index fc946fce..441909bf 100644
--- a/src/Common/Language.xml
+++ b/src/Common/Language.xml
@@ -32,6 +32,7 @@
<entry lang="en" key="IDC_DEVICE_TRANSFORM_MODE_INPLACE">Encrypt partition in place</entry>
<entry lang="en" key="IDC_DISPLAY_KEYS">Display generated keys (their portions)</entry>
<entry lang="en" key="IDC_DISPLAY_POOL_CONTENTS">Display pool content</entry>
+ <entry lang="en" key="IDC_DOWNLOAD_CD_BURN_SOFTWARE">Download CD/DVD recording software</entry>
<entry lang="en" key="IDC_FILE_CONTAINER">Create an encrypted file container</entry>
<entry lang="en" key="IDC_GB">&amp;GiB</entry>
<entry lang="en" key="IDC_TB">&amp;TiB</entry>
@@ -602,6 +603,7 @@
<entry lang="en" key="OVERWRITEPROMPT_DEVICE_HIDDEN_OS_PARTITION">CAUTION: ANY FILES CURRENTLY STORED ON THE PARTITION '%s'%s (I.E. ON THE FIRST PARTITION BEHIND THE SYSTEM PARTITION) WILL BE ERASED AND LOST (THEY WILL NOT BE ENCRYPTED)!\n\nAre you sure you want to proceed with format?</entry>
<entry lang="en" key="OVERWRITEPROMPT_DEVICE_SECOND_WARNING_LOTS_OF_DATA">WARNING: THE SELECTED PARTITION CONTAINS A LARGE AMOUNT OF DATA! Any files stored on the partition will be erased and lost (they will NOT be encrypted)!</entry>
<entry lang="en" key="ERASE_FILES_BY_CREATING_VOLUME">Erase any files stored on the partition by creating a VeraCrypt volume within it</entry>
+ <entry lang="en" key="PASSWORD">Password</entry>
<entry lang="en" key="PIM">PIM</entry>
<entry lang="en" key="IDD_PCDM_CHANGE_PKCS5_PRF">Set Header Key Derivation Algorithm</entry>
<entry lang="en" key="IDD_PCDM_ADD_REMOVE_VOL_KEYFILES">Add/Remove Keyfiles to/from Volume</entry>
@@ -956,7 +958,7 @@
<entry lang="en" key="HEADER_RESTORE_INTERNAL">Restore the volume header from the backup embedded in the volume</entry>
<entry lang="en" key="HEADER_RESTORE_EXTERNAL">Restore the volume header from an external backup file</entry>
<entry lang="en" key="HEADER_BACKUP_SIZE_INCORRECT">The size of the volume header backup file is incorrect.</entry>
- <entry lang="en" key="VOLUME_HAS_NO_BACKUP_HEADER">There is no backup header embedded in this volume (note that only volumes created by VeraCrypt 6.0 or later contain embedded backup headers).</entry>
+ <entry lang="en" key="VOLUME_HAS_NO_BACKUP_HEADER">There is no backup header embedded in this volume (note that only volumes created by TrueCrypt 6.0 or later contain embedded backup headers).</entry>
<entry lang="en" key="BACKUP_HEADER_NOT_FOR_SYS_DEVICE">You are attempting to back up the header of the system partition/drive. This is not allowed. Backup/restore operations pertaining to the system partition/drive can be performed only using the VeraCrypt Rescue Disk.\n\nDo you want to create a VeraCrypt Rescue Disk?</entry>
<entry lang="en" key="RESTORE_HEADER_NOT_FOR_SYS_DEVICE">You are attempting to restore the header of a virtual VeraCrypt volume but you selected the system partition/drive. This is not allowed. Backup/restore operations pertaining to the system partition/drive can be performed only using the VeraCrypt Rescue Disk.\n\nDo you want to create a VeraCrypt Rescue Disk?</entry>
<entry lang="en" key="RESCUE_DISK_NON_WIZARD_CREATION_SELECT_PATH">After you click OK, you will select a filename for the new VeraCrypt Rescue Disk image and the location where you wish to place it.</entry>
@@ -1105,7 +1107,6 @@
<entry lang="en" key="PIM_REQUIRE_LONG_PASSWORD">Password must contain 20 or more characters in order to use the specified PIM.\nShorter passwords can only be used if the PIM is 485 or greater.</entry>
<entry lang="en" key="BOOT_PIM_REQUIRE_LONG_PASSWORD">Pre-boot authentication Password must contain 20 or more characters in order to use the specified PIM.\nShorter passwords can only be used if the PIM is 98 or greater.</entry>
<entry lang="en" key="KEYFILES_NOT_SUPPORTED_FOR_SYS_ENCRYPTION">Keyfiles are currently not supported for system encryption.</entry>
- <entry lang="en" key="RESCUE_DISK_BACK_BUTTON">The Rescue Disk was already created depending on the selected options. In order to prevent incompatibility, you have to click 'cancel' and restart the system encryption process, if you want to modify any configuration.</entry>
<entry lang="en" key="CANNOT_RESTORE_KEYBOARD_LAYOUT">Warning: VeraCrypt could not restore the original keyboard layout. This may cause you to enter a password incorrectly.</entry>
<entry lang="en" key="CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION">Error: Cannot set the keyboard layout for VeraCrypt to the standard US keyboard layout.\n\nNote that the password needs to be typed in the pre-boot environment (before Windows starts) where non-US Windows keyboard layouts are not available. Therefore, the password must always be typed using the standard US keyboard layout.</entry>
<entry lang="en" key="ALT_KEY_CHARS_NOT_FOR_SYS_ENCRYPTION">It is not possible to type characters by pressing keys while the right Alt key is held down. However, you can type most of such characters by pressing appropriate keys while the Shift key is held down.</entry>
@@ -1174,14 +1175,13 @@
<entry lang="en" key="CD_BURNER_NOT_PRESENT_CONNECTED_NOW">A CD/DVD burner is connected to my computer now. Continue and write the Rescue Disk.</entry>
<entry lang="en" key="CD_BURNER_NOT_PRESENT_WILL_STORE_ISO_INFO">Please follow these steps:\n\n1) Connect a removable drive, such as a USB flash drive, to your computer now.\n\n2) Copy the VeraCrypt Rescue Disk image file (%s) to the removable drive.\n\nIn case you need to use the VeraCrypt Rescue Disk in the future, you will be able to connect your removable drive (containing the VeraCrypt Rescue Disk image) to a computer with a CD/DVD burner and create a bootable VeraCrypt Rescue Disk by burning the image to a CD or DVD. IMPORTANT: Note that the VeraCrypt Rescue Disk image file must be written to the CD/DVD as an ISO disk image (not as an individual file).</entry>
<entry lang="en" key="RESCUE_DISK_RECORDING_TITLE">Rescue Disk Recording</entry>
- <entry lang="en" key="AES_BOX_HELP">AES is secure according to NIST</entry>
- <entry lang="en" key="BACKUP_RESCUE_DISK_TITLE">Backup Rescue Disk</entry>
<entry lang="en" key="RESCUE_DISK_CREATED_TITLE">Rescue Disk Created</entry>
<entry lang="en" key="SYS_ENCRYPTION_PRETEST_TITLE">System Encryption Test</entry>
<entry lang="en" key="RESCUE_DISK_DISK_VERIFIED_TITLE">Rescue Disk Verified</entry>
<entry lang="en" key="RESCUE_DISK_VERIFIED_INFO">\nThe VeraCrypt Rescue Disk has been successfully verified. Please remove it from the drive now and store it in a safe place.\n\nClick Next to continue.</entry>
<entry lang="en" key="REMOVE_RESCUE_DISK_FROM_DRIVE">WARNING: During the next steps, the VeraCrypt Rescue Disk must not be in the drive. Otherwise, it will not be possible to complete the steps correctly.\n\nPlease remove it from the drive now and store it in a safe place. Then click OK.</entry>
<entry lang="en" key="PREBOOT_NOT_LOCALIZED">Warning: Due to technical limitations of the pre-boot environment, texts displayed by VeraCrypt in the pre-boot environment (i.e. before Windows starts) cannot be localized. The VeraCrypt Boot Loader user interface is completely in English.\n\nContinue?</entry>
+ <entry lang="en" key="SYS_ENCRYPTION_PRETEST_INFO">Before encrypting your system partition or drive, VeraCrypt needs to verify that everything works correctly.\n\nAfter you click Test, all the necessary components (for example, the pre-boot authentication component, i.e. the VeraCrypt Boot Loader) will be installed and your computer will be restarted. Then you will have to enter your password in the VeraCrypt Boot Loader screen that will appear before Windows starts. After Windows starts, you will be automatically informed about the result of this pretest.\n\nThe following device will be modified: Drive #%d\n\n\nIf you click Cancel now, nothing will be installed and the pretest will not be performed.</entry>
<entry lang="en" key="SYS_ENCRYPTION_PRETEST_INFO2_PORTION_1">IMPORTANT NOTES -- PLEASE READ OR PRINT (click 'Print'):\n\nNote that none of your files will be encrypted before you successfully restart your computer and start Windows. Thus, if anything fails, your data will NOT be lost. However, if something does go wrong, you might encounter difficulties in starting Windows. Therefore, please read (and, if possible, print) the following guidelines on what to do if Windows cannot start after you restart the computer.\n\n</entry>
<entry lang="en" key="SYS_ENCRYPTION_PRETEST_INFO2_PORTION_2">What to Do If Windows Cannot Start\n------------------------------------------------\n\nNote: These instructions are valid only if you have not started encrypting.\n\n- If Windows does not start after you enter the correct password (or if you repeatedly enter the correct password but VeraCrypt says that the password is incorrect), do not panic. Restart (power off and on) the computer, and in the VeraCrypt Boot Loader screen, press the Esc key on your keyboard (and if you have multiple systems, choose which to start). Then Windows should start (provided that it is not encrypted) and VeraCrypt will automatically ask whether you want to uninstall the pre-boot authentication component. Note that the previous steps do NOT work if the system partition/drive is encrypted (nobody can start Windows or access encrypted data on the drive without the correct password even if he or she follows the previous steps).\n\n</entry>
<entry lang="en" key="SYS_ENCRYPTION_PRETEST_INFO2_PORTION_3">- If the previous steps do not help or if the VeraCrypt Boot Loader screen does not appear (before Windows starts), insert the VeraCrypt Rescue Disk into your CD/DVD drive and restart your computer. If the VeraCrypt Rescue Disk screen does not appear (or if you do not see the 'Repair Options' item in the 'Keyboard Controls' section of the VeraCrypt Rescue Disk screen), it is possible that your BIOS is configured to attempt to boot from hard drives before CD/DVD drives. If that is the case, restart your computer, press F2 or Delete (as soon as you see a BIOS start-up screen), and wait until a BIOS configuration screen appears. If no BIOS configuration screen appears, restart (reset) the computer again and start pressing F2 or Delete repeatedly as soon as you restart (reset) the computer. When a BIOS configuration screen appears, configure your BIOS to boot from the CD/DVD drive first (for information on how to do so, please refer to the documentation for your BIOS/motherboard or contact your computer vendor's technical support team for assistance). Then restart your computer. The VeraCrypt Rescue Disk screen should appear now. In the VeraCrypt Rescue Disk screen, select 'Repair Options' by pressing F8 on your keyboard. From the 'Repair Options' menu, select 'Restore original system loader'. Then remove the Rescue Disk from your CD/DVD drive and restart your computer. Windows should start normally (provided that it is not encrypted).\n\n</entry>
@@ -1189,7 +1189,6 @@
<entry lang="en" key="SYS_ENCRYPTION_PRETEST_RESULT_TITLE">Pretest Successfully Completed</entry>
<entry lang="en" key="SYS_ENCRYPTION_PRETEST_RESULT_INFO">If the encryption is interrupted you can resume it restarting VeraCrypt and selecting 'System' > 'Resume Interrupted Process'\n\nPlease make sure, that your device does not run out of power during the encryption process.</entry>
<entry lang="en" key="SYSENC_ENCRYPTION_PAGE_INFO">Make sure that your device does not run out of power.\nIf the encryption is interrupted you can resume it restarting VeraCrypt and selecting 'System' > 'Resume Interrupted Process'.</entry>
- <entry lang="en" key="SYSENC_DECRYPTION_PAGE_INFO">Make sure that your device does not run out of power.\nIf the decryption is interrupted you can resume it restarting VeraCrypt and selecting 'System' > 'Resume Interrupted Process'.</entry>
<entry lang="en" key="NONSYS_INPLACE_ENC_ENCRYPTION_PAGE_INFO">\n\nYou can click Pause or Defer anytime to interrupt the process of encryption, exit this wizard, restart or shut down your computer, and then resume the process, which will continue from the point it was stopped. Note that the volume cannot be mounted until it has been fully encrypted.</entry>
<entry lang="en" key="NONSYS_INPLACE_DEC_DECRYPTION_PAGE_INFO">\n\nYou can click Pause or Defer anytime to interrupt the process of decryption, exit this wizard, restart or shut down the computer, and then resume the process, which will continue from the point where it was stopped. Note that the volume cannot be mounted until it has been fully decrypted.</entry>
<entry lang="en" key="SYSENC_HIDDEN_OS_INITIAL_INFO_TITLE">Hidden System Started</entry>
@@ -1476,7 +1475,6 @@
<entry lang="en" key="LINUX_CROSS_SUPPORT_OTHER_HELP">Choose this option if you need to use the volume on other platforms.</entry>
<entry lang="en" key="LINUX_CROSS_SUPPORT_ONLY">I will mount the volume only on {0}</entry>
<entry lang="en" key="LINUX_CROSS_SUPPORT_ONLY_HELP">Choose this option if you do not need to use the volume on other platforms.</entry>
- <entry lang="en" key="LINUX_CROSS_SUPPORT_ONLY_HELP">Choose this option if you do not need to use the volume on other platforms.</entry>
<entry lang="en" key="LINUX_DESELECT">Deselect</entry>
<entry lang="en" key="LINUX_ADMIN_PW_QUERY">Enter your user password or administrator password:</entry>
<entry lang="en" key="LINUX_ADMIN_PW_QUERY_TITLE">Administrator privileges required</entry>
@@ -1560,7 +1558,7 @@
<entry lang="en" key="ENTER_PASSWORD">Enter password</entry>
<entry lang="en" key="ENTER_TC_VOL_PASSWORD">Enter VeraCrypt Volume Password</entry>
<entry lang="en" key="MOUNT">Mount</entry>
- <entry lang="en" key="MOUNT_POINT">Mount Directory"</entry>
+ <entry lang="en" key="MOUNT_POINT">Mount Directory</entry>
<entry lang="en" key="NO_VOLUMES_MOUNTED">No volumes mounted.</entry>
<entry lang="en" key="OPEN_NEW_VOLUME">Specify a New VeraCrypt Volume</entry>
<entry lang="en" key="PARAMETER_INCORRECT">Parameter incorrect</entry>
@@ -1570,6 +1568,11 @@
<entry lang="en" key="UNKNOWN_OPTION">Unknown option</entry>
<entry lang="en" key="VOLUME_LOCATION">Volume Location</entry>
<entry lang="en" key="VOLUME_HOST_IN_USE">WARNING: The host file/device {0} is already in use!\n\nIgnoring this can cause undesired results including system instability. All applications that might be using the host file/device should be closed before mounting the volume.\n\nContinue mounting?</entry>
+ <entry lang="en" key="CANT_INSTALL_WITH_EXE_OVER_MSI">VeraCrypt was previously installed using an MSI package and so it can't be updated using the standard installer.\n\nPlease use the MSI package to update your VeraCrypt installation.</entry>
+ <entry lang="en" key="IDC_USE_ALL_FREE_SPACE">Use all available free space</entry>
+ <entry lang="en" key="RESCUE_DISK_BACK_BUTTON">The Rescue Disk was already created depending on the selected options. In order to prevent incompatibility, you have to click 'cancel' and restart the system encryption process, if you want to modify any configuration.</entry>
+ <entry lang="en" key="AES_BOX_HELP">AES is secure according to NIST</entry>
+ <entry lang="en" key="BACKUP_RESCUE_DISK_TITLE">Backup Rescue Disk</entry>
<entry lang="en" key="RESCUE_DISK_CHECKLIST_A">Store your password in a safe location. You can not recover your data without your password.\nThat is why VeraCrypt is considered to be secure.</entry>
<entry lang="en" key="RESCUE_DISK_CHECKLIST_B">Make sure that the rescue file is stored on an external medium. This could be a flash drive, an external hard drive or even a cloud storage.\nYour rescue file is located here:</entry>
<entry lang="en" key="RESCUE_DISK_CHECKLIST_C">Before you start encrypting your system, it is always a good idea to backup your personal data on an external drive for the unlikely case that the encryption process fails.</entry>
diff --git a/src/Common/Password.c b/src/Common/Password.c
index 8c94fc06..3c9faa82 100644
--- a/src/Common/Password.c
+++ b/src/Common/Password.c
@@ -23,6 +23,7 @@
#include "Random.h"
#include <io.h>
+#include <strsafe.h>
#ifndef SRC_POS
#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
@@ -211,7 +212,7 @@ int ChangePwd (const wchar_t *lpszVolume, Password *oldPassword, int old_pkcs5,
if (bDevice == FALSE)
{
- wcscpy (szCFDevice, szDiskFile);
+ StringCchCopyW (szCFDevice, ARRAYSIZE(szCFDevice), szDiskFile);
}
else
{
diff --git a/src/Common/Tcdefs.h b/src/Common/Tcdefs.h
index d01ea63b..f8ec9960 100644
--- a/src/Common/Tcdefs.h
+++ b/src/Common/Tcdefs.h
@@ -55,21 +55,23 @@ extern unsigned short _rotl16(unsigned short value, unsigned char shift);
#define TC_APP_NAME "VeraCrypt"
// Version displayed to user
-#define VERSION_STRING "1.24-Update9"
+#define VERSION_STRING "1.25.7"
#ifdef VC_EFI_CUSTOM_MODE
#define VERSION_STRING_SUFFIX "-CustomEFI"
+#elif defined(VC_SKIP_OS_DRIVER_REQ_CHECK)
+#define VERSION_STRING_SUFFIX "-TESTSIGNING"
#else
#define VERSION_STRING_SUFFIX ""
#endif
// Version number to compare against driver
-#define VERSION_NUM 0x0124
+#define VERSION_NUM 0x0125
// Release date
-#define TC_STR_RELEASE_DATE L"January 1, 2021"
-#define TC_RELEASE_DATE_YEAR 2021
-#define TC_RELEASE_DATE_MONTH 1
+#define TC_STR_RELEASE_DATE L"January 7, 2022"
+#define TC_RELEASE_DATE_YEAR 2022
+#define TC_RELEASE_DATE_MONTH 01
#define BYTES_PER_KB 1024LL
#define BYTES_PER_MB 1048576LL
@@ -180,10 +182,10 @@ typedef uint64 uint_64t;
typedef CHAR16 wchar_t;
typedef int LONG;
-#define wcscpy StrCpy
+#define StringCchCopyW StrCpyS
#define wcslen StrLen
#define wcscmp StrCmp
-#define wcscat StrCat
+#define StringCchCatW StrCatS
#define memcpy(dest,source,count) CopyMem(dest,source,(UINTN)(count))
#define memset(dest,ch,count) SetMem(dest,(UINTN)(count),(UINT8)(ch))
@@ -195,7 +197,7 @@ typedef int LONG;
#define strchr(str,ch) ScanMem8((VOID *)(str),AsciiStrSize(str),(UINT8)ch)
#define strcmp AsciiStrCmp
#define strncmp(string1,string2,count) (int)(AsciiStrnCmp(string1,string2,(UINTN)(count)))
-#define strcpy(strDest,strSource) AsciiStrCpyS(strDest,MAX_STRING_SIZE,strSource)
+#define StringCchCopyA(strDest,strMaxSize,strSource) AsciiStrCpyS(strDest,strMaxSize,strSource)
#define strncpy(strDest,strSource,count) AsciiStrnCpyS(strDest,MAX_STRING_SIZE,strSource,(UINTN)count)
#define strlen(str) (size_t)(AsciiStrnLenS(str,MAX_STRING_SIZE))
#define strstr AsciiStrStr
diff --git a/src/Common/Tests.c b/src/Common/Tests.c
index 0af4313e..a66c7b54 100644
--- a/src/Common/Tests.c
+++ b/src/Common/Tests.c
@@ -707,7 +707,7 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci)
if (!EAIsModeSupported (ci->ea, ci->mode))
continue;
- EAGetName (name, ci->ea, 0);
+ EAGetName (name, ARRAYSIZE(name), ci->ea, 0);
if (EAInit (ci->ea, key1, ci->ks) != ERR_SUCCESS)
return FALSE;
@@ -1188,7 +1188,7 @@ BOOL TestSectorBufEncryption (PCRYPTO_INFO ci)
if (!EAIsModeSupported (ci->ea, ci->mode))
continue;
- EAGetName (name, ci->ea, 0);
+ EAGetName (name, ARRAYSIZE(name), ci->ea, 0);
if (EAInit (ci->ea, key1, ci->ks) != ERR_SUCCESS)
return FALSE;
diff --git a/src/Common/Volumes.c b/src/Common/Volumes.c
index d3001a94..7bfb8ec2 100644
--- a/src/Common/Volumes.c
+++ b/src/Common/Volumes.c
@@ -170,7 +170,10 @@ BOOL ReadVolumeHeaderRecoveryMode = FALSE;
int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int selected_pkcs5_prf, int pim, BOOL truecryptMode, PCRYPTO_INFO *retInfo, CRYPTO_INFO *retHeaderCryptoInfo)
{
char header[TC_VOLUME_HEADER_EFFECTIVE_SIZE];
- CRYPTOPP_ALIGN_DATA(16) KEY_INFO keyInfo;
+ unsigned char* keyInfoBuffer = NULL;
+ int keyInfoBufferSize = sizeof (KEY_INFO) + 16;
+ size_t keyInfoBufferOffset;
+ PKEY_INFO keyInfo;
PCRYPTO_INFO cryptoInfo;
CRYPTOPP_ALIGN_DATA(16) char dk[MASTER_KEYDATA_SIZE];
int enqPkcs5Prf, pkcs5_prf;
@@ -179,16 +182,28 @@ int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int
int primaryKeyOffset;
int pkcs5PrfCount = LAST_PRF_ID - FIRST_PRF_ID + 1;
#if !defined(_UEFI)
- TC_EVENT keyDerivationCompletedEvent;
- TC_EVENT noOutstandingWorkItemEvent;
+ TC_EVENT *keyDerivationCompletedEvent = NULL;
+ TC_EVENT *noOutstandingWorkItemEvent = NULL;
KeyDerivationWorkItem *keyDerivationWorkItems = NULL;
+ int keyDerivationWorkItemsSize = 0;
KeyDerivationWorkItem *item;
size_t encryptionThreadCount = GetEncryptionThreadCount();
- LONG outstandingWorkItemCount = 0;
+ LONG *outstandingWorkItemCount = NULL;
int i;
#endif
size_t queuedWorkItems = 0;
+ // allocate 16-bytes aligned buffer to hold KEY_INFO in a portable way
+ keyInfoBuffer = TCalloc(keyInfoBufferSize);
+ if (!keyInfoBuffer)
+ return ERR_OUTOFMEMORY;
+ keyInfoBufferOffset = 16 - (((uint64) keyInfoBuffer) % 16);
+ keyInfo = (PKEY_INFO) (keyInfoBuffer + keyInfoBufferOffset);
+
+#if !defined(DEVICE_DRIVER) && !defined(_UEFI)
+ VirtualLock (keyInfoBuffer, keyInfoBufferSize);
+#endif
+
// if no PIM specified, use default value
if (pim < 0)
pim = 0;
@@ -218,45 +233,78 @@ int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int
/* use thread pool only if no PRF was specified */
if ((selected_pkcs5_prf == 0) && (encryptionThreadCount > 1))
{
- keyDerivationWorkItems = TCalloc (sizeof (KeyDerivationWorkItem) * pkcs5PrfCount);
+ keyDerivationCompletedEvent = TCalloc (sizeof (TC_EVENT));
+ if (!keyDerivationCompletedEvent)
+ return ERR_OUTOFMEMORY;
+
+ noOutstandingWorkItemEvent = TCalloc (sizeof (TC_EVENT));
+ if (!noOutstandingWorkItemEvent)
+ {
+ TCfree(keyDerivationCompletedEvent);
+ return ERR_OUTOFMEMORY;
+ }
+
+ outstandingWorkItemCount = TCalloc (sizeof (LONG));
+ if (!outstandingWorkItemCount)
+ {
+ TCfree(keyDerivationCompletedEvent);
+ TCfree(noOutstandingWorkItemEvent);
+ return ERR_OUTOFMEMORY;
+ }
+
+ keyDerivationWorkItemsSize = sizeof (KeyDerivationWorkItem) * pkcs5PrfCount;
+ keyDerivationWorkItems = TCalloc (keyDerivationWorkItemsSize);
if (!keyDerivationWorkItems)
+ {
+ TCfree(keyDerivationCompletedEvent);
+ TCfree(noOutstandingWorkItemEvent);
+ TCfree(outstandingWorkItemCount);
return ERR_OUTOFMEMORY;
+ }
for (i = 0; i < pkcs5PrfCount; ++i)
keyDerivationWorkItems[i].Free = TRUE;
+ *outstandingWorkItemCount = 0;
#ifdef DEVICE_DRIVER
- KeInitializeEvent (&keyDerivationCompletedEvent, SynchronizationEvent, FALSE);
- KeInitializeEvent (&noOutstandingWorkItemEvent, SynchronizationEvent, TRUE);
+ KeInitializeEvent (keyDerivationCompletedEvent, SynchronizationEvent, FALSE);
+ KeInitializeEvent (noOutstandingWorkItemEvent, SynchronizationEvent, TRUE);
#else
- keyDerivationCompletedEvent = CreateEvent (NULL, FALSE, FALSE, NULL);
- if (!keyDerivationCompletedEvent)
+ *keyDerivationCompletedEvent = CreateEvent (NULL, FALSE, FALSE, NULL);
+ if (!*keyDerivationCompletedEvent)
{
TCfree (keyDerivationWorkItems);
+ TCfree(keyDerivationCompletedEvent);
+ TCfree(noOutstandingWorkItemEvent);
+ TCfree(outstandingWorkItemCount);
return ERR_OUTOFMEMORY;
}
- noOutstandingWorkItemEvent = CreateEvent (NULL, FALSE, TRUE, NULL);
- if (!noOutstandingWorkItemEvent)
+ *noOutstandingWorkItemEvent = CreateEvent (NULL, FALSE, TRUE, NULL);
+ if (!*noOutstandingWorkItemEvent)
{
CloseHandle (keyDerivationCompletedEvent);
TCfree (keyDerivationWorkItems);
+ TCfree(keyDerivationCompletedEvent);
+ TCfree(noOutstandingWorkItemEvent);
+ TCfree(outstandingWorkItemCount);
return ERR_OUTOFMEMORY;
}
+
+ VirtualLock (keyDerivationWorkItems, keyDerivationWorkItemsSize);
#endif
}
#if !defined(DEVICE_DRIVER)
- VirtualLock (&keyInfo, sizeof (keyInfo));
VirtualLock (&dk, sizeof (dk));
VirtualLock (&header, sizeof (header));
#endif
#endif // !defined(_UEFI)
- crypto_loadkey (&keyInfo, password->Text, (int) password->Length);
+ crypto_loadkey (keyInfo, password->Text, (int) password->Length);
// PKCS5 is used to derive the primary header key(s) and secondary header key(s) (XTS mode) from the password
- memcpy (keyInfo.salt, encryptedHeader + HEADER_SALT_OFFSET, PKCS5_SALT_SIZE);
+ memcpy (keyInfo->salt, encryptedHeader + HEADER_SALT_OFFSET, PKCS5_SALT_SIZE);
// Test all available PKCS5 PRFs
for (enqPkcs5Prf = FIRST_PRF_ID; enqPkcs5Prf <= LAST_PRF_ID || queuedWorkItems > 0; ++enqPkcs5Prf)
@@ -283,9 +331,9 @@ int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int
item->KeyReady = FALSE;
item->Pkcs5Prf = enqPkcs5Prf;
- EncryptionThreadPoolBeginKeyDerivation (&keyDerivationCompletedEvent, &noOutstandingWorkItemEvent,
- &item->KeyReady, &outstandingWorkItemCount, enqPkcs5Prf, keyInfo.userKey,
- keyInfo.keyLength, keyInfo.salt, get_pkcs5_iteration_count (enqPkcs5Prf, pim, truecryptMode, bBoot), item->DerivedKey);
+ EncryptionThreadPoolBeginKeyDerivation (keyDerivationCompletedEvent, noOutstandingWorkItemEvent,
+ &item->KeyReady, outstandingWorkItemCount, enqPkcs5Prf, keyInfo->userKey,
+ keyInfo->keyLength, keyInfo->salt, get_pkcs5_iteration_count (enqPkcs5Prf, pim, truecryptMode, bBoot), item->DerivedKey);
++queuedWorkItems;
break;
@@ -307,7 +355,7 @@ int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int
if (!item->Free && InterlockedExchangeAdd (&item->KeyReady, 0) == TRUE)
{
pkcs5_prf = item->Pkcs5Prf;
- keyInfo.noIterations = get_pkcs5_iteration_count (pkcs5_prf, pim, truecryptMode, bBoot);
+ keyInfo->noIterations = get_pkcs5_iteration_count (pkcs5_prf, pim, truecryptMode, bBoot);
memcpy (dk, item->DerivedKey, sizeof (dk));
item->Free = TRUE;
@@ -317,7 +365,7 @@ int ReadVolumeHeader (BOOL bBoot, char *encryptedHeader, Password *password, int
}
if (queuedWorkItems > 0)
- TC_WAIT_EVENT (keyDerivationCompletedEvent);
+ TC_WAIT_EVENT (*keyDerivationCompletedEvent);
}
continue;
KeyReady: ;
@@ -326,33 +374,33 @@ KeyReady: ;
#endif // !defined(_UEFI)
{
pkcs5_prf = enqPkcs5Prf;
- keyInfo.noIterations = get_pkcs5_iteration_count (enqPkcs5Prf, pim, truecryptMode, bBoot);
+ keyInfo->noIterations = get_pkcs5_iteration_count (enqPkcs5Prf, pim, truecryptMode, bBoot);
switch (pkcs5_prf)
{
case RIPEMD160:
- derive_key_ripemd160 (keyInfo.userKey, keyInfo.keyLength, keyInfo.salt,
- PKCS5_SALT_SIZE, keyInfo.noIterations, dk, GetMaxPkcs5OutSize());
+ derive_key_ripemd160 (keyInfo->userKey, keyInfo->keyLength, keyInfo->salt,
+ PKCS5_SALT_SIZE, keyInfo->noIterations, dk, GetMaxPkcs5OutSize());
break;
case SHA512:
- derive_key_sha512 (keyInfo.userKey, keyInfo.keyLength, keyInfo.salt,
- PKCS5_SALT_SIZE, keyInfo.noIterations, dk, GetMaxPkcs5OutSize());
+ derive_key_sha512 (keyInfo->userKey, keyInfo->keyLength, keyInfo->salt,
+ PKCS5_SALT_SIZE, keyInfo->noIterations, dk, GetMaxPkcs5OutSize());
break;
case WHIRLPOOL:
- derive_key_whirlpool (keyInfo.userKey, keyInfo.keyLength, keyInfo.salt,
- PKCS5_SALT_SIZE, keyInfo.noIterations, dk, GetMaxPkcs5OutSize());
+ derive_key_whirlpool (keyInfo->userKey, keyInfo->keyLength, keyInfo->salt,
+ PKCS5_SALT_SIZE, keyInfo->noIterations, dk, GetMaxPkcs5OutSize());
break;
case SHA256:
- derive_key_sha256 (keyInfo.userKey, keyInfo.keyLength, keyInfo.salt,
- PKCS5_SALT_SIZE, keyInfo.noIterations, dk, GetMaxPkcs5OutSize());
+ derive_key_sha256 (keyInfo->userKey, keyInfo->keyLength, keyInfo->salt,
+ PKCS5_SALT_SIZE, keyInfo->noIterations, dk, GetMaxPkcs5OutSize());
break;
case STREEBOG:
- derive_key_streebog(keyInfo.userKey, keyInfo.keyLength, keyInfo.salt,
- PKCS5_SALT_SIZE, keyInfo.noIterations, dk, GetMaxPkcs5OutSize());
+ derive_key_streebog(keyInfo->userKey, keyInfo->keyLength, keyInfo->salt,
+ PKCS5_SALT_SIZE, keyInfo->noIterations, dk, GetMaxPkcs5OutSize());
break;
default:
// Unknown/wrong ID
@@ -509,7 +557,7 @@ KeyReady: ;
if (retInfo == NULL)
{
cryptoInfo->pkcs5 = pkcs5_prf;
- cryptoInfo->noIterations = keyInfo.noIterations;
+ cryptoInfo->noIterations = keyInfo->noIterations;
cryptoInfo->bTrueCryptMode = truecryptMode;
cryptoInfo->volumePim = pim;
goto ret;
@@ -526,34 +574,34 @@ KeyReady: ;
}
// Master key data
- memcpy (keyInfo.master_keydata, header + HEADER_MASTER_KEYDATA_OFFSET, MASTER_KEYDATA_SIZE);
+ memcpy (keyInfo->master_keydata, header + HEADER_MASTER_KEYDATA_OFFSET, MASTER_KEYDATA_SIZE);
#ifdef TC_WINDOWS_DRIVER
{
RMD160_CTX ctx;
RMD160Init (&ctx);
- RMD160Update (&ctx, keyInfo.master_keydata, MASTER_KEYDATA_SIZE);
+ RMD160Update (&ctx, keyInfo->master_keydata, MASTER_KEYDATA_SIZE);
RMD160Update (&ctx, header, sizeof(header));
RMD160Final (cryptoInfo->master_keydata_hash, &ctx);
burn(&ctx, sizeof (ctx));
}
#else
- memcpy (cryptoInfo->master_keydata, keyInfo.master_keydata, MASTER_KEYDATA_SIZE);
+ memcpy (cryptoInfo->master_keydata, keyInfo->master_keydata, MASTER_KEYDATA_SIZE);
#endif
// PKCS #5
cryptoInfo->pkcs5 = pkcs5_prf;
- cryptoInfo->noIterations = keyInfo.noIterations;
+ cryptoInfo->noIterations = keyInfo->noIterations;
cryptoInfo->bTrueCryptMode = truecryptMode;
cryptoInfo->volumePim = pim;
// Init the cipher with the decrypted master key
- status = EAInit (cryptoInfo->ea, keyInfo.master_keydata + primaryKeyOffset, cryptoInfo->ks);
+ status = EAInit (cryptoInfo->ea, keyInfo->master_keydata + primaryKeyOffset, cryptoInfo->ks);
if (status == ERR_CIPHER_INIT_FAILURE)
goto err;
#ifndef TC_WINDOWS_DRIVER
// The secondary master key (if cascade, multiple concatenated)
- memcpy (cryptoInfo->k2, keyInfo.master_keydata + EAGetKeySize (cryptoInfo->ea), EAGetKeySize (cryptoInfo->ea));
+ memcpy (cryptoInfo->k2, keyInfo->master_keydata + EAGetKeySize (cryptoInfo->ea), EAGetKeySize (cryptoInfo->ea));
#endif
- if (!EAInitMode (cryptoInfo, keyInfo.master_keydata + EAGetKeySize (cryptoInfo->ea)))
+ if (!EAInitMode (cryptoInfo, keyInfo->master_keydata + EAGetKeySize (cryptoInfo->ea)))
{
status = ERR_MODE_INIT_FAILED;
goto err;
@@ -573,13 +621,11 @@ err:
*retInfo = NULL;
}
-ret:
- burn (&keyInfo, sizeof (keyInfo));
+ret:
burn (dk, sizeof(dk));
burn (header, sizeof(header));
#if !defined(DEVICE_DRIVER) && !defined(_UEFI)
- VirtualUnlock (&keyInfo, sizeof (keyInfo));
VirtualUnlock (&dk, sizeof (dk));
VirtualUnlock (&header, sizeof (header));
#endif
@@ -587,20 +633,19 @@ ret:
#if !defined(_UEFI)
if ((selected_pkcs5_prf == 0) && (encryptionThreadCount > 1))
{
- TC_WAIT_EVENT (noOutstandingWorkItemEvent);
-
- if (keyDerivationWorkItems)
- {
- burn (keyDerivationWorkItems, sizeof (KeyDerivationWorkItem) * pkcs5PrfCount);
- TCfree (keyDerivationWorkItems);
- }
-
-#if !defined(DEVICE_DRIVER)
- CloseHandle (keyDerivationCompletedEvent);
- CloseHandle (noOutstandingWorkItemEvent);
-#endif
+ EncryptionThreadPoolBeginReadVolumeHeaderFinalization (keyDerivationCompletedEvent, noOutstandingWorkItemEvent, outstandingWorkItemCount,
+ keyInfoBuffer, keyInfoBufferSize,
+ keyDerivationWorkItems, keyDerivationWorkItemsSize);
}
+ else
#endif
+ {
+ burn (keyInfo, sizeof (KEY_INFO));
+#if !defined(DEVICE_DRIVER) && !defined(_UEFI)
+ VirtualUnlock (keyInfoBuffer, keyInfoBufferSize);
+#endif
+ TCfree(keyInfoBuffer);
+ }
return status;
}
diff --git a/src/Common/Xml.c b/src/Common/Xml.c
index 37b73498..9f77b3ba 100644
--- a/src/Common/Xml.c
+++ b/src/Common/Xml.c
@@ -12,6 +12,7 @@
#if !defined(_UEFI)
#include <windows.h>
#include <stdio.h>
+#include <strsafe.h>
#else
#include "Tcdefs.h"
#pragma warning( disable : 4706 ) // assignment within conditional expression
@@ -185,26 +186,30 @@ char *XmlQuoteText (const char *textSrc, char *textDst, int textDstMaxSize)
case '&':
if (textDst + 6 > textDstLast)
return NULL;
- strcpy (textDst, "&amp;");
+ StringCchCopyA (textDst, textDstMaxSize, "&amp;");
textDst += 5;
+ textDstMaxSize -= 5;
continue;
case '>':
if (textDst + 5 > textDstLast)
return NULL;
- strcpy (textDst, "&gt;");
+ StringCchCopyA (textDst, textDstMaxSize, "&gt;");
textDst += 4;
+ textDstMaxSize -= 4;
continue;
case '<':
if (textDst + 5 > textDstLast)
return NULL;
- strcpy (textDst, "&lt;");
+ StringCchCopyA (textDst, textDstMaxSize, "&lt;");
textDst += 4;
+ textDstMaxSize -= 4;
continue;
default:
*textDst++ = c;
+ textDstMaxSize--;
}
}
@@ -230,26 +235,30 @@ wchar_t *XmlQuoteTextW (const wchar_t *textSrc, wchar_t *textDst, int textDstMax
case L'&':
if (textDst + 6 > textDstLast)
return NULL;
- wcscpy (textDst, L"&amp;");
+ StringCchCopyW (textDst, textDstMaxSize, L"&amp;");
textDst += 5;
+ textDstMaxSize -= 5;
continue;
case L'>':
if (textDst + 5 > textDstLast)
return NULL;
- wcscpy (textDst, L"&gt;");
+ StringCchCopyW (textDst, textDstMaxSize, L"&gt;");
textDst += 4;
+ textDstMaxSize -= 4;
continue;
case L'<':
if (textDst + 5 > textDstLast)
return NULL;
- wcscpy (textDst, L"&lt;");
+ StringCchCopyW (textDst, textDstMaxSize, L"&lt;");
textDst += 4;
+ textDstMaxSize -= 4;
continue;
default:
*textDst++ = c;
+ textDstMaxSize--;
}
}
diff --git a/src/Core/Unix/CoreService.cpp b/src/Core/Unix/CoreService.cpp
index 44389612..f05d8569 100644
--- a/src/Core/Unix/CoreService.cpp
+++ b/src/Core/Unix/CoreService.cpp
@@ -458,6 +458,9 @@ namespace VeraCrypt
adminPassword[request.AdminPassword.size()] = '\n';
}
+#if defined(TC_LINUX )
+ Thread::Sleep (1000); // wait 1 second for the forked sudo to start
+#endif
if (write (inPipe->GetWriteFD(), &adminPassword.front(), adminPassword.size())) { } // Errors ignored
burn (&adminPassword.front(), adminPassword.size());
diff --git a/src/Core/Unix/CoreUnix.cpp b/src/Core/Unix/CoreUnix.cpp
index a6485208..2dac4cb5 100644
--- a/src/Core/Unix/CoreUnix.cpp
+++ b/src/Core/Unix/CoreUnix.cpp
@@ -24,6 +24,11 @@
namespace VeraCrypt
{
+#ifdef TC_LINUX
+ static string GetTmpUser ();
+ static bool SamePath (const string& path1, const string& path2);
+#endif
+
CoreUnix::CoreUnix ()
{
signal (SIGPIPE, SIG_IGN);
@@ -355,9 +360,98 @@ namespace VeraCrypt
string CoreUnix::GetTempDirectory () const
{
- char *envDir = getenv ("TMPDIR");
- return envDir ? envDir : "/tmp";
+ const char *tmpdir = getenv ("TMPDIR");
+ string envDir = tmpdir ? tmpdir : "/tmp";
+
+#ifdef TC_LINUX
+ /*
+ * If pam_tmpdir.so is in use, a different temporary directory is
+ * allocated for each user ID. We need to mount to the directory used
+ * by the non-root user.
+ */
+ if (getuid () == 0 && envDir.size () >= 2
+ && envDir.substr (envDir.size () - 2) == "/0") {
+ string tmpuser = GetTmpUser ();
+ if (SamePath (envDir, tmpuser + "/0")) {
+ /* Substitute the sudo'ing user for 0 */
+ char uid[40];
+ FILE *fp = fopen ("/proc/self/loginuid", "r");
+ if (fp != NULL) {
+ if (fgets (uid, sizeof (uid), fp) != nullptr) {
+ envDir = tmpuser + "/" + uid;
+ }
+ fclose (fp);
+ }
+ }
+ }
+#endif
+
+ return envDir;
+ }
+
+#ifdef TC_LINUX
+ static string GetTmpUser ()
+ {
+ string tmpuser = "/tmp/user";
+ FILE *fp = fopen ("/etc/security/tmpdir.conf", "r");
+ if (fp == NULL) {
+ return tmpuser;
+ }
+ while (true) {
+ /* Parses the same way as pam_tmpdir */
+ char line[1024];
+ if (fgets (line, sizeof (line), fp) == nullptr) {
+ break;
+ }
+ if (line[0] == '#') {
+ continue;
+ }
+ size_t len = strlen (line);
+ if (len > 0 && line[len-1] == '\n') {
+ line[len-1] = '\0';
+ }
+ char *eq = strchr (line, '=');
+ if (eq == nullptr) {
+ continue;
+ }
+ *eq = '\0';
+ const char *key = line;
+ const char *value = eq + 1;
+ if (strcmp (key, "tmpdir") == 0) {
+ tmpuser = value;
+ break;
+ }
+ }
+ fclose (fp);
+ return tmpuser;
+ }
+
+ static bool SamePath (const string& path1, const string& path2)
+ {
+ size_t i1 = 0;
+ size_t i2 = 0;
+ while (i1 < path1.size () && i2 < path2.size ()) {
+ if (path1[i1] != path2[i2]) {
+ return false;
+ }
+ /* Any two substrings consisting entirely of slashes compare equal */
+ if (path1[i1] == '/') {
+ while (i1 < path1.size () && path1[i1] == '/') {
+ ++i1;
+ }
+ while (i2 < path2.size () && path2[i2] == '/') {
+ ++i2;
+ }
+ }
+ else
+ {
+ ++i1;
+ ++i2;
+ }
+ }
+ return (i1 == path1.size () && i2 == path2.size ());
}
+#endif
bool CoreUnix::IsMountPointAvailable (const DirectoryPath &mountPoint) const
{
diff --git a/src/Core/Unix/OpenBSD/CoreOpenBSD.cpp b/src/Core/Unix/OpenBSD/CoreOpenBSD.cpp
new file mode 100644
index 00000000..0b55b401
--- /dev/null
+++ b/src/Core/Unix/OpenBSD/CoreOpenBSD.cpp
@@ -0,0 +1,166 @@
+/* $OpenBSD$ */
+/*
+ Based on FreeBSD/CoreFreeBSD.cpp
+
+ Derived from source code of TrueCrypt 7.1a, which is
+ 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-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.
+*/
+
+#include <fstream>
+#include <iostream>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/param.h>
+#include <sys/ucred.h>
+#include <sys/mount.h>
+#include <sys/wait.h>
+#include "CoreOpenBSD.h"
+#include "Core/Unix/CoreServiceProxy.h"
+
+namespace VeraCrypt
+{
+ CoreOpenBSD::CoreOpenBSD ()
+ {
+ }
+
+ CoreOpenBSD::~CoreOpenBSD ()
+ {
+ }
+
+ DevicePath CoreOpenBSD::AttachFileToLoopDevice (const FilePath &filePath, bool readOnly) const
+ {
+ list <string> args;
+
+ if (readOnly)
+ {
+ throw;
+ }
+
+ // find an available vnd
+ int freeVnd = -1;
+ for (int vnd = 0; vnd <= 3; vnd++)
+ {
+ stringstream devPath;
+ devPath << "/dev/vnd" << vnd << "c";
+
+ if (FilesystemPath (devPath.str()).IsBlockDevice() || FilesystemPath (devPath.str()).IsCharacterDevice())
+ {
+ make_shared_auto (HostDevice, device);
+ device->Path = devPath.str();
+ try
+ {
+ GetDeviceSize (device->Path);
+ }
+ catch (...)
+ {
+ freeVnd = vnd;
+ break;
+ }
+ }
+ }
+
+ if (freeVnd == -1)
+ throw "couldn't find free vnd";
+
+ args.push_back ("-c");
+
+ stringstream freePath;
+ freePath << "vnd" << freeVnd;
+ args.push_back (freePath.str());
+
+ args.push_back (filePath);
+
+ Process::Execute ("vnconfig", args);
+
+ return "/dev/" + freePath.str() + "c";
+ }
+
+ void CoreOpenBSD::DetachLoopDevice (const DevicePath &devicePath) const
+ {
+ list <string> args;
+ args.push_back ("-u");
+ args.push_back (devicePath);
+
+ for (int t = 0; true; t++)
+ {
+ try
+ {
+ Process::Execute ("vnconfig", args);
+ break;
+ }
+ catch (ExecutedProcessFailed&)
+ {
+ if (t > 5)
+ throw;
+ Thread::Sleep (200);
+ }
+ }
+ }
+
+ // not sure what this is used for
+ HostDeviceList CoreOpenBSD::GetHostDevices (bool pathListOnly) const
+ {
+ throw;
+ }
+
+ MountedFilesystemList CoreOpenBSD::GetMountedFilesystems (const DevicePath &devicePath, const DirectoryPath &mountPoint) const
+ {
+
+ static Mutex mutex;
+ ScopeLock sl (mutex);
+
+ struct statfs *sysMountList;
+ int count = getmntinfo (&sysMountList, MNT_NOWAIT);
+ throw_sys_if (count == 0);
+
+ MountedFilesystemList mountedFilesystems;
+
+ for (int i = 0; i < count; i++)
+ {
+ make_shared_auto (MountedFilesystem, mf);
+
+ if (sysMountList[i].f_mntfromname[0])
+ mf->Device = DevicePath (sysMountList[i].f_mntfromname);
+ else
+ continue;
+
+ if (sysMountList[i].f_mntonname[0])
+ mf->MountPoint = DirectoryPath (sysMountList[i].f_mntonname);
+
+ mf->Type = sysMountList[i].f_fstypename;
+
+ if ((devicePath.IsEmpty() || devicePath == mf->Device) && (mountPoint.IsEmpty() || mountPoint == mf->MountPoint))
+ mountedFilesystems.push_back (mf);
+ }
+
+ return mountedFilesystems;
+ }
+
+ void CoreOpenBSD::MountFilesystem (const DevicePath &devicePath, const DirectoryPath &mountPoint, const string &filesystemType, bool readOnly, const string &systemMountOptions) const
+ {
+ try
+ {
+ // Try to mount FAT by default as mount is unable to probe filesystem type on BSD
+ CoreUnix::MountFilesystem (devicePath, mountPoint, filesystemType.empty() ? "msdos" : filesystemType, readOnly, systemMountOptions);
+ }
+ catch (ExecutedProcessFailed&)
+ {
+ if (!filesystemType.empty())
+ throw;
+
+ CoreUnix::MountFilesystem (devicePath, mountPoint, filesystemType, readOnly, systemMountOptions);
+ }
+ }
+
+#ifdef TC_OPENBSD
+ unique_ptr <CoreBase> Core (new CoreServiceProxy <CoreOpenBSD>);
+ unique_ptr <CoreBase> CoreDirect (new CoreOpenBSD);
+#endif
+}
diff --git a/src/Core/Unix/OpenBSD/CoreOpenBSD.h b/src/Core/Unix/OpenBSD/CoreOpenBSD.h
new file mode 100644
index 00000000..3f6c48b5
--- /dev/null
+++ b/src/Core/Unix/OpenBSD/CoreOpenBSD.h
@@ -0,0 +1,44 @@
+/* $OpenBSD$ */
+/*
+ Based on FreeBSD/CoreFreeBSD.h
+
+ Derived from source code of TrueCrypt 7.1a, which is
+ 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-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.
+*/
+
+#ifndef TC_HEADER_Core_CoreOpenBSD
+#define TC_HEADER_Core_CoreOpenBSD
+
+#include "System.h"
+#include "Core/Unix/CoreUnix.h"
+
+namespace VeraCrypt
+{
+ class CoreOpenBSD : public CoreUnix
+ {
+ public:
+ CoreOpenBSD ();
+ virtual ~CoreOpenBSD ();
+
+ virtual HostDeviceList GetHostDevices (bool pathListOnly = false) const;
+
+ protected:
+ virtual DevicePath AttachFileToLoopDevice (const FilePath &filePath, bool readOnly) const;
+ virtual void DetachLoopDevice (const DevicePath &devicePath) const;
+ virtual MountedFilesystemList GetMountedFilesystems (const DevicePath &devicePath = DevicePath(), const DirectoryPath &mountPoint = DirectoryPath()) const;
+ virtual void MountFilesystem (const DevicePath &devicePath, const DirectoryPath &mountPoint, const string &filesystemType, bool readOnly, const string &systemMountOptions) const;
+
+ private:
+ CoreOpenBSD (const CoreOpenBSD &);
+ CoreOpenBSD &operator= (const CoreOpenBSD &);
+ };
+}
+
+#endif // TC_HEADER_Core_CoreOpenBSD
diff --git a/src/Core/Unix/OpenBSD/System.h b/src/Core/Unix/OpenBSD/System.h
new file mode 100644
index 00000000..90b24b2a
--- /dev/null
+++ b/src/Core/Unix/OpenBSD/System.h
@@ -0,0 +1,19 @@
+/* $OpenBSD$ */
+/*
+ Based on FreeBSD/System.h
+
+ Derived from source code of TrueCrypt 7.1a, which is
+ 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-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.
+*/
+
+#ifndef TC_HEADER_Platform_OpenBSD_System
+#define TC_HEADER_Platform_OpenBSD_System
+
+#endif // TC_HEADER_Platform_OpenBSD_System
diff --git a/src/Crypto/cpu.h b/src/Crypto/cpu.h
index e4e05a0c..58729f32 100644
--- a/src/Crypto/cpu.h
+++ b/src/Crypto/cpu.h
@@ -209,6 +209,7 @@ extern "C" {
#endif
#define CRYPTOPP_CPUID_AVAILABLE
+#define TC_AES_HW_CPU
// these should not be used directly
extern volatile int g_x86DetectionDone;
diff --git a/src/Crypto/jitterentropy-base.c b/src/Crypto/jitterentropy-base.c
index c3856b41..b7512532 100644
--- a/src/Crypto/jitterentropy-base.c
+++ b/src/Crypto/jitterentropy-base.c
@@ -53,7 +53,7 @@
#ifdef TC_WINDOWS_DRIVER
-#define UINT64_MAX 0xffffffffffffffffU
+#define UINT64_MAX 0xffffffffffffffffui64
#else
#include <stdint.h>
#endif
@@ -345,7 +345,7 @@ static uint64_t jent_loop_shuffle(struct rand_data *ec,
* We add a lower boundary value to ensure we have a minimum
* RNG loop count.
*/
- return (shuffle + (1<<min));
+ return (shuffle + (1ULL<<min));
}
/**
diff --git a/src/Driver/DriveFilter.c b/src/Driver/DriveFilter.c
index 4afb692b..d3510052 100644
--- a/src/Driver/DriveFilter.c
+++ b/src/Driver/DriveFilter.c
@@ -2112,8 +2112,8 @@ void GetBootEncryptionAlgorithmName (PIRP irp, PIO_STACK_LOCATION irpSp)
wchar_t BootEncryptionAlgorithmNameW[256];
wchar_t BootPrfAlgorithmNameW[256];
GetBootEncryptionAlgorithmNameRequest *request = (GetBootEncryptionAlgorithmNameRequest *) irp->AssociatedIrp.SystemBuffer;
- EAGetName (BootEncryptionAlgorithmNameW, BootDriveFilterExtension->Queue.CryptoInfo->ea, 0);
- HashGetName2 (BootPrfAlgorithmNameW, BootDriveFilterExtension->Queue.CryptoInfo->pkcs5);
+ EAGetName (BootEncryptionAlgorithmNameW, 256, BootDriveFilterExtension->Queue.CryptoInfo->ea, 0);
+ HashGetName2 (BootPrfAlgorithmNameW, 256, BootDriveFilterExtension->Queue.CryptoInfo->pkcs5);
RtlStringCbPrintfA (request->BootEncryptionAlgorithmName, sizeof (request->BootEncryptionAlgorithmName), "%S", BootEncryptionAlgorithmNameW);
RtlStringCbPrintfA (request->BootPrfAlgorithmName, sizeof (request->BootPrfAlgorithmName), "%S", BootPrfAlgorithmNameW);
diff --git a/src/Driver/Driver.rc b/src/Driver/Driver.rc
index 58fe96fc..3af073ce 100644
--- a/src/Driver/Driver.rc
+++ b/src/Driver/Driver.rc
@@ -27,8 +27,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,24,25,0
- PRODUCTVERSION 1,24,25,0
+ FILEVERSION 1,25,6,1
+ PRODUCTVERSION 1,25,6,1
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -45,11 +45,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "IDRIX"
VALUE "FileDescription", "VeraCrypt Driver"
- VALUE "FileVersion", "1.24"
+ VALUE "FileVersion", "1.25"
VALUE "LegalTrademarks", "VeraCrypt"
VALUE "OriginalFilename", "veracrypt.sys"
VALUE "ProductName", "VeraCrypt"
- VALUE "ProductVersion", "1.24"
+ VALUE "ProductVersion", "1.25"
END
END
BLOCK "VarFileInfo"
diff --git a/src/Driver/DumpFilter.c b/src/Driver/DumpFilter.c
index fc1c7d37..725a4fe0 100644
--- a/src/Driver/DumpFilter.c
+++ b/src/Driver/DumpFilter.c
@@ -127,7 +127,7 @@ NTSTATUS DumpFilterEntry (PFILTER_EXTENSION filterExtension, PFILTER_INITIALIZAT
goto err;
}
- WriteFilterBufferSize = filterInitData->MaxPagesPerWrite * PAGE_SIZE;
+ WriteFilterBufferSize = ((SIZE_T)filterInitData->MaxPagesPerWrite) * PAGE_SIZE;
#ifdef _WIN64
highestAcceptableWriteBufferAddr.QuadPart = 0x7FFffffFFFFLL;
diff --git a/src/Driver/EncryptedIoQueue.c b/src/Driver/EncryptedIoQueue.c
index 85b9a330..6900fc0d 100644
--- a/src/Driver/EncryptedIoQueue.c
+++ b/src/Driver/EncryptedIoQueue.c
@@ -775,9 +775,10 @@ static VOID MainThreadProc (PVOID threadArg)
while (dataRemaining > 0)
{
- BOOL isLastFragment = dataRemaining <= TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE;
+ ULONG queueFragmentSize = queue->FragmentSize;
+ BOOL isLastFragment = dataRemaining <= queueFragmentSize;
- ULONG dataFragmentLength = isLastFragment ? dataRemaining : TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE;
+ ULONG dataFragmentLength = isLastFragment ? dataRemaining : queueFragmentSize;
activeFragmentBuffer = (activeFragmentBuffer == queue->FragmentBufferA ? queue->FragmentBufferB : queue->FragmentBufferA);
InterlockedIncrement (&queue->IoThreadPendingRequestCount);
@@ -847,9 +848,9 @@ static VOID MainThreadProc (PVOID threadArg)
if (isLastFragment)
break;
- dataRemaining -= TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE;
- dataBuffer += TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE;
- fragmentOffset.QuadPart += TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE;
+ dataRemaining -= queueFragmentSize;
+ dataBuffer += queueFragmentSize;
+ fragmentOffset.QuadPart += queueFragmentSize;
}
}
}
@@ -971,7 +972,11 @@ NTSTATUS EncryptedIoQueueStart (EncryptedIoQueue *queue)
{
NTSTATUS status;
EncryptedIoQueueBuffer *buffer;
- int i;
+ int i, preallocatedIoRequestCount, preallocatedItemCount, fragmentSize;
+
+ preallocatedIoRequestCount = EncryptionIoRequestCount;
+ preallocatedItemCount = EncryptionItemCount;
+ fragmentSize = EncryptionFragmentSize;
queue->StartPending = TRUE;
queue->ThreadExitRequested = FALSE;
@@ -986,30 +991,84 @@ NTSTATUS EncryptedIoQueueStart (EncryptedIoQueue *queue)
KeInitializeEvent (&queue->PoolBufferFreeEvent, SynchronizationEvent, FALSE);
KeInitializeEvent (&queue->QueueResumedEvent, SynchronizationEvent, FALSE);
- queue->FragmentBufferA = TCalloc (TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE);
+retry_fragmentAllocate:
+ queue->FragmentBufferA = TCalloc (fragmentSize);
if (!queue->FragmentBufferA)
- goto noMemory;
+ {
+ if (fragmentSize > TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE)
+ {
+ fragmentSize = TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE;
+ goto retry_fragmentAllocate;
+ }
+ else
+ goto noMemory;
+ }
- queue->FragmentBufferB = TCalloc (TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE);
+ queue->FragmentBufferB = TCalloc (fragmentSize);
if (!queue->FragmentBufferB)
- goto noMemory;
-
- KeInitializeEvent (&queue->FragmentBufferAFreeEvent, SynchronizationEvent, TRUE);
- KeInitializeEvent (&queue->FragmentBufferBFreeEvent, SynchronizationEvent, TRUE);
+ {
+ if (fragmentSize > TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE)
+ {
+ fragmentSize = TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE;
+ TCfree (queue->FragmentBufferA);
+ queue->FragmentBufferA = NULL;
+ goto retry_fragmentAllocate;
+ }
+ else
+ goto noMemory;
+ }
queue->ReadAheadBufferValid = FALSE;
- queue->ReadAheadBuffer = TCalloc (TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE);
+ queue->ReadAheadBuffer = TCalloc (fragmentSize);
if (!queue->ReadAheadBuffer)
- goto noMemory;
+ {
+ if (fragmentSize > TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE)
+ {
+ fragmentSize = TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE;
+ TCfree (queue->FragmentBufferA);
+ TCfree (queue->FragmentBufferB);
+ queue->FragmentBufferA = NULL;
+ queue->FragmentBufferB = NULL;
+ goto retry_fragmentAllocate;
+ }
+ else
+ goto noMemory;
+ }
+
+ queue->FragmentSize = fragmentSize;
+
+ KeInitializeEvent (&queue->FragmentBufferAFreeEvent, SynchronizationEvent, TRUE);
+ KeInitializeEvent (&queue->FragmentBufferBFreeEvent, SynchronizationEvent, TRUE);
+retry_preallocated:
// Preallocate buffers
- for (i = 0; i < TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_COUNT; ++i)
+ for (i = 0; i < preallocatedIoRequestCount; ++i)
{
- if (i < TC_ENC_IO_QUEUE_PREALLOCATED_ITEM_COUNT && !GetPoolBuffer (queue, sizeof (EncryptedIoQueueItem)))
- goto noMemory;
+ if (i < preallocatedItemCount && !GetPoolBuffer (queue, sizeof (EncryptedIoQueueItem)))
+ {
+ if (preallocatedItemCount > TC_ENC_IO_QUEUE_PREALLOCATED_ITEM_COUNT)
+ {
+ preallocatedItemCount = TC_ENC_IO_QUEUE_PREALLOCATED_ITEM_COUNT;
+ preallocatedIoRequestCount = TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_COUNT;
+ FreePoolBuffers (queue);
+ goto retry_preallocated;
+ }
+ else
+ goto noMemory;
+ }
if (!GetPoolBuffer (queue, sizeof (EncryptedIoRequest)))
- goto noMemory;
+ {
+ if (preallocatedIoRequestCount > TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_COUNT)
+ {
+ preallocatedItemCount = TC_ENC_IO_QUEUE_PREALLOCATED_ITEM_COUNT;
+ preallocatedIoRequestCount = TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_COUNT;
+ FreePoolBuffers (queue);
+ goto retry_preallocated;
+ }
+ else
+ goto noMemory;
+ }
}
for (buffer = queue->FirstPoolBuffer; buffer != NULL; buffer = buffer->NextBuffer)
diff --git a/src/Driver/EncryptedIoQueue.h b/src/Driver/EncryptedIoQueue.h
index 184e1714..c4b6f269 100644
--- a/src/Driver/EncryptedIoQueue.h
+++ b/src/Driver/EncryptedIoQueue.h
@@ -24,6 +24,7 @@
#define TC_ENC_IO_QUEUE_PREALLOCATED_ITEM_COUNT 8
#define TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_COUNT 16
+#define TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_MAX_COUNT 8192
typedef struct EncryptedIoQueueBufferStruct
@@ -121,6 +122,8 @@ typedef struct
SIZE_T SecRegionSize;
volatile BOOL ThreadBlockReadWrite;
+
+ int FragmentSize;
} EncryptedIoQueue;
diff --git a/src/Driver/Fuse/FuseService.cpp b/src/Driver/Fuse/FuseService.cpp
index a2c769f8..eee0c433 100644
--- a/src/Driver/Fuse/FuseService.cpp
+++ b/src/Driver/Fuse/FuseService.cpp
@@ -10,7 +10,12 @@
code distribution packages.
*/
+#ifdef TC_OPENBSD
+#define FUSE_USE_VERSION 26
+#else
#define FUSE_USE_VERSION 25
+#endif
+
#include <errno.h>
#include <fcntl.h>
#include <fuse.h>
@@ -51,7 +56,11 @@ namespace VeraCrypt
return 0;
}
+#ifdef TC_OPENBSD
+ static void *fuse_service_init (struct fuse_conn_info *)
+#else
static void *fuse_service_init ()
+#endif
{
try
{
@@ -583,7 +592,11 @@ namespace VeraCrypt
SignalHandlerPipe->GetWriteFD();
+#ifdef TC_OPENBSD
+ _exit (fuse_main (argc, argv, &fuse_service_oper, NULL));
+#else
_exit (fuse_main (argc, argv, &fuse_service_oper));
+#endif
}
VolumeInfo FuseService::OpenVolumeInfo;
diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c
index 2d025fa5..6f068a8f 100644
--- a/src/Driver/Ntdriver.c
+++ b/src/Driver/Ntdriver.c
@@ -148,12 +148,38 @@ static KeAreAllApcsDisabledFn KeAreAllApcsDisabledPtr = NULL;
static KeSetSystemGroupAffinityThreadFn KeSetSystemGroupAffinityThreadPtr = NULL;
static KeQueryActiveGroupCountFn KeQueryActiveGroupCountPtr = NULL;
static KeQueryActiveProcessorCountExFn KeQueryActiveProcessorCountExPtr = NULL;
+int EncryptionIoRequestCount = 0;
+int EncryptionItemCount = 0;
+int EncryptionFragmentSize = 0;
POOL_TYPE ExDefaultNonPagedPoolType = NonPagedPool;
ULONG ExDefaultMdlProtection = 0;
PDEVICE_OBJECT VirtualVolumeDeviceObjects[MAX_MOUNTED_VOLUME_DRIVE_NUMBER + 1];
+BOOL AlignValue (ULONG ulValue, ULONG ulAlignment, ULONG *pulResult)
+{
+ BOOL bRet = FALSE;
+ HRESULT hr;
+ if (ulAlignment == 0)
+ {
+ *pulResult = ulValue;
+ bRet = TRUE;
+ }
+ else
+ {
+ ulAlignment -= 1;
+ hr = ULongAdd (ulValue, ulAlignment, &ulValue);
+ if (S_OK == hr)
+ {
+ *pulResult = ulValue & (~ulAlignment);
+ bRet = TRUE;
+ }
+ }
+
+ return bRet;
+}
+
BOOL IsUefiBoot ()
{
BOOL bStatus = FALSE;
@@ -1690,7 +1716,7 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION
ULONG ulNewInputLength = 0;
BOOL bForwardIoctl = FALSE;
- if (inputLength >= minSizeGeneric && inputLength >= minSizedataSet && inputLength >= minSizeParameter)
+ if (((ULONGLONG) inputLength) >= minSizeGeneric && ((ULONGLONG) inputLength) >= minSizedataSet && ((ULONGLONG) inputLength) >= minSizeParameter)
{
if (bEntireSet)
{
@@ -1702,36 +1728,53 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION
}
else
{
- DWORD dwDataSetOffset = ALIGN_VALUE (inputLength, sizeof(DEVICE_DATA_SET_RANGE));
+ DWORD dwDataSetOffset;
DWORD dwDataSetLength = sizeof(DEVICE_DATA_SET_RANGE);
- Dump ("ProcessVolumeDeviceControlIrp: IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES - DEVICE_DSM_FLAG_ENTIRE_DATA_SET_RANGE set. Setting data range to all volume.\n");
-
- ulNewInputLength = dwDataSetOffset + dwDataSetLength;
- pNewSetAttrs = (PDEVICE_MANAGE_DATA_SET_ATTRIBUTES) TCalloc (ulNewInputLength);
- if (pNewSetAttrs)
+ if (AlignValue (inputLength, sizeof(DEVICE_DATA_SET_RANGE), &dwDataSetOffset))
{
- PDEVICE_DATA_SET_RANGE pRange = (PDEVICE_DATA_SET_RANGE) (((unsigned char*) pNewSetAttrs) + dwDataSetOffset);
+ Dump ("ProcessVolumeDeviceControlIrp: IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES - DEVICE_DSM_FLAG_ENTIRE_DATA_SET_RANGE set. Setting data range to all volume.\n");
- memcpy (pNewSetAttrs, pInputAttrs, inputLength);
+ if (S_OK == ULongAdd(dwDataSetOffset, dwDataSetLength, &ulNewInputLength))
+ {
+ pNewSetAttrs = (PDEVICE_MANAGE_DATA_SET_ATTRIBUTES) TCalloc (ulNewInputLength);
+ if (pNewSetAttrs)
+ {
+ PDEVICE_DATA_SET_RANGE pRange = (PDEVICE_DATA_SET_RANGE) (((unsigned char*) pNewSetAttrs) + dwDataSetOffset);
+
+ memcpy (pNewSetAttrs, pInputAttrs, inputLength);
- pRange->StartingOffset = (ULONGLONG) Extension->cryptoInfo->hiddenVolume ? Extension->cryptoInfo->hiddenVolumeOffset : Extension->cryptoInfo->volDataAreaOffset;
- pRange->LengthInBytes = Extension->DiskLength;
+ pRange->StartingOffset = (ULONGLONG) Extension->cryptoInfo->hiddenVolume ? Extension->cryptoInfo->hiddenVolumeOffset : Extension->cryptoInfo->volDataAreaOffset;
+ pRange->LengthInBytes = Extension->DiskLength;
- pNewSetAttrs->Size = sizeof(DEVICE_MANAGE_DATA_SET_ATTRIBUTES);
- pNewSetAttrs->Action = action;
- pNewSetAttrs->Flags = pInputAttrs->Flags & (~DEVICE_DSM_FLAG_ENTIRE_DATA_SET_RANGE);
- pNewSetAttrs->ParameterBlockOffset = pInputAttrs->ParameterBlockOffset;
- pNewSetAttrs->ParameterBlockLength = pInputAttrs->ParameterBlockLength;
- pNewSetAttrs->DataSetRangesOffset = dwDataSetOffset;
- pNewSetAttrs->DataSetRangesLength = dwDataSetLength;
+ pNewSetAttrs->Size = sizeof(DEVICE_MANAGE_DATA_SET_ATTRIBUTES);
+ pNewSetAttrs->Action = action;
+ pNewSetAttrs->Flags = pInputAttrs->Flags & (~DEVICE_DSM_FLAG_ENTIRE_DATA_SET_RANGE);
+ pNewSetAttrs->ParameterBlockOffset = pInputAttrs->ParameterBlockOffset;
+ pNewSetAttrs->ParameterBlockLength = pInputAttrs->ParameterBlockLength;
+ pNewSetAttrs->DataSetRangesOffset = dwDataSetOffset;
+ pNewSetAttrs->DataSetRangesLength = dwDataSetLength;
- bForwardIoctl = TRUE;
+ bForwardIoctl = TRUE;
+ }
+ else
+ {
+ Dump ("ProcessVolumeDeviceControlIrp: IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES - Failed to allocate memory.\n");
+ Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES;
+ Irp->IoStatus.Information = 0;
+ }
+ }
+ else
+ {
+ Dump ("ProcessVolumeDeviceControlIrp: IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES - DEVICE_DSM_FLAG_ENTIRE_DATA_SET_RANGE set but data range length computation overflowed.\n");
+ Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
+ Irp->IoStatus.Information = 0;
+ }
}
else
{
- Dump ("ProcessVolumeDeviceControlIrp: IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES - Failed to allocate memory.\n");
- Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES;
+ Dump ("ProcessVolumeDeviceControlIrp: IOCTL_STORAGE_MANAGE_DATA_SET_ATTRIBUTES - DEVICE_DSM_FLAG_ENTIRE_DATA_SET_RANGE set but data set offset computation overflowed.\n");
+ Irp->IoStatus.Status = STATUS_INVALID_PARAMETER;
Irp->IoStatus.Information = 0;
}
}
@@ -2843,6 +2886,18 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex
}
break;
+ case VC_IOCTL_ENCRYPTION_QUEUE_PARAMS:
+ if (ValidateIOBufferSize (Irp, sizeof (EncryptionQueueParameters), ValidateOutput))
+ {
+ EncryptionQueueParameters* pParams = (EncryptionQueueParameters*) Irp->AssociatedIrp.SystemBuffer;
+ pParams->EncryptionFragmentSize = EncryptionFragmentSize;
+ pParams->EncryptionIoRequestCount = EncryptionIoRequestCount;
+ pParams->EncryptionItemCount = EncryptionItemCount;
+ Irp->IoStatus.Information = sizeof (EncryptionQueueParameters);
+ Irp->IoStatus.Status = STATUS_SUCCESS;
+ }
+ break;
+
default:
return TCCompleteIrp (Irp, STATUS_INVALID_DEVICE_REQUEST, 0);
}
@@ -3253,6 +3308,7 @@ LPWSTR TCTranslateCode (ULONG ulCode)
TC_CASE_RET_NAME (VC_IOCTL_GET_DRIVE_GEOMETRY_EX);
TC_CASE_RET_NAME (VC_IOCTL_EMERGENCY_CLEAR_ALL_KEYS);
TC_CASE_RET_NAME (VC_IOCTL_IS_RAM_ENCRYPTION_ENABLED);
+ TC_CASE_RET_NAME (VC_IOCTL_ENCRYPTION_QUEUE_PARAMS);
TC_CASE_RET_NAME (IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS);
@@ -4572,7 +4628,7 @@ void EnsureNullTerminatedString (wchar_t *str, size_t maxSizeInBytes)
void *AllocateMemoryWithTimeout (size_t size, int retryDelay, int timeout)
{
LARGE_INTEGER waitInterval;
- waitInterval.QuadPart = retryDelay * -10000;
+ waitInterval.QuadPart = ((LONGLONG)retryDelay) * -10000;
ASSERT (KeGetCurrentIrql() <= APC_LEVEL);
ASSERT (retryDelay > 0 && retryDelay <= timeout);
@@ -4755,6 +4811,52 @@ NTSTATUS ReadRegistryConfigFlags (BOOL driverEntry)
TCfree (data);
}
+ if (driverEntry && NT_SUCCESS (TCReadRegistryKey (&name, VC_ENCRYPTION_IO_REQUEST_COUNT, &data)))
+ {
+ if (data->Type == REG_DWORD)
+ EncryptionIoRequestCount = *(uint32 *) data->Data;
+
+ TCfree (data);
+ }
+
+ if (driverEntry && NT_SUCCESS (TCReadRegistryKey (&name, VC_ENCRYPTION_ITEM_COUNT, &data)))
+ {
+ if (data->Type == REG_DWORD)
+ EncryptionItemCount = *(uint32 *) data->Data;
+
+ TCfree (data);
+ }
+
+ if (driverEntry && NT_SUCCESS (TCReadRegistryKey (&name, VC_ENCRYPTION_FRAGMENT_SIZE, &data)))
+ {
+ if (data->Type == REG_DWORD)
+ EncryptionFragmentSize = *(uint32 *) data->Data;
+
+ TCfree (data);
+ }
+
+ if (driverEntry)
+ {
+ if (EncryptionIoRequestCount < TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_COUNT)
+ EncryptionIoRequestCount = TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_COUNT;
+ else if (EncryptionIoRequestCount > TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_MAX_COUNT)
+ EncryptionIoRequestCount = TC_ENC_IO_QUEUE_PREALLOCATED_IO_REQUEST_MAX_COUNT;
+
+ if ((EncryptionItemCount == 0) || (EncryptionItemCount > (EncryptionIoRequestCount / 2)))
+ EncryptionItemCount = EncryptionIoRequestCount / 2;
+
+ /* EncryptionFragmentSize value in registry is expressed in KiB */
+ /* Maximum allowed value for EncryptionFragmentSize is 2048 KiB */
+ EncryptionFragmentSize *= 1024;
+ if (EncryptionFragmentSize == 0)
+ EncryptionFragmentSize = TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE;
+ else if (EncryptionFragmentSize > (8 * TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE))
+ EncryptionFragmentSize = 8 * TC_ENC_IO_QUEUE_MAX_FRAGMENT_SIZE;
+
+
+ }
+
+
return status;
}
diff --git a/src/Driver/Ntdriver.h b/src/Driver/Ntdriver.h
index 47ae49f7..b7e2d56e 100644
--- a/src/Driver/Ntdriver.h
+++ b/src/Driver/Ntdriver.h
@@ -125,6 +125,9 @@ extern BOOL CacheBootPassword;
extern BOOL CacheBootPim;
extern BOOL BlockSystemTrimCommand;
extern BOOL AllowWindowsDefrag;
+extern int EncryptionIoRequestCount;
+extern int EncryptionItemCount;
+extern int EncryptionFragmentSize;
/* Helper macro returning x seconds in units of 100 nanoseconds */
#define WAIT_SECONDS(x) ((x)*10000000)
diff --git a/src/Driver/veracrypt_vs2019.vcxproj b/src/Driver/veracrypt_vs2019.vcxproj
index 8221652b..4c09db94 100644
--- a/src/Driver/veracrypt_vs2019.vcxproj
+++ b/src/Driver/veracrypt_vs2019.vcxproj
@@ -5,10 +5,18 @@
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\Common\Cache.c" />
@@ -35,17 +43,23 @@
<ClCompile Include="..\Crypto\kuznyechik.c" />
<ClCompile Include="..\Crypto\kuznyechik_simd.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\Crypto\rdrand.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\Crypto\Rmd160.c" />
<ClCompile Include="..\Crypto\SerpentFast.c" />
<ClCompile Include="..\Crypto\SerpentFast_simd.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\Crypto\Sha2.c" />
<ClCompile Include="..\Crypto\Streebog.c" />
@@ -83,6 +97,16 @@
<_NT_TARGET_VERSION>0x0A00</_NT_TARGET_VERSION>
<SupportsPackaging>false</SupportsPackaging>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+ <ConfigurationType>Driver</ConfigurationType>
+ <DriverType>WDM</DriverType>
+ <DriverTargetPlatform>Universal</DriverTargetPlatform>
+ <_NT_TARGET_VERSION>0x0A00</_NT_TARGET_VERSION>
+ <SupportsPackaging>false</SupportsPackaging>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>false</UseDebugLibraries>
@@ -92,6 +116,15 @@
<_NT_TARGET_VERSION>0x0A00</_NT_TARGET_VERSION>
<SupportsPackaging>false</SupportsPackaging>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+ <ConfigurationType>Driver</ConfigurationType>
+ <DriverType>WDM</DriverType>
+ <_NT_TARGET_VERSION>0x0A00</_NT_TARGET_VERSION>
+ <SupportsPackaging>false</SupportsPackaging>
+ </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@@ -105,11 +138,19 @@
<OutDir>$(SolutionDir)$(Platform)\$(ConfigurationName)\</OutDir>
<TargetName>veracrypt</TargetName>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <TargetName>veracrypt</TargetName>
+ <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
<OutDir>$(ProjectDir)$(Platform)\$(ConfigurationName)\</OutDir>
<TargetName>veracrypt</TargetName>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <TargetName>veracrypt</TargetName>
+ <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
+ </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<Link>
<AdditionalDependencies>fltmgr.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -117,7 +158,24 @@
</Link>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_WIN32;DEBUG;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_WIN32;_NO_CRT_STDIO_INLINE;DEBUG;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4064;4627;4627;4366;4100;4057;4457;4456;4152;4213;4244;4127;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <PostBuildEvent>
+ <Command>copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-arm64.sys"</Command>
+ </PostBuildEvent>
+ <Inf>
+ <SpecifyDriverVerDirectiveVersion>false</SpecifyDriverVerDirectiveVersion>
+ </Inf>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Link>
+ <AdditionalDependencies>fltmgr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ </Link>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_WIN32;_NO_CRT_STDIO_INLINE;DEBUG;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4064;4627;4627;4366;4100;4057;4457;4456;4152;4213;4244;4127;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<PostBuildEvent>
@@ -134,7 +192,25 @@
</Link>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_WIN32;_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4064;4627;4627;4366;4100;4057;4457;4456;4152;4213;4244;4127;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <PostBuildEvent>
+ <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-arm64.sys"</Command>
+ </PostBuildEvent>
+ <Inf>
+ <SpecifyArchitecture>true</SpecifyArchitecture>
+ <SpecifyDriverVerDirectiveVersion>false</SpecifyDriverVerDirectiveVersion>
+ </Inf>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Link>
+ <AdditionalDependencies>fltmgr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ </Link>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(SolutionDir)Common;$(SolutionDir)Crypto;$(SolutionDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>TC_WINDOWS_DRIVER;_WIN32;_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4064;4627;4627;4366;4100;4057;4457;4456;4152;4213;4244;4127;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<PostBuildEvent>
@@ -189,57 +265,83 @@
<CustomBuild Include="..\Crypto\Aes_hw_cpu.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
+</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win64 -Ox -g -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
+</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Crypto\Aes_x64.asm">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Crypto\Aes_x86.asm">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
+</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) &amp; nasm.exe -Xvc -f win32 -Ox -g --prefix _ -o "$(TargetDir)\%(Filename).obj" "%(FullPath)"
+</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Crypto\Gost89_x64.asm">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Crypto\Twofish_x64.S">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Crypto\Camellia_aesni_x64.S">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Crypto\Camellia_x64.S">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
@@ -251,56 +353,72 @@
<CustomBuild Include="..\Crypto\sha256_avx1_x64.asm">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Crypto\sha256_avx2_x64.asm">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Crypto\sha256_sse4_x64.asm">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Crypto\sha512-x86-nayuki.S">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Crypto\sha512-x64-nayuki.S">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Crypto\sha512_avx1_x64.asm">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Crypto\sha512_avx2_x64.asm">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\Crypto\sha512_sse4_x64.asm">
<FileType>Document</FileType>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
@@ -308,12 +426,20 @@
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) &amp; ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)"
</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)"
+</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) &amp; ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)"
</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) &amp; ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)"
+</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
@@ -321,12 +447,20 @@
<FileType>Document</FileType>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">echo %(Filename)%(Extension) &amp; ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)"
</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">echo %(Filename)%(Extension) &amp; ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)"
+</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">echo %(Filename)%(Extension) &amp; ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)"
</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">echo %(Filename)%(Extension) &amp; ml64.exe /nologo /D_M_X64 /W3 /Cx /Zi /Fo "$(TargetDir)\%(Filename).obj" /c "%(FullPath)"
+</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(TargetDir)\%(Filename).obj;%(Outputs)</Outputs>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CustomBuild>
</ItemGroup>
<ItemGroup>
diff --git a/src/ExpandVolume/ExpandVolume.c b/src/ExpandVolume/ExpandVolume.c
index e340a8bb..84f6cfe8 100644
--- a/src/ExpandVolume/ExpandVolume.c
+++ b/src/ExpandVolume/ExpandVolume.c
@@ -37,6 +37,7 @@
#include "InitDataArea.h"
#include "ExpandVolume.h"
#include "Resource.h"
+#include <strsafe.h>
#ifndef SRC_POS
#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
@@ -526,7 +527,7 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
if (bDevice == FALSE)
{
- wcscpy (szCFDevice, szDiskFile);
+ StringCchCopyW (szCFDevice, ARRAYSIZE(szCFDevice), szDiskFile);
}
else
{
diff --git a/src/ExpandVolume/ExpandVolume.rc b/src/ExpandVolume/ExpandVolume.rc
index 798e0a7e..f37b3324 100644
--- a/src/ExpandVolume/ExpandVolume.rc
+++ b/src/ExpandVolume/ExpandVolume.rc
@@ -193,8 +193,8 @@ IDR_MOUNT_RSRC_HEADER HEADER "resource.h"
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,24,25,0
- PRODUCTVERSION 1,24,25,0
+ FILEVERSION 1,25,7,0
+ PRODUCTVERSION 1,25,7,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -211,11 +211,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "IDRIX"
VALUE "FileDescription", "VeraCrypt Expander"
- VALUE "FileVersion", "1.24-Update9"
+ VALUE "FileVersion", "1.25"
VALUE "LegalTrademarks", "VeraCrypt"
VALUE "OriginalFilename", "VeraCryptExpander.exe"
VALUE "ProductName", "VeraCrypt"
- VALUE "ProductVersion", "1.24-Update9"
+ VALUE "ProductVersion", "1.25"
END
END
BLOCK "VarFileInfo"
diff --git a/src/ExpandVolume/ExpandVolume.vcxproj b/src/ExpandVolume/ExpandVolume.vcxproj
index 5fe967bb..bb00fcd4 100644
--- a/src/ExpandVolume/ExpandVolume.vcxproj
+++ b/src/ExpandVolume/ExpandVolume.vcxproj
@@ -17,6 +17,14 @@
<Configuration>ReleaseCustomEFI</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|Win32">
+ <Configuration>Release_SkipOsDriverReqCheck</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|x64">
+ <Configuration>Release_SkipOsDriverReqCheck</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -37,6 +45,11 @@
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>Windows7.1SDK</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
@@ -52,6 +65,11 @@
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>Windows7.1SDK</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
@@ -69,6 +87,10 @@
<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_SkipOsDriverReqCheck|Win32'" 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|Win32'" 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" />
@@ -81,6 +103,10 @@
<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_SkipOsDriverReqCheck|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|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" />
@@ -101,26 +127,36 @@
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</GenerateManifest>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptExpander</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptExpander</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">VeraCryptExpander</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptExpander</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VeraCryptExpander</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VeraCryptExpander</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">VeraCryptExpander</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">VeraCryptExpander</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -277,6 +313,50 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
<Command>copy Release\VeraCryptExpander.exe "..\Release\Setup Files\"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">
+ <Midl>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName>
+ <OutputDirectory>
+ </OutputDirectory>
+ </Midl>
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>VCEXPANDER;TCMOUNT;VC_SKIP_OS_DRIVER_REQ_CHECK;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>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <DelayLoadDLLs>mpr.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>MachineX86</TargetMachine>
+ <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy Release\VeraCryptExpander.exe "..\Release\Setup Files\"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">
<Midl>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -372,6 +452,54 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
<PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">
+ <Midl>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(SolutionDir)/Mount/$(ProjectName).tlb</TypeLibraryName>
+ <OutputDirectory>
+ </OutputDirectory>
+ </Midl>
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\pkcs11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>VCEXPANDER;TCMOUNT;VC_SKIP_OS_DRIVER_REQ_CHECK;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>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4311;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptExpander.exe</OutputFile>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <DelayLoadDLLs>mpr.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>
+ <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>VeraCryptExpander.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCryptExpander-x64.exe"</Command>
+ </PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">
<Midl>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -452,8 +580,10 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
<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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\BaseCom.cpp" />
@@ -466,16 +596,20 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
<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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\EncryptionThreadPool.c" />
@@ -485,8 +619,10 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
<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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Language.c" />
@@ -508,8 +644,10 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
<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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
</ClCompile>
</ItemGroup>
@@ -556,12 +694,16 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
<OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)/Mount</OutputDirectory>
<HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
<OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)/Mount</OutputDirectory>
+ <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">$(SolutionDir)/Mount</OutputDirectory>
<OutputDirectory Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(SolutionDir)/Mount</OutputDirectory>
<HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
+ <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
<HeaderFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
<OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)/Mount</OutputDirectory>
+ <OutputDirectory Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(SolutionDir)/Mount</OutputDirectory>
<OutputDirectory Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(SolutionDir)/Mount</OutputDirectory>
<HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
+ <HeaderFileName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
<HeaderFileName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(SolutionDir)/Mount/%(Filename)_h.h</HeaderFileName>
</Midl>
</ItemGroup>
@@ -571,8 +713,10 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCryptExpander-x64.exe" &gt;NUL:
<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)'=='Release_SkipOsDriverReqCheck|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
diff --git a/src/Format/Format.rc b/src/Format/Format.rc
index 6001c41c..9714af98 100644
--- a/src/Format/Format.rc
+++ b/src/Format/Format.rc
@@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,24,25,0
- PRODUCTVERSION 1,24,25,0
+ FILEVERSION 1,25,7,0
+ PRODUCTVERSION 1,25,7,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -46,11 +46,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "IDRIX"
VALUE "FileDescription", "VeraCrypt Format"
- VALUE "FileVersion", "1.24-Update9"
+ VALUE "FileVersion", "1.25"
VALUE "LegalTrademarks", "VeraCrypt"
VALUE "OriginalFilename", "VeraCrypt Format.exe"
VALUE "ProductName", "VeraCrypt"
- VALUE "ProductVersion", "1.24-Update9"
+ VALUE "ProductVersion", "1.25"
END
END
BLOCK "VarFileInfo"
diff --git a/src/Format/Format.vcxproj b/src/Format/Format.vcxproj
index 204654e1..d80f4618 100644
--- a/src/Format/Format.vcxproj
+++ b/src/Format/Format.vcxproj
@@ -17,6 +17,14 @@
<Configuration>ReleaseCustomEFI</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|Win32">
+ <Configuration>Release_SkipOsDriverReqCheck</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|x64">
+ <Configuration>Release_SkipOsDriverReqCheck</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -37,6 +45,11 @@
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>Windows7.1SDK</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
@@ -52,6 +65,11 @@
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>Windows7.1SDK</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
@@ -69,6 +87,10 @@
<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_SkipOsDriverReqCheck|Win32'" 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|Win32'" 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" />
@@ -81,6 +103,10 @@
<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_SkipOsDriverReqCheck|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|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" />
@@ -101,26 +127,36 @@
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</GenerateManifest>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptFormat</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptFormat</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">VeraCryptFormat</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptFormat</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VeraCryptFormat</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VeraCryptFormat</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">VeraCryptFormat</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">VeraCryptFormat</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -245,6 +281,46 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" &gt;NUL:
<Command>copy Release\VeraCryptFormat.exe "..\Release\Setup Files\VeraCrypt Format.exe"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">
+ <Midl>
+ <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>
+ <PreprocessorDefinitions>VOLFORMAT;VC_SKIP_OS_DRIVER_REQ_CHECK;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\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptFormat.exe</OutputFile>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <DelayLoadDLLs>mpr.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>MachineX86</TargetMachine>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy Release\VeraCryptFormat.exe "..\Release\Setup Files\VeraCrypt Format.exe"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">
<Midl>
<TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName>
@@ -332,6 +408,50 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" &gt;NUL:
<PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|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>
+ <PreprocessorDefinitions>VOLFORMAT;VC_SKIP_OS_DRIVER_REQ_CHECK;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;%(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>
+ <AdditionalManifestFiles>Format.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt Format-x64.exe"</Command>
+ </PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
@@ -382,16 +502,20 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" &gt;NUL:
<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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\BaseCom.cpp" />
@@ -404,16 +528,20 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" &gt;NUL:
<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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\EncryptionThreadPool.c" />
@@ -425,8 +553,10 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" &gt;NUL:
<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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Language.c" />
@@ -530,8 +660,10 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt Format-x64.exe" &gt;NUL:
<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)'=='Release_SkipOsDriverReqCheck|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c
index 1492060c..30f35257 100644
--- a/src/Format/Tcformat.c
+++ b/src/Format/Tcformat.c
@@ -1448,7 +1448,7 @@ void ComboSelChangeEA (HWND hwndDlg)
wchar_t name[100];
nIndex = (int) SendMessage (GetDlgItem (hwndDlg, IDC_COMBO_BOX), CB_GETITEMDATA, nIndex, 0);
- EAGetName (name, nIndex, 0);
+ EAGetName (name, ARRAYSIZE(name),nIndex, 0);
SetWindowTextW (GetDlgItem (hwndDlg, IDC_BOX_HELP), GetString ("AES_HELP_NEW"));
}
@@ -4162,7 +4162,7 @@ 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);
@@ -5748,7 +5748,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
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");
@@ -6638,8 +6638,8 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
#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 ();
@@ -7576,7 +7576,7 @@ 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"));
}
}
diff --git a/src/Main/CommandLineInterface.cpp b/src/Main/CommandLineInterface.cpp
index 0ae246c6..865f69dd 100644
--- a/src/Main/CommandLineInterface.cpp
+++ b/src/Main/CommandLineInterface.cpp
@@ -339,7 +339,7 @@ namespace VeraCrypt
ArgFilesystem = VolumeCreationOptions::FilesystemType::UFS;
#endif
else
- ArgFilesystem = VolumeCreationOptions::FilesystemType::None;
+ throw_err (LangString["UNKNOWN_OPTION"] + L": " + str);
}
}
@@ -574,40 +574,45 @@ namespace VeraCrypt
if (parser.Found (L"size", &str))
{
- uint64 multiplier;
- wxChar lastChar = str [str.Length () - 1];
- if (lastChar >= wxT('0') && lastChar <= wxT('9'))
- multiplier = 1;
- else if (lastChar == wxT('K') || lastChar == wxT('k'))
- multiplier = BYTES_PER_KB;
- else if (lastChar == wxT('M') || lastChar == wxT('m'))
- multiplier = BYTES_PER_MB;
- else if (lastChar == wxT('G') || lastChar == wxT('g'))
- multiplier = BYTES_PER_GB;
- else if (lastChar == wxT('T') || lastChar == wxT('t'))
- multiplier = BYTES_PER_TB;
- else
- throw_err (LangString["PARAMETER_INCORRECT"] + L": " + str);
-
- // remove suffix if present
- if (multiplier != 1)
- str.RemoveLast ();
- // check that we only have digits in the string
- size_t index = str.find_first_not_of (wxT("0123456789"));
- if (index != (size_t) wxNOT_FOUND)
+ if (str.CmpNoCase (wxT("max")) == 0)
{
- // restore last characater for error display
- if (multiplier != 1)
- str += lastChar;
- throw_err (LangString["PARAMETER_INCORRECT"] + L": " + str);
+ ArgSize = (uint64) -1; // indicator of maximum available size
}
- try
- {
- ArgSize = multiplier * StringConverter::ToUInt64 (wstring (str));
- }
- catch (...)
+ else
{
- throw_err (LangString["PARAMETER_INCORRECT"] + L": " + str);
+ uint64 multiplier;
+ wxString originalStr = str;
+ size_t index = str.find_first_not_of (wxT("0123456789"));
+ if (index == 0)
+ {
+ throw_err (LangString["PARAMETER_INCORRECT"] + L": " + str);
+ }
+ else if (index != (size_t) wxNOT_FOUND)
+ {
+ wxString sizeSuffix = str.Mid(index);
+ if (sizeSuffix.CmpNoCase(wxT("K")) == 0 || sizeSuffix.CmpNoCase(wxT("KiB")) == 0)
+ multiplier = BYTES_PER_KB;
+ else if (sizeSuffix.CmpNoCase(wxT("M")) == 0 || sizeSuffix.CmpNoCase(wxT("MiB")) == 0)
+ multiplier = BYTES_PER_MB;
+ else if (sizeSuffix.CmpNoCase(wxT("G")) == 0 || sizeSuffix.CmpNoCase(wxT("GiB")) == 0)
+ multiplier = BYTES_PER_GB;
+ else if (sizeSuffix.CmpNoCase(wxT("T")) == 0 || sizeSuffix.CmpNoCase(wxT("TiB")) == 0)
+ multiplier = BYTES_PER_TB;
+ else
+ throw_err (LangString["PARAMETER_INCORRECT"] + L": " + str);
+
+ str = str.Left (index);
+ }
+ else
+ multiplier = 1;
+ try
+ {
+ ArgSize = multiplier * StringConverter::ToUInt64 (wstring (str));
+ }
+ catch (...)
+ {
+ throw_err (LangString["PARAMETER_INCORRECT"] + L": " + originalStr);
+ }
}
}
diff --git a/src/Main/FatalErrorHandler.cpp b/src/Main/FatalErrorHandler.cpp
index 55c989cf..5e391698 100644
--- a/src/Main/FatalErrorHandler.cpp
+++ b/src/Main/FatalErrorHandler.cpp
@@ -25,7 +25,7 @@
#ifdef TC_MACOSX
# include <sys/ucontext.h>
-#elif defined (TC_BSD)
+#elif defined (TC_BSD) && !defined (TC_OPENBSD)
# include <ucontext.h>
#endif
@@ -56,9 +56,13 @@ namespace VeraCrypt
#elif defined (TC_MACOSX)
# ifdef __x86_64__
faultingInstructionAddress = context->uc_mcontext->__ss.__rip;
+# else
+# ifdef __aarch64__
+ faultingInstructionAddress = context->uc_mcontext->__ss.__pc;
# else
faultingInstructionAddress = context->uc_mcontext->__ss.__eip;
# endif
+# endif
#endif
wstringstream vars;
diff --git a/src/Main/Forms/AboutDialog.cpp b/src/Main/Forms/AboutDialog.cpp
index 300db727..1751d8b4 100644
--- a/src/Main/Forms/AboutDialog.cpp
+++ b/src/Main/Forms/AboutDialog.cpp
@@ -57,7 +57,7 @@ namespace VeraCrypt
L"Paulo Barreto, Brian Gladman, Wei Dai, Peter Gutmann, and many others.\n\n"
L"Portions of this software:\n"
- L"Copyright \xA9 2013-2020 IDRIX. All rights reserved.\n"
+ L"Copyright \xA9 2013-2022 IDRIX. All rights reserved.\n"
L"Copyright \xA9 2003-2012 TrueCrypt Developers Association. All Rights Reserved.\n"
L"Copyright \xA9 1998-2000 Paul Le Roux. All Rights Reserved.\n"
L"Copyright \xA9 1998-2008 Brian Gladman. All Rights Reserved.\n"
@@ -69,7 +69,7 @@ namespace VeraCrypt
L"Copyright \xA9 2013-2019 Stephan Mueller <smueller@chronox.de>\n\n"
L"\nThis software as a whole:\n"
- L"Copyright \xA9 2013-2020 IDRIX. All rights reserved.\n\n"
+ L"Copyright \xA9 2013-2022 IDRIX. All rights reserved.\n\n"
L"This software uses wxWidgets library, which is copyright \xA9 1998-2011 Julian Smart, Robert Roebling et al.\n\n"
diff --git a/src/Main/Forms/Forms.cpp b/src/Main/Forms/Forms.cpp
index 0af3e2a6..d281febc 100644
--- a/src/Main/Forms/Forms.cpp
+++ b/src/Main/Forms/Forms.cpp
@@ -3625,6 +3625,12 @@ VolumeSizeWizardPageBase::VolumeSizeWizardPageBase( wxWindow* parent, wxWindowID
bSizer99->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
+ UseAllFreeSpaceCheckBox = new wxCheckBox( this, wxID_ANY, _("IDC_USE_ALL_FREE_SPACE"), wxDefaultPosition, wxDefaultSize, 0 );
+ bSizer99->Add( UseAllFreeSpaceCheckBox, 0, wxALL|wxEXPAND, 5 );
+
+
+ bSizer99->Add( 0, 0, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
+
FreeSpaceStaticText = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
FreeSpaceStaticText->Wrap( -1 );
@@ -3649,6 +3655,7 @@ VolumeSizeWizardPageBase::VolumeSizeWizardPageBase( wxWindow* parent, wxWindowID
// Connect Events
VolumeSizeTextCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( VolumeSizeWizardPageBase::OnVolumeSizeTextChanged ), NULL, this );
VolumeSizePrefixChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( VolumeSizeWizardPageBase::OnVolumeSizePrefixSelected ), NULL, this );
+ UseAllFreeSpaceCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VolumeSizeWizardPageBase::OnUseAllFreeSpaceCheckBoxClick ), NULL, this );
}
VolumeSizeWizardPageBase::~VolumeSizeWizardPageBase()
@@ -3656,6 +3663,7 @@ VolumeSizeWizardPageBase::~VolumeSizeWizardPageBase()
// Disconnect Events
VolumeSizeTextCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( VolumeSizeWizardPageBase::OnVolumeSizeTextChanged ), NULL, this );
VolumeSizePrefixChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( VolumeSizeWizardPageBase::OnVolumeSizePrefixSelected ), NULL, this );
+ UseAllFreeSpaceCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( VolumeSizeWizardPageBase::OnUseAllFreeSpaceCheckBoxClick ), NULL, this );
}
diff --git a/src/Main/Forms/Forms.h b/src/Main/Forms/Forms.h
index 3ea89763..b1756876 100644
--- a/src/Main/Forms/Forms.h
+++ b/src/Main/Forms/Forms.h
@@ -1063,12 +1063,14 @@ namespace VeraCrypt
protected:
wxTextCtrl* VolumeSizeTextCtrl;
wxChoice* VolumeSizePrefixChoice;
+ wxCheckBox* UseAllFreeSpaceCheckBox;
wxStaticText* FreeSpaceStaticText;
wxStaticText* InfoStaticText;
// Virtual event handlers, overide them in your derived class
virtual void OnVolumeSizeTextChanged( wxCommandEvent& event ) { event.Skip(); }
virtual void OnVolumeSizePrefixSelected( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnUseAllFreeSpaceCheckBoxClick( wxCommandEvent& event ) { event.Skip(); }
public:
diff --git a/src/Main/Forms/MainFrame.cpp b/src/Main/Forms/MainFrame.cpp
index b744ebbd..ab42ac06 100644
--- a/src/Main/Forms/MainFrame.cpp
+++ b/src/Main/Forms/MainFrame.cpp
@@ -46,6 +46,9 @@ namespace VeraCrypt
DEFINE_EVENT_TYPE(wxEVT_COMMAND_SHOW_WARNING)
MainFrame::MainFrame (wxWindow* parent) : MainFrameBase (parent),
+#ifdef HAVE_INDICATORS
+ indicator (NULL),
+#endif
ListItemRightClickEventPending (false),
SelectedItemIndex (-1),
SelectedSlotNumber (0),
@@ -282,7 +285,7 @@ namespace VeraCrypt
VolumeStaticBoxSizer->Detach (VolumeGridBagSizer);
VolumeStaticBoxSizer->Add (VolumeGridBagSizer, 1, wxEXPAND, 0);
- ExitButton->SetLabel (LangString["CLOSE"]);
+ ExitButton->SetLabel (LangString["IDCLOSE"]);
MountAllDevicesButton->SetLabel (LangString["LINUX_MOUNT_ALL_DEV"]);
#endif
@@ -1558,6 +1561,32 @@ namespace VeraCrypt
}
}
+#ifdef HAVE_INDICATORS
+ void MainFrame::SetBusy (bool busy)
+ {
+ gtk_widget_set_sensitive(indicator_item_mountfavorites, !busy);
+ gtk_widget_set_sensitive(indicator_item_dismountall, !busy);
+ gtk_widget_set_sensitive(indicator_item_prefs, !busy);
+ gtk_widget_set_sensitive(indicator_item_exit, !busy /*&& CanExit()*/);
+ }
+
+ static void IndicatorOnShowHideMenuItemSelected (GtkWidget *widget, MainFrame *self) { Gui->SetBackgroundMode (!Gui->IsInBackgroundMode()); }
+ static void IndicatorOnMountAllFavoritesMenuItemSelected (GtkWidget *widget, MainFrame *self) { self->SetBusy(true); self->MountAllFavorites (); self->SetBusy(false); }
+ static void IndicatorOnDismountAllMenuItemSelected (GtkWidget *widget, MainFrame *self) { self->SetBusy(true); Gui->DismountAllVolumes(); self->SetBusy(false); }
+ static void IndicatorOnPreferencesMenuItemSelected (GtkWidget *widget, MainFrame *self) {
+ self->SetBusy(true);
+ PreferencesDialog dialog (self);
+ dialog.ShowModal();
+ self->SetBusy(false);
+ }
+ static void IndicatorOnExitMenuItemSelected (GtkWidget *widget, MainFrame *self) {
+ self->SetBusy(true);
+ if (Core->GetMountedVolumes().empty() || Gui->AskYesNo (LangString ["CONFIRM_EXIT"], false, true))
+ self->Close (true);
+ self->SetBusy(false);
+ }
+
+#endif
void MainFrame::ShowTaskBarIcon (bool show)
{
if (!show && mTaskBarIcon->IsIconInstalled())
@@ -1567,8 +1596,47 @@ namespace VeraCrypt
else if (show && !mTaskBarIcon->IsIconInstalled())
{
#ifndef TC_MACOSX
+#ifndef HAVE_INDICATORS
mTaskBarIcon->SetIcon (Resources::GetVeraCryptIcon(), L"VeraCrypt");
#endif
+#endif
+#ifdef HAVE_INDICATORS
+ if (indicator == NULL) {
+ indicator = app_indicator_new ("veracrypt", "veracrypt", APP_INDICATOR_CATEGORY_APPLICATION_STATUS);
+ app_indicator_set_status (indicator, APP_INDICATOR_STATUS_ACTIVE);
+
+ GtkWidget *menu = gtk_menu_new();
+
+ indicator_item_showhide = gtk_menu_item_new_with_label (LangString[Gui->IsInBackgroundMode() ? "SHOW_TC" : "HIDE_TC"].mb_str());
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_showhide);
+ g_signal_connect (indicator_item_showhide, "activate", G_CALLBACK (IndicatorOnShowHideMenuItemSelected), this);
+
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new());
+
+ indicator_item_mountfavorites = gtk_menu_item_new_with_label (LangString["IDM_MOUNT_FAVORITE_VOLUMES"]);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_mountfavorites);
+ g_signal_connect (indicator_item_mountfavorites, "activate", G_CALLBACK (IndicatorOnMountAllFavoritesMenuItemSelected), this);
+
+ indicator_item_dismountall = gtk_menu_item_new_with_label (LangString["HK_DISMOUNT_ALL"]);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_dismountall);
+ g_signal_connect (indicator_item_dismountall, "activate", G_CALLBACK (IndicatorOnDismountAllMenuItemSelected), this);
+
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new());
+
+ indicator_item_prefs = gtk_menu_item_new_with_label (LangString["IDM_PREFERENCES"]);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_prefs);
+ g_signal_connect (indicator_item_prefs, "activate", G_CALLBACK (IndicatorOnPreferencesMenuItemSelected), this);
+
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new());
+
+ indicator_item_exit = gtk_menu_item_new_with_label (LangString["EXIT"]);
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), indicator_item_exit);
+ g_signal_connect (indicator_item_exit, "activate", G_CALLBACK (IndicatorOnExitMenuItemSelected), this);
+
+ gtk_widget_show_all (menu);
+ app_indicator_set_menu (indicator, GTK_MENU (menu));
+ }
+#endif
}
}
diff --git a/src/Main/Forms/MainFrame.h b/src/Main/Forms/MainFrame.h
index 9089ce72..5372adbb 100644
--- a/src/Main/Forms/MainFrame.h
+++ b/src/Main/Forms/MainFrame.h
@@ -13,6 +13,12 @@
#ifndef TC_HEADER_Main_Forms_MainFrame
#define TC_HEADER_Main_Forms_MainFrame
+#ifdef HAVE_INDICATORS
+#define GSocket GlibGSocket
+#include <libayatana-appindicator/app-indicator.h>
+#undef GSocket
+#endif
+
#include "Forms.h"
#include "ChangePasswordDialog.h"
#ifdef TC_MACOSX
@@ -38,6 +44,18 @@ namespace VeraCrypt
static FilePath GetShowRequestFifoPath () { return Application::GetConfigFilePath (L".show-request-queue", true); }
#endif
+ void MountAllFavorites ();
+
+#ifdef HAVE_INDICATORS
+ AppIndicator *indicator;
+ GtkWidget *indicator_item_showhide;
+ GtkWidget *indicator_item_mountfavorites;
+ GtkWidget *indicator_item_dismountall;
+ GtkWidget *indicator_item_prefs;
+ GtkWidget *indicator_item_exit;
+ void SetBusy (bool busy);
+
+#endif
protected:
enum
{
@@ -71,7 +89,6 @@ namespace VeraCrypt
void LoadFavoriteVolumes ();
void LoadPreferences ();
void MountAllDevices ();
- void MountAllFavorites ();
void MountVolume ();
void OnAboutMenuItemSelected (wxCommandEvent& event);
void OnQuit(wxCommandEvent& event) { Close(true); }
diff --git a/src/Main/Forms/TrueCrypt.fbp b/src/Main/Forms/TrueCrypt.fbp
index 927a60b9..24689fcf 100644
--- a/src/Main/Forms/TrueCrypt.fbp
+++ b/src/Main/Forms/TrueCrypt.fbp
@@ -29553,6 +29553,104 @@
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
+ <object class="wxCheckBox" expanded="0">
+ <property name="BottomDockable">1</property>
+ <property name="LeftDockable">1</property>
+ <property name="RightDockable">1</property>
+ <property name="TopDockable">1</property>
+ <property name="aui_layer"></property>
+ <property name="aui_name"></property>
+ <property name="aui_position"></property>
+ <property name="aui_row"></property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="checked">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="default_pane">0</property>
+ <property name="dock">Dock</property>
+ <property name="dock_fixed">0</property>
+ <property name="docking">Left</property>
+ <property name="enabled">1</property>
+ <property name="fg"></property>
+ <property name="floatable">1</property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">IDC_USE_ALL_FREE_SPACE</property>
+ <property name="max_size"></property>
+ <property name="maximize_button">0</property>
+ <property name="maximum_size"></property>
+ <property name="min_size"></property>
+ <property name="minimize_button">0</property>
+ <property name="minimum_size"></property>
+ <property name="moveable">1</property>
+ <property name="name">UseAllFreeSpaceCheckBox</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">protected</property>
+ <property name="pin_button">1</property>
+ <property name="pos"></property>
+ <property name="resize">Resizable</property>
+ <property name="show">1</property>
+ <property name="size"></property>
+ <property name="style"></property>
+ <property name="subclass">; forward_declare</property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="validator_data_type"></property>
+ <property name="validator_style">wxFILTER_NONE</property>
+ <property name="validator_type">wxDefaultValidator</property>
+ <property name="validator_variable"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <event name="OnChar"></event>
+ <event name="OnCheckBox">OnUseAllFreeSpaceCheckBoxClick</event>
+ <event name="OnEnterWindow"></event>
+ <event name="OnEraseBackground"></event>
+ <event name="OnKeyDown"></event>
+ <event name="OnKeyUp"></event>
+ <event name="OnKillFocus"></event>
+ <event name="OnLeaveWindow"></event>
+ <event name="OnLeftDClick"></event>
+ <event name="OnLeftDown"></event>
+ <event name="OnLeftUp"></event>
+ <event name="OnMiddleDClick"></event>
+ <event name="OnMiddleDown"></event>
+ <event name="OnMiddleUp"></event>
+ <event name="OnMotion"></event>
+ <event name="OnMouseEvents"></event>
+ <event name="OnMouseWheel"></event>
+ <event name="OnPaint"></event>
+ <event name="OnRightDClick"></event>
+ <event name="OnRightDown"></event>
+ <event name="OnRightUp"></event>
+ <event name="OnSetFocus"></event>
+ <event name="OnSize"></event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxBOTTOM|wxEXPAND|wxTOP</property>
+ <property name="proportion">0</property>
+ <object class="spacer" expanded="0">
+ <property name="height">0</property>
+ <property name="permission">protected</property>
+ <property name="width">0</property>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxEXPAND</property>
+ <property name="proportion">0</property>
<object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
diff --git a/src/Main/Forms/VolumeSizeWizardPage.cpp b/src/Main/Forms/VolumeSizeWizardPage.cpp
index 47d73983..61427ea5 100644
--- a/src/Main/Forms/VolumeSizeWizardPage.cpp
+++ b/src/Main/Forms/VolumeSizeWizardPage.cpp
@@ -24,9 +24,10 @@ namespace VeraCrypt
SectorSize (sectorSize),
AvailableDiskSpace (0)
{
- VolumeSizePrefixChoice->Append (LangString["KB"], reinterpret_cast <void *> (1024));
- VolumeSizePrefixChoice->Append (LangString["MB"], reinterpret_cast <void *> (1024 * 1024));
- VolumeSizePrefixChoice->Append (LangString["GB"], reinterpret_cast <void *> (1024 * 1024 * 1024));
+ VolumeSizePrefixChoice->Append (LangString["KB"], reinterpret_cast <void *> (1));
+ VolumeSizePrefixChoice->Append (LangString["MB"], reinterpret_cast <void *> (2));
+ VolumeSizePrefixChoice->Append (LangString["GB"], reinterpret_cast <void *> (3));
+ VolumeSizePrefixChoice->Append (LangString["TB"], reinterpret_cast <void *> (4));
VolumeSizePrefixChoice->Select (Prefix::MB);
wxLongLong diskSpace = 0;
@@ -34,6 +35,7 @@ namespace VeraCrypt
{
VolumeSizeTextCtrl->Disable();
VolumeSizeTextCtrl->SetValue (L"");
+ UseAllFreeSpaceCheckBox->Disable();
}
else
{
@@ -74,13 +76,25 @@ namespace VeraCrypt
uint64 VolumeSizeWizardPage::GetVolumeSize () const
{
uint64 prefixMult = 1;
- int selection = VolumeSizePrefixChoice->GetSelection();
- if (selection == wxNOT_FOUND)
- return 0;
-
- prefixMult = reinterpret_cast <uint64> (VolumeSizePrefixChoice->GetClientData (selection));
+ uint64 val;
+ if (UseAllFreeSpaceCheckBox->IsChecked ())
+ {
+ val = AvailableDiskSpace;
+ }
+ else
+ {
+ int selection = VolumeSizePrefixChoice->GetSelection();
+ if (selection == wxNOT_FOUND)
+ return 0;
- uint64 val = StringConverter::ToUInt64 (wstring (VolumeSizeTextCtrl->GetValue()));
+ uint64 counter = reinterpret_cast <uint64> (VolumeSizePrefixChoice->GetClientData (selection));
+ while (counter)
+ {
+ prefixMult *= 1024;
+ counter--;
+ }
+ val = StringConverter::ToUInt64 (wstring(VolumeSizeTextCtrl->GetValue()));
+ }
if (val <= 0x7fffFFFFffffFFFFull / prefixMult)
{
val *= prefixMult;
@@ -98,7 +112,7 @@ namespace VeraCrypt
bool VolumeSizeWizardPage::IsValid ()
{
- if (!VolumeSizeTextCtrl->GetValue().empty() && Validate())
+ if ((!VolumeSizeTextCtrl->GetValue().empty() || UseAllFreeSpaceCheckBox->IsChecked ()) && Validate())
{
try
{
@@ -126,7 +140,12 @@ namespace VeraCrypt
return;
}
- if (size % (1024 * 1024 * 1024) == 0)
+ if (size % (1024ULL * 1024ULL * 1024ULL * 1024ULL) == 0)
+ {
+ size /= 1024ULL * 1024ULL * 1024ULL * 1024ULL;
+ VolumeSizePrefixChoice->Select (Prefix::TB);
+ }
+ else if (size % (1024 * 1024 * 1024) == 0)
{
size /= 1024 * 1024 * 1024;
VolumeSizePrefixChoice->Select (Prefix::GB);
@@ -144,4 +163,21 @@ namespace VeraCrypt
VolumeSizeTextCtrl->SetValue (StringConverter::FromNumber (size));
}
+
+ void VolumeSizeWizardPage::OnUseAllFreeSpaceCheckBoxClick( wxCommandEvent& event )
+ {
+ if (UseAllFreeSpaceCheckBox->IsChecked ())
+ {
+ VolumeSizePrefixChoice->Select (Prefix::MB);
+ VolumeSizeTextCtrl->SetValue (L"");
+ VolumeSizePrefixChoice->Disable();
+ VolumeSizeTextCtrl->Disable();
+ }
+ else
+ {
+ VolumeSizePrefixChoice->Enable();
+ VolumeSizeTextCtrl->SetValue (L"");
+ VolumeSizeTextCtrl->Enable();
+ }
+ }
}
diff --git a/src/Main/Forms/VolumeSizeWizardPage.h b/src/Main/Forms/VolumeSizeWizardPage.h
index aac41f99..754bd691 100644
--- a/src/Main/Forms/VolumeSizeWizardPage.h
+++ b/src/Main/Forms/VolumeSizeWizardPage.h
@@ -37,13 +37,15 @@ namespace VeraCrypt
{
KB = 0,
MB,
- GB
+ GB,
+ TB
};
};
void OnBrowseButtonClick (wxCommandEvent& event);
void OnVolumeSizePrefixSelected (wxCommandEvent& event) { PageUpdatedEvent.Raise(); }
void OnVolumeSizeTextChanged (wxCommandEvent& event) { PageUpdatedEvent.Raise(); }
+ void OnUseAllFreeSpaceCheckBoxClick( wxCommandEvent& event );
uint64 MaxVolumeSize;
bool MaxVolumeSizeValid;
diff --git a/src/Main/Forms/international.h b/src/Main/Forms/international.h
index a30adab0..1ca0c436 100644
--- a/src/Main/Forms/international.h
+++ b/src/Main/Forms/international.h
@@ -1,4 +1,4 @@
-#ifdef TC_LINUX
+#ifndef TC_WINDOWS
#include "Main/LanguageStrings.h"
#undef _
#define _(key) LangString[key]
diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp
index 04e98855..7d1cee7c 100755..100644
--- a/src/Main/GraphicUserInterface.cpp
+++ b/src/Main/GraphicUserInterface.cpp
@@ -1018,7 +1018,7 @@ namespace VeraCrypt
wxLog::FlushActive();
Application::SetExitCode (1);
- Gui->ShowInfo (LangStrin["LINUX_VC_RUNNING_ALREADY"]);
+ Gui->ShowInfo (LangString["LINUX_VC_RUNNING_ALREADY"]);
return false;
#endif
}
@@ -1754,6 +1754,10 @@ namespace VeraCrypt
}
BackgroundMode = state;
+
+#ifdef HAVE_INDICATORS
+ gtk_menu_item_set_label ((GtkMenuItem*) ((MainFrame*) mMainFrame)->indicator_item_showhide, LangString[Gui->IsInBackgroundMode() ? "SHOW_TC" : "HIDE_TC"].mb_str());
+#endif
}
void GraphicUserInterface::SetListCtrlColumnWidths (wxListCtrl *listCtrl, list <int> columnWidthPermilles, bool hasVerticalScrollbar) const
diff --git a/src/Main/LanguageStrings.cpp b/src/Main/LanguageStrings.cpp
index 33aaf6a9..71914ec7 100644
--- a/src/Main/LanguageStrings.cpp
+++ b/src/Main/LanguageStrings.cpp
@@ -29,6 +29,9 @@ namespace VeraCrypt
{
if (Map.count (key) > 0)
return wxString (Map.find (key)->second);
+ // return "VeraCrypt" as it is
+ if (key == "VeraCrypt")
+ return L"VeraCrypt";
return wxString (L"?") + StringConverter::ToWide (key) + L"?";
}
@@ -40,7 +43,6 @@ namespace VeraCrypt
void LanguageStrings::Init ()
{
-#ifdef TC_LINUX
static byte LanguageXml[] =
{
# include "Common/Language.xml.h"
@@ -53,7 +55,7 @@ namespace VeraCrypt
text.Replace (L"\\n", L"\n");
Map[StringConverter::ToSingle (wstring (node.Attributes[L"key"]))] = text;
}
-#endif
+
foreach (XmlNode node, XmlParser (Resources::GetLanguageXml()).GetNodes (L"entry"))
{
wxString text = node.InnerText;
diff --git a/src/Main/Main.make b/src/Main/Main.make
index 77f7dc91..8def8aaa 100755
--- a/src/Main/Main.make
+++ b/src/Main/Main.make
@@ -178,6 +178,7 @@ endif
ifeq "$(PLATFORM)" "MacOSX"
prepare: $(APPNAME)
mkdir -p $(APPNAME).app/Contents/MacOS $(APPNAME).app/Contents/Resources/doc/HTML
+ mkdir -p $(APPNAME).app/Contents/MacOS $(APPNAME).app/Contents/Resources/languages
-rm -f $(APPNAME).app/Contents/MacOS/$(APPNAME)
-rm -f $(APPNAME).app/Contents/MacOS/$(APPNAME)_console
@@ -200,6 +201,7 @@ endif
cp $(BASE_DIR)/Resources/Icons/VeraCrypt.icns $(APPNAME).app/Contents/Resources
cp $(BASE_DIR)/Resources/Icons/VeraCrypt_Volume.icns $(APPNAME).app/Contents/Resources
cp $(BASE_DIR)/../doc/html/* $(APPNAME).app/Contents/Resources/doc/HTML
+ cp $(BASE_DIR)/../Translations/* $(APPNAME).app/Contents/Resources/languages
echo -n APPLTRUE >$(APPNAME).app/Contents/PkgInfo
ifdef VC_LEGACY_BUILD
@@ -207,6 +209,7 @@ ifdef VC_LEGACY_BUILD
else
sed -e 's/_VERSION_/$(patsubst %a,%.1,$(patsubst %b,%.2,$(TC_VERSION)))/' ../Build/Resources/MacOSX/Info.plist.xml >$(APPNAME).app/Contents/Info.plist
endif
+ chmod -R go-w $(APPNAME).app
codesign -s "Developer ID Application: IDRIX (Z933746L2S)" --timestamp $(APPNAME).app
install: prepare
@@ -253,16 +256,23 @@ prepare: $(APPNAME)
mkdir -p $(BASE_DIR)/Setup/Linux/usr/share/veracrypt/languages
cp -r $(BASE_DIR)/../Translations/* $(BASE_DIR)/Setup/Linux/usr/share/veracrypt/languages/
+ mkdir -p $(BASE_DIR)/Setup/Linux/usr/sbin
+ cp $(BASE_DIR)/Setup/Linux/mount.$(APPNAME) $(BASE_DIR)/Setup/Linux/usr/sbin/mount.$(APPNAME)
+ chmod +x $(BASE_DIR)/Setup/Linux/usr/sbin/mount.$(APPNAME)
ifndef TC_NO_GUI
mkdir -p $(BASE_DIR)/Setup/Linux/usr/share/applications
mkdir -p $(BASE_DIR)/Setup/Linux/usr/share/pixmaps
+ mkdir -p $(BASE_DIR)/Setup/Linux/usr/share/mime/packages
cp $(BASE_DIR)/Resources/Icons/VeraCrypt-256x256.xpm $(BASE_DIR)/Setup/Linux/usr/share/pixmaps/$(APPNAME).xpm
cp $(BASE_DIR)/Setup/Linux/$(APPNAME).desktop $(BASE_DIR)/Setup/Linux/usr/share/applications/$(APPNAME).desktop
+ cp $(BASE_DIR)/Setup/Linux/$(APPNAME).xml $(BASE_DIR)/Setup/Linux/usr/share/mime/packages/$(APPNAME).xml
endif
install: prepare
+ifneq "$(DESTDIR)" ""
mkdir -p $(DESTDIR)
+endif
cp -R $(BASE_DIR)/Setup/Linux/usr $(DESTDIR)/
ifeq "$(TC_BUILD_CONFIG)" "Release"
@@ -304,15 +314,19 @@ prepare: $(APPNAME)
ifndef TC_NO_GUI
mkdir -p $(BASE_DIR)/Setup/FreeBSD/usr/share/applications
mkdir -p $(BASE_DIR)/Setup/FreeBSD/usr/share/pixmaps
+ mkdir -p $(BASE_DIR)/Setup/Linux/usr/share/mime/packages
cp $(BASE_DIR)/Resources/Icons/VeraCrypt-256x256.xpm $(BASE_DIR)/Setup/FreeBSD/usr/share/pixmaps/$(APPNAME).xpm
cp $(BASE_DIR)/Setup/Linux/$(APPNAME).desktop $(BASE_DIR)/Setup/FreeBSD/usr/share/applications/$(APPNAME).desktop
+ cp $(BASE_DIR)/Setup/Linux/$(APPNAME).xml $(BASE_DIR)/Setup/Linux/usr/share/mime/packages/$(APPNAME).xml
endif
chown -R root:wheel $(BASE_DIR)/Setup/FreeBSD/usr
chmod -R go-w $(BASE_DIR)/Setup/FreeBSD/usr
install: prepare
+ifneq "$(DESTDIR)" ""
mkdir -p $(DESTDIR)
+endif
cp -R $(BASE_DIR)/Setup/FreeBSD/usr $(DESTDIR)/.
ifeq "$(TC_BUILD_CONFIG)" "Release"
diff --git a/src/Main/Resources.cpp b/src/Main/Resources.cpp
index 32bcd9d2..d9a787a5 100644
--- a/src/Main/Resources.cpp
+++ b/src/Main/Resources.cpp
@@ -14,16 +14,17 @@
#include "Platform/Platform.h"
#include "Resources.h"
-#ifdef TC_LINUX
+#ifdef TC_WINDOWS
+#include "Main/resource.h"
+#else
+#ifdef TC_MACOSX
+#include "Application.h"
+#endif
#include "Platform/File.h"
#include "Platform/StringConverter.h"
#include <stdio.h>
#endif
-#ifdef TC_WINDOWS
-#include "Main/resource.h"
-#endif
-
namespace VeraCrypt
{
@@ -54,18 +55,24 @@ namespace VeraCrypt
strBuf.Zero();
strBuf.CopyFrom (res);
return string (reinterpret_cast <char *> (strBuf.Ptr()));
-#elif TC_LINUX
+#else
// get language from env LANG
// support: C,POSIX,
// support for e.g. german: de_DE.UTF-8, de.UTF8, de_DE, de
// not support e.g.: de@Euro
string defaultLang("en");
+#if defined (TC_MACOSX)
+ string filenamePrefix = StringConverter::ToSingle (Application::GetExecutableDirectory()) + "/../Resources/languages/Language.";
+#else
string filenamePrefix("/usr/share/veracrypt/languages/Language.");
+#endif
string filenamePost(".xml");
string filename = filenamePrefix + defaultLang + filenamePost;
if(const char* env_p = getenv("LANG")){
string lang(env_p);
+#ifdef DEBUG
std::cout << lang << std::endl;
+#endif
if ( lang.size() > 1 ){
int found = lang.find(".");
if ( found > 1 ){
@@ -127,14 +134,6 @@ namespace VeraCrypt
};
return string ((const char*) LanguageXml);
-#else
- static byte LanguageXml[] =
- {
-# include "Common/Language.xml.h"
- , 0
- };
-
- return string ((const char*) LanguageXml);
#endif
}
diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp
index 2cacbb1b..7233b8b6 100644
--- a/src/Main/TextUserInterface.cpp
+++ b/src/Main/TextUserInterface.cpp
@@ -646,6 +646,29 @@ namespace VeraCrypt
}
else
{
+ uint64 AvailableDiskSpace = 0;
+ wxLongLong diskSpace = 0;
+ if (wxGetDiskSpace (wxFileName (wstring (options->Path)).GetPath(), nullptr, &diskSpace))
+ {
+ AvailableDiskSpace = (uint64) diskSpace.GetValue ();
+ if (maxVolumeSize > AvailableDiskSpace)
+ maxVolumeSize = AvailableDiskSpace;
+ }
+
+ if (options->Size == (uint64) (-1))
+ {
+ if (AvailableDiskSpace)
+ {
+ // caller requesting maximum size
+ // we use maxVolumeSize because it is guaranteed to be less of equal to AvailableDiskSpace
+ options->Size = maxVolumeSize;
+ }
+ else
+ {
+ throw_err (_("Failed to get available disk space on the selected target."));
+ }
+ }
+
options->Quick = false;
uint32 sectorSizeRem = options->Size % options->SectorSize;
@@ -657,43 +680,62 @@ namespace VeraCrypt
if (Preferences.NonInteractive)
throw MissingArgument (SRC_POS);
- wstring sizeStr = AskString (options->Type == VolumeType::Hidden ? _("\nEnter hidden volume size (sizeK/size[M]/sizeG): ") : _("\nEnter volume size (sizeK/size[M]/sizeG): "));
uint64 multiplier = 1024 * 1024;
-
- if (sizeStr.find (L"K") != string::npos)
- {
- multiplier = 1024;
- sizeStr.resize (sizeStr.size() - 1);
- }
- else if (sizeStr.find (L"M") != string::npos)
+ wxString sizeStr = AskString (options->Type == VolumeType::Hidden ? _("\nEnter hidden volume size (sizeK/size[M]/sizeG/sizeT/max): ") : _("\nEnter volume size (sizeK/size[M]/sizeG.sizeT/max): "));
+ if (sizeStr.CmpNoCase(wxT("max")) == 0)
{
- sizeStr.resize (sizeStr.size() - 1);
- }
- else if (sizeStr.find (L"G") != string::npos)
- {
- multiplier = 1024 * 1024 * 1024;
- sizeStr.resize (sizeStr.size() - 1);
+ multiplier = 1;
+ if (AvailableDiskSpace)
+ {
+ // caller requesting maximum size
+ // we use maxVolumeSize because it is guaranteed to be less of equal to AvailableDiskSpace
+ options->Size = maxVolumeSize;
+ }
+ else
+ {
+ throw_err (_("Failed to get available disk space on the selected target."));
+ }
}
- else if (sizeStr.find (L"T") != string::npos)
+ else
{
- multiplier = (uint64) 1024 * 1024 * 1024 * 1024;
- sizeStr.resize (sizeStr.size() - 1);
- }
+ multiplier = 1024 * 1024;
+ size_t index = sizeStr.find_first_not_of (wxT("0123456789"));
+ if (index == 0)
+ {
+ continue;
+ }
+ else if (index != (size_t) wxNOT_FOUND)
+ {
+ wxString sizeSuffix = sizeStr.Mid(index);
+ if (sizeSuffix.CmpNoCase(wxT("K")) == 0 || sizeSuffix.CmpNoCase(wxT("KiB")) == 0)
+ multiplier = BYTES_PER_KB;
+ else if (sizeSuffix.CmpNoCase(wxT("M")) == 0 || sizeSuffix.CmpNoCase(wxT("MiB")) == 0)
+ multiplier = BYTES_PER_MB;
+ else if (sizeSuffix.CmpNoCase(wxT("G")) == 0 || sizeSuffix.CmpNoCase(wxT("GiB")) == 0)
+ multiplier = BYTES_PER_GB;
+ else if (sizeSuffix.CmpNoCase(wxT("T")) == 0 || sizeSuffix.CmpNoCase(wxT("TiB")) == 0)
+ multiplier = BYTES_PER_TB;
+ else
+ continue;
- try
- {
- options->Size = StringConverter::ToUInt64 (sizeStr);
- options->Size *= multiplier;
+ sizeStr = sizeStr.Left (index);
+ }
- sectorSizeRem = options->Size % options->SectorSize;
- if (sectorSizeRem != 0)
- options->Size += options->SectorSize - sectorSizeRem;
- }
- catch (...)
- {
- options->Size = 0;
- continue;
+ try
+ {
+ options->Size = StringConverter::ToUInt64 (wstring(sizeStr));
+ }
+ catch (...)
+ {
+ options->Size = 0;
+ continue;
+ }
}
+ options->Size *= multiplier;
+
+ sectorSizeRem = options->Size % options->SectorSize;
+ if (sectorSizeRem != 0)
+ options->Size += options->SectorSize - sectorSizeRem;
if (options->Size < minVolumeSize)
{
diff --git a/src/Main/UserInterface.cpp b/src/Main/UserInterface.cpp
index b4bfe836..d0e2f9a1 100644
--- a/src/Main/UserInterface.cpp
+++ b/src/Main/UserInterface.cpp
@@ -1270,10 +1270,11 @@ namespace VeraCrypt
"--slot=SLOT\n"
" Use specified slot number when mounting, dismounting, or listing a volume.\n"
"\n"
- "--size=SIZE[K|M|G|T]\n"
+ "--size=SIZE[K|KiB|M|MiB|G|GiB|T|TiB] or --size=max\n"
" Use specified size when creating a new volume. If no suffix is indicated,\n"
" then SIZE is interpreted in bytes. Suffixes K, M, G or T can be used to\n"
" indicate a value in KiB, MiB, GiB or TiB respectively.\n"
+ " If max is specified, the new volume will use all available free disk space.\n"
"\n"
"-t, --text\n"
" Use text user interface. Graphical user interface is used by default if\n"
diff --git a/src/Makefile b/src/Makefile
index 86871c8b..eb87e6ea 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -95,6 +95,15 @@ ifeq "$(origin WXSTATIC)" "command line"
endif
endif
+ifeq "$(origin INDICATOR)" "command line"
+ ifneq (,$(findstring gtk3,$(shell $(WX_CONFIG) --selected-config)))
+ INDICATOR_LIBRARY=ayatana-appindicator3-0.1
+ else
+ INDICATOR_LIBRARY=ayatana-appindicator-0.1
+ endif
+ export LIBS += $(shell pkg-config --libs $(INDICATOR_LIBRARY))
+ C_CXX_FLAGS += $(shell pkg-config --cflags $(INDICATOR_LIBRARY)) -DHAVE_INDICATORS
+endif
#------ Release configuration ------
@@ -174,6 +183,15 @@ ifeq "$(shell uname -s)" "Linux"
PLATFORM := Linux
C_CXX_FLAGS += -DTC_UNIX -DTC_LINUX
+
+ # GNU GCC version 11 and higher compile with -std=gnu++17 by default
+ # which breaks "byte" definitions in Crypto++ library. So set
+ # -std=gnu++14 instead.
+ GCC11PLUS := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 11)
+ ifeq "$(GCC11PLUS)" "1"
+ CXXFLAGS += -std=gnu++14
+ endif
+
ifeq "$(SIMD_SUPPORTED)" "1"
CFLAGS += -msse2
@@ -245,7 +263,7 @@ ifeq "$(shell uname -s)" "Darwin"
export VC_OSX_SDK ?= $(VC_OSX_TARGET)
#check to see if XCode 3 path exists.Otherwise, use XCode 4 path
- VC_OSX_SDK_PATH := /Developer/SDKs/MacOSX$(VC_OSX_SDK).sdk
+ VC_OSX_SDK_PATH := /Developer/SDKs/MacOSX$(VC_OSX_SDK).sdk
ifeq ($(wildcard $(VC_OSX_SDK_PATH)/SDKSettings.plist),)
VC_OSX_SDK_PATH := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$(VC_OSX_SDK).sdk
endif
@@ -265,6 +283,10 @@ ifeq "$(shell uname -s)" "Darwin"
ifeq "$(CPU_ARCH)" "x64"
CPU_ARCH = x86
endif
+
+ ifeq "$(CPU_ARCH)" "arm64"
+ CPU_ARCH = x86
+ endif
CFLAGS += -msse2
CXXFLAGS += -msse2
@@ -293,14 +315,18 @@ ifeq "$(shell uname -s)" "Darwin"
C_CXX_FLAGS += -gfull -arch x86_64
LFLAGS += -Wl,-dead_strip -arch x86_64
+ WX_CONFIGURE_FLAGS += --without-libpng --disable-gif --disable-pcx --disable-tga --disable-iff --disable-gif --disable-svg
+
#----- Legacy build: we build both 32-bit and 64-bit ----
ifdef VC_LEGACY_BUILD
C_CXX_FLAGS += -arch i386
LFLAGS += -arch i386
WX_CONFIGURE_FLAGS += --enable-universal_binary=i386,x86_64
else
- CXXFLAGS += -std=c++11
- WX_CONFIGURE_FLAGS += --disable-universal_binary
+ CXXFLAGS += -std=c++11
+ C_CXX_FLAGS += -arch arm64
+ LFLAGS += -arch arm64
+ WX_CONFIGURE_FLAGS += --enable-universal_binary=arm64,x86_64
endif
WXCONFIG_CFLAGS += -gfull
@@ -363,6 +389,27 @@ ifeq "$(shell uname -s)" "FreeBSD"
endif
+#------ OpenBSD configuration ------
+
+ifeq "$(shell uname -s)" "OpenBSD"
+
+ PLATFORM := OpenBSD
+ PLATFORM_UNSUPPORTED := 1
+ C_CXX_FLAGS += -DTC_UNIX -DTC_BSD -DTC_OPENBSD
+
+ CC := cc
+ CXX := c++
+
+ ifeq "$(TC_BUILD_CONFIG)" "Release"
+ C_CXX_FLAGS += -fdata-sections -ffunction-sections -fpie
+ LFLAGS += -Wl,--gc-sections -pie
+
+ WXCONFIG_CFLAGS += -fpie -fPIC
+ WXCONFIG_CXXFLAGS += -fpie -fPIC
+ endif
+endif
+
+
#------ Solaris configuration ------
ifeq "$(shell uname -s)" "SunOS"
@@ -389,8 +436,8 @@ WX_CONFIGURE_FLAGS += --disable-protocol --disable-protocols --disable-url --dis
--disable-xrc --disable-aui --disable-postscript --disable-printarch \
--disable-arcstream --disable-fs_archive --disable-fs_zip --disable-tarstream --disable-zipstream \
--disable-animatectrl --disable-bmpcombobox --disable-calendar --disable-caret --disable-checklst --disable-collpane --disable-colourpicker --disable-comboctrl \
- --disable-datepick --disable-display --disable-dirpicker --disable-filepicker --disable-fontpicker --disable-grid --disable-dataviewctrl \
- --disable-listbook --disable-odcombobox --disable-sash --disable-searchctrl --disable-slider --disable-splitter --disable-togglebtn \
+ --disable-datepick --disable-display --disable-dirpicker --disable-filepicker --disable-fontpicker --disable-grid --disable-dataviewctrl \
+ --disable-listbook --disable-odcombobox --disable-sash --disable-searchctrl --disable-slider --disable-splitter --disable-togglebtn \
--disable-toolbar --disable-tbarnative --disable-treebook --disable-toolbook --disable-tipwindow --disable-popupwin \
--disable-commondlg --disable-aboutdlg --disable-coldlg --disable-finddlg --disable-fontdlg --disable-numberdlg --disable-splash \
--disable-tipdlg --disable-progressdlg --disable-wizarddlg --disable-miniframe --disable-splines --disable-palette \
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index 343be9d4..8f7261b9 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -1806,7 +1806,7 @@ void LoadDriveLetters (HWND hwndDlg, HWND hTree, int drive)
if (propSysEnc.ea >= EAGetFirst() && propSysEnc.ea <= EAGetCount())
{
- EAGetName (szTmp, propSysEnc.ea, 1);
+ EAGetName (szTmp, ARRAYSIZE(szTmp),propSysEnc.ea, 1);
}
else
{
@@ -1932,7 +1932,7 @@ void LoadDriveLetters (HWND hwndDlg, HWND hTree, int drive)
GetSizeString (bSysEncPartition ? GetSysEncDeviceSize(TRUE) : driver.diskLength[i], szTmpW, sizeof(szTmpW));
ListSubItemSet (hTree, listItem.iItem, 2, szTmpW);
- EAGetName (szTmp, bSysEncPartition ? propSysEnc.ea : driver.ea[i], 1);
+ EAGetName (szTmp, ARRAYSIZE(szTmp),bSysEncPartition ? propSysEnc.ea : driver.ea[i], 1);
listItem.iSubItem = 3;
ListView_SetItem (hTree, &listItem);
@@ -4233,14 +4233,14 @@ BOOL CALLBACK VolumePropertiesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LP
return 1;
}
- EAGetName (szTmp, prop.ea, 1);
+ EAGetName (szTmp, ARRAYSIZE(szTmp), prop.ea, 1);
ListSubItemSet (list, i++, 1, szTmp);
// Key size(s)
{
wchar_t name[128];
int size = EAGetKeySize (prop.ea);
- EAGetName (name, prop.ea, 1);
+ EAGetName (name, ARRAYSIZE(name), prop.ea, 1);
// Primary key
ListItemAdd (list, i, GetString ("KEY_SIZE"));
@@ -4301,7 +4301,7 @@ BOOL CALLBACK VolumePropertiesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LP
GetDateFormatW (LOCALE_USER_DEFAULT, 0, &st, 0, sw, sizeof (sw)/2);
swprintf (date, L"%s ", sw);
GetTimeFormatW (LOCALE_USER_DEFAULT, 0, &st, 0, sw, sizeof (sw)/2);
- wcscat (date, sw);
+ StringCchCatW (date, ARRAYSIZE(date), sw);
ListSubItemSet (list, i++, 1, date);
// Header date
@@ -4311,7 +4311,7 @@ BOOL CALLBACK VolumePropertiesDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LP
GetDateFormatW (LOCALE_USER_DEFAULT, 0, &st, 0, sw, sizeof (sw)/2);
swprintf (date, L"%s ", sw);
GetTimeFormatW (LOCALE_USER_DEFAULT, 0, &st, 0, sw, sizeof (sw)/2);
- wcscat (date, sw);
+ StringCchCatW (date, ARRAYSIZE(date), sw);
GetLocalTime (&st);
SystemTimeToFileTime (&st, &curFt);
@@ -4816,6 +4816,10 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
{
StringCbPrintfW (dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\VeraCrypt-x64.exe", dstDir);
}
+ else if (wcscmp(fileName, L"VeraCrypt-arm64.exe") == 0)
+ {
+ StringCbPrintfW(dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\VeraCrypt-arm64.exe", dstDir);
+ }
else if (wcscmp (fileName, L"veracrypt.sys") == 0)
{
StringCbPrintfW (dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\veracrypt.sys", dstDir);
@@ -4824,6 +4828,10 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
{
StringCbPrintfW (dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\veracrypt-x64.sys", dstDir);
}
+ else if (wcscmp(fileName, L"veracrypt-arm64.sys") == 0)
+ {
+ StringCbPrintfW(dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\veracrypt-arm64.sys", dstDir);
+ }
else if (copyWizard && (wcscmp (fileName, L"VeraCrypt Format.exe") == 0))
{
StringCbPrintfW (dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\VeraCrypt Format.exe", dstDir);
@@ -4832,6 +4840,10 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
{
StringCbPrintfW (dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\VeraCrypt Format-x64.exe", dstDir);
}
+ else if (copyWizard && (wcscmp(fileName, L"VeraCrypt Format-arm64.exe") == 0))
+ {
+ StringCbPrintfW(dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\VeraCrypt Format-arm64.exe", dstDir);
+ }
else if (copyExpander && (wcscmp (fileName, L"VeraCryptExpander.exe") == 0))
{
StringCbPrintfW (dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\VeraCryptExpander.exe", dstDir);
@@ -4840,6 +4852,10 @@ BOOL CALLBACK TravelerDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa
{
StringCbPrintfW (dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\VeraCryptExpander-x64.exe", dstDir);
}
+ else if (copyExpander && (wcscmp(fileName, L"VeraCryptExpander-arm64.exe") == 0))
+ {
+ StringCbPrintfW(dstPath, sizeof(dstPath), L"%s\\VeraCrypt\\VeraCryptExpander-arm64.exe", dstDir);
+ }
else
continue;
@@ -9647,6 +9663,35 @@ static void SystemFavoritesServiceSetStatus (DWORD status, DWORD waitHint = 0)
SetServiceStatus (SystemFavoritesServiceStatusHandle, &SystemFavoritesServiceStatus);
}
+static void SystemFavoritesServiceUpdateLoaderProcessing ()
+{
+ if (!(BootEncObj->ReadServiceConfigurationFlags () & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_UPDATE_LOADER))
+ {
+ try
+ {
+ BootEncryption::UpdateSetupConfigFile (true);
+ if (!BootEncStatus.HiddenSystem)
+ {
+ // re-install our bootloader again in case the update process has removed it.
+ bool bForceSetNextBoot = false;
+ bool bSetBootentry = true;
+ bool bForceFirstBootEntry = true;
+ uint32 flags = BootEncObj->ReadServiceConfigurationFlags ();
+ if (flags & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_FORCE_SET_BOOTNEXT)
+ bForceSetNextBoot = true;
+ if (flags & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_SET_BOOTENTRY)
+ bSetBootentry = false;
+ if (flags & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_FORCE_FIRST_BOOTENTRY)
+ bForceFirstBootEntry = false;
+ BootEncryption bootEnc (NULL, true, bSetBootentry, bForceFirstBootEntry, bForceSetNextBoot);
+ bootEnc.InstallBootLoader (true);
+ }
+ }
+ catch (...)
+ {
+ }
+ }
+}
static DWORD WINAPI SystemFavoritesServiceCtrlHandler ( DWORD dwControl,
DWORD dwEventType,
@@ -9659,32 +9704,7 @@ static DWORD WINAPI SystemFavoritesServiceCtrlHandler ( DWORD dwControl,
case SERVICE_CONTROL_STOP:
SystemFavoritesServiceSetStatus (SERVICE_STOP_PENDING);
- if (!(BootEncObj->ReadServiceConfigurationFlags () & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_UPDATE_LOADER))
- {
- try
- {
- BootEncryption::UpdateSetupConfigFile (true);
- if (!BootEncStatus.HiddenSystem)
- {
- // re-install our bootloader again in case the update process has removed it.
- bool bForceSetNextBoot = false;
- bool bSetBootentry = true;
- bool bForceFirstBootEntry = true;
- uint32 flags = BootEncObj->ReadServiceConfigurationFlags ();
- if (flags & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_FORCE_SET_BOOTNEXT)
- bForceSetNextBoot = true;
- if (flags & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_SET_BOOTENTRY)
- bSetBootentry = false;
- if (flags & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_DONT_FORCE_FIRST_BOOTENTRY)
- bForceFirstBootEntry = false;
- BootEncryption bootEnc (NULL, true, bSetBootentry, bForceFirstBootEntry, bForceSetNextBoot);
- bootEnc.InstallBootLoader (true);
- }
- }
- catch (...)
- {
- }
- }
+ SystemFavoritesServiceUpdateLoaderProcessing ();
/* clear VC_DRIVER_CONFIG_CLEAR_KEYS_ON_NEW_DEVICE_INSERTION flag */
SetDriverConfigurationFlag (VC_DRIVER_CONFIG_CLEAR_KEYS_ON_NEW_DEVICE_INSERTION, FALSE);
@@ -9692,6 +9712,24 @@ static DWORD WINAPI SystemFavoritesServiceCtrlHandler ( DWORD dwControl,
SystemFavoritesServiceSetStatus (SERVICE_STOP_PENDING);
break;
+ case SERVICE_CONTROL_POWEREVENT:
+ {
+ /* perform fixing of bootloader and SetupConfig.ini when the system resumes from sleep */
+ if (dwEventType == PBT_APMRESUMEAUTOMATIC)
+ {
+ SystemFavoritesServiceUpdateLoaderProcessing ();
+ }
+ }
+ break;
+ case SERVICE_CONTROL_SESSIONCHANGE:
+ {
+ /* perform fixing of bootloader and SetupConfig.ini when the user logs in or when he unlocks his locked session */
+ if ((dwEventType == WTS_SESSION_UNLOCK) || (dwEventType == WTS_SESSION_LOGON))
+ {
+ SystemFavoritesServiceUpdateLoaderProcessing ();
+ }
+ }
+ break;
case SERVICE_CONTROL_DEVICEEVENT:
if (DBT_DEVICEARRIVAL == dwEventType)
{
@@ -9757,7 +9795,7 @@ static VOID WINAPI SystemFavoritesServiceMain (DWORD argc, LPTSTR *argv)
SystemFavoritesServiceStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
SystemFavoritesServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
if (IsOSAtLeast (WIN_VISTA))
- SystemFavoritesServiceStatus.dwControlsAccepted |= SERVICE_ACCEPT_PRESHUTDOWN;
+ SystemFavoritesServiceStatus.dwControlsAccepted |= SERVICE_ACCEPT_PRESHUTDOWN | SERVICE_ACCEPT_SESSIONCHANGE | SERVICE_ACCEPT_POWEREVENT;
if ((argc >= 2) && (0 == _wcsicmp (argv[1], VC_SYSTEM_FAVORITES_SERVICE_ARG_SKIP_MOUNT)))
bSkipMount = TRUE;
@@ -9807,6 +9845,8 @@ static VOID WINAPI SystemFavoritesServiceMain (DWORD argc, LPTSTR *argv)
if (!(ReadDriverConfigurationFlags() & TC_DRIVER_CONFIG_CACHE_BOOT_PASSWORD))
WipeCache (NULL, TRUE);
+
+ SystemFavoritesServiceUpdateLoaderProcessing ();
}
SystemFavoritesServiceSetStatus (SERVICE_RUNNING);
diff --git a/src/Mount/Mount.rc b/src/Mount/Mount.rc
index d93f15e3..8f951a79 100644
--- a/src/Mount/Mount.rc
+++ b/src/Mount/Mount.rc
@@ -559,8 +559,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,24,25,0
- PRODUCTVERSION 1,24,25,0
+ FILEVERSION 1,25,7,0
+ PRODUCTVERSION 1,25,7,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -577,11 +577,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "IDRIX"
VALUE "FileDescription", "VeraCrypt"
- VALUE "FileVersion", "1.24-Update9"
+ VALUE "FileVersion", "1.25"
VALUE "LegalTrademarks", "VeraCrypt"
VALUE "OriginalFilename", "VeraCrypt.exe"
VALUE "ProductName", "VeraCrypt"
- VALUE "ProductVersion", "1.24-Update9"
+ VALUE "ProductVersion", "1.25"
END
END
BLOCK "VarFileInfo"
diff --git a/src/Mount/Mount.vcxproj b/src/Mount/Mount.vcxproj
index 73a6641e..8989f650 100644
--- a/src/Mount/Mount.vcxproj
+++ b/src/Mount/Mount.vcxproj
@@ -17,6 +17,14 @@
<Configuration>ReleaseCustomEFI</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|Win32">
+ <Configuration>Release_SkipOsDriverReqCheck</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|x64">
+ <Configuration>Release_SkipOsDriverReqCheck</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -37,6 +45,11 @@
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>Windows7.1SDK</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
@@ -52,6 +65,11 @@
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>Windows7.1SDK</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
@@ -69,6 +87,10 @@
<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_SkipOsDriverReqCheck|Win32'" 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|Win32'" 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" />
@@ -81,6 +103,10 @@
<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_SkipOsDriverReqCheck|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|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" />
@@ -101,26 +127,36 @@
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</GenerateManifest>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCrypt</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCrypt</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">VeraCrypt</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCrypt</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">VeraCrypt</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">VeraCrypt</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">VeraCrypt</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">VeraCrypt</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -266,6 +302,49 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" &gt;NUL:
<Command>copy Release\VeraCrypt.exe "..\Release\Setup Files"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">
+ <Midl>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName>
+ <OutputDirectory>
+ </OutputDirectory>
+ </Midl>
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>TCMOUNT;VC_SKIP_OS_DRIVER_REQ_CHECK;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;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\Crypto\Release\crypto.lib;..\Common\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <DelayLoadDLLs>mpr.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>MachineX86</TargetMachine>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy Release\VeraCrypt.exe "..\Release\Setup Files"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">
<Midl>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -359,6 +438,53 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" &gt;NUL:
<PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">
+ <Midl>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>$(SolutionDir)/$(ProjectName)/$(ProjectName).tlb</TypeLibraryName>
+ <OutputDirectory>
+ </OutputDirectory>
+ </Midl>
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>TCMOUNT;VC_SKIP_OS_DRIVER_REQ_CHECK;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;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>..\Crypto\x64\Release\crypto.lib;..\Common\x64\Release\Zip.lib;mpr.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCrypt.exe</OutputFile>
+ <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
+ <DelayLoadDLLs>mpr.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>
+ <AdditionalManifestFiles>Mount.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy $(TargetPath) "..\Release\Setup Files\VeraCrypt-x64.exe"</Command>
+ </PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">
<Midl>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -415,8 +541,10 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" &gt;NUL:
<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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\BaseCom.cpp" />
@@ -429,16 +557,20 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" &gt;NUL:
<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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\EncryptionThreadPool.c" />
@@ -448,8 +580,10 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" &gt;NUL:
<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)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Language.c" />
@@ -556,8 +690,10 @@ copy $(TargetPath) "..\Debug\Setup Files\VeraCrypt-x64.exe" &gt;NUL:
<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)'=='Release_SkipOsDriverReqCheck|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|x64'">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
diff --git a/src/Platform/Unix/File.cpp b/src/Platform/Unix/File.cpp
index cfb17e13..d3413800 100644
--- a/src/Platform/Unix/File.cpp
+++ b/src/Platform/Unix/File.cpp
@@ -23,6 +23,12 @@
#include <sys/disk.h>
#endif
+#ifdef TC_OPENBSD
+#include <sys/ioctl.h>
+#include <sys/dkio.h>
+#include <sys/disklabel.h>
+#endif
+
#ifdef TC_SOLARIS
#include <stropts.h>
#include <sys/dkio.h>
@@ -32,6 +38,10 @@
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef TC_FREEBSD
+#include <sys/sysctl.h>
+#endif
+
#include "Platform/File.h"
#include "Platform/TextReader.h"
@@ -113,6 +123,11 @@ namespace VeraCrypt
throw_sys_sub_if (ioctl (FileHandle, DIOCGSECTORSIZE, &sectorSize) == -1, wstring (Path));
return (uint32) sectorSize;
+#elif defined (TC_OPENBSD)
+ struct disklabel dl;
+ throw_sys_sub_if (ioctl (FileHandle, DIOCGPDINFO, &dl) == -1, wstring (Path));
+ return (uint32) dl.d_secsize;
+
#elif defined (TC_SOLARIS)
struct dk_minfo mediaInfo;
throw_sys_sub_if (ioctl (FileHandle, DKIOCGMEDIAINFO, &mediaInfo) == -1, wstring (Path));
@@ -146,6 +161,31 @@ namespace VeraCrypt
throw_sys_sub_if (ioctl (FileHandle, DKIOCGETBASE, &offset) == -1, wstring (Path));
return offset;
+#elif defined (TC_FREEBSD)
+ // Get the kernel GEOM configuration
+ size_t sysctlDataLen, mibLen;
+ int mib[4];
+ mibLen = 4;
+ throw_sys_sub_if (sysctlnametomib ("kern.geom.conftxt", mib, &mibLen), wstring (Path));
+ throw_sys_sub_if (sysctl (mib, mibLen, NULL, &sysctlDataLen, NULL, 0), wstring (Path));
+ vector<char> conftxt(sysctlDataLen);
+ throw_sys_sub_if (sysctl (mib, mibLen, (void *)conftxt.data(), &sysctlDataLen, NULL, 0), wstring (Path));
+
+ // Find the slice/partition data
+ string conftxtStr (conftxt.begin(), conftxt.end());
+ size_t confLoc = conftxtStr.find (Path.ToBaseName());
+ throw_sys_sub_if (confLoc == string::npos, wstring (Path));
+
+ // Skip to the ninth column
+ for (int i = 0; i < 6;i++) {
+ confLoc = conftxtStr.find (" ", confLoc + 1);
+ throw_sys_sub_if (confLoc == string::npos, wstring (Path));
+ }
+ confLoc++;
+ size_t end = conftxtStr.find (" ", confLoc);
+ throw_sys_sub_if (end == string::npos, wstring (Path));
+ return StringConverter::ToUInt64 (conftxtStr.substr (confLoc, end - confLoc));
+
#elif defined (TC_SOLARIS)
struct extpart_info partInfo;
@@ -171,6 +211,10 @@ namespace VeraCrypt
throw_sys_sub_if (ioctl (FileHandle, DKIOCGETBLOCKSIZE, &blockSize) == -1, wstring (Path));
throw_sys_sub_if (ioctl (FileHandle, DKIOCGETBLOCKCOUNT, &blockCount) == -1, wstring (Path));
return blockCount * blockSize;
+# elif TC_OPENBSD
+ struct disklabel dl;
+ throw_sys_sub_if (ioctl (FileHandle, DIOCGPDINFO, &dl) == -1, wstring (Path));
+ return DL_GETDSIZE(&dl);
# else
uint64 mediaSize;
throw_sys_sub_if (ioctl (FileHandle, DIOCGMEDIASIZE, &mediaSize) == -1, wstring (Path));
diff --git a/src/Platform/Unix/FilesystemPath.cpp b/src/Platform/Unix/FilesystemPath.cpp
index 674b395b..1230c2aa 100644
--- a/src/Platform/Unix/FilesystemPath.cpp
+++ b/src/Platform/Unix/FilesystemPath.cpp
@@ -15,7 +15,7 @@
#include "Platform/StringConverter.h"
#include <stdio.h>
#include <sys/stat.h>
-#if !defined(__FreeBSD__) && !defined(__APPLE__)
+#if !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(__OpenBSD__)
#include <sys/sysmacros.h>
#endif
@@ -107,8 +107,11 @@ namespace VeraCrypt
string pathStr = StringConverter::ToSingle (Path);
size_t p = pathStr.rfind ("s");
- if (p == string::npos)
- throw PartitionDeviceRequired (SRC_POS);
+ if (p == string::npos) {
+ p = pathStr.rfind ("p");
+ if (p == string::npos)
+ throw PartitionDeviceRequired (SRC_POS);
+ }
path = pathStr.substr (0, p);
#elif defined (TC_SOLARIS)
diff --git a/src/Platform/Unix/SystemInfo.cpp b/src/Platform/Unix/SystemInfo.cpp
index d4f648bb..f09674aa 100644
--- a/src/Platform/Unix/SystemInfo.cpp
+++ b/src/Platform/Unix/SystemInfo.cpp
@@ -24,6 +24,8 @@ namespace VeraCrypt
return L"Mac OS X";
#elif defined (TC_FREEBSD)
return L"FreeBSD";
+#elif defined (TC_OPENBSD)
+ return L"OpenBSD";
#elif defined (TC_SOLARIS)
return L"Solaris";
#else
diff --git a/src/Readme.txt b/src/Readme.txt
index d4dc8f16..6a57464c 100644
--- a/src/Readme.txt
+++ b/src/Readme.txt
@@ -44,6 +44,7 @@ Requirements for Building VeraCrypt for Windows:
------------------------------------------------
- Microsoft Visual C++ 2010 SP1 (Professional Edition or compatible)
+- Microsoft Visual C++ 2019
- Microsoft Visual C++ 1.52 (available from MSDN Subscriber Downloads)
- Microsoft Windows SDK for Windows 7.1 (configured for Visual C++ 2010)
- Microsoft Windows SDK for Windows 8.1 (needed for SHA-256 code signing)
@@ -59,19 +60,19 @@ The 64-bit editions of Windows Vista and later versions of Windows, and in
some cases (e.g. playback of HD DVD content) also the 32-bit editions, do not
allow the VeraCrypt driver to run without an appropriate digital signature.
Therefore, all .sys files in official VeraCrypt binary packages are digitally
-signed with the digital certificate of the IDRIX, which was
-issued by Thawte certification authority. At the end of each official .exe and
+signed with the digital certificate of the IDRIX, which was issued by
+GlobalSign certification authority. At the end of each official .exe and
.sys file, there are embedded digital signatures and all related certificates
(i.e. all certificates in the relevant certification chain, such as the
certification authority certificates, CA-MS cross-certificate, and the
IDRIX certificate).
-Keep this in mind if you compile VeraCrypt
-and compare your binaries with the official binaries. If your binaries are
-unsigned, the sizes of the official binaries will usually be approximately
-10 KiB greater than sizes of your binaries (there may be further differences
-if you use a different version of the compiler, or if you install a different
-or no service pack for Visual Studio, or different hotfixes for it, or if you
-use different versions of the required SDKs).
+Keep this in mind if you compile VeraCrypt and compare your binaries with the
+official binaries. If your binaries are unsigned, the sizes of the official
+binaries will usually be approximately 10 KiB greater than sizes of your
+binaries (there may be further differences if you use a different version of
+the compiler, or if you install a different or no service pack for Visual
+Studio, or different hotfixes for it, or if you use different versions of
+the required SDKs).
Instructions for Building VeraCrypt for Windows:
@@ -91,12 +92,22 @@ Instructions for Building VeraCrypt for Windows:
3) Open the solution file 'VeraCrypt.sln' in Microsoft Visual Studio 2010.
-4) Select 'All' as the active solution configuration.
+4) Select 'All' as the active solution configuration and WIN32 as the active
+ platform.
5) Build the solution.
+6) Select x64 as the active platform and build the solution again.
+
+7) Open the solution file 'VeraCrypt_vs2019.sln' in Microsoft Visual Studio 2019.
+
+8) Select 'All' as the active solution configuration and ARM64 as the active
+ platform.
+
+9) Build the solution.
+
6) If successful, there should be newly built VeraCrypt binaries in the
- 'Release' folder.
+ 'Release\Setup Files' folder.
Instructions for Signing and Packaging VeraCrypt for Windows:
-------------------------------------------------------------
@@ -105,17 +116,19 @@ First, create an environment variable 'WSDK81' pointing to the Windows SDK
for Windows 8.1 installation directory.
The folder "Signing" contains a batch file (sign.bat) that will sign all
VeraCrypt components using a code signing certificate present on the
-certificate store and also build the final installation setup.
-The batch file suppose that the code signing certificate is issued by Thawt.
-This is the case for IDRIX's certificate. If yours is issued by another CA,
-then you should put the Root and Intermediate certificates in the "Signing"
-folder and then modify sign.bat accordingly.
+certificate store and also build the final installation setup and MSI package.
+The batch file suppose that the code signing certificate is issued by
+GlobalSign. This is the case for IDRIX's certificate. If yours is issued by
+another CA, then you should put its intermediate certificates in the "Signing"
+folder and modify sign.bat accordingly.
+
+In order to generate MSI packages, WiX Toolset v3.11 must be installed.
VeraCrypt EFI Boot Loader:
--------------------------
VeraCrypt source code contains pre-built EFI binaries under src\Boot\EFI.
-The source code of VeraCrypt EFI Boot Loader is licensed under LGPL and
+The source code of VeraCrypt EFI Boot Loader is licensed under LGPL and
it is available at https://github.com/veracrypt/VeraCrypt-DCS.
For build instructions, please refer to the file src\Boot\EFI\Readme.txt.
@@ -146,7 +159,7 @@ Instructions for Building VeraCrypt for Linux and Mac OS X:
command to configure the wxWidgets static library for VeraCrypt and to
build it:
- $ make WXSTATIC=1 WX_ROOT=/usr/src/wxWidgets wxbuild
+ $ make WXSTATIC=1 WX_ROOT=/usr/src/wxWidgets wxbuild
The variable WX_ROOT must point to the location of the source code of the
wxWidgets library. Output files will be placed in the './wxrelease/'
@@ -154,11 +167,11 @@ Instructions for Building VeraCrypt for Linux and Mac OS X:
3) To build VeraCrypt, run the following command:
- $ make
+ $ make
or if you have no wxWidgets shared library installed:
- $ make WXSTATIC=1
+ $ make WXSTATIC=1
4) If successful, the VeraCrypt executable should be located in the directory
'Main'.
@@ -168,18 +181,18 @@ interface (through the switch --text) is built.
On Linux, a console-only executable, which requires no GUI library, can be
built using the 'NOGUI' parameter:
- $ make NOGUI=1 WXSTATIC=1 WX_ROOT=/usr/src/wxWidgets wxbuild
- $ make NOGUI=1 WXSTATIC=1
+ $ make NOGUI=1 WXSTATIC=1 WX_ROOT=/usr/src/wxWidgets wxbuild
+ $ make NOGUI=1 WXSTATIC=1
On MacOSX, building a console-only executable is not supported.
Mac OS X specifics:
-----------------------------------------------------------
-Under MacOSX, the SDK for OSX 10.7 is used by default. To use another version
-of the SDK (i.e. 10.6), you can export the environment variable VC_OSX_TARGET:
+Under MacOSX, the SDK for OSX 11.3 is used by default. To use another version
+of the SDK (i.e. 10.15), you can export the environment variable VC_OSX_TARGET:
- $ export VC_OSX_TARGET=10.6
+ $ export VC_OSX_TARGET=10.15
Before building under MacOSX, pkg-config must be installed if not yet available.
@@ -191,16 +204,16 @@ compile using the following commands :
$ sudo make install
After making sure pkg-config is available, download and install OSXFuse from
-https://osxfuse.github.io/ (MacFUSE compatibility layer must selected)
+https://osxfuse.github.io/
The script build_veracrypt_macosx.sh available under "src/Build" performs the
full build of VeraCrypt including the creation of the installer pkg. It expects
-to find the wxWidgets 3.0.3 sources at the same level as where you put
+to find the wxWidgets 3.1.2 sources at the same level as where you put
VeraCrypt sources (i.e. if "src" path is "/Users/joe/Projects/VeraCrypt/src"
-then wxWidgets should be at "/Users/joe/Projects/wxWidgets-3.0.3")
+then wxWidgets should be at "/Users/joe/Projects/wxWidgets-3.1.2")
The build process uses Code Signing certificates whose ID is specified in
-src/Main/Main.make (look for lines containing "Developer ID Application" and
+src/Main/Main.make (look for lines containing "Developer ID Application" and
"Developer ID Installer"). You'll have to modify these lines to put the ID of
your Code Signing certificates or comment them if you don't have one.
@@ -241,10 +254,10 @@ Copyright Information
---------------------
This software as a whole:
-Copyright (c) 2013-2020 IDRIX. All rights reserved.
+Copyright (c) 2013-2022 IDRIX. All rights reserved.
Portions of this software:
-Copyright (c) 2013-2020 IDRIX. All rights reserved.
+Copyright (c) 2013-2022 IDRIX. All rights reserved.
Copyright (c) 2003-2012 TrueCrypt Developers Association. All rights reserved.
Copyright (c) 1998-2000 Paul Le Roux. All rights reserved.
Copyright (c) 1998-2008 Brian Gladman, Worcester, UK. All rights reserved.
diff --git a/src/Release/Setup Files/Product64.wxs b/src/Release/Setup Files/Product64.wxs
index 7bd7388b..8f453a05 100644
--- a/src/Release/Setup Files/Product64.wxs
+++ b/src/Release/Setup Files/Product64.wxs
@@ -4,7 +4,7 @@
<!-- FullProductVersion's first 3 parts MUST BE incremented at each release in order
for upgrades to work ; Windows Installer ignores the 4th part -->
- <?define var.FullProductVersion = 1.24.25?>
+ <?define var.FullProductVersion = 1.25.7?>
<?define var.ProductName = VeraCrypt $(var.FullProductVersion)?>
<!-- Unique GUID identifying this family of product (32-bit and 64-bit have the same) -->
@@ -12,7 +12,7 @@
<!-- Unique GUID identifying this product release (32-bit and 64-bit have different ones) -->
<!-- MUST BE regenerated for each new release -->
- <?define var.ProductGuid = {4B0DDCE8-2DAC-4350-8F5E-632BD9BA9209}?>
+ <?define var.ProductGuid = {5660AE59-4AFF-4BE7-9DF5-6656D55537A3}?>
<!-- Unique GUID identifying a particular Windows Installer package -->
<!-- When compiling a product, it should not be set in order to allow it to be generated for each build -->
@@ -1115,7 +1115,7 @@
<!-- MSI already removes all values and subkeys that it creates : no need to set Action="createAndRemoveOnUninstall" -->
<RegistryKey Root="HKLM" Key="SOFTWARE\Classes\VeraCryptVolume\DefaultIcon" >
- <RegistryValue Type="string" Value="[APPLICATIONROOTFOLDER]\VeraCrypt.exe,1" KeyPath="yes" />
+ <RegistryValue Type="string" Value="[APPLICATIONROOTFOLDER]VeraCrypt.exe,1" KeyPath="yes" />
</RegistryKey>
</Component>
@@ -1126,7 +1126,7 @@
<!-- MSI already removes all values and subkeys that it creates : no need to set Action="createAndRemoveOnUninstall" -->
<RegistryKey Root="HKLM" Key="SOFTWARE\Classes\VeraCryptVolume\Shell\open\command" >
- <RegistryValue Type="string" Value="&quot;[APPLICATIONROOTFOLDER]\VeraCrypt.exe&quot; /v &quot;%%1&quot;" KeyPath="yes" />
+ <RegistryValue Type="string" Value="&quot;[APPLICATIONROOTFOLDER]VeraCrypt.exe&quot; /v &quot;%1&quot;" KeyPath="yes" />
</RegistryKey>
</Component>
diff --git a/src/Release/Setup Files/build_msi_x64.bat b/src/Release/Setup Files/build_msi_x64.bat
index 476625b0..e610160a 100644
--- a/src/Release/Setup Files/build_msi_x64.bat
+++ b/src/Release/Setup Files/build_msi_x64.bat
@@ -118,7 +118,7 @@ cd %MSI_BUILDPATH%
@if NOT "%ERRORLEVEL%" == "0" goto msi_failed
"%VC_DIR_WIX%\candle.exe" -dLang=en -arch x64 -ext WixUIExtension -ext WiXUtilExtension Custom_InstallDirDlg.wxs -out out\64\en-us\Custom_InstallDirDlg.wixobj
@if NOT "%ERRORLEVEL%" == "0" goto msi_failed
-"%VC_DIR_WIX%\Light.exe" -ext WixUIExtension -ext WiXUtilExtension -cultures:en-us -loc Strings-en.wxl out\64\en-us\Product.wixobj out\64\en-us\Custom_InstallDirDlg.wixobj out\64\en-us\Custom_InstallDir.wixobj -out out\64\en-us\VeraCrypt_%1_Setup_en-us.msi -pdbout out\64\en-us\VeraCrypt_%1_Setup_en-us.wixpdb -sice:ICE09
+"%VC_DIR_WIX%\Light.exe" -ext WixUIExtension -ext WiXUtilExtension -cultures:en-us -loc Strings-en.wxl out\64\en-us\Product.wixobj out\64\en-us\Custom_InstallDirDlg.wixobj out\64\en-us\Custom_InstallDir.wixobj -out out\64\en-us\VeraCrypt_Setup_%1_en-us.msi -pdbout out\64\en-us\VeraCrypt_Setup_%1_en-us.wixpdb -sice:ICE09
@if NOT "%ERRORLEVEL%" == "0" goto msi_failed
::------------------------------------
@@ -129,8 +129,8 @@ cd %MSI_BUILDPATH%
@set OUT_PATH=%cd%\out\64\
@echo [INFO] OUT_PATH=%OUT_PATH%
-@set MSI_FILE_IN=VeraCrypt_%1_Setup
-@set MSI_FILE_OUT=VeraCrypt_%1_Setup_x64
+@set MSI_FILE_IN=VeraCrypt_Setup_%1
+@set MSI_FILE_OUT=VeraCrypt_Setup_x64_%1
:: Check if all the MSI files were built
@set LANG=en-us
@@ -152,7 +152,7 @@ cd %MSI_BUILDPATH%
mkdir bin
@copy /Y "%OUT_PATH%\%MSI_FILE_OUT%.msi" "%cd%\bin\%MSI_FILE_OUT%.msi"
@set LANG=en-us
-@copy /Y "%OUT_PATH%\%LANG%\%MSI_FILE_IN%_%LANG%.msi" "%cd%\bin\%MSI_FILE_IN%_x64_%LANG%.msi"
+@copy /Y "%OUT_PATH%\%LANG%\%MSI_FILE_IN%_%LANG%.msi" "%cd%\bin\%MSI_FILE_OUT%_%LANG%.msi"
@rmdir /S /Q "%cd%\out"
goto END
diff --git a/src/Release/Setup Files/veracrypt-arm64.cat b/src/Release/Setup Files/veracrypt-arm64.cat
index 2f72e7d0..7dd138e0 100644
--- a/src/Release/Setup Files/veracrypt-arm64.cat
+++ b/src/Release/Setup Files/veracrypt-arm64.cat
Binary files differ
diff --git a/src/Release/Setup Files/veracrypt-arm64.sys b/src/Release/Setup Files/veracrypt-arm64.sys
index 60cb99ae..fd4a65df 100644
--- a/src/Release/Setup Files/veracrypt-arm64.sys
+++ b/src/Release/Setup Files/veracrypt-arm64.sys
Binary files differ
diff --git a/src/Release/Setup Files/veracrypt-x64.cat b/src/Release/Setup Files/veracrypt-x64.cat
index 36706341..02cd7159 100644
--- a/src/Release/Setup Files/veracrypt-x64.cat
+++ b/src/Release/Setup Files/veracrypt-x64.cat
Binary files differ
diff --git a/src/Release/Setup Files/veracrypt-x64.sys b/src/Release/Setup Files/veracrypt-x64.sys
index cae02099..a7969ab3 100644
--- a/src/Release/Setup Files/veracrypt-x64.sys
+++ b/src/Release/Setup Files/veracrypt-x64.sys
Binary files differ
diff --git a/src/Release/Setup Files/veracrypt.Inf b/src/Release/Setup Files/veracrypt.Inf
index 2b8fed00..a9c1bea3 100644
--- a/src/Release/Setup Files/veracrypt.Inf
+++ b/src/Release/Setup Files/veracrypt.Inf
@@ -10,7 +10,7 @@ signature = "$Windows NT$"
Class = "Encryption" ;This is determined by the work this filter driver does
ClassGuid = {a0a701c0-a511-42ff-aa6c-06dc0395576f} ;This value is determined by the Class
Provider = %ProviderString%
-DriverVer = 01/01/2020,1.24.25.0
+DriverVer = 12/29/2021,1.25.6.1
CatalogFile = veracrypt.cat
diff --git a/src/Release/Setup Files/veracrypt.cat b/src/Release/Setup Files/veracrypt.cat
index 9fe26bb1..655ec398 100644
--- a/src/Release/Setup Files/veracrypt.cat
+++ b/src/Release/Setup Files/veracrypt.cat
Binary files differ
diff --git a/src/Release/Setup Files/veracrypt.sys b/src/Release/Setup Files/veracrypt.sys
index 25f7f8e3..730d0f57 100644
--- a/src/Release/Setup Files/veracrypt.sys
+++ b/src/Release/Setup Files/veracrypt.sys
Binary files differ
diff --git a/src/Setup/Linux/mount.veracrypt b/src/Setup/Linux/mount.veracrypt
new file mode 100644
index 00000000..499ad9b9
--- /dev/null
+++ b/src/Setup/Linux/mount.veracrypt
@@ -0,0 +1,23 @@
+#!/bin/bash
+DEV="$1"
+MNTPT="$2"
+VCOPTIONS=""
+OPTIONS=""
+
+shift 3
+IFS=','
+for arg in $*; do
+ case "$arg" in
+ truecrypt) VCOPTIONS=(${VCOPTIONS[*]} --truecrypt);;
+ system) VCOPTIONS=(${VCOPTIONS[*]} --mount-options=system);;
+ fs=*) VCOPTIONS=(${VCOPTIONS[*]} --filesystem=${arg#*=});;
+ keyfiles=*) VCOPTIONS=(${VCOPTIONS[*]} --keyfiles=${arg#*=});;
+ password=*) VCOPTIONS=(${VCOPTIONS[*]} --password=${arg#*=});;
+ pim=*) VCOPTIONS=(${VCOPTIONS[*]} --pim==${arg#*=});;
+ protect-hidden=*) VCOPTIONS=(${VCOPTIONS[*]} --protect-hidden=${arg#*=});;
+ slot=*) VCOPTIONS=(${VCOPTIONS[*]} --slot=${arg#*=});;
+ *) OPTIONS="${OPTIONS}${arg},";;
+ esac
+done
+
+/usr/bin/veracrypt --non-interactive --text ${VCOPTIONS[*]} --fs-options="${OPTIONS%,*}" ${DEV} ${MNTPT}
diff --git a/src/Setup/Linux/veracrypt.desktop b/src/Setup/Linux/veracrypt.desktop
index 01dfaf61..4504f20c 100644
--- a/src/Setup/Linux/veracrypt.desktop
+++ b/src/Setup/Linux/veracrypt.desktop
@@ -1,10 +1,11 @@
[Desktop Entry]
-Encoding=UTF-8
+Type=Application
Name=VeraCrypt
-GenericName=VeraCrypt
-Comment=VeraCrypt
-Exec=/usr/bin/veracrypt
+GenericName=VeraCrypt volume manager
+Comment=Create and mount VeraCrypt encrypted volumes
Icon=veracrypt
+Exec=/usr/bin/veracrypt %f
+Categories=Security;Utility;Filesystem
+Keywords=encryption,filesystem
Terminal=false
-Type=Application
-Categories=Encryption;Encryption Tools;Utility;
+MimeType=application/x-veracrypt-volume;application/x-truecrypt-volume; \ No newline at end of file
diff --git a/src/Setup/Linux/veracrypt.xml b/src/Setup/Linux/veracrypt.xml
new file mode 100644
index 00000000..4fc73b90
--- /dev/null
+++ b/src/Setup/Linux/veracrypt.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+ <mime-type type="application/x-veracrypt-volume">
+ <comment>VeraCrypt Volume</comment>
+ <glob pattern="*.hc"/>
+ </mime-type>
+ <mime-type type="application/x-truecrypt-volume">
+ <comment>TrueCrypt Volume</comment>
+ <glob pattern="*.tc"/>
+ </mime-type>
+</mime-info>
diff --git a/src/Setup/MacOSX/postinstall.sh b/src/Setup/MacOSX/postinstall.sh
new file mode 100755
index 00000000..661b0f5b
--- /dev/null
+++ b/src/Setup/MacOSX/postinstall.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+if !([ -e "/usr/local/lib/libfuse.2.dylib" ])
+then
+ ln -s /usr/local/lib/libosxfuse.2.dylib /usr/local/lib/libfuse.2.dylib
+fi
+
+chmod -R go-w /Applications/VeraCrypt.app
+
+exit 0
diff --git a/src/Setup/MacOSX/veracrypt.pkgproj b/src/Setup/MacOSX/veracrypt.pkgproj
index 39865a5b..9843c722 100755
--- a/src/Setup/MacOSX/veracrypt.pkgproj
+++ b/src/Setup/MacOSX/veracrypt.pkgproj
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
@@ -519,8 +520,10 @@
<dict>
<key>POSTINSTALL_PATH</key>
<dict>
+ <key>PATH</key>
+ <string>postinstall.sh</string>
<key>PATH_TYPE</key>
- <integer>0</integer>
+ <integer>1</integer>
</dict>
<key>PREINSTALL_PATH</key>
<dict>
@@ -555,7 +558,7 @@
<key>USE_HFS+_COMPRESSION</key>
<false/>
<key>VERSION</key>
- <string>1.24.25</string>
+ <string>1.25.7</string>
</dict>
<key>TYPE</key>
<integer>0</integer>
@@ -838,6 +841,13 @@ https://osxfuse.github.io/
</dict>
<key>PROJECT_SETTINGS</key>
<dict>
+ <key>ADVANCED_OPTIONS</key>
+ <dict>
+ <key>installer-script.options:hostArchitectures</key>
+ <array>
+ <string>x86_64,arm64</string>
+ </array>
+ </dict>
<key>BUILD_FORMAT</key>
<integer>0</integer>
<key>BUILD_PATH</key>
@@ -1016,7 +1026,7 @@ https://osxfuse.github.io/
</dict>
</array>
<key>NAME</key>
- <string>VeraCrypt 1.24-Update9</string>
+ <string>VeraCrypt 1.25.7</string>
<key>PAYLOAD_ONLY</key>
<false/>
<key>TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING</key>
diff --git a/src/Setup/MacOSX/veracrypt_Legacy.pkgproj b/src/Setup/MacOSX/veracrypt_Legacy.pkgproj
index 3db3c5d6..7075791e 100755
--- a/src/Setup/MacOSX/veracrypt_Legacy.pkgproj
+++ b/src/Setup/MacOSX/veracrypt_Legacy.pkgproj
@@ -519,8 +519,10 @@
<dict>
<key>POSTINSTALL_PATH</key>
<dict>
+ <key>PATH</key>
+ <string>postinstall.sh</string>
<key>PATH_TYPE</key>
- <integer>0</integer>
+ <integer>1</integer>
</dict>
<key>PREINSTALL_PATH</key>
<dict>
@@ -555,7 +557,7 @@
<key>USE_HFS+_COMPRESSION</key>
<false/>
<key>VERSION</key>
- <string>1.24.25</string>
+ <string>1.25.7</string>
</dict>
<key>TYPE</key>
<integer>0</integer>
@@ -1060,7 +1062,7 @@ https://osxfuse.github.io/
</dict>
</array>
<key>NAME</key>
- <string>VeraCrypt Legacy 1.24-Update9</string>
+ <string>VeraCrypt Legacy 1.25.7</string>
<key>PAYLOAD_ONLY</key>
<false/>
<key>TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING</key>
diff --git a/src/Setup/Portable.rc b/src/Setup/Portable.rc
index 6ffc03c7..6f6b2f57 100644
--- a/src/Setup/Portable.rc
+++ b/src/Setup/Portable.rc
@@ -26,8 +26,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,24,25,0
- PRODUCTVERSION 1,24,25,0
+ FILEVERSION 1,25,7,0
+ PRODUCTVERSION 1,25,7,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -44,11 +44,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "IDRIX"
VALUE "FileDescription", "VeraCrypt Portable"
- VALUE "FileVersion", "1.24-Update9"
+ VALUE "FileVersion", "1.25"
VALUE "LegalTrademarks", "VeraCrypt"
VALUE "OriginalFilename", "VeraCrypt Portable.exe"
VALUE "ProductName", "VeraCrypt"
- VALUE "ProductVersion", "1.24-Update9"
+ VALUE "ProductVersion", "1.25"
END
END
BLOCK "VarFileInfo"
diff --git a/src/Setup/Portable.vcxproj b/src/Setup/Portable.vcxproj
index e864515b..1a8e4a46 100644
--- a/src/Setup/Portable.vcxproj
+++ b/src/Setup/Portable.vcxproj
@@ -9,6 +9,10 @@
<Configuration>ReleaseCustomEFI</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|Win32">
+ <Configuration>Release_SkipOsDriverReqCheck</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -25,6 +29,11 @@
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>Windows7.1SDK</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
@@ -42,6 +51,10 @@
<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_SkipOsDriverReqCheck|Win32'" 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|Win32'" 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" />
@@ -59,15 +72,20 @@
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">PortableRelease\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">PortableRelease\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">PortableRelease\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">PortableRelease\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">PortableRelease\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">PortableRelease\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptPortable</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptPortable</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">VeraCryptPortable</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptPortable</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -145,6 +163,44 @@ copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portabl
<Command>copy PortableRelease\VeraCryptPortable.exe "..\Release\Setup Files\VeraCrypt Portable.exe"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SETUP;PORTABLE;VC_SKIP_OS_DRIVER_REQ_CHECK;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(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;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile>
+ <UACExecutionLevel>AsInvoker</UACExecutionLevel>
+ <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;mpr.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>MachineX86</TargetMachine>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>Portable.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy PortableRelease\VeraCryptPortable.exe "..\Release\Setup Files\VeraCrypt Portable.exe"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">
<ClCompile>
<AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
@@ -192,11 +248,13 @@ copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portabl
<ClCompile Include="Setup.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="Wizard.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Xml.c" />
@@ -205,11 +263,13 @@ copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portabl
<ClCompile Include="..\Common\Dictionary.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Dlgcode.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Endian.c" />
@@ -253,6 +313,7 @@ copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portabl
<ResourceCompile Include="..\Common\Common.rc">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild>
</ResourceCompile>
<ResourceCompile Include="Portable.rc" />
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c
index fc119a81..9f025ef0 100644
--- a/src/Setup/Setup.c
+++ b/src/Setup/Setup.c
@@ -84,6 +84,8 @@ BOOL bDesktopIconStatusDetermined = FALSE;
HMODULE volatile SystemRestoreDll = 0;
+extern HMODULE hcrypt32dll;
+
void localcleanup (void)
{
localcleanupwiz ();
@@ -738,6 +740,24 @@ void DetermineUpgradeDowngradeStatus (BOOL bCloseDriverHandle, LONG *driverVersi
*driverVersionPtr = driverVersion;
}
+BOOL isMsiInstalled ()
+{
+ BOOL bRet = FALSE;
+ HKEY hKey;
+ if (ERROR_SUCCESS == RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\VeraCrypt_MSI", 0, KEY_READ | KEY_WOW64_64KEY, &hKey))
+ {
+ DWORD dwType = 0;
+ if ( (ERROR_SUCCESS == RegQueryValueExW(hKey, L"ProductGuid", NULL, &dwType, NULL, NULL))
+ && (REG_SZ == dwType))
+ {
+ bRet = TRUE;
+ }
+ RegCloseKey(hKey);
+ }
+
+ return bRet;
+}
+
static BOOL IsFileInUse (const wstring &filePath)
{
@@ -2224,6 +2244,14 @@ void DoInstall (void *arg)
ClearLogWindow (hwndDlg);
+ if (isMsiInstalled())
+ {
+ MessageBoxW (hwndDlg, GetString ("CANT_INSTALL_WITH_EXE_OVER_MSI"), lpszTitle, MB_ICONHAND);
+ Error ("INSTALL_FAILED", hwndDlg);
+ PostMessage (MainDlg, TC_APPMSG_INSTALL_FAILURE, 0, 0);
+ return;
+ }
+
if (mkfulldir (InstallationPath, TRUE) != 0)
{
if (mkfulldir (InstallationPath, FALSE) != 0)
@@ -2252,12 +2280,15 @@ void DoInstall (void *arg)
&& (IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L".exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L"-x86.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L"-x64.exe")
+ || IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L"-arm64.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L" Format.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L" Format-x86.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L" Format-x64.exe")
+ || IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L" Format-arm64.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L"Expander.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L"Expander-x86.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L"Expander-x64.exe")
+ || IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L"Expander-arm64.exe")
|| IsFileInUse (wstring (InstallationPath) + L'\\' + _T(TC_APP_NAME) L" Setup.exe")
)
)
@@ -2687,31 +2718,6 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
SelfExtractStartupInit();
-#ifdef PORTABLE
- lpszTitle = L"VeraCrypt Portable";
-#else
- lpszTitle = L"VeraCrypt Setup";
-#endif
- /* Call InitApp to initialize the common code */
- InitApp (hInstance, NULL);
-
-#ifndef PORTABLE
- if (IsAdmin () != TRUE)
- if (MessageBoxW (NULL, GetString ("SETUP_ADMIN"), lpszTitle, MB_YESNO | MB_ICONQUESTION) != IDYES)
- {
- FinalizeApp ();
- exit (1);
- }
-#endif
- /* Setup directory */
- {
- wchar_t *s;
- GetModuleFileName (NULL, SetupFilesDir, ARRAYSIZE (SetupFilesDir));
- s = wcsrchr (SetupFilesDir, L'\\');
- if (s)
- s[1] = 0;
- }
-
/* Parse command line arguments */
if (lpszCommandLine[0] == L'/')
@@ -2744,6 +2750,31 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
}
}
+#ifdef PORTABLE
+ lpszTitle = L"VeraCrypt Portable";
+#else
+ lpszTitle = L"VeraCrypt Setup";
+#endif
+ /* Call InitApp to initialize the common code */
+ InitApp (hInstance, NULL);
+
+#ifndef PORTABLE
+ if (IsAdmin () != TRUE)
+ if (MessageBoxW (NULL, GetString ("SETUP_ADMIN"), lpszTitle, MB_YESNO | MB_ICONQUESTION) != IDYES)
+ {
+ FinalizeApp ();
+ exit (1);
+ }
+#endif
+ /* Setup directory */
+ {
+ wchar_t *s;
+ GetModuleFileName (NULL, SetupFilesDir, ARRAYSIZE (SetupFilesDir));
+ s = wcsrchr (SetupFilesDir, L'\\');
+ if (s)
+ s[1] = 0;
+ }
+
if (bMakePackage)
{
/* Create self-extracting package */
diff --git a/src/Setup/Setup.rc b/src/Setup/Setup.rc
index 1b80a9fd..47f9011e 100644
--- a/src/Setup/Setup.rc
+++ b/src/Setup/Setup.rc
@@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,24,25,0
- PRODUCTVERSION 1,24,25,0
+ FILEVERSION 1,25,7,0
+ PRODUCTVERSION 1,25,7,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -46,11 +46,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "IDRIX"
VALUE "FileDescription", "VeraCrypt Setup"
- VALUE "FileVersion", "1.24-Update9"
+ VALUE "FileVersion", "1.25"
VALUE "LegalTrademarks", "VeraCrypt"
VALUE "OriginalFilename", "VeraCrypt Setup.exe"
VALUE "ProductName", "VeraCrypt"
- VALUE "ProductVersion", "1.24-Update9"
+ VALUE "ProductVersion", "1.25"
END
END
BLOCK "VarFileInfo"
@@ -155,14 +155,14 @@ BEGIN
PUSHBUTTON "",IDC_PREV,209,211,50,14
DEFPUSHBUTTON "",IDC_NEXT,259,211,50,14
PUSHBUTTON "Cancel",IDCANCEL,317,211,50,14
- LTEXT "",IDC_BOX_TITLE,11,5,324,12,0,WS_EX_TRANSPARENT
+ LTEXT "",IDC_BOX_TITLE,11,2,324,12,0,WS_EX_TRANSPARENT
CONTROL 107,IDC_BITMAP_SETUP_WIZARD,"Static",SS_BITMAP | SS_NOTIFY,139,3,228,30
CONTROL 109,IDC_SETUP_WIZARD_BKG,"Static",SS_BITMAP,0,0,11,10
CONTROL "",IDC_SETUP_WIZARD_GFX_AREA,"Static",SS_GRAYRECT | NOT WS_VISIBLE,0,0,378,36,WS_EX_TRANSPARENT | WS_EX_STATICEDGE
CONTROL "",IDC_HR_BOTTOM,"Static",SS_ETCHEDHORZ,67,204,306,1,WS_EX_STATICEDGE
CONTROL "",IDC_HR,"Static",SS_ETCHEDHORZ,0,35,399,1,WS_EX_STATICEDGE
LTEXT "VeraCrypt Installer",IDC_STATIC,4,200,62,8,WS_DISABLED
- LTEXT "",IDC_BOX_INFO,18,18,317,13,0,WS_EX_TRANSPARENT
+ LTEXT "",IDC_BOX_INFO,18,15,317,16,0,WS_EX_TRANSPARENT
LTEXT "",IDC_MAIN_CONTENT_CANVAS,0,36,374,164
LTEXT "",IDC_POS_BOX,14,42,346,155,0,WS_EX_TRANSPARENT
END
diff --git a/src/Setup/Setup.vcxproj b/src/Setup/Setup.vcxproj
index 30c7e167..3e03eb7d 100644
--- a/src/Setup/Setup.vcxproj
+++ b/src/Setup/Setup.vcxproj
@@ -9,6 +9,10 @@
<Configuration>ReleaseCustomEFI</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
+ <ProjectConfiguration Include="Release_SkipOsDriverReqCheck|Win32">
+ <Configuration>Release_SkipOsDriverReqCheck</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -25,6 +29,11 @@
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>Windows7.1SDK</PlatformToolset>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>Windows7.1SDK</PlatformToolset>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
@@ -42,6 +51,10 @@
<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_SkipOsDriverReqCheck|Win32'" 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|Win32'" 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" />
@@ -59,15 +72,20 @@
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">Release\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
+ <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptSetup</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptSetup</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">VeraCryptSetup</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptSetup</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -146,6 +164,44 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt COMReg.exe" &gt;NU
<Command>copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt Setup.exe" &amp;&amp; copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt COMReg.exe"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">
+ <ClCompile>
+ <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>MaxSpeed</Optimization>
+ <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>SETUP;VC_SKIP_OS_DRIVER_REQ_CHECK;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(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;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile>
+ <UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
+ <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.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>MachineX86</TargetMachine>
+ </Link>
+ <Manifest>
+ <AdditionalManifestFiles>Setup.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
+ </Manifest>
+ <PostBuildEvent>
+ <Command>copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt Setup.exe" &amp;&amp; copy Release\VeraCryptSetup.exe "..\Release\Setup Files\VeraCrypt COMReg.exe"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">
<ClCompile>
<AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
@@ -194,11 +250,13 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt COMReg.exe" &gt;NU
<ClCompile Include="Setup.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="Wizard.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Xml.c" />
@@ -207,11 +265,13 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt COMReg.exe" &gt;NU
<ClCompile Include="..\Common\Dictionary.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Dlgcode.c">
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
+ <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">CompileAsCpp</CompileAs>
<CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
</ClCompile>
<ClCompile Include="..\Common\Endian.c" />
@@ -219,6 +279,20 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt COMReg.exe" &gt;NU
<ClCompile Include="..\Common\Registry.c" />
</ItemGroup>
<ItemGroup>
+ <None Include="..\..\Translations\Language.ar.xml" />
+ <None Include="..\..\Translations\Language.cs.xml" />
+ <None Include="..\..\Translations\Language.de.xml" />
+ <None Include="..\..\Translations\Language.es.xml" />
+ <None Include="..\..\Translations\Language.fr.xml" />
+ <None Include="..\..\Translations\Language.it.xml" />
+ <None Include="..\..\Translations\Language.ja.xml" />
+ <None Include="..\..\Translations\Language.nl.xml" />
+ <None Include="..\..\Translations\Language.pl.xml" />
+ <None Include="..\..\Translations\Language.ro.xml" />
+ <None Include="..\..\Translations\Language.ru.xml" />
+ <None Include="..\..\Translations\Language.vi.xml" />
+ <None Include="..\..\Translations\Language.zh-cn.xml" />
+ <None Include="..\..\Translations\Language.zh-hk.xml" />
<None Include="ComSetup.rgs" />
<None Include="Setup.ico" />
<None Include="..\Common\VeraCrypt.ico" />
@@ -257,6 +331,7 @@ copy Debug\VeraCryptSetup.exe "..\Debug\Setup Files\VeraCrypt COMReg.exe" &gt;NU
<ResourceCompile Include="..\Common\Common.rc">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_SkipOsDriverReqCheck|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
diff --git a/src/Setup/Setup.vcxproj.filters b/src/Setup/Setup.vcxproj.filters
index d747363f..5b16fbe3 100644
--- a/src/Setup/Setup.vcxproj.filters
+++ b/src/Setup/Setup.vcxproj.filters
@@ -95,6 +95,20 @@
<None Include="..\Common\Textual_logo_background.bmp">
<Filter>Resource Files\Common</Filter>
</None>
+ <None Include="..\..\Translations\Language.ar.xml" />
+ <None Include="..\..\Translations\Language.cs.xml" />
+ <None Include="..\..\Translations\Language.de.xml" />
+ <None Include="..\..\Translations\Language.es.xml" />
+ <None Include="..\..\Translations\Language.fr.xml" />
+ <None Include="..\..\Translations\Language.it.xml" />
+ <None Include="..\..\Translations\Language.ja.xml" />
+ <None Include="..\..\Translations\Language.nl.xml" />
+ <None Include="..\..\Translations\Language.pl.xml" />
+ <None Include="..\..\Translations\Language.ro.xml" />
+ <None Include="..\..\Translations\Language.ru.xml" />
+ <None Include="..\..\Translations\Language.vi.xml" />
+ <None Include="..\..\Translations\Language.zh-cn.xml" />
+ <None Include="..\..\Translations\Language.zh-hk.xml" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\Common\Apidrvr.h">
diff --git a/src/SetupDLL/Portable.manifest b/src/SetupDLL/Portable.manifest
deleted file mode 100644
index 5d4cb896..00000000
--- a/src/SetupDLL/Portable.manifest
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
- <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
- <security>
- <requestedPrivileges>
- <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
- </requestedPrivileges>
- </security>
- </trustInfo>
- <asmv3:application>
- <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
- <dpiAware>true</dpiAware>
- </asmv3:windowsSettings>
- </asmv3:application>
- <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
- <application>
- <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
- <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
- </application>
- </compatibility>
- <dependency>
- <dependentAssembly>
- <assemblyIdentity
- type="win32"
- name="Microsoft.Windows.Common-Controls"
- version="6.0.0.0"
- processorArchitecture="*"
- publicKeyToken="6595b64144ccf1df"
- language="*"
- />
- </dependentAssembly>
- </dependency>
-</assembly> \ No newline at end of file
diff --git a/src/SetupDLL/Portable.rc b/src/SetupDLL/Portable.rc
deleted file mode 100644
index 6ffc03c7..00000000
--- a/src/SetupDLL/Portable.rc
+++ /dev/null
@@ -1,291 +0,0 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "winres.h"
-#include "..\\common\\resource.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (United States) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,24,25,0
- PRODUCTVERSION 1,24,25,0
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x1L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904b0"
- BEGIN
- VALUE "CompanyName", "IDRIX"
- VALUE "FileDescription", "VeraCrypt Portable"
- VALUE "FileVersion", "1.24-Update9"
- VALUE "LegalTrademarks", "VeraCrypt"
- VALUE "OriginalFilename", "VeraCrypt Portable.exe"
- VALUE "ProductName", "VeraCrypt"
- VALUE "ProductVersion", "1.24-Update9"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1200
- END
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// HEADER
-//
-
-IDR_SETUP_RSRC_HEADER HEADER "resource.h"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-/////////////////////////////////////////////////////////////////////////////
-//
-// LANGUAGES
-//
-
-IDR_LANG_AR LANGUAGES "..\\..\\Translations\\Language.ar.xml"
-IDR_LANG_CS LANGUAGES "..\\..\\Translations\\Language.cs.xml"
-IDR_LANG_DE LANGUAGES "..\\..\\Translations\\Language.de.xml"
-IDR_LANG_ES LANGUAGES "..\\..\\Translations\\Language.es.xml"
-IDR_LANG_FR LANGUAGES "..\\..\\Translations\\Language.fr.xml"
-IDR_LANG_IT LANGUAGES "..\\..\\Translations\\Language.it.xml"
-IDR_LANG_JA LANGUAGES "..\\..\\Translations\\Language.ja.xml"
-IDR_LANG_NL LANGUAGES "..\\..\\Translations\\Language.nl.xml"
-IDR_LANG_PL LANGUAGES "..\\..\\Translations\\Language.pl.xml"
-IDR_LANG_RO LANGUAGES "..\\..\\Translations\\Language.ro.xml"
-IDR_LANG_RU LANGUAGES "..\\..\\Translations\\Language.ru.xml"
-IDR_LANG_VI LANGUAGES "..\\..\\Translations\\Language.vi.xml"
-IDR_LANG_ZHCN LANGUAGES "..\\..\\Translations\\Language.zh-cn.xml"
-IDR_LANG_ZHHK LANGUAGES "..\\..\\Translations\\Language.zh-hk.xml"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_INFO_PAGE_DLG DIALOGEX 0, 0, 217, 156
-STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- LTEXT "",IDC_BOX_HELP,0,10,217,146
-END
-
-IDD_INTRO_PAGE_DLG DIALOGEX 0, 0, 346, 152
-STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- CONTROL "",IDC_LICENSE_TEXT,"RichEdit20W",WS_BORDER | WS_VSCROLL | WS_TABSTOP | 0x2804,0,23,345,108
- CONTROL "",IDC_AGREE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,2,137,126,10
- LTEXT "",IDC_BOX_HELP,0,0,346,22
-END
-
-IDD_INSTL_DLG DIALOGEX 0, 0, 374, 231
-STYLE DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "VeraCrypt Portable Wizard"
-CLASS "VeraCryptCustomDlg"
-FONT 8, "MS Shell Dlg", 0, 0, 0x0
-BEGIN
- PUSHBUTTON "&Help",IDHELP,150,211,50,14
- PUSHBUTTON "",IDC_PREV,209,211,50,14
- DEFPUSHBUTTON "",IDC_NEXT,259,211,50,14
- PUSHBUTTON "Cancel",IDCANCEL,317,211,50,14
- LTEXT "",IDC_BOX_TITLE,11,5,324,12,0,WS_EX_TRANSPARENT
- CONTROL 107,IDC_BITMAP_SETUP_WIZARD,"Static",SS_BITMAP | SS_NOTIFY,139,3,228,30
- CONTROL 109,IDC_SETUP_WIZARD_BKG,"Static",SS_BITMAP,0,0,11,10
- CONTROL "",IDC_SETUP_WIZARD_GFX_AREA,"Static",SS_GRAYRECT | NOT WS_VISIBLE,0,0,378,36,WS_EX_TRANSPARENT | WS_EX_STATICEDGE
- CONTROL "",IDC_HR_BOTTOM,"Static",SS_ETCHEDHORZ,67,204,306,1,WS_EX_STATICEDGE
- CONTROL "",IDC_HR,"Static",SS_ETCHEDHORZ,0,35,399,1,WS_EX_STATICEDGE
- LTEXT "VeraCrypt Portable",IDC_STATIC,4,200,62,8,WS_DISABLED
- LTEXT "",IDC_BOX_INFO,18,18,317,13,0,WS_EX_TRANSPARENT
- LTEXT "",IDC_MAIN_CONTENT_CANVAS,0,36,374,164
- LTEXT "",IDC_POS_BOX,14,42,346,155,0,WS_EX_TRANSPARENT
-END
-
-IDD_EXTRACTION_OPTIONS_PAGE_DLG DIALOGEX 0, 0, 346, 152
-STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 0, 0, 0x0
-BEGIN
- PUSHBUTTON "Bro&wse...",IDC_BROWSE,277,32,62,14
- EDITTEXT IDC_DESTINATION,6,33,264,12,ES_AUTOHSCROLL
- LTEXT "Please select or type the location where you want to place the extracted files:",IDT_EXTRACT_DESTINATION,6,15,333,17
- CONTROL "&Open the destination location when finished",IDC_OPEN_CONTAINING_FOLDER,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,91,318,16
- LTEXT "",IDC_BOX_HELP,6,56,333,32
-END
-
-IDD_PROGRESS_PAGE_DLG DIALOGEX 0, 0, 346, 152
-STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- LISTBOX IDC_LOG_WINDOW,0,1,345,131,LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | LBS_NOSEL | WS_VSCROLL
- CONTROL "",IDC_PROGRESS_BAR,"msctls_progress32",PBS_SMOOTH | WS_BORDER,0,139,345,12
-END
-
-IDD_DONATIONS_PAGE_DLG DIALOGEX 0, 0, 346, 152
-STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
-EXSTYLE WS_EX_TRANSPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x0
-BEGIN
- PUSHBUTTON "Donate now...",IDC_DONATE,124,94,96,14
-END
-
-IDD_INSTALL_LANGUAGE DIALOGEX 0, 0, 213, 87
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "VeraCrypt Setup Wizard"
-FONT 8, "MS Shell Dlg", 400, 0, 0x1
-BEGIN
- DEFPUSHBUTTON "OK",IDOK,102,66,50,14
- PUSHBUTTON "Cancel",IDCANCEL,156,66,50,14
- ICON 501,IDC_STATIC,10,10,32,32
- LTEXT "Select the language to use during the installation:",IDC_SELECT_LANGUAGE_LABEL,42,13,157,26
- COMBOBOX IDC_LANGUAGES_LIST,42,44,164,155,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-END
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_SETUP ICON "Setup.ico"
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "#include ""..\\\\common\\\\resource.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "#include ""..\\\\common\\\\common.rc""\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_INFO_PAGE_DLG, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 210
- TOPMARGIN, 7
- BOTTOMMARGIN, 149
- END
-
- IDD_INTRO_PAGE_DLG, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 339
- TOPMARGIN, 7
- BOTTOMMARGIN, 145
- END
-
- IDD_INSTL_DLG, DIALOG
- BEGIN
- END
-
- IDD_EXTRACTION_OPTIONS_PAGE_DLG, DIALOG
- BEGIN
- RIGHTMARGIN, 343
- BOTTOMMARGIN, 147
- END
-
- IDD_PROGRESS_PAGE_DLG, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 339
- TOPMARGIN, 7
- BOTTOMMARGIN, 145
- END
-
- IDD_DONATIONS_PAGE_DLG, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 339
- TOPMARGIN, 7
- BOTTOMMARGIN, 147
- END
-
- IDD_INSTALL_LANGUAGE, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 206
- TOPMARGIN, 7
- BOTTOMMARGIN, 80
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Bitmap
-//
-
-IDB_SETUP_WIZARD BITMAP "VeraCrypt_setup.bmp"
-IDB_SETUP_WIZARD_BKG BITMAP "VeraCrypt_setup_background.bmp"
-#endif // English (United States) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-#include "..\\common\\common.rc"
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/src/SetupDLL/Portable.vcxproj b/src/SetupDLL/Portable.vcxproj
deleted file mode 100644
index e864515b..00000000
--- a/src/SetupDLL/Portable.vcxproj
+++ /dev/null
@@ -1,281 +0,0 @@
-<?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">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="ReleaseCustomEFI|Win32">
- <Configuration>ReleaseCustomEFI</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{60698D56-DB83-4D19-9C87-9DFB6A6F8C87}</ProjectGuid>
- <RootNamespace>Portable</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" 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|Win32'" 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">
- <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'">PortableDebug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">PortableDebug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</GenerateManifest>
- <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</EmbedManifest>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">PortableRelease\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">PortableRelease\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">PortableRelease\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">PortableRelease\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">false</LinkIncremental>
- <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest>
- <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</GenerateManifest>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">VeraCryptPortable</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">VeraCryptPortable</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">VeraCryptPortable</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>SETUP;PORTABLE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;DEBUG;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <BufferSecurityCheck>true</BufferSecurityCheck>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4057;4100;4127;4201;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalOptions>/NODEFAULTLIB:LIBCMTD %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>libcmtd.lib;atlsd.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Crypto\Debug\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile>
- <UACExecutionLevel>AsInvoker</UACExecutionLevel>
- <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)Portable.pdb</ProgramDatabaseFile>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>true</DataExecutionPrevention>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <Manifest>
- <AdditionalManifestFiles>Portable.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
- </Manifest>
- <PostBuildEvent>
- <Command>md "..\Debug\Setup Files" 2&gt;NUL:
-copy PortableDebug\VeraCryptPortable.exe "..\Debug\Setup Files\VeraCrypt Portable.exe" &gt;NUL:
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>SETUP;PORTABLE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(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;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile>
- <UACExecutionLevel>AsInvoker</UACExecutionLevel>
- <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;mpr.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>MachineX86</TargetMachine>
- </Link>
- <Manifest>
- <AdditionalManifestFiles>Portable.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
- </Manifest>
- <PostBuildEvent>
- <Command>copy PortableRelease\VeraCryptPortable.exe "..\Release\Setup Files\VeraCrypt Portable.exe"</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">
- <ClCompile>
- <AdditionalOptions>/w34189 %(AdditionalOptions)</AdditionalOptions>
- <Optimization>MaxSpeed</Optimization>
- <AdditionalIncludeDirectories>..\Common;..\Crypto;..\;..\PKCS11;..\Common\zlib;..\Common\libzip;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>SETUP;PORTABLE;VC_EFI_CUSTOM_MODE;WIN32;HAVE_CONFIG_H;ZIP_STATIC;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NON_CONFORMING_SWPRINTFS;_ATL_NO_DEFAULT_LIBS;%(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;4505;4701;4706;4131;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)VeraCryptPortable.exe</OutputFile>
- <UACExecutionLevel>AsInvoker</UACExecutionLevel>
- <DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;mpr.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>MachineX86</TargetMachine>
- </Link>
- <Manifest>
- <AdditionalManifestFiles>Portable.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
- </Manifest>
- <PostBuildEvent>
- <Command>copy PortableRelease\VeraCryptPortable.exe "..\Release\Setup Files\VeraCrypt Portable.exe"</Command>
- </PostBuildEvent>
- <ResourceCompile>
- <PreprocessorDefinitions>VC_EFI_CUSTOM_MODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="Dir.c" />
- <ClCompile Include="SelfExtract.c" />
- <ClCompile Include="Setup.c">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="Wizard.c">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\Common\Xml.c" />
- <ClCompile Include="..\Common\BootEncryption.cpp" />
- <ClCompile Include="..\Common\Crc.c" />
- <ClCompile Include="..\Common\Dictionary.c">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\Common\Dlgcode.c">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsCpp</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">CompileAsCpp</CompileAs>
- </ClCompile>
- <ClCompile Include="..\Common\Endian.c" />
- <ClCompile Include="..\Common\Language.c" />
- <ClCompile Include="..\Common\Registry.c" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Setup.ico" />
- <None Include="..\Common\VeraCrypt.ico" />
- <None Include="VeraCrypt_setup.bmp" />
- <None Include="VeraCrypt_setup_background.bmp" />
- <None Include="..\Common\VeraCrypt_Volume.ico" />
- <None Include="..\Common\Language.xml" />
- <None Include="..\Resources\Texts\License.rtf" />
- <None Include="..\Common\Textual_logo_288dpi.bmp" />
- <None Include="..\Common\Textual_logo_96dpi.bmp" />
- <None Include="..\Common\Textual_logo_background.bmp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\Common\Apidrvr.h" />
- <ClInclude Include="..\Common\Combo.h" />
- <ClInclude Include="ComSetup.h" />
- <ClInclude Include="..\Common\Crc.h" />
- <ClInclude Include="Dir.h" />
- <ClInclude Include="..\Common\Dlgcode.h" />
- <ClInclude Include="..\Common\Exception.h" />
- <ClInclude Include="..\Common\Inflate.h" />
- <ClInclude Include="..\Common\Language.h" />
- <ClInclude Include="..\Common\Registry.h" />
- <ClInclude Include="..\Common\Resource.h" />
- <ClInclude Include="Resource.h" />
- <ClInclude Include="SelfExtract.h" />
- <ClInclude Include="Setup.h" />
- <ClInclude Include="..\Common\Tcdefs.h" />
- <ClInclude Include="Wizard.h" />
- </ItemGroup>
- <ItemGroup>
- <Manifest Include="Portable.manifest" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\Common\Common.rc">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseCustomEFI|Win32'">true</ExcludedFromBuild>
- </ResourceCompile>
- <ResourceCompile Include="Portable.rc" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Boot\Windows\Boot.vcxproj">
- <Project>{8b7f059f-e4c7-4e11-88f5-ee8b8433072e}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="..\ExpandVolume\ExpandVolume.vcxproj">
- <Project>{9715ff1d-599b-4bbc-ad96-bef6e08ff827}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="..\Format\Format.vcxproj">
- <Project>{9dc1abe2-d18b-48fb-81d2-8c50adc57bcf}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="..\Mount\Mount.vcxproj">
- <Project>{e4c40f94-e7f9-4981-86e4-186b46f993f3}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/src/SetupDLL/Portable.vcxproj.filters b/src/SetupDLL/Portable.vcxproj.filters
deleted file mode 100644
index 855ecc00..00000000
--- a/src/SetupDLL/Portable.vcxproj.filters
+++ /dev/null
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
- </Filter>
- <Filter Include="Source Files\Common">
- <UniqueIdentifier>{876C2050-1694-4F32-AF5D-491C6A43A799}</UniqueIdentifier>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
- <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
- </Filter>
- <Filter Include="Resource Files\Common">
- <UniqueIdentifier>{17370B4B-2D76-41A9-9828-015FB30054F6}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="Dir.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="SelfExtract.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Setup.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="Wizard.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\Xml.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\BootEncryption.cpp">
- <Filter>Source Files\Common</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\Crc.c">
- <Filter>Source Files\Common</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\Dictionary.c">
- <Filter>Source Files\Common</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\Dlgcode.c">
- <Filter>Source Files\Common</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\Language.c">
- <Filter>Source Files\Common</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\Registry.c">
- <Filter>Source Files\Common</Filter>
- </ClCompile>
- <ClCompile Include="..\Common\Endian.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <None Include="Setup.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="..\Common\VeraCrypt.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="VeraCrypt_setup.bmp">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="VeraCrypt_setup_background.bmp">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="..\Common\VeraCrypt_Volume.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="..\Common\Language.xml">
- <Filter>Resource Files\Common</Filter>
- </None>
- <None Include="..\Resources\Texts\License.rtf">
- <Filter>Resource Files\Common</Filter>
- </None>
- <None Include="..\Common\Textual_logo_288dpi.bmp">
- <Filter>Resource Files\Common</Filter>
- </None>
- <None Include="..\Common\Textual_logo_96dpi.bmp">
- <Filter>Resource Files\Common</Filter>
- </None>
- <None Include="..\Common\Textual_logo_background.bmp">
- <Filter>Resource Files\Common</Filter>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\Common\Apidrvr.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\Combo.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="ComSetup.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\Crc.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Dir.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\Dlgcode.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\Exception.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\Inflate.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\Language.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\Registry.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\Resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="SelfExtract.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Setup.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Common\Tcdefs.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="Wizard.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <Manifest Include="Portable.manifest" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\Common\Common.rc">
- <Filter>Resource Files\Common</Filter>
- </ResourceCompile>
- <ResourceCompile Include="Portable.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/src/SetupDLL/Portable.vcxproj.user b/src/SetupDLL/Portable.vcxproj.user
deleted file mode 100644
index ace9a86a..00000000
--- a/src/SetupDLL/Portable.vcxproj.user
+++ /dev/null
@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-</Project> \ No newline at end of file
diff --git a/src/SetupDLL/Setup.c b/src/SetupDLL/Setup.c
index 14bdefd4..4aec04f9 100644
--- a/src/SetupDLL/Setup.c
+++ b/src/SetupDLL/Setup.c
@@ -1511,6 +1511,11 @@ BOOL DoDriverUnload_Dll (MSIHANDLE hInstaller, HWND hwnd)
BootEncryption bootEnc (hwnd);
if (bootEnc.GetDriverServiceStartType() == SERVICE_BOOT_START)
{
+ MSILogAndShow(hInstaller, MSI_ERROR_LEVEL, L"VeraCrypt MSI installation is currently not compatible with Windows System Encryption");
+ bOK = FALSE;
+ goto end;
+
+ /************* TODO: find a workaround to the fact that MSI service cannot access EFI environment variable
try
{
// Check hidden OS update consistency
@@ -1554,6 +1559,7 @@ BOOL DoDriverUnload_Dll (MSIHANDLE hInstaller, HWND hwnd)
SystemEncryptionUpdate = TRUE;
PortableMode = FALSE;
}
+ *****************************************/
}
}
catch (...) { }
@@ -1891,7 +1897,8 @@ BOOL UpgradeBootLoader_Dll (MSIHANDLE hInstaller, HWND hwndDlg)
{
MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin UpgradeBootLoader_Dll");
- BOOL bOK = FALSE;
+ BOOL bOK = FALSE, bNeedUnloadDriver = FALSE;
+ int status;
if (!SystemEncryptionUpdate)
{
@@ -1900,6 +1907,19 @@ BOOL UpgradeBootLoader_Dll (MSIHANDLE hInstaller, HWND hwndDlg)
goto end;
}
+ if (hDriver == INVALID_HANDLE_VALUE)
+ {
+ status = DriverAttach();
+ if ((status == 0) && (hDriver != INVALID_HANDLE_VALUE))
+ {
+ bNeedUnloadDriver = TRUE;
+ }
+ else
+ {
+ MSILog(hInstaller, MSI_INFO_LEVEL, L"UpgradeBootLoader_Dll: failed to attach to driver");
+ }
+ }
+
try
{
BootEncryption bootEnc (hwndDlg);
@@ -1928,6 +1948,11 @@ BOOL UpgradeBootLoader_Dll (MSIHANDLE hInstaller, HWND hwndDlg)
MSILog (hInstaller, MSI_ERROR_LEVEL, GetString("BOOT_LOADER_UPGRADE_FAILED"));
end:
+ if (bNeedUnloadDriver)
+ {
+ CloseHandle (hDriver);
+ hDriver = INVALID_HANDLE_VALUE;
+ }
MSILog(hInstaller, MSI_INFO_LEVEL, L"End UpgradeBootLoader_Dll");
return bOK;
}
@@ -3045,6 +3070,9 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_PostInstall(MSIHANDLE hInstaller)
{
MSILog(hInstaller, MSI_ERROR_LEVEL, L"End VC_CustomAction_PostInstall: Could not write to registry");
}
+
+ // delete entry of EXE installation if it exists
+ RegDeleteKeyExW (HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt", KEY_WOW64_32KEY, 0);
}
end:
@@ -3469,9 +3497,9 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_DoChecks(MSIHANDLE hInstaller)
DWORD cchValueBuf = 0;
UINT uiStat = 0;
HKEY hkey = 0;
- DWORD dw = 0;
std::wstring szInstallDir = L"";
BOOL bRefreshExts = FALSE;
+ BOOL bDisableReboot = FALSE;
UINT uiRet = ERROR_INSTALL_FAILURE;
MSILog(hInstaller, MSI_INFO_LEVEL, L"Begin VC_CustomAction_DoChecks");
@@ -3506,6 +3534,22 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_DoChecks(MSIHANDLE hInstaller)
}
}
+ // Get REBOOT to see whether it specified "ReallySuppress" which means no automatic reboot
+ szValueBuf.clear();
+ cchValueBuf = 0;
+ uiStat = MsiGetProperty(hInstaller, TEXT("REBOOT"), (LPWSTR)TEXT(""), &cchValueBuf);
+ if (ERROR_MORE_DATA == uiStat)
+ {
+ ++cchValueBuf; // add 1 for null termination
+ szValueBuf.resize(cchValueBuf);
+ uiStat = MsiGetProperty(hInstaller, TEXT("REBOOT"), &szValueBuf[0], &cchValueBuf);
+ if ((ERROR_SUCCESS == uiStat))
+ {
+ MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_DoChecks: REBOOT = '%s'", szValueBuf.c_str());
+ bDisableReboot = (szValueBuf[0] == L'R' || szValueBuf[0] == L'r');
+ }
+ }
+
// Read RegKeys previously setup by Pre/Post-Install
if (RegOpenKeyExW (HKEY_LOCAL_MACHINE, L"Software\\.VeraCrypt\\Values", 0, KEY_READ, &hkey) == ERROR_SUCCESS)
{
@@ -3585,8 +3629,16 @@ EXTERN_C UINT STDAPICALLTYPE VC_CustomAction_DoChecks(MSIHANDLE hInstaller)
// Check if reboot was required by the pre/post-install and set Wix property ISREBOOTREQUIRED accordingly.
if (bRestartRequired)
- {
- uiRet = MsiSetProperty(hInstaller, L"ISREBOOTREQUIRED", L"1");
+ {
+ if (bDisableReboot)
+ {
+ MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_DoChecks: reboot is required but it is disabled because \"REBOOT\" specifies ReallySuppress");
+ }
+ else
+ {
+ MSILog(hInstaller, MSI_INFO_LEVEL, L"VC_CustomAction_DoChecks: reboot is required");
+ uiRet = MsiSetProperty(hInstaller, L"ISREBOOTREQUIRED", L"1");
+ }
}
else
{
diff --git a/src/SetupDLL/Setup.rc b/src/SetupDLL/Setup.rc
index 6e1a5312..ed6e80a5 100644
--- a/src/SetupDLL/Setup.rc
+++ b/src/SetupDLL/Setup.rc
@@ -28,8 +28,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,24,25,0
- PRODUCTVERSION 1,24,25,0
+ FILEVERSION 1,25,7,0
+ PRODUCTVERSION 1,25,7,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -46,11 +46,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "IDRIX"
VALUE "FileDescription", "VeraCryptSetup"
- VALUE "FileVersion", "1.24-Update9"
+ VALUE "FileVersion", "1.25"
VALUE "LegalTrademarks", "VeraCrypt"
VALUE "OriginalFilename", "VeraCryptSetup.dll"
VALUE "ProductName", "VeraCrypt"
- VALUE "ProductVersion", "1.24-Update9"
+ VALUE "ProductVersion", "1.25"
END
END
BLOCK "VarFileInfo"
diff --git a/src/SetupDLL/SetupDLL.vcxproj b/src/SetupDLL/SetupDLL.vcxproj
index 374ad866..6b68dcc4 100644
--- a/src/SetupDLL/SetupDLL.vcxproj
+++ b/src/SetupDLL/SetupDLL.vcxproj
@@ -88,7 +88,7 @@
</ClCompile>
<Link>
<AdditionalOptions>/NODEFAULTLIB:LIBCMTD %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>msi.lib;libcmtd.lib;atlsd.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Crypto\Debug\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>version.lib;msi.lib;libcmtd.lib;atlsd.lib;mpr.lib;..\Common\Debug\Zip.lib;..\Crypto\Debug\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptSetup.dll</OutputFile>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
@@ -127,7 +127,7 @@ copy Debug\VeraCryptSetup.dll "..\Debug\Setup Files\VeraCryptSetup.dll" &gt;NUL:
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>msi.lib;mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>version.lib;msi.lib;mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptSetup.dll</OutputFile>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
@@ -166,7 +166,7 @@ copy Debug\VeraCryptSetup.dll "..\Debug\Setup Files\VeraCryptSetup.dll" &gt;NUL:
</ClCompile>
<Link>
<AdditionalOptions>/IGNORE:4089 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>msi.lib;mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>version.lib;msi.lib;mpr.lib;..\Common\Release\Zip.lib;..\Crypto\Release\crypto.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)VeraCryptSetup.exe</OutputFile>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<DelayLoadDLLs>user32.dll;gdi32.dll;advapi32.dll;shell32.dll;ole32.dll;oleaut32.dll;mpr.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
diff --git a/src/Signing/DigiCert_Assured_ID_Code_Signing_CA.cer b/src/Signing/DigiCert_Assured_ID_Code_Signing_CA.cer
deleted file mode 100644
index 46fe7f38..00000000
--- a/src/Signing/DigiCert_Assured_ID_Code_Signing_CA.cer
+++ /dev/null
Binary files differ
diff --git a/src/Signing/DigiCert_Assured_ID_MS_Cross_Cert.crt b/src/Signing/DigiCert_Assured_ID_MS_Cross_Cert.crt
deleted file mode 100644
index a63e06ec..00000000
--- a/src/Signing/DigiCert_Assured_ID_MS_Cross_Cert.crt
+++ /dev/null
@@ -1,30 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIFNDCCAxygAwIBAgIKYRyyigAAAAAAJjANBgkqhkiG9w0BAQUFADB/MQswCQYD
-VQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEe
-MBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSkwJwYDVQQDEyBNaWNyb3Nv
-ZnQgQ29kZSBWZXJpZmljYXRpb24gUm9vdDAeFw0xMTA0MTUxOTQxMzdaFw0yMTA0
-MTUxOTUxMzdaMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMx
-GTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNVBAMTG0RpZ2lDZXJ0IEFz
-c3VyZWQgSUQgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
-AK0OFc7kQ4BcsYfzt2D5cRKlrtwmlIiq9M71IDkoWGAM+IDaqRWVMmE8tbEohIqK
-3J8KDIMXeo+QrIrneVNcMYQq9g+YMjZ2zN7dPKii72r7IfJSYd+fINcf4rHZ/hhk
-0hJbX/lYGDW8R82hNvlrf9SwOD7BG8OMM9nYLxj+KA+zp4PWw25EwGE1lhb+WZyL
-dm3X8aJLDSv/C3LanmDQjpA1xnhVhyChz+VtCshJfDGYM2wi6YfQMlqiuhOCEe05
-F52ZOnKh5vqk2dUXMXWuhX0irj8BRob2KHnIsdrkVxfEfhwOsLSSplazvbKX7aqn
-8LfFqD+VFtD/oZbrCF8Yd08CAwEAAaOByzCByDARBgNVHSAECjAIMAYGBFUdIAAw
-CwYDVR0PBAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFEXroq/0ksuC
-MS1Ri6enIZ3zbcgPMB8GA1UdIwQYMBaAFGL7CiFbf0NuEdoJVFBr9dKWcfGeMFUG
-A1UdHwROMEwwSqBIoEaGRGh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2kvY3Js
-L3Byb2R1Y3RzL01pY3Jvc29mdENvZGVWZXJpZlJvb3QuY3JsMA0GCSqGSIb3DQEB
-BQUAA4ICAQBc9bItAs7tAbU1EtgT96pAFMehXKCKVe1+VepqxFcXb9BHIkI2WO/F
-rGHF9ixSzmrmyA2F2rM0Qg6kAiUYJnK5Kk6lfksW8qDkDESc4k2a9HTw+SemaZAx
-wkRlQ0jHSGnQ/IQJ8oYUCsIploV/EeuHExdu0+xr/x1XirF7HqWgfOmiemjl+sax
-YdZyY/o3kWODVZn4HWFPDG+j97yxFSrMjYXjFBfvfklEP7AiwPCsvi/b4QyGsPRY
-XFoQqUvN80SKRlIIPgpiEOlFlQS3i41LB09QDbe75/uMonh4xsU7dmOyz+UhhFpm
-/OBMeYNOz6jucAWGWHzCnNc8o608fnZiXIfQ7XzVxVsUIfS+daJ10unhWtAgMHhB
-Yk1rXm4bFxAkSthYh3XQFddiu/0YVmWEJWGXf6rUnfTzXW2gMcLhngKsPpDDMn7o
-MpA0FtCLFM+VrM7ljFSiZbi/7RhqVwc+0+eaSi8IGgQcSYcaiuYbCKNl2BwxxQ2c
-urNo3fRQdhYGdf7EA+fRPt/chi4QAn5mEpZTTnrzNlh5sSBC2JY/Nb4/jvKZl0P1
-5AzhPGhyjI1J11pStXP7ejWUOmGwhILASIXBlzLTm3JfoNI0j37wRnzyjHKUxwew
-17WyMLgZZfCcgyewoKvQonJ+BQ+zrt25W5tCvMMmY0VrhvEdRkPtyA==
------END CERTIFICATE-----
diff --git a/src/Signing/GlobalSign_R1Cross.cer b/src/Signing/GlobalSign_R1Cross.cer
deleted file mode 100644
index d90a4800..00000000
--- a/src/Signing/GlobalSign_R1Cross.cer
+++ /dev/null
@@ -1,26 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIEXTCCA0WgAwIBAgILBAAAAAABJQcd+a8wDQYJKoZIhvcNAQELBQAwVzELMAkG
-A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
-b3QgQ0ExGzAZBgNVBAMTEkdsb2JhbFNpZ24gUm9vdCBDQTAeFw0wOTExMTgxMDAw
-MDBaFw0xOTAzMTgxMDAwMDBaMEwxIDAeBgNVBAsTF0dsb2JhbFNpZ24gUm9vdCBD
-QSAtIFIzMRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQDEwpHbG9iYWxTaWdu
-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzCV2kHkGeCIW9cCDtoTK
-KJ79BXYRxa2IcvxGAkPHsoqdBF8kyy5L4WCCRuFSqwyBR3Bs3WTR6/Usow+CPQwr
-rpfXthSGEHm7OxOAd4wI4UnSamIvH176lmjfiSeVOJ8G1z7JyyZZDXPesMjpJg6D
-FcbvW4vSBGDKSaYo9mk79svIKJHlnYphVzesdBTcdOA67nIvLpz70Lu/9T0A4QYz
-6IIrrlOmOhZzjN1BDiA6wLSnoemyT5AuMmDpV8u5BJJoaOU4JmB1sp93/5EU764g
-SfytQBVI0QIxYRleuJfvrXe3ZJp6v1/BE++bYvsNbOBUaRapA9pu6YOTcXbGaYWC
-FwIDAQABo4IBMzCCAS8wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w
-HQYDVR0OBBYEFI/wS3+oLkUkrk1Q+mOai97i3Ru8MEYGA1UdIAQ/MD0wOwYEVR0g
-ADAzMDEGCCsGAQUFBwIBFiVodHRwOi8vd3d3Lmdsb2JhbHNpZ24ubmV0L3JlcG9z
-aXRvcnkvMDMGA1UdHwQsMCowKKAmoCSGImh0dHA6Ly9jcmwuZ2xvYmFsc2lnbi5u
-ZXQvcm9vdC5jcmwwTwYIKwYBBQUHAQEEQzBBMD8GCCsGAQUFBzABhjNodHRwOi8v
-b2NzcC5nbG9iYWxzaWduLmNvbS9FeHRlbmRlZFNTTFNIQTI1NkNBQ3Jvc3MwHwYD
-VR0jBBgwFoAUYHtmGkUNl8qJUC99BM00qP/8/UswDQYJKoZIhvcNAQELBQADggEB
-AEJSqX6iz1s7y0vduvhXWdMkpHdy72JEN4LtBu4E1RZfJKMU3GxUBWqwmz3agTna
-rSjblW+Bg/XNYrFFJLHdKeUIVJWVjPAdBl8a1kY/E0AXSBEWm0dN0Tq1D1cckjDQ
-+LIlOwrN9of5x7JX0z99pYwUzpyox59Gk9pZ+nldZSA1RFpPwZCdwVSSVtw0yPXB
-A9BdwFlInAD8laDx0Xb3FjbIE5J/LSvAuIDxJiYfQU1Svx6XuwGCCOcV9sHVNCrM
-9eTDh3pXgeHW10KGYgF34qnEeob0BDh6B2p9AOxz96gLNHjFnrPvuDhADowzU8h1
-7F8+6nVe/4IOdBXcGQXzujE=
------END CERTIFICATE-----
diff --git a/src/Signing/GlobalSign_Root_CA_MS_Cross_Cert.crt b/src/Signing/GlobalSign_Root_CA_MS_Cross_Cert.crt
deleted file mode 100644
index c66b91d2..00000000
--- a/src/Signing/GlobalSign_Root_CA_MS_Cross_Cert.crt
+++ /dev/null
@@ -1,30 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIFJjCCAw6gAwIBAgIKYSkVJwAAAAAAKjANBgkqhkiG9w0BAQUFADB/MQswCQYD
-VQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEe
-MBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSkwJwYDVQQDEyBNaWNyb3Nv
-ZnQgQ29kZSBWZXJpZmljYXRpb24gUm9vdDAeFw0xMTA0MTUxOTU1MDhaFw0yMTA0
-MTUyMDA1MDhaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52
-LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxTaWduIFJvb3Qg
-Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZjc6j40+Kfvvx
-i4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6scTHAH
-oT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4
-bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVt
-bNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlw
-R5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N89iFo7+ryUp9/
-k5DPAgMBAAGjgcswgcgwEQYDVR0gBAowCDAGBgRVHSAAMAsGA1UdDwQEAwIBhjAP
-BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzAf
-BgNVHSMEGDAWgBRi+wohW39DbhHaCVRQa/XSlnHxnjBVBgNVHR8ETjBMMEqgSKBG
-hkRodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9NaWNy
-b3NvZnRDb2RlVmVyaWZSb290LmNybDANBgkqhkiG9w0BAQUFAAOCAgEAX/jQZXRq
-gcamylsDtpFK6Eu97yuhQvDvtKWtzTOJ7AuVhaxiUBEIqljSWqCDEOWmM3ryWvLF
-/nh88JyD3xkK2XOWAC3WLM3pFNQdneg/PBp295BO+wE1CmyTE6DDVutnoOTRepbe
-wmfxkPgKe/UyG5TsX3UfjRs02mxYp8stJ54iJrfJqjDMB3e4NuOCAbU5PMyN2adf
-fyOzh3/bV5iRi9fOJSDjnWRP3Yf3K2hJAxjgpd98X2hkTTaDjUeB8ungqGmr+nsW
-PAWkSeqIMBkKbHMFUXjf1B3dOtR/LeROVL6DQx56dDO0pOvXcHO8KgKYiWbu9ryP
-dJN44ykCWlpD4ljOfM+aytI2iTviX9omBU7I1OcskQ4Xl8W+7osTESMjKU/6g9BQ
-9rr61T2zFz30/wNKoyXc5nVh0fo1CGvWJ0TQaLeNReDrhSzIoV1hRHQWDllYrtK1
-7qW81tcHarYpeP2XZ2fdjU8XlE/S7QyvlyQ3w6Kcgdpr4UO2V3tM7L95Exnnn+hE
-6UeBt15wHpH4PdF7J/ULcFZDSAXdqS+rhhAdCxLjGtBMbnXe1kWzC3SIh5NcVkpB
-Apr3rreZ2LZ/iPoR8kV89NcbkcAc8aD71AgKQRoUKs706zRIbmaHntVLejl/uw49
-OGHPc1cG5BIGa9lrUwjNcBjCLU+XRpG8qfA=
------END CERTIFICATE-----
diff --git a/src/Signing/GlobalSign_SHA256_EV_CodeSigning_CA.cer b/src/Signing/GlobalSign_SHA256_EV_CodeSigning_CA.cer
index 3b901736..21d4951b 100644
--- a/src/Signing/GlobalSign_SHA256_EV_CodeSigning_CA.cer
+++ b/src/Signing/GlobalSign_SHA256_EV_CodeSigning_CA.cer
Binary files differ
diff --git a/src/Signing/sign-sha256.bat b/src/Signing/sign-sha256.bat
deleted file mode 100644
index 7902e66c..00000000
--- a/src/Signing/sign-sha256.bat
+++ /dev/null
@@ -1,68 +0,0 @@
-PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip
-
-set VC_VERSION=1.24-Update9
-set VC_VERSION_NBRE=1.24.25
-set SIGNINGPATH=%~dp0
-cd %SIGNINGPATH%
-
-call "..\..\doc\chm\create_chm.bat"
-
-cd %SIGNINGPATH%
-
-rem sign using SHA-1
-signtool sign /v /sha1 85aa2e55cfb9c38fe474c58b38e9521450cd9306 /ac DigiCert_Assured_ID_MS_Cross_Cert.crt /fd sha1 /t http://timestamp.digicert.com "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys"
-
-timeout /t 10
-
-rem sign using SHA-256
-signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_R3Cross.cer /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys"
-signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_R3Cross.cer /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\veracrypt-arm64.sys"
-signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt-arm64.exe" "..\Release\Setup Files\VeraCrypt Format-arm64.exe" "..\Release\Setup Files\VeraCryptExpander-arm64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe"
-
-rem create setup and MSI
-cd "..\Release\Setup Files\"
-copy ..\..\LICENSE .
-copy ..\..\License.txt .
-copy ..\..\NOTICE .
-copy ..\..\Resources\Texts\License.rtf .
-copy ..\..\Common\VeraCrypt.ico .
-copy ..\..\Setup\VeraCrypt_setup_background.bmp .
-copy ..\..\Setup\VeraCrypt_setup.bmp .
-copy ..\..\Setup\Setup.ico .
-del *.xml
-rmdir /S /Q Languages
-mkdir Languages
-copy /V /Y ..\..\..\Translations\*.xml Languages\.
-del Languages.zip
-7z a -y Languages.zip Languages
-rmdir /S /Q docs
-mkdir docs\html\en
-mkdir docs\EFI-DCS
-copy /V /Y ..\..\..\doc\html\* docs\html\en\.
-copy "..\..\..\doc\chm\VeraCrypt User Guide.chm" docs\.
-copy "..\..\..\doc\EFI-DCS\*.pdf" docs\EFI-DCS\.
-del docs.zip
-7z a -y docs.zip docs
-"VeraCrypt Setup.exe" /p
-"VeraCrypt Portable.exe" /p
-call build_msi_x64.bat %VC_VERSION_NBRE%
-del LICENSE
-del License.txt
-del NOTICE
-del License.rtf
-del VeraCrypt.ico
-del VeraCrypt_setup_background.bmp
-del VeraCrypt_setup.bmp
-del Setup.ico
-del "VeraCrypt User Guide.chm"
-del Languages.zip
-del docs.zip
-rmdir /S /Q Languages
-rmdir /S /Q docs
-
-cd %SIGNINGPATH%
-
-rem sign using SHA-256
-signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Portable %VC_VERSION%.exe" "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64.msi" "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64_en-us.msi"
-
-pause
diff --git a/src/Signing/sign.bat b/src/Signing/sign.bat
index 15dca15d..f02c9494 100644
--- a/src/Signing/sign.bat
+++ b/src/Signing/sign.bat
@@ -1,7 +1,7 @@
PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip
-set VC_VERSION=1.24-Update9
-set VC_VERSION_NBRE=1.24.25
+set VC_VERSION=1.25.7
+set VC_VERSION_NBRE=1.25.7
set SIGNINGPATH=%~dp0
cd %SIGNINGPATH%
@@ -9,15 +9,8 @@ call "..\..\doc\chm\create_chm.bat"
cd %SIGNINGPATH%
-rem sign using SHA-1
-signtool sign /v /sha1 85aa2e55cfb9c38fe474c58b38e9521450cd9306 /ac DigiCert_Assured_ID_MS_Cross_Cert.crt /fd sha1 /t http://timestamp.digicert.com "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys"
-signtool sign /v /sha1 85aa2e55cfb9c38fe474c58b38e9521450cd9306 /ac DigiCert_Assured_ID_Code_Signing_CA.cer /fd sha1 /t http://timestamp.digicert.com "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe"
-
-timeout /t 10
-
rem sign using SHA-256
-signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_R3Cross.cer /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys"
-signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe"
+signtool sign /v /sha1 88c1ff4b7469ea3915bd8e7635a7567d34f43202 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://timestamp.digicert.com /td SHA256 "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt-arm64.exe" "..\Release\Setup Files\VeraCrypt Format-arm64.exe" "..\Release\Setup Files\VeraCryptExpander-arm64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe" "..\Release\Setup Files\VeraCryptSetup.dll"
rem create setup and MSI
cd "..\Release\Setup Files\"
@@ -62,20 +55,7 @@ rmdir /S /Q docs
cd %SIGNINGPATH%
-rem Can't dual-sign MSI files when using signtool (only jsign / osslsigncode can do that)
-
-rem sign using SHA-1
-signtool sign /v /sha1 85aa2e55cfb9c38fe474c58b38e9521450cd9306 /ac DigiCert_Assured_ID_Code_Signing_CA.cer /fd sha1 /t http://timestamp.digicert.com "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Portable %VC_VERSION%.exe"
-
-timeout /t 10
-
-rem dual sign Setup using SHA-256
-signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Portable %VC_VERSION%.exe" "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64.msi" "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64_en-us.msi"
-
-rem single sign MSI using SHA-256
-signtool sign /v /sha1 04141E4EA6D9343CEC994F6C099DC09BDD8937C9 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64.msi" "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64_en-us.msi"
-
-move "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Legacy Setup %VC_VERSION%.exe"
-move "..\Release\Setup Files\VeraCrypt Portable %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Legacy Portable %VC_VERSION%.exe"
+rem sign Setup using SHA-256
+signtool sign /v /sha1 88c1ff4b7469ea3915bd8e7635a7567d34f43202 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://timestamp.digicert.com /td SHA256 "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Portable %VC_VERSION%.exe" "..\Release\Setup Files\bin\VeraCrypt_Setup_x64_%VC_VERSION_NBRE%.msi" "..\Release\Setup Files\bin\VeraCrypt_Setup_x64_%VC_VERSION_NBRE%_en-us.msi"
pause
diff --git a/src/Signing/sign_TESTSIGNING.bat b/src/Signing/sign_TESTSIGNING.bat
new file mode 100644
index 00000000..146a3157
--- /dev/null
+++ b/src/Signing/sign_TESTSIGNING.bat
@@ -0,0 +1,59 @@
+PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip
+
+set VC_VERSION=1.25.7-TESTSIGNING
+set VC_VERSION_NBRE=1.25.7
+set SIGNINGPATH=%~dp0
+cd %SIGNINGPATH%
+
+rem sign using SHA-256
+signtool sign /v /sha1 88c1ff4b7469ea3915bd8e7635a7567d34f43202 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://timestamp.digicert.com /td SHA256 "..\Release\Setup Files\veracrypt.sys" "..\Release\Setup Files\veracrypt-x64.sys"
+
+signtool sign /v /sha1 88c1ff4b7469ea3915bd8e7635a7567d34f43202 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://timestamp.digicert.com /td SHA256 "..\Release\Setup Files\VeraCrypt.exe" "..\Release\Setup Files\VeraCrypt Format.exe" "..\Release\Setup Files\VeraCryptExpander.exe" "..\Release\Setup Files\VeraCrypt-x64.exe" "..\Release\Setup Files\VeraCrypt Format-x64.exe" "..\Release\Setup Files\VeraCryptExpander-x64.exe" "..\Release\Setup Files\VeraCrypt-arm64.exe" "..\Release\Setup Files\VeraCrypt Format-arm64.exe" "..\Release\Setup Files\VeraCryptExpander-arm64.exe" "..\Release\Setup Files\VeraCrypt COMReg.exe" "..\Release\Setup Files\VeraCryptSetup.dll"
+
+rem create setup and MSI
+cd "..\Release\Setup Files\"
+copy ..\..\LICENSE .
+copy ..\..\License.txt .
+copy ..\..\NOTICE .
+copy ..\..\Resources\Texts\License.rtf .
+copy ..\..\Common\VeraCrypt.ico .
+copy ..\..\Setup\VeraCrypt_setup_background.bmp .
+copy ..\..\Setup\VeraCrypt_setup.bmp .
+copy ..\..\Setup\Setup.ico .
+del *.xml
+rmdir /S /Q Languages
+mkdir Languages
+copy /V /Y ..\..\..\Translations\*.xml Languages\.
+del Languages.zip
+7z a -y Languages.zip Languages
+rmdir /S /Q docs
+mkdir docs\html\en
+mkdir docs\EFI-DCS
+copy /V /Y ..\..\..\doc\html\* docs\html\en\.
+copy "..\..\..\doc\chm\VeraCrypt User Guide.chm" docs\.
+copy "..\..\..\doc\EFI-DCS\*.pdf" docs\EFI-DCS\.
+del docs.zip
+7z a -y docs.zip docs
+"VeraCrypt Setup.exe" /p
+"VeraCrypt Portable.exe" /p
+
+del LICENSE
+del License.txt
+del NOTICE
+del License.rtf
+del VeraCrypt.ico
+del VeraCrypt_setup_background.bmp
+del VeraCrypt_setup.bmp
+del Setup.ico
+del "VeraCrypt User Guide.chm"
+del Languages.zip
+del docs.zip
+rmdir /S /Q Languages
+rmdir /S /Q docs
+
+cd %SIGNINGPATH%
+
+rem sign Setup using SHA-256
+signtool sign /v /sha1 88c1ff4b7469ea3915bd8e7635a7567d34f43202 /ac GlobalSign_SHA256_EV_CodeSigning_CA.cer /fd sha256 /tr http://timestamp.digicert.com /td SHA256 "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe" "..\Release\Setup Files\VeraCrypt Portable %VC_VERSION%.exe"
+
+pause
diff --git a/src/Signing/sign_test.bat b/src/Signing/sign_test.bat
index e69cd97d..49fd1d9f 100644
--- a/src/Signing/sign_test.bat
+++ b/src/Signing/sign_test.bat
@@ -1,6 +1,6 @@
PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip
-set VC_VERSION=1.24-Update9
-set VC_VERSION_NBRE=1.24.25
+set VC_VERSION=1.25.7
+set VC_VERSION_NBRE=1.25.7
set PFXNAME=TestCertificate\idrix_codeSign.pfx
set PFXPASSWORD=idrix
set PFXCA=TestCertificate\idrix_TestRootCA.crt
@@ -78,6 +78,6 @@ rem dual-sign Setup using SHA-256
signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\VeraCrypt Setup %VC_VERSION%.exe"
rem single sign MSI using SHA-256
-signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64.msi" "..\Release\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64_en-us.msi"
+signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Release\Setup Files\bin\VeraCrypt_Setup_x64_%VC_VERSION_NBRE%.msi" "..\Release\Setup Files\bin\VeraCrypt_Setup_x64_%VC_VERSION_NBRE%_en-us.msi"
pause \ No newline at end of file
diff --git a/src/Signing/sign_test_debug.bat b/src/Signing/sign_test_debug.bat
index 4b5e33ac..bb4fee2c 100644
--- a/src/Signing/sign_test_debug.bat
+++ b/src/Signing/sign_test_debug.bat
@@ -1,6 +1,6 @@
PATH=%PATH%;%WSDK81%\bin\x86;C:\Program Files\7-Zip;C:\Program Files (x86)\7-Zip
-set VC_VERSION=1.24-Update9
-set VC_VERSION_NBRE=1.24.25
+set VC_VERSION=1.25.7
+set VC_VERSION_NBRE=1.25.7
set PFXNAME=TestCertificate\idrix_codeSign.pfx
set PFXPASSWORD=idrix
set PFXCA=TestCertificate\idrix_TestRootCA.crt
@@ -15,13 +15,9 @@ call "..\..\doc\chm\create_chm.bat"
cd %SIGNINGPATH%
-rem sign using SHA-1
-signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac %PFXCA% /fd sha1 /t http://timestamp.digicert.com "..\Debug\Setup Files\veracrypt.sys" "..\Debug\Setup Files\veracrypt-x64.sys" "..\Debug\Setup Files\VeraCrypt.exe" "..\Debug\Setup Files\VeraCrypt Format.exe" "..\Debug\Setup Files\VeraCryptExpander.exe" "..\Debug\Setup Files\VeraCrypt-x64.exe" "..\Debug\Setup Files\VeraCrypt Format-x64.exe" "..\Debug\Setup Files\VeraCryptExpander-x64.exe" "..\Debug\Setup Files\VeraCrypt COMReg.exe"
-
-timeout /t 10
rem sign using SHA-256
-signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Debug\Setup Files\veracrypt.sys" "..\Debug\Setup Files\veracrypt-x64.sys" "..\Debug\Setup Files\veracrypt-arm64.sys" "..\Debug\Setup Files\VeraCrypt.exe" "..\Debug\Setup Files\VeraCrypt Format.exe" "..\Debug\Setup Files\VeraCryptExpander.exe" "..\Debug\Setup Files\VeraCrypt-x64.exe" "..\Debug\Setup Files\VeraCrypt Format-x64.exe" "..\Debug\Setup Files\VeraCryptExpander-x64.exe" "..\Debug\Setup Files\VeraCrypt-arm64.exe" "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" "..\Debug\Setup Files\VeraCrypt COMReg.exe"
+signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Debug\Setup Files\veracrypt.sys" "..\Debug\Setup Files\veracrypt-x64.sys" "..\Debug\Setup Files\veracrypt-arm64.sys" "..\Debug\Setup Files\VeraCrypt.exe" "..\Debug\Setup Files\VeraCrypt Format.exe" "..\Debug\Setup Files\VeraCryptExpander.exe" "..\Debug\Setup Files\VeraCrypt-x64.exe" "..\Debug\Setup Files\VeraCrypt Format-x64.exe" "..\Debug\Setup Files\VeraCryptExpander-x64.exe" "..\Debug\Setup Files\VeraCrypt-arm64.exe" "..\Debug\Setup Files\VeraCrypt Format-arm64.exe" "..\Debug\Setup Files\VeraCryptExpander-arm64.exe" "..\Debug\Setup Files\VeraCrypt COMReg.exe"
rem create setup and MSI
cd "..\Debug\Setup Files\"
@@ -78,6 +74,6 @@ rem dual-sign Setup using SHA-256
signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /as /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Debug\Setup Files\VeraCrypt Setup %VC_VERSION%.exe"
rem single sign MSI using SHA-256
-signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Debug\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64.msi" "..\Debug\Setup Files\bin\VeraCrypt_%VC_VERSION_NBRE%_Setup_x64_en-us.msi"
+signtool sign /v /a /f %SHA256PFXNAME% /p %SHA256PFXPASSWORD% /ac %SHA256PFXCA% /fd sha256 /tr http://rfc3161timestamp.globalsign.com/advanced /td SHA256 "..\Debug\Setup Files\bin\VeraCrypt_Setup_x64_%VC_VERSION_NBRE%.msi" "..\Debug\Setup Files\bin\VeraCrypt_Setup_x64_%VC_VERSION_NBRE%_en-us.msi"
pause \ No newline at end of file
diff --git a/src/VeraCrypt.sln b/src/VeraCrypt.sln
index c7a31445..e17d710c 100644
--- a/src/VeraCrypt.sln
+++ b/src/VeraCrypt.sln
@@ -41,6 +41,8 @@ Global
All CustomEFI|x64 = All CustomEFI|x64
All Debug|Win32 = All Debug|Win32
All Debug|x64 = All Debug|x64
+ All_SkipOsDriverReqCheck|Win32 = All_SkipOsDriverReqCheck|Win32
+ All_SkipOsDriverReqCheck|x64 = All_SkipOsDriverReqCheck|x64
All|Win32 = All|Win32
All|x64 = All|x64
Boot Loader|Win32 = Boot Loader|Win32
@@ -91,6 +93,10 @@ Global
{993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All Debug|Win32.Build.0 = Debug|Win32
{993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All Debug|x64.ActiveCfg = Debug|x64
{993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All Debug|x64.Build.0 = Debug|x64
+ {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32
+ {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release|Win32
+ {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release|x64
+ {993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All_SkipOsDriverReqCheck|x64.Build.0 = Release|x64
{993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All|Win32.ActiveCfg = Release|Win32
{993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All|Win32.Build.0 = Release|Win32
{993245CF-6B70-47EE-91BB-39F8FC6DC0E7}.All|x64.ActiveCfg = Release|x64
@@ -164,6 +170,9 @@ Global
{EF5EF444-18D0-40D7-8DFA-775EC4448602}.All Debug|Win32.ActiveCfg = Debug|Win32
{EF5EF444-18D0-40D7-8DFA-775EC4448602}.All Debug|Win32.Build.0 = Debug|Win32
{EF5EF444-18D0-40D7-8DFA-775EC4448602}.All Debug|x64.ActiveCfg = Debug|Win32
+ {EF5EF444-18D0-40D7-8DFA-775EC4448602}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32
+ {EF5EF444-18D0-40D7-8DFA-775EC4448602}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release|Win32
+ {EF5EF444-18D0-40D7-8DFA-775EC4448602}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release|Win32
{EF5EF444-18D0-40D7-8DFA-775EC4448602}.All|Win32.ActiveCfg = Release|Win32
{EF5EF444-18D0-40D7-8DFA-775EC4448602}.All|Win32.Build.0 = Release|Win32
{EF5EF444-18D0-40D7-8DFA-775EC4448602}.All|x64.ActiveCfg = Release|Win32
@@ -222,6 +231,10 @@ Global
{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All Debug|Win32.Build.0 = Debug|Win32
{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All Debug|x64.ActiveCfg = Debug|x64
{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All Debug|x64.Build.0 = Debug|x64
+ {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release_SkipOsDriverReqCheck|Win32
+ {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release_SkipOsDriverReqCheck|Win32
+ {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release_SkipOsDriverReqCheck|x64
+ {9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All_SkipOsDriverReqCheck|x64.Build.0 = Release_SkipOsDriverReqCheck|x64
{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All|Win32.ActiveCfg = Release|Win32
{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All|Win32.Build.0 = Release|Win32
{9DC1ABE2-D18B-48FB-81D2-8C50ADC57BCF}.All|x64.ActiveCfg = Release|x64
@@ -296,6 +309,10 @@ Global
{E4C40F94-E7F9-4981-86E4-186B46F993F3}.All Debug|Win32.Build.0 = Debug|Win32
{E4C40F94-E7F9-4981-86E4-186B46F993F3}.All Debug|x64.ActiveCfg = Debug|x64
{E4C40F94-E7F9-4981-86E4-186B46F993F3}.All Debug|x64.Build.0 = Debug|x64
+ {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release_SkipOsDriverReqCheck|Win32
+ {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release_SkipOsDriverReqCheck|Win32
+ {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release_SkipOsDriverReqCheck|x64
+ {E4C40F94-E7F9-4981-86E4-186B46F993F3}.All_SkipOsDriverReqCheck|x64.Build.0 = Release_SkipOsDriverReqCheck|x64
{E4C40F94-E7F9-4981-86E4-186B46F993F3}.All|Win32.ActiveCfg = Release|Win32
{E4C40F94-E7F9-4981-86E4-186B46F993F3}.All|Win32.Build.0 = Release|Win32
{E4C40F94-E7F9-4981-86E4-186B46F993F3}.All|x64.ActiveCfg = Release|x64
@@ -368,6 +385,9 @@ Global
{DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All Debug|Win32.ActiveCfg = Debug|Win32
{DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All Debug|Win32.Build.0 = Debug|Win32
{DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All Debug|x64.ActiveCfg = Debug|Win32
+ {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release_SkipOsDriverReqCheck|Win32
+ {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release_SkipOsDriverReqCheck|Win32
+ {DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release_SkipOsDriverReqCheck|Win32
{DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All|Win32.ActiveCfg = Release|Win32
{DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All|Win32.Build.0 = Release|Win32
{DF5F654D-BD44-4E31-B92E-B68074DC37A8}.All|x64.ActiveCfg = Release|Win32
@@ -422,6 +442,9 @@ Global
{8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All Debug|Win32.ActiveCfg = Release|Win32
{8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All Debug|Win32.Build.0 = Release|Win32
{8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All Debug|x64.ActiveCfg = Release Loader|Win32
+ {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32
+ {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release|Win32
+ {8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release|Win32
{8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All|Win32.ActiveCfg = Release|Win32
{8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All|Win32.Build.0 = Release|Win32
{8B7F059F-E4C7-4E11-88F5-EE8B8433072E}.All|x64.ActiveCfg = Release|Win32
@@ -476,6 +499,10 @@ Global
{9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All Debug|Win32.Build.0 = Debug|Win32
{9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All Debug|x64.ActiveCfg = Debug|x64
{9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All Debug|x64.Build.0 = Debug|x64
+ {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release_SkipOsDriverReqCheck|Win32
+ {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release_SkipOsDriverReqCheck|Win32
+ {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release_SkipOsDriverReqCheck|x64
+ {9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All_SkipOsDriverReqCheck|x64.Build.0 = Release_SkipOsDriverReqCheck|x64
{9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All|Win32.ActiveCfg = Release|Win32
{9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All|Win32.Build.0 = Release|Win32
{9715FF1D-599B-4BBC-AD96-BEF6E08FF827}.All|x64.ActiveCfg = Release|x64
@@ -561,6 +588,10 @@ Global
{6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All Debug|Win32.Build.0 = Debug|Win32
{6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All Debug|x64.ActiveCfg = Debug|x64
{6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All Debug|x64.Build.0 = Debug|x64
+ {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32
+ {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release|Win32
+ {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release|x64
+ {6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All_SkipOsDriverReqCheck|x64.Build.0 = Release|x64
{6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All|Win32.ActiveCfg = Release|Win32
{6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All|Win32.Build.0 = Release|Win32
{6316EE71-0210-4CA4-BCC7-CFB7A3C090FC}.All|x64.ActiveCfg = Release|x64
@@ -628,6 +659,9 @@ Global
{60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All Debug|Win32.ActiveCfg = Debug|Win32
{60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All Debug|Win32.Build.0 = Debug|Win32
{60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All Debug|x64.ActiveCfg = Debug|Win32
+ {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release_SkipOsDriverReqCheck|Win32
+ {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release_SkipOsDriverReqCheck|Win32
+ {60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release_SkipOsDriverReqCheck|Win32
{60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All|Win32.ActiveCfg = Release|Win32
{60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All|Win32.Build.0 = Release|Win32
{60698D56-DB83-4D19-9C87-9DFB6A6F8C87}.All|x64.ActiveCfg = Release|Win32
@@ -694,6 +728,9 @@ Global
{ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All Debug|Win32.ActiveCfg = Debug|Win32
{ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All Debug|Win32.Build.0 = Debug|Win32
{ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All Debug|x64.ActiveCfg = Debug|Win32
+ {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All_SkipOsDriverReqCheck|Win32.ActiveCfg = Release|Win32
+ {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All_SkipOsDriverReqCheck|Win32.Build.0 = Release|Win32
+ {ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All_SkipOsDriverReqCheck|x64.ActiveCfg = Release|Win32
{ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All|Win32.ActiveCfg = Release|Win32
{ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All|Win32.Build.0 = Release|Win32
{ADD324E2-ADC8-402E-87EB-03E4E26B1B49}.All|x64.ActiveCfg = Release|Win32
diff --git a/src/Volume/Cipher.cpp b/src/Volume/Cipher.cpp
index 40507a2d..02ee6989 100644
--- a/src/Volume/Cipher.cpp
+++ b/src/Volume/Cipher.cpp
@@ -22,7 +22,6 @@
#ifdef TC_AES_HW_CPU
# include "Crypto/Aes_hw_cpu.h"
#endif
-#include "Crypto/cpu.h"
extern "C" int IsAesHwCpuSupported ()
{
@@ -32,7 +31,7 @@ extern "C" int IsAesHwCpuSupported ()
if (!stateValid)
{
- state = g_hasAESNI ? true : false;
+ state = HasAESNI() ? true : false;
stateValid = true;
}
return state && VeraCrypt::Cipher::IsHwSupportEnabled();
@@ -203,7 +202,7 @@ namespace VeraCrypt
if (!stateValid)
{
- state = g_hasAESNI ? true : false;
+ state = HasAESNI() ? true : false;
stateValid = true;
}
return state && HwSupportEnabled;
diff --git a/src/Volume/Cipher.h b/src/Volume/Cipher.h
index 18d1d2ed..061dcc38 100644
--- a/src/Volume/Cipher.h
+++ b/src/Volume/Cipher.h
@@ -14,8 +14,7 @@
#define TC_HEADER_Encryption_Ciphers
#include "Platform/Platform.h"
-#include "Crypto/config.h"
-
+#include "Crypto/cpu.h"
namespace VeraCrypt
{
@@ -126,10 +125,6 @@ namespace VeraCrypt
#undef TC_EXCEPTION
-#if (defined (TC_ARCH_X86) || defined (TC_ARCH_X64)) && !defined (__ppc__)
-# define TC_AES_HW_CPU
-#endif
-
}
#endif // TC_HEADER_Encryption_Ciphers
diff --git a/src/Volume/Pkcs5Kdf.cpp b/src/Volume/Pkcs5Kdf.cpp
index fd49d2e2..ba5f46dd 100644
--- a/src/Volume/Pkcs5Kdf.cpp
+++ b/src/Volume/Pkcs5Kdf.cpp
@@ -56,15 +56,15 @@ namespace VeraCrypt
if (truecryptMode)
{
- l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacRipemd160 (true)));
l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacSha512 (true)));
l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacWhirlpool (true)));
+ l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacRipemd160 (true)));
}
else
{
l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacSha512 (false)));
- l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacWhirlpool (false)));
l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacSha256 ()));
+ l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacWhirlpool (false)));
l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacRipemd160 (false)));
l.push_back (shared_ptr <Pkcs5Kdf> (new Pkcs5HmacStreebog ()));
}