VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main')
-rw-r--r--src/Main/Application.cpp4
-rw-r--r--src/Main/Application.h2
-rw-r--r--src/Main/CommandLineInterface.cpp46
-rw-r--r--src/Main/CommandLineInterface.h7
-rw-r--r--src/Main/FatalErrorHandler.cpp2
-rw-r--r--src/Main/FatalErrorHandler.h2
-rw-r--r--src/Main/FavoriteVolume.cpp2
-rw-r--r--src/Main/FavoriteVolume.h2
-rw-r--r--src/Main/Forms/AboutDialog.cpp12
-rw-r--r--src/Main/Forms/AboutDialog.h2
-rw-r--r--src/Main/Forms/BenchmarkDialog.cpp23
-rw-r--r--src/Main/Forms/BenchmarkDialog.h2
-rw-r--r--src/Main/Forms/ChangePasswordDialog.cpp7
-rw-r--r--src/Main/Forms/ChangePasswordDialog.h2
-rw-r--r--src/Main/Forms/DeviceSelectionDialog.cpp2
-rw-r--r--src/Main/Forms/DeviceSelectionDialog.h2
-rw-r--r--src/Main/Forms/EncryptionOptionsWizardPage.cpp2
-rw-r--r--src/Main/Forms/EncryptionOptionsWizardPage.h2
-rw-r--r--src/Main/Forms/EncryptionTestDialog.cpp16
-rw-r--r--src/Main/Forms/EncryptionTestDialog.h2
-rw-r--r--src/Main/Forms/FavoriteVolumesDialog.cpp2
-rw-r--r--src/Main/Forms/FavoriteVolumesDialog.h2
-rw-r--r--src/Main/Forms/Forms.cpp102
-rw-r--r--src/Main/Forms/Forms.h12
-rw-r--r--src/Main/Forms/InfoWizardPage.cpp2
-rw-r--r--src/Main/Forms/InfoWizardPage.h2
-rw-r--r--src/Main/Forms/KeyfileGeneratorDialog.cpp8
-rw-r--r--src/Main/Forms/KeyfileGeneratorDialog.h2
-rw-r--r--src/Main/Forms/KeyfilesDialog.cpp2
-rw-r--r--src/Main/Forms/KeyfilesDialog.h2
-rw-r--r--src/Main/Forms/KeyfilesPanel.cpp2
-rw-r--r--src/Main/Forms/KeyfilesPanel.h2
-rw-r--r--src/Main/Forms/LegalNoticesDialog.cpp2
-rw-r--r--src/Main/Forms/LegalNoticesDialog.h2
-rw-r--r--src/Main/Forms/MainFrame.cpp34
-rw-r--r--src/Main/Forms/MainFrame.h4
-rw-r--r--src/Main/Forms/MountOptionsDialog.cpp38
-rw-r--r--src/Main/Forms/MountOptionsDialog.h11
-rw-r--r--src/Main/Forms/NewSecurityTokenKeyfileDialog.cpp2
-rw-r--r--src/Main/Forms/NewSecurityTokenKeyfileDialog.h2
-rw-r--r--src/Main/Forms/PreferencesDialog.cpp121
-rw-r--r--src/Main/Forms/PreferencesDialog.h5
-rw-r--r--src/Main/Forms/ProgressWizardPage.cpp2
-rw-r--r--src/Main/Forms/ProgressWizardPage.h2
-rw-r--r--src/Main/Forms/RandomPoolEnrichmentDialog.cpp8
-rw-r--r--src/Main/Forms/RandomPoolEnrichmentDialog.h2
-rw-r--r--src/Main/Forms/SecurityTokenKeyfilesDialog.cpp6
-rw-r--r--src/Main/Forms/SecurityTokenKeyfilesDialog.h2
-rw-r--r--src/Main/Forms/SelectDirectoryWizardPage.cpp2
-rw-r--r--src/Main/Forms/SelectDirectoryWizardPage.h2
-rw-r--r--src/Main/Forms/SingleChoiceWizardPage.h2
-rw-r--r--src/Main/Forms/TrueCrypt.fbp586
-rw-r--r--src/Main/Forms/VolumeCreationProgressWizardPage.cpp2
-rw-r--r--src/Main/Forms/VolumeCreationProgressWizardPage.h2
-rw-r--r--src/Main/Forms/VolumeCreationWizard.cpp39
-rw-r--r--src/Main/Forms/VolumeCreationWizard.h2
-rw-r--r--src/Main/Forms/VolumeFormatOptionsWizardPage.cpp2
-rw-r--r--src/Main/Forms/VolumeFormatOptionsWizardPage.h2
-rw-r--r--src/Main/Forms/VolumeLocationWizardPage.cpp2
-rw-r--r--src/Main/Forms/VolumeLocationWizardPage.h2
-rw-r--r--src/Main/Forms/VolumePasswordPanel.cpp9
-rw-r--r--src/Main/Forms/VolumePasswordPanel.h2
-rw-r--r--src/Main/Forms/VolumePasswordWizardPage.cpp2
-rw-r--r--src/Main/Forms/VolumePasswordWizardPage.h2
-rw-r--r--src/Main/Forms/VolumePimWizardPage.cpp5
-rw-r--r--src/Main/Forms/VolumePropertiesDialog.cpp2
-rw-r--r--src/Main/Forms/VolumePropertiesDialog.h2
-rw-r--r--src/Main/Forms/VolumeSizeWizardPage.cpp6
-rw-r--r--src/Main/Forms/VolumeSizeWizardPage.h2
-rw-r--r--src/Main/Forms/WaitDialog.cpp8
-rw-r--r--src/Main/Forms/WaitDialog.h6
-rw-r--r--src/Main/Forms/WizardFrame.cpp2
-rw-r--r--src/Main/Forms/WizardFrame.h2
-rw-r--r--src/Main/Forms/WizardPage.h2
-rw-r--r--src/Main/GraphicUserInterface.cpp114
-rw-r--r--src/Main/GraphicUserInterface.h3
-rw-r--r--src/Main/Hotkey.cpp10
-rw-r--r--src/Main/Hotkey.h2
-rw-r--r--src/Main/LanguageStrings.cpp11
-rw-r--r--src/Main/LanguageStrings.h2
-rw-r--r--src/Main/Main.h2
-rwxr-xr-xsrc/Main/Main.make52
-rw-r--r--src/Main/Resources.cpp104
-rw-r--r--src/Main/Resources.h2
-rw-r--r--src/Main/StringFormatter.cpp2
-rw-r--r--src/Main/StringFormatter.h5
-rw-r--r--src/Main/System.cpp2
-rw-r--r--src/Main/System.h2
-rw-r--r--src/Main/SystemPrecompiled.h2
-rw-r--r--src/Main/TextUserInterface.cpp115
-rw-r--r--src/Main/TextUserInterface.h4
-rw-r--r--src/Main/Unix/Main.cpp4
-rw-r--r--src/Main/UserInterface.cpp201
-rw-r--r--src/Main/UserInterface.h6
-rw-r--r--src/Main/UserInterfaceException.h2
-rw-r--r--src/Main/UserInterfaceType.h2
-rw-r--r--src/Main/UserPreferences.cpp6
-rw-r--r--src/Main/UserPreferences.h4
-rw-r--r--src/Main/VolumeHistory.cpp2
-rw-r--r--src/Main/VolumeHistory.h2
-rw-r--r--src/Main/Xml.cpp4
-rw-r--r--src/Main/Xml.h2
102 files changed, 1477 insertions, 413 deletions
diff --git a/src/Main/Application.cpp b/src/Main/Application.cpp
index c72e2cc6..7948235e 100644
--- a/src/Main/Application.cpp
+++ b/src/Main/Application.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -87,11 +87,11 @@ namespace VeraCrypt
}
#endif
FilePath Application::GetConfigFilePath (const wxString &configFileName, bool createConfigDir)
{
- static wxScopedPtr<const wxString> configDirC;
+ static std::unique_ptr<const wxString> configDirC;
static bool configDirExists = false;
if (!configDirExists)
{
if (!configDirC)
diff --git a/src/Main/Application.h b/src/Main/Application.h
index 82c6b00e..4bc9c199 100644
--- a/src/Main/Application.h
+++ b/src/Main/Application.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/CommandLineInterface.cpp b/src/Main/CommandLineInterface.cpp
index 2bbc73ea..2d38a5bd 100644
--- a/src/Main/CommandLineInterface.cpp
+++ b/src/Main/CommandLineInterface.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -27,39 +27,45 @@ namespace VeraCrypt
ArgNewPim (-1),
ArgNoHiddenVolumeProtection (false),
ArgPim (-1),
ArgSize (0),
ArgVolumeType (VolumeType::Unknown),
+ ArgAllowScreencapture (false),
ArgDisableFileSizeCheck (false),
ArgUseLegacyPassword (false),
-#if defined(TC_LINUX ) || defined (TC_FREEBSD)
ArgUseDummySudoPassword (false),
-#endif
+#if defined(TC_UNIX)
+ ArgAllowInsecureMount (false),
+ #endif
StartBackgroundTask (false)
{
wxCmdLineParser parser;
parser.SetCmdLine (argc, argv);
parser.SetSwitchChars (L"-");
+#if defined(TC_WINDOWS) || defined(TC_MACOSX)
+ parser.AddSwitch (L"", L"allow-screencapture", _("Allow window to be included in screenshots and screen captures (Windows/MacOS)"));
+#endif
parser.AddOption (L"", L"auto-mount", _("Auto mount device-hosted/favorite volumes"));
parser.AddSwitch (L"", L"backup-headers", _("Backup volume headers"));
parser.AddSwitch (L"", L"background-task", _("Start Background Task"));
#ifdef TC_WINDOWS
parser.AddSwitch (L"", L"cache", _("Cache passwords and keyfiles"));
#endif
parser.AddSwitch (L"C", L"change", _("Change password or keyfiles"));
parser.AddSwitch (L"c", L"create", _("Create new volume"));
parser.AddSwitch (L"", L"create-keyfile", _("Create new keyfile"));
parser.AddSwitch (L"", L"delete-token-keyfiles", _("Delete security token keyfiles"));
- parser.AddSwitch (L"d", L"dismount", _("Dismount volume"));
+ parser.AddSwitch (L"d", L"dismount", _("Unmount volume (deprecated: use 'unmount')"));
+ parser.AddSwitch (L"u", L"unmount", _("Unmount volume"));
parser.AddSwitch (L"", L"display-password", _("Display password while typing"));
parser.AddOption (L"", L"encryption", _("Encryption algorithm"));
parser.AddSwitch (L"", L"explore", _("Open explorer window for mounted volume"));
parser.AddSwitch (L"", L"export-token-keyfile",_("Export keyfile from token"));
parser.AddOption (L"", L"filesystem", _("Filesystem type"));
- parser.AddSwitch (L"f", L"force", _("Force mount/dismount/overwrite"));
+ parser.AddSwitch (L"f", L"force", _("Force mount/unmount/overwrite"));
#if !defined(TC_WINDOWS) && !defined(TC_MACOSX)
parser.AddOption (L"", L"fs-options", _("Filesystem mount options"));
#endif
parser.AddOption (L"", L"hash", _("Hash algorithm"));
parser.AddSwitch (L"h", L"help", _("Display detailed command line help"), wxCMD_LINE_OPTION_HELP);
@@ -104,10 +110,13 @@ namespace VeraCrypt
parser.AddSwitch (L"", L"no-size-check", _("Disable check of container size against disk free space."));
parser.AddSwitch (L"", L"legacy-password-maxlength", _("Use legacy maximum password length (64 UTF-8 bytes)"));
#if defined(TC_LINUX ) || defined (TC_FREEBSD)
parser.AddSwitch (L"", L"use-dummy-sudo-password", _("Use dummy password in sudo to detect if it is already authenticated"));
#endif
+#if defined(TC_UNIX)
+ parser.AddSwitch (L"", L"allow-insecure-mount", _("Allow mounting volumes on mount points that are in the user's PATH"));
+#endif
wxString str;
bool param1IsVolume = false;
bool param1IsMountedVolumeSpec = false;
bool param1IsMountPoint = false;
bool param1IsFile = false;
@@ -140,10 +149,15 @@ namespace VeraCrypt
// Load preferences first to allow command line options to override them
Preferences.Load();
ArgMountOptions = Preferences.DefaultMountOptions;
}
+#if defined(TC_WINDOWS) || defined(TC_MACOSX)
+ ArgAllowScreencapture = parser.Found (L"allow-screencapture");
+#else
+ ArgAllowScreencapture = true; // Protection against screenshots is supported only on Windows and MacOS
+#endif
// Commands
if (parser.Found (L"auto-mount", &str))
{
CheckCommandSingle();
@@ -207,11 +221,11 @@ namespace VeraCrypt
{
CheckCommandSingle();
ArgCommand = CommandId::DeleteSecurityTokenKeyfiles;
}
- if (parser.Found (L"dismount"))
+ if (parser.Found (L"unmount") || parser.Found (L"dismount"))
{
CheckCommandSingle();
ArgCommand = CommandId::DismountVolumes;
param1IsMountedVolumeSpec = true;
}
@@ -345,24 +359,38 @@ namespace VeraCrypt
else if (str.IsSameAs (L"APFS", false))
ArgFilesystem = VolumeCreationOptions::FilesystemType::APFS;
#elif defined (TC_FREEBSD) || defined (TC_SOLARIS)
else if (str.IsSameAs (L"UFS", false))
ArgFilesystem = VolumeCreationOptions::FilesystemType::UFS;
+ else if (str.IsSameAs (L"Ext2", false))
+ ArgFilesystem = VolumeCreationOptions::FilesystemType::Ext2;
+ else if (str.IsSameAs (L"Ext3", false))
+ ArgFilesystem = VolumeCreationOptions::FilesystemType::Ext3;
+ else if (str.IsSameAs (L"Ext4", false))
+ ArgFilesystem = VolumeCreationOptions::FilesystemType::Ext4;
+ else if (str.IsSameAs (L"NTFS", false))
+ ArgFilesystem = VolumeCreationOptions::FilesystemType::NTFS;
+ else if (str.IsSameAs (L"exFAT", false))
+ ArgFilesystem = VolumeCreationOptions::FilesystemType::exFAT;
#endif
else
throw_err (LangString["UNKNOWN_OPTION"] + L": " + str);
}
}
ArgForce = parser.Found (L"force");
ArgDisableFileSizeCheck = parser.Found (L"no-size-check");
- ArgUseLegacyPassword = parser.Found (L"legacy-password-maxlength");
+ ArgUseLegacyPassword = parser.Found (L"legacy-password-maxlength");
#if defined(TC_LINUX ) || defined (TC_FREEBSD)
ArgUseDummySudoPassword = parser.Found (L"use-dummy-sudo-password");
#endif
+#if defined(TC_UNIX)
+ ArgAllowInsecureMount = parser.Found (L"allow-insecure-mount");
+#endif
+
#if !defined(TC_WINDOWS) && !defined(TC_MACOSX)
if (parser.Found (L"fs-options", &str))
ArgMountOptions.FilesystemOptions = str;
#endif
@@ -822,22 +850,22 @@ namespace VeraCrypt
wxMBConvUTF8 utf8;
size_t ulen = utf8.FromWChar (NULL, 0, str, charCount);
if (wxCONV_FAILED == ulen)
throw PasswordUTF8Invalid (SRC_POS);
SecureBuffer passwordBuf(ulen);
- ulen = utf8.FromWChar ((char*) (byte*) passwordBuf, ulen, str, charCount);
+ ulen = utf8.FromWChar ((char*) (uint8*) passwordBuf, ulen, str, charCount);
if (wxCONV_FAILED == ulen)
throw PasswordUTF8Invalid (SRC_POS);
if (ulen > maxUtf8Len)
{
if (maxUtf8Len == VolumePassword::MaxLegacySize)
throw PasswordLegacyUTF8TooLong (SRC_POS);
else
throw PasswordUTF8TooLong (SRC_POS);
}
- ConstBufferPtr utf8Buffer ((byte*) passwordBuf, ulen);
+ ConstBufferPtr utf8Buffer ((uint8*) passwordBuf, ulen);
return shared_ptr<SecureBuffer>(new SecureBuffer (utf8Buffer));
}
else
return shared_ptr<SecureBuffer>(new SecureBuffer ());
}
diff --git a/src/Main/CommandLineInterface.h b/src/Main/CommandLineInterface.h
index 4003dc05..c255feb0 100644
--- a/src/Main/CommandLineInterface.h
+++ b/src/Main/CommandLineInterface.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -82,14 +82,17 @@ namespace VeraCrypt
uint64 ArgSize;
shared_ptr <VolumePath> ArgVolumePath;
VolumeInfoList ArgVolumes;
VolumeType::Enum ArgVolumeType;
shared_ptr<SecureBuffer> ArgTokenPin;
+ bool ArgAllowScreencapture;
bool ArgDisableFileSizeCheck;
bool ArgUseLegacyPassword;
-#if defined(TC_LINUX ) || defined (TC_FREEBSD)
bool ArgUseDummySudoPassword;
+
+#if defined(TC_UNIX)
+ bool ArgAllowInsecureMount;
#endif
bool StartBackgroundTask;
UserPreferences Preferences;
diff --git a/src/Main/FatalErrorHandler.cpp b/src/Main/FatalErrorHandler.cpp
index 5e391698..092a65dc 100644
--- a/src/Main/FatalErrorHandler.cpp
+++ b/src/Main/FatalErrorHandler.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/FatalErrorHandler.h b/src/Main/FatalErrorHandler.h
index d787cdd7..c037d80f 100644
--- a/src/Main/FatalErrorHandler.h
+++ b/src/Main/FatalErrorHandler.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/FavoriteVolume.cpp b/src/Main/FavoriteVolume.cpp
index 0b6ff146..e804e15b 100644
--- a/src/Main/FavoriteVolume.cpp
+++ b/src/Main/FavoriteVolume.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/FavoriteVolume.h b/src/Main/FavoriteVolume.h
index 7bc6a430..f59a10f1 100644
--- a/src/Main/FavoriteVolume.h
+++ b/src/Main/FavoriteVolume.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/AboutDialog.cpp b/src/Main/Forms/AboutDialog.cpp
index e3768361..9b92ed0b 100644
--- a/src/Main/Forms/AboutDialog.cpp
+++ b/src/Main/Forms/AboutDialog.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -25,11 +25,15 @@ namespace VeraCrypt
wxFont versionStaticTextFont = VersionStaticText->GetFont();
versionStaticTextFont.SetWeight (wxFONTWEIGHT_BOLD);
VersionStaticText->SetFont (versionStaticTextFont);
- VersionStaticText->SetLabel (Application::GetName() + L" " + StringConverter::ToWide (Version::String()));
+ wstring versionStr = StringConverter::ToWide (Version::String());
+#ifdef VC_MACOSX_FUSET
+ versionStr += L" (FUSE-T build)";
+#endif
+ VersionStaticText->SetLabel (Application::GetName() + L" " + versionStr);
CopyrightStaticText->SetLabel (TC_STR_RELEASED_BY);
WebsiteHyperlink->SetLabel (L"www.idrix.fr");
CreditsTextCtrl->SetMinSize (wxSize (
Gui->GetCharWidth (CreditsTextCtrl) * 70,
@@ -55,11 +59,11 @@ namespace VeraCrypt
L"Phillip Rogaway, "
L"Hans Dobbertin, Antoon Bosselaers, Bart Preneel, Jack Lloyd"
L"Paulo Barreto, Brian Gladman, Wei Dai, Peter Gutmann, and many others.\n\n"
L"Portions of this software:\n"
- L"Copyright \xA9 2013-2023 IDRIX. All rights reserved.\n"
+ L"Copyright \xA9 2013-2025 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"
L"Copyright \xA9 1995-2023 Jean-loup Gailly and Mark Adler.\n"
L"Copyright \xA9 2016 Disk Cryptography Services for EFI (DCS), Alex Kolotnikov.\n"
@@ -68,11 +72,11 @@ namespace VeraCrypt
L"Copyright \xA9 1999-2016 Jack Lloyd. All rights reserved.\n"
L"Copyright \xA9 2013-2019 Stephan Mueller <smueller@chronox.de>\n"
L"Copyright \xA9 1999-2023 Igor Pavlov\n\n"
L"\nThis software as a whole:\n"
- L"Copyright \xA9 2013-2023 IDRIX. All rights reserved.\n\n"
+ L"Copyright \xA9 2013-2025 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"
L"An IDRIX Release");
}
diff --git a/src/Main/Forms/AboutDialog.h b/src/Main/Forms/AboutDialog.h
index 7ce64b98..01cf5e90 100644
--- a/src/Main/Forms/AboutDialog.h
+++ b/src/Main/Forms/AboutDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/BenchmarkDialog.cpp b/src/Main/Forms/BenchmarkDialog.cpp
index 7b0209ff..168630fa 100644
--- a/src/Main/Forms/BenchmarkDialog.cpp
+++ b/src/Main/Forms/BenchmarkDialog.cpp
@@ -2,18 +2,21 @@
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 all other portions of this file are Copyright (c) 2013-2025 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 "System.h"
#include "Volume/EncryptionModeXTS.h"
+#ifdef WOLFCRYPT_BACKEND
+#include "Volume/EncryptionModeWolfCryptXTS.h"
+#endif
#include "Main/GraphicUserInterface.h"
#include "BenchmarkDialog.h"
namespace VeraCrypt
{
@@ -40,14 +43,14 @@ namespace VeraCrypt
BenchmarkChoice->Select (0);
BufferSizeChoice->Select (1);
UpdateBenchmarkList ();
-
- wxTextValidator validator (wxFILTER_INCLUDE_CHAR_LIST); // wxFILTER_NUMERIC does not exclude - . , etc.
- const wxChar *valArr[] = { L"0", L"1", L"2", L"3", L"4", L"5", L"6", L"7", L"8", L"9" };
- validator.SetIncludes (wxArrayString (array_capacity (valArr), (const wxChar **) &valArr));
+
+ VolumePimText->SetMinSize (wxSize (Gui->GetCharWidth (VolumePimText) * 15, -1));
+
+ wxTextValidator validator (wxFILTER_DIGITS);
VolumePimText->SetValidator (validator);
Layout();
Fit();
Center();
@@ -207,13 +210,17 @@ namespace VeraCrypt
BenchmarkResult result;
result.AlgorithmName = ea->GetName(true);
Buffer key (ea->GetKeySize());
ea->SetKey (key);
-
+ #ifdef WOLFCRYPT_BACKEND
+ shared_ptr <EncryptionMode> xts (new EncryptionModeWolfCryptXTS);
+ ea->SetKeyXTS (key);
+ #else
shared_ptr <EncryptionMode> xts (new EncryptionModeXTS);
- xts->SetKey (key);
+ #endif
+ xts->SetKey (key);
ea->SetMode (xts);
wxLongLong startTime = wxGetLocalTimeMillis();
// CPU "warm up" (an attempt to prevent skewed results on systems where CPU frequency gradually changes depending on CPU load).
@@ -272,11 +279,11 @@ namespace VeraCrypt
Buffer dk(MASTER_KEYDATA_SIZE);
Buffer salt(64);
const char *tmp_salt = {"\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF\x01\x23\x45\x67\x89\xAB\xCD\xEF\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF\x01\x23\x45\x67\x89\xAB\xCD\xEF\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xAA\xBB\xCC\xDD\xEE\xFF"};
unsigned long pim;
Pkcs5KdfList prfList = Pkcs5Kdf::GetAvailableAlgorithms ();
- VolumePassword password ((const byte*) "passphrase-1234567890", 21);
+ VolumePassword password ((const uint8*) "passphrase-1234567890", 21);
memcpy (&pim, buffer.Ptr (), sizeof (unsigned long));
memcpy (salt.Ptr(), tmp_salt, 64);
foreach (shared_ptr <Pkcs5Kdf> prf, prfList)
diff --git a/src/Main/Forms/BenchmarkDialog.h b/src/Main/Forms/BenchmarkDialog.h
index 16a5446b..3b17e20b 100644
--- a/src/Main/Forms/BenchmarkDialog.h
+++ b/src/Main/Forms/BenchmarkDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/ChangePasswordDialog.cpp b/src/Main/Forms/ChangePasswordDialog.cpp
index 397ee693..6b613b05 100644
--- a/src/Main/Forms/ChangePasswordDialog.cpp
+++ b/src/Main/Forms/ChangePasswordDialog.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -169,10 +169,11 @@ namespace VeraCrypt
/* force the display of the random enriching interface */
RandomNumberGenerator::SetEnrichedByUserStatus (false);
Gui->UserEnrichRandomPool (this, NewPasswordPanel->GetPkcs5Kdf() ? NewPasswordPanel->GetPkcs5Kdf()->GetHash() : shared_ptr <Hash>());
+ bool masterKeyVulnerable = false;
{
#ifdef TC_UNIX
// Temporarily take ownership of a device if the user is not an administrator
UserId origDeviceOwner ((uid_t) -1);
@@ -191,10 +192,11 @@ namespace VeraCrypt
wxBusyCursor busy;
ChangePasswordThreadRoutine routine(Path, Gui->GetPreferences().DefaultMountOptions.PreserveTimestamps,
CurrentPasswordPanel->GetPassword(), CurrentPasswordPanel->GetVolumePim(), CurrentPasswordPanel->GetPkcs5Kdf(), CurrentPasswordPanel->GetKeyfiles(),
newPassword, newPim, newKeyfiles, NewPasswordPanel->GetPkcs5Kdf(), NewPasswordPanel->GetHeaderWipeCount(), Gui->GetPreferences().EMVSupportEnabled);
Gui->ExecuteWaitThreadRoutine (this, &routine);
+ masterKeyVulnerable = routine.m_masterKeyVulnerable;
}
switch (DialogMode)
{
case Mode::ChangePasswordAndKeyfiles:
@@ -212,10 +214,13 @@ namespace VeraCrypt
default:
throw ParameterIncorrect (SRC_POS);
}
+ if (masterKeyVulnerable)
+ Gui->ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
+
EndModal (wxID_OK);
}
catch (UnportablePassword &e)
{
Gui->ShowError (e);
diff --git a/src/Main/Forms/ChangePasswordDialog.h b/src/Main/Forms/ChangePasswordDialog.h
index 66fbfecf..88ced0ae 100644
--- a/src/Main/Forms/ChangePasswordDialog.h
+++ b/src/Main/Forms/ChangePasswordDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/DeviceSelectionDialog.cpp b/src/Main/Forms/DeviceSelectionDialog.cpp
index df4292c9..9573414c 100644
--- a/src/Main/Forms/DeviceSelectionDialog.cpp
+++ b/src/Main/Forms/DeviceSelectionDialog.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/DeviceSelectionDialog.h b/src/Main/Forms/DeviceSelectionDialog.h
index 2ab7a9ce..960d90af 100644
--- a/src/Main/Forms/DeviceSelectionDialog.h
+++ b/src/Main/Forms/DeviceSelectionDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/EncryptionOptionsWizardPage.cpp b/src/Main/Forms/EncryptionOptionsWizardPage.cpp
index 663a6129..594c0c0a 100644
--- a/src/Main/Forms/EncryptionOptionsWizardPage.cpp
+++ b/src/Main/Forms/EncryptionOptionsWizardPage.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/EncryptionOptionsWizardPage.h b/src/Main/Forms/EncryptionOptionsWizardPage.h
index fbc63f9e..07b357c1 100644
--- a/src/Main/Forms/EncryptionOptionsWizardPage.h
+++ b/src/Main/Forms/EncryptionOptionsWizardPage.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/EncryptionTestDialog.cpp b/src/Main/Forms/EncryptionTestDialog.cpp
index 17184a0e..47918532 100644
--- a/src/Main/Forms/EncryptionTestDialog.cpp
+++ b/src/Main/Forms/EncryptionTestDialog.cpp
@@ -2,18 +2,21 @@
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 all other portions of this file are Copyright (c) 2013-2025 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 "System.h"
#include "Volume/EncryptionModeXTS.h"
+#ifdef WOLFCRYPT_BACKEND
+#include "Volume/EncryptionModeWolfCryptXTS.h"
+#endif
#include "Volume/EncryptionTest.h"
#include "Main/GraphicUserInterface.h"
#include "EncryptionTestDialog.h"
namespace VeraCrypt
@@ -92,12 +95,17 @@ namespace VeraCrypt
{
BlockNumberTextCtrl->SetFocus();
throw StringConversionFailed (SRC_POS);
}
+ #ifdef WOLFCRYPT_BACKEND
+ shared_ptr <EncryptionMode> xts (new EncryptionModeWolfCryptXTS);
+ ea->SetKeyXTS (secondaryKey);
+ #else
shared_ptr <EncryptionMode> xts (new EncryptionModeXTS);
- xts->SetKey (secondaryKey);
+ #endif
+ xts->SetKey (secondaryKey);
ea->SetMode (xts);
Buffer sector (ENCRYPTION_DATA_UNIT_SIZE);
BufferPtr block = sector.GetRange (blockNumber * ea->GetMaxBlockSize(), ea->GetMaxBlockSize());
@@ -131,11 +139,11 @@ namespace VeraCrypt
return Gui->GetSelectedData <EncryptionAlgorithm> (EncryptionAlgorithmChoice)->GetNew();
}
void EncryptionTestDialog::GetTextCtrlData (wxTextCtrl *textCtrl, Buffer &buffer) const
{
- vector <byte> data;
+ vector <uint8> data;
string dataStr = StringConverter::ToSingle (wstring (textCtrl->GetValue()));
for (size_t i = 0; i < dataStr.size() / 2; ++i)
{
unsigned int dataByte;
@@ -143,11 +151,11 @@ namespace VeraCrypt
{
textCtrl->SetFocus();
throw StringConversionFailed (SRC_POS);
}
- data.push_back ((byte) dataByte);
+ data.push_back ((uint8) dataByte);
}
if (data.empty())
return;
diff --git a/src/Main/Forms/EncryptionTestDialog.h b/src/Main/Forms/EncryptionTestDialog.h
index 3ba7d5e3..67e033b9 100644
--- a/src/Main/Forms/EncryptionTestDialog.h
+++ b/src/Main/Forms/EncryptionTestDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/FavoriteVolumesDialog.cpp b/src/Main/Forms/FavoriteVolumesDialog.cpp
index a0c48f92..ee92a47a 100644
--- a/src/Main/Forms/FavoriteVolumesDialog.cpp
+++ b/src/Main/Forms/FavoriteVolumesDialog.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/FavoriteVolumesDialog.h b/src/Main/Forms/FavoriteVolumesDialog.h
index adbf400d..3b5cd828 100644
--- a/src/Main/Forms/FavoriteVolumesDialog.h
+++ b/src/Main/Forms/FavoriteVolumesDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/Forms.cpp b/src/Main/Forms/Forms.cpp
index 7afad90f..6e1432a3 100644
--- a/src/Main/Forms/Forms.cpp
+++ b/src/Main/Forms/Forms.cpp
@@ -128,10 +128,14 @@ MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& t
ToolsMenu->Append( WipeCachedPasswordsMenuItem );
MainMenuBar->Append( ToolsMenu, _("MENU_TOOLS") );
SettingsMenu = new wxMenu();
+ wxMenuItem* LanguageMenuItem;
+ LanguageMenuItem = new wxMenuItem( SettingsMenu, wxID_ANY, wxString( _("IDM_LANGUAGE") ) , wxEmptyString, wxITEM_NORMAL );
+ SettingsMenu->Append( LanguageMenuItem );
+
HotkeysMenuItem = new wxMenuItem( SettingsMenu, wxID_ANY, wxString( _("IDM_HOTKEY_SETTINGS") ) , wxEmptyString, wxITEM_NORMAL );
SettingsMenu->Append( HotkeysMenuItem );
wxMenuItem* DefaultKeyfilesMenuItem;
DefaultKeyfilesMenuItem = new wxMenuItem( SettingsMenu, wxID_ANY, wxString( _("IDM_DEFAULT_KEYFILES") ) , wxEmptyString, wxITEM_NORMAL );
@@ -432,21 +436,22 @@ MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& t
ToolsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnRestoreVolumeHeaderMenuItemSelected ), this, RestoreVolumeHeaderMenuItem->GetId());
ToolsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnCreateKeyfileMenuItemSelected ), this, CreateKeyfileMenuItem->GetId());
ToolsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnManageSecurityTokenKeyfilesMenuItemSelected ), this, ManageSecurityTokenKeyfilesMenuItem->GetId());
ToolsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnCloseAllSecurityTokenSessionsMenuItemSelected ), this, CloseAllSecurityTokenSessionsMenuItem->GetId());
ToolsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnWipeCacheButtonClick ), this, WipeCachedPasswordsMenuItem->GetId());
+ SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnLanguageMenuItemSelected ), this, LanguageMenuItem->GetId());
SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnHotkeysMenuItemSelected ), this, HotkeysMenuItem->GetId());
SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnDefaultKeyfilesMenuItemSelected ), this, DefaultKeyfilesMenuItem->GetId());
SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnDefaultMountParametersMenuItemSelected ), this, DefaultMountParametersMenuItem->GetId());
SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnSecurityTokenPreferencesMenuItemSelected ), this, SecurityTokenPreferencesMenuItem->GetId());
#ifdef TC_MACOSX
this->Connect( PreferencesMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnPreferencesMenuItemSelected ) );
this->Connect( UserGuideMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnUserGuideMenuItemSelected ) );
#else
SettingsMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnPreferencesMenuItemSelected ), this, PreferencesMenuItem->GetId());
HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnUserGuideMenuItemSelected ), this, UserGuideMenuItem->GetId());
-#endif
+#endif
HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnOnlineHelpMenuItemSelected ), this, OnlineHelpMenuItem->GetId());
HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnBeginnersTutorialMenuItemSelected ), this, BeginnersTutorialMenuItem->GetId());
HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnFaqMenuItemSelected ), this, FaqMenuItem->GetId());
HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnWebsiteMenuItemSelected ), this, WebsiteMenuItem->GetId());
HelpMenu->Bind(wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnDownloadsMenuItemSelected ), this, DownloadsMenuItem->GetId());
@@ -1814,19 +1819,19 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c
bSizer44 = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizer33;
bSizer33 = new wxBoxSizer( wxVERTICAL );
- AutoDismountSizer = new wxStaticBoxSizer( new wxStaticBox( SecurityPage, wxID_ANY, _("IDT_AUTO_DISMOUNT") ), wxVERTICAL );
+ AutoDismountSizer = new wxStaticBoxSizer( new wxStaticBox( SecurityPage, wxID_ANY, _("IDT_AUTO_UNMOUNT") ), wxVERTICAL );
wxStaticBoxSizer* sbSizer13;
- sbSizer13 = new wxStaticBoxSizer( new wxStaticBox( AutoDismountSizer->GetStaticBox(), wxID_ANY, _("LINUX_DISMOUNT_ALL_WHEN") ), wxVERTICAL );
+ sbSizer13 = new wxStaticBoxSizer( new wxStaticBox( AutoDismountSizer->GetStaticBox(), wxID_ANY, _("LINUX_UNMOUNT_ALL_WHEN") ), wxVERTICAL );
- DismountOnLogOffCheckBox = new wxCheckBox( sbSizer13->GetStaticBox(), wxID_ANY, _("IDC_PREF_DISMOUNT_LOGOFF"), wxDefaultPosition, wxDefaultSize, 0 );
+ DismountOnLogOffCheckBox = new wxCheckBox( sbSizer13->GetStaticBox(), wxID_ANY, _("IDC_PREF_UNMOUNT_LOGOFF"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer13->Add( DismountOnLogOffCheckBox, 0, wxALL, 5 );
- DismountOnScreenSaverCheckBox = new wxCheckBox( sbSizer13->GetStaticBox(), wxID_ANY, _("IDC_PREF_DISMOUNT_SCREENSAVER"), wxDefaultPosition, wxDefaultSize, 0 );
+ DismountOnScreenSaverCheckBox = new wxCheckBox( sbSizer13->GetStaticBox(), wxID_ANY, _("IDC_PREF_UNMOUNT_SCREENSAVER"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer13->Add( DismountOnScreenSaverCheckBox, 0, wxALL, 5 );
DismountOnPowerSavingCheckBox = new wxCheckBox( sbSizer13->GetStaticBox(), wxID_ANY, _("LINUX_ENTERING_POVERSAWING"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer13->Add( DismountOnPowerSavingCheckBox, 0, wxALL, 5 );
@@ -1834,11 +1839,11 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c
AutoDismountSizer->Add( sbSizer13, 0, wxEXPAND|wxALL, 5 );
wxBoxSizer* bSizer34;
bSizer34 = new wxBoxSizer( wxHORIZONTAL );
- DismountOnInactivityCheckBox = new wxCheckBox( AutoDismountSizer->GetStaticBox(), wxID_ANY, _("IDC_PREF_DISMOUNT_INACTIVE"), wxDefaultPosition, wxDefaultSize, 0 );
+ DismountOnInactivityCheckBox = new wxCheckBox( AutoDismountSizer->GetStaticBox(), wxID_ANY, _("IDC_PREF_UNMOUNT_INACTIVE"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer34->Add( DismountOnInactivityCheckBox, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
DismountOnInactivitySpinCtrl = new wxSpinCtrl( AutoDismountSizer->GetStaticBox(), wxID_ANY, wxT("1"), wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 1, 9999, 1 );
DismountOnInactivitySpinCtrl->SetMinSize( wxSize( 60,-1 ) );
@@ -1850,11 +1855,11 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c
bSizer34->Add( m_staticText5, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
AutoDismountSizer->Add( bSizer34, 0, wxEXPAND, 5 );
- ForceAutoDismountCheckBox = new wxCheckBox( AutoDismountSizer->GetStaticBox(), wxID_ANY, _("IDC_PREF_FORCE_AUTO_DISMOUNT"), wxDefaultPosition, wxDefaultSize, 0 );
+ ForceAutoDismountCheckBox = new wxCheckBox( AutoDismountSizer->GetStaticBox(), wxID_ANY, _("IDC_PREF_FORCE_AUTO_UNMOUNT"), wxDefaultPosition, wxDefaultSize, 0 );
AutoDismountSizer->Add( ForceAutoDismountCheckBox, 0, wxALL, 5 );
bSizer33->Add( AutoDismountSizer, 0, wxEXPAND|wxALL, 5 );
@@ -1870,11 +1875,11 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c
sbSizer14 = new wxStaticBoxSizer( new wxStaticBox( SecurityPage, wxID_ANY, _("IDT_PW_CACHE_OPTIONS") ), wxVERTICAL );
WipeCacheOnCloseCheckBox = new wxCheckBox( sbSizer14->GetStaticBox(), wxID_ANY, _("IDC_PREF_WIPE_CACHE_ON_EXIT"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer14->Add( WipeCacheOnCloseCheckBox, 0, wxALL, 5 );
- WipeCacheOnAutoDismountCheckBox = new wxCheckBox( sbSizer14->GetStaticBox(), wxID_ANY, _("IDC_PREF_WIPE_CACHE_ON_AUTODISMOUNT"), wxDefaultPosition, wxDefaultSize, 0 );
+ WipeCacheOnAutoDismountCheckBox = new wxCheckBox( sbSizer14->GetStaticBox(), wxID_ANY, _("IDC_PREF_WIPE_CACHE_ON_AUTOUNMOUNT"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer14->Add( WipeCacheOnAutoDismountCheckBox, 0, wxALL, 5 );
bSizer33->Add( sbSizer14, 0, wxEXPAND|wxALL, 5 );
@@ -1976,11 +1981,11 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c
sbSizer26->Add( BackgroundTaskMenuMountItemsEnabledCheckBox, 0, wxALL, 5 );
BackgroundTaskMenuOpenItemsEnabledCheckBox = new wxCheckBox( sbSizer26->GetStaticBox(), wxID_ANY, _("TASKICON_PREF_OPEN_VOL"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer26->Add( BackgroundTaskMenuOpenItemsEnabledCheckBox, 0, wxALL, 5 );
- BackgroundTaskMenuDismountItemsEnabledCheckBox = new wxCheckBox( sbSizer26->GetStaticBox(), wxID_ANY, _("TASKICON_PREF_DISMOUNT_VOL"), wxDefaultPosition, wxDefaultSize, 0 );
+ BackgroundTaskMenuDismountItemsEnabledCheckBox = new wxCheckBox( sbSizer26->GetStaticBox(), wxID_ANY, _("TASKICON_PREF_UNMOUNT_VOL"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer26->Add( BackgroundTaskMenuDismountItemsEnabledCheckBox, 0, wxALL, 5 );
sbSizer18->Add( sbSizer26, 1, wxEXPAND|wxALL, 5 );
@@ -2019,11 +2024,11 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c
ExplorerSizer = new wxStaticBoxSizer( new wxStaticBox( SystemIntegrationPage, wxID_ANY, _("LINUX_PREF_TAB_SYSTEM_INTEGRATION_EXPLORER") ), wxVERTICAL );
OpenExplorerWindowAfterMountCheckBox = new wxCheckBox( ExplorerSizer->GetStaticBox(), wxID_ANY, _("IDC_PREF_OPEN_EXPLORER"), wxDefaultPosition, wxDefaultSize, 0 );
ExplorerSizer->Add( OpenExplorerWindowAfterMountCheckBox, 0, wxALL, 5 );
- CloseExplorerWindowsOnDismountCheckBox = new wxCheckBox( ExplorerSizer->GetStaticBox(), wxID_ANY, _("LINUX_CLOSE_EXPL_ON_DISMOUNT"), wxDefaultPosition, wxDefaultSize, 0 );
+ CloseExplorerWindowsOnDismountCheckBox = new wxCheckBox( ExplorerSizer->GetStaticBox(), wxID_ANY, _("LINUX_CLOSE_EXPL_ON_UNMOUNT"), wxDefaultPosition, wxDefaultSize, 0 );
ExplorerSizer->Add( CloseExplorerWindowsOnDismountCheckBox, 0, wxALL, 5 );
bSizer37->Add( ExplorerSizer, 0, wxEXPAND|wxALL, 5 );
@@ -2231,11 +2236,11 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c
sbSizer24 = new wxStaticBoxSizer( new wxStaticBox( sbSizer21->GetStaticBox(), wxID_ANY, _("IDT_FORMAT_OPTIONS") ), wxVERTICAL );
BeepAfterHotkeyMountDismountCheckBox = new wxCheckBox( sbSizer24->GetStaticBox(), wxID_ANY, _("LINUX_SOUND_NOTIFICATION"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer24->Add( BeepAfterHotkeyMountDismountCheckBox, 0, wxALL, 5 );
- DisplayMessageAfterHotkeyDismountCheckBox = new wxCheckBox( sbSizer24->GetStaticBox(), wxID_ANY, _("LINUX_CONFIRM_AFTER_DISMOUNT"), wxDefaultPosition, wxDefaultSize, 0 );
+ DisplayMessageAfterHotkeyDismountCheckBox = new wxCheckBox( sbSizer24->GetStaticBox(), wxID_ANY, _("LINUX_CONFIRM_AFTER_UNMOUNT"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer24->Add( DisplayMessageAfterHotkeyDismountCheckBox, 0, wxALL, 5 );
sbSizer21->Add( sbSizer24, 0, wxEXPAND|wxALL, 5 );
@@ -2248,10 +2253,71 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c
HotkeysPage->SetSizer( bSizer51 );
HotkeysPage->Layout();
bSizer51->Fit( HotkeysPage );
PreferencesNotebook->AddPage( HotkeysPage, _("LINUX_HOTKEYS"), false );
+ LanguagesPage = new wxPanel( PreferencesNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ wxBoxSizer* bSizer170;
+ bSizer170 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer171;
+ bSizer171 = new wxBoxSizer( wxVERTICAL );
+
+ wxBoxSizer* bSizer173;
+ bSizer173 = new wxBoxSizer( wxVERTICAL );
+
+ wxStaticBoxSizer* sbSizer49;
+ sbSizer49 = new wxStaticBoxSizer( new wxStaticBox( LanguagesPage, wxID_ANY, _("LINUX_LANGUAGE") ), wxVERTICAL );
+
+ wxBoxSizer* bSizer174;
+ bSizer174 = new wxBoxSizer( wxHORIZONTAL );
+
+ m_staticText73 = new wxStaticText( sbSizer49->GetStaticBox(), wxID_ANY, _("IDT_ACTIVE_LANG_PACK"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText73->Wrap( -1 );
+ bSizer174->Add( m_staticText73, 0, wxLEFT|wxTOP, 5 );
+
+ m_staticText74 = new wxStaticText( sbSizer49->GetStaticBox(), wxID_ANY, _("CURRENT_LANGUAGE_PACK"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText74->Wrap( -1 );
+ bSizer174->Add( m_staticText74, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
+
+
+ sbSizer49->Add( bSizer174, 0, wxBOTTOM, 5 );
+
+ wxWrapSizer* wSizer1;
+ wSizer1 = new wxWrapSizer( wxHORIZONTAL, wxWRAPSIZER_DEFAULT_FLAGS );
+
+ m_staticText72 = new wxStaticText( sbSizer49->GetStaticBox(), wxID_ANY, _("IDT_LANGPACK_AUTHORS"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText72->Wrap( -1 );
+ wSizer1->Add( m_staticText72, 0, wxBOTTOM|wxLEFT, 5 );
+
+ m_staticText71 = new wxStaticText( sbSizer49->GetStaticBox(), wxID_ANY, _("LANGUAGE_TRANSLATORS"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText71->Wrap( -1 );
+ wSizer1->Add( m_staticText71, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
+
+
+ sbSizer49->Add( wSizer1, 0, 0, 5 );
+
+ LanguageListBox = new wxListBox( sbSizer49->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE|wxLB_SORT );
+ sbSizer49->Add( LanguageListBox, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
+
+ SysDefaultLangButton = new wxButton( sbSizer49->GetStaticBox(), wxID_ANY, _("LINUX_SELECT_SYS_DEFAULT_LANG"), wxDefaultPosition, wxDefaultSize, 0 );
+ sbSizer49->Add( SysDefaultLangButton, 0, wxALIGN_BOTTOM|wxALL|wxEXPAND, 5 );
+
+
+ bSizer173->Add( sbSizer49, 1, wxALL|wxEXPAND, 5 );
+
+
+ bSizer171->Add( bSizer173, 1, wxEXPAND, 5 );
+
+
+ bSizer170->Add( bSizer171, 1, wxALL|wxEXPAND, 5 );
+
+
+ LanguagesPage->SetSizer( bSizer170 );
+ LanguagesPage->Layout();
+ bSizer170->Fit( LanguagesPage );
+ PreferencesNotebook->AddPage( LanguagesPage, _("LINUX_LANGUAGE"), false );
bSizer178->Add( PreferencesNotebook, 1, wxEXPAND | wxALL, 5 );
wxBoxSizer* bSizer182;
bSizer182 = new wxBoxSizer( wxHORIZONTAL );
@@ -2278,10 +2344,11 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c
this->Layout();
bSizer32->Fit( this );
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PreferencesDialogBase::OnClose ) );
+ PreferencesNotebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( PreferencesDialogBase::OnPageChanged ), NULL, this );
DismountOnScreenSaverCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnDismountOnScreenSaverCheckBoxClick ), NULL, this );
DismountOnPowerSavingCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnDismountOnPowerSavingCheckBoxClick ), NULL, this );
ForceAutoDismountCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnForceAutoDismountCheckBoxClick ), NULL, this );
PreserveTimestampsCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnPreserveTimestampsCheckBoxClick ), NULL, this );
BackgroundTaskEnabledCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnBackgroundTaskEnabledCheckBoxClick ), NULL, this );
@@ -2290,17 +2357,19 @@ PreferencesDialogBase::PreferencesDialogBase( wxWindow* parent, wxWindowID id, c
SelectPkcs11ModuleButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnSelectPkcs11ModuleButtonClick ), NULL, this );
HotkeyListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( PreferencesDialogBase::OnHotkeyListItemDeselected ), NULL, this );
HotkeyListCtrl->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( PreferencesDialogBase::OnHotkeyListItemSelected ), NULL, this );
AssignHotkeyButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnAssignHotkeyButtonClick ), NULL, this );
RemoveHotkeyButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnRemoveHotkeyButtonClick ), NULL, this );
+ SysDefaultLangButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnSysDefaultLangButtonClick ), NULL, this );
OKButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnOKButtonClick ), NULL, this );
}
PreferencesDialogBase::~PreferencesDialogBase()
{
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PreferencesDialogBase::OnClose ) );
+ PreferencesNotebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( PreferencesDialogBase::OnPageChanged ), NULL, this );
DismountOnScreenSaverCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnDismountOnScreenSaverCheckBoxClick ), NULL, this );
DismountOnPowerSavingCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnDismountOnPowerSavingCheckBoxClick ), NULL, this );
ForceAutoDismountCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnForceAutoDismountCheckBoxClick ), NULL, this );
PreserveTimestampsCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnPreserveTimestampsCheckBoxClick ), NULL, this );
BackgroundTaskEnabledCheckBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnBackgroundTaskEnabledCheckBoxClick ), NULL, this );
@@ -2309,10 +2378,11 @@ PreferencesDialogBase::~PreferencesDialogBase()
SelectPkcs11ModuleButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnSelectPkcs11ModuleButtonClick ), NULL, this );
HotkeyListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( PreferencesDialogBase::OnHotkeyListItemDeselected ), NULL, this );
HotkeyListCtrl->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( PreferencesDialogBase::OnHotkeyListItemSelected ), NULL, this );
AssignHotkeyButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnAssignHotkeyButtonClick ), NULL, this );
RemoveHotkeyButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnRemoveHotkeyButtonClick ), NULL, this );
+ SysDefaultLangButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnSysDefaultLangButtonClick ), NULL, this );
OKButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PreferencesDialogBase::OnOKButtonClick ), NULL, this );
}
RandomPoolEnrichmentDialogBase::RandomPoolEnrichmentDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
@@ -2713,23 +2783,23 @@ KeyfilesPanelBase::KeyfilesPanelBase( wxWindow* parent, wxWindowID id, const wxP
wxBoxSizer* bSizer137;
bSizer137 = new wxBoxSizer( wxHORIZONTAL );
AddFilesButton = new wxButton( this, wxID_ANY, _("IDC_KEYADD"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer137->Add( AddFilesButton, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ bSizer137->Add( AddFilesButton, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
AddDirectoryButton = new wxButton( this, wxID_ANY, _("IDC_ADD_KEYFILE_PATH"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer137->Add( AddDirectoryButton, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ bSizer137->Add( AddDirectoryButton, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
AddSecurityTokenSignatureButton = new wxButton( this, wxID_ANY, _("IDC_TOKEN_FILES_ADD"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer137->Add( AddSecurityTokenSignatureButton, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ bSizer137->Add( AddSecurityTokenSignatureButton, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
RemoveButton = new wxButton( this, wxID_ANY, _("IDC_KEYREMOVE"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer137->Add( RemoveButton, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+ bSizer137->Add( RemoveButton, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
RemoveAllButton = new wxButton( this, wxID_ANY, _("IDC_KEYREMOVEALL"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizer137->Add( RemoveAllButton, 0, wxEXPAND|wxALL, 5 );
+ bSizer137->Add( RemoveAllButton, 0, wxALL|wxEXPAND, 5 );
bSizer21->Add( bSizer137, 0, wxEXPAND, 5 );
diff --git a/src/Main/Forms/Forms.h b/src/Main/Forms/Forms.h
index 96a03c79..70a8c230 100644
--- a/src/Main/Forms/Forms.h
+++ b/src/Main/Forms/Forms.h
@@ -36,10 +36,12 @@
#include <wx/textctrl.h>
#include <wx/dialog.h>
#include <wx/choice.h>
#include <wx/gauge.h>
#include <wx/spinctrl.h>
+#include <wx/wrapsizer.h>
+#include <wx/listbox.h>
#include <wx/notebook.h>
#include "international.h"
///////////////////////////////////////////////////////////////////////////
@@ -114,10 +116,11 @@ namespace VeraCrypt
virtual void OnRestoreVolumeHeaderMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCreateKeyfileMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnManageSecurityTokenKeyfilesMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCloseAllSecurityTokenSessionsMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnWipeCacheButtonClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnLanguageMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnHotkeysMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnDefaultKeyfilesMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnDefaultMountParametersMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSecurityTokenPreferencesMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPreferencesMenuItemSelected( wxCommandEvent& event ) { event.Skip(); }
@@ -611,15 +614,21 @@ namespace VeraCrypt
wxCheckBox* HotkeyAltCheckBox;
wxCheckBox* HotkeyWinCheckBox;
wxButton* RemoveHotkeyButton;
wxCheckBox* BeepAfterHotkeyMountDismountCheckBox;
wxCheckBox* DisplayMessageAfterHotkeyDismountCheckBox;
+ wxStaticText* m_staticText73;
+ wxStaticText* m_staticText74;
+ wxStaticText* m_staticText72;
+ wxStaticText* m_staticText71;
+ wxButton* SysDefaultLangButton;
wxButton* OKButton;
wxButton* CancelButton;
// Virtual event handlers, override them in your derived class
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
+ virtual void OnPageChanged( wxNotebookEvent& event ) { event.Skip(); }
virtual void OnDismountOnScreenSaverCheckBoxClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnDismountOnPowerSavingCheckBoxClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnForceAutoDismountCheckBoxClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPreserveTimestampsCheckBoxClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnBackgroundTaskEnabledCheckBoxClick( wxCommandEvent& event ) { event.Skip(); }
@@ -628,18 +637,21 @@ namespace VeraCrypt
virtual void OnSelectPkcs11ModuleButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnHotkeyListItemDeselected( wxListEvent& event ) { event.Skip(); }
virtual void OnHotkeyListItemSelected( wxListEvent& event ) { event.Skip(); }
virtual void OnAssignHotkeyButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRemoveHotkeyButtonClick( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnSysDefaultLangButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
public:
wxPanel* DefaultMountOptionsPage;
wxPanel* DefaultKeyfilesPage;
wxPanel* SecurityTokensPage;
wxPanel* HotkeysPage;
+ wxPanel* LanguagesPage;
+ wxListBox* LanguageListBox;
PreferencesDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("IDD_PREFERENCES_DLG"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
~PreferencesDialogBase();
diff --git a/src/Main/Forms/InfoWizardPage.cpp b/src/Main/Forms/InfoWizardPage.cpp
index 6d8cf926..465f1693 100644
--- a/src/Main/Forms/InfoWizardPage.cpp
+++ b/src/Main/Forms/InfoWizardPage.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/InfoWizardPage.h b/src/Main/Forms/InfoWizardPage.h
index aa7da264..0a4c3324 100644
--- a/src/Main/Forms/InfoWizardPage.h
+++ b/src/Main/Forms/InfoWizardPage.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/KeyfileGeneratorDialog.cpp b/src/Main/Forms/KeyfileGeneratorDialog.cpp
index 2d729ccf..58224e18 100644
--- a/src/Main/Forms/KeyfileGeneratorDialog.cpp
+++ b/src/Main/Forms/KeyfileGeneratorDialog.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -162,16 +162,16 @@ namespace VeraCrypt
void KeyfileGeneratorDialog::OnMouseMotion (wxMouseEvent& event)
{
event.Skip();
- RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&event), sizeof (event)));
+ RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&event), sizeof (event)));
long coord = event.GetX();
- RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord)));
+ RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&coord), sizeof (coord)));
coord = event.GetY();
- RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord)));
+ RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&coord), sizeof (coord)));
if (ShowRandomPoolCheckBox->IsChecked())
ShowBytes (RandomPoolStaticText, RandomNumberGenerator::PeekPool().GetRange (0, 24));
else
HideBytes (RandomPoolStaticText, 24);
diff --git a/src/Main/Forms/KeyfileGeneratorDialog.h b/src/Main/Forms/KeyfileGeneratorDialog.h
index 7b8b2b29..de3a1287 100644
--- a/src/Main/Forms/KeyfileGeneratorDialog.h
+++ b/src/Main/Forms/KeyfileGeneratorDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/KeyfilesDialog.cpp b/src/Main/Forms/KeyfilesDialog.cpp
index c734b4d9..d81b101f 100644
--- a/src/Main/Forms/KeyfilesDialog.cpp
+++ b/src/Main/Forms/KeyfilesDialog.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/KeyfilesDialog.h b/src/Main/Forms/KeyfilesDialog.h
index 2ee601e3..2abaf713 100644
--- a/src/Main/Forms/KeyfilesDialog.h
+++ b/src/Main/Forms/KeyfilesDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/KeyfilesPanel.cpp b/src/Main/Forms/KeyfilesPanel.cpp
index e3d086fc..4439ff36 100644
--- a/src/Main/Forms/KeyfilesPanel.cpp
+++ b/src/Main/Forms/KeyfilesPanel.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/KeyfilesPanel.h b/src/Main/Forms/KeyfilesPanel.h
index ef680d49..d22abb8b 100644
--- a/src/Main/Forms/KeyfilesPanel.h
+++ b/src/Main/Forms/KeyfilesPanel.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/LegalNoticesDialog.cpp b/src/Main/Forms/LegalNoticesDialog.cpp
index ce7e442c..0de62897 100644
--- a/src/Main/Forms/LegalNoticesDialog.cpp
+++ b/src/Main/Forms/LegalNoticesDialog.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/LegalNoticesDialog.h b/src/Main/Forms/LegalNoticesDialog.h
index 31df666b..0769fdb7 100644
--- a/src/Main/Forms/LegalNoticesDialog.h
+++ b/src/Main/Forms/LegalNoticesDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/MainFrame.cpp b/src/Main/Forms/MainFrame.cpp
index de1c99a4..59329e09 100644
--- a/src/Main/Forms/MainFrame.cpp
+++ b/src/Main/Forms/MainFrame.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -82,10 +82,11 @@ namespace VeraCrypt
InitControls();
InitPreferences();
InitTaskBarIcon();
InitEvents();
InitMessageFilter();
+ InitWindowPrivacy();
if (!GetPreferences().SecurityTokenModule.IsEmpty() && !SecurityToken::IsInitialized())
{
try
{
@@ -468,10 +469,16 @@ namespace VeraCrypt
MainFrameWndProc = (WNDPROC) GetWindowLongPtr (mainFrameHwnd, GWL_WNDPROC);
SetWindowLongPtr (mainFrameHwnd, GWL_WNDPROC, (LONG_PTR) MainFrameWndProcFilter);
#endif
}
+
+ void MainFrame::InitWindowPrivacy ()
+ {
+ Gui->SetContentProtection(!CmdLine->ArgAllowScreencapture);
+ }
+
void MainFrame::InitPreferences ()
{
try
{
LoadPreferences();
@@ -516,11 +523,11 @@ namespace VeraCrypt
Gui->AppendToMenu (*popup, LangString[Gui->IsInBackgroundMode() ? "SHOW_TC" : "HIDE_TC"], this, wxCommandEventHandler (TaskBarIcon::OnShowHideMenuItemSelected));
popup->AppendSeparator();
Gui->AppendToMenu (*popup, LangString["IDM_MOUNT_FAVORITE_VOLUMES"], this, wxCommandEventHandler (TaskBarIcon::OnMountAllFavoritesMenuItemSelected))->Enable (!Busy);
- Gui->AppendToMenu (*popup, LangString["HK_DISMOUNT_ALL"], this, wxCommandEventHandler (TaskBarIcon::OnDismountAllMenuItemSelected))->Enable (!Busy);
+ Gui->AppendToMenu (*popup, LangString["HK_UNMOUNT_ALL"], this, wxCommandEventHandler (TaskBarIcon::OnDismountAllMenuItemSelected))->Enable (!Busy);
// Favorite volumes
if (Gui->GetPreferences().BackgroundTaskMenuMountItemsEnabled && !Frame->FavoriteVolumesMenuMap.empty())
{
popup->AppendSeparator();
@@ -556,11 +563,11 @@ namespace VeraCrypt
{
popup->AppendSeparator();
DismountMap.clear();
foreach (shared_ptr <VolumeInfo> volume, mountedVolumes)
{
- wxString label = LangString["DISMOUNT"] + L" ";
+ wxString label = LangString["UNMOUNT"] + L" ";
if (!volume->MountPoint.IsEmpty())
label += wstring (volume->MountPoint) + L" (" + wstring (volume->Path) + L")";
else
label += wstring (volume->Path);
@@ -999,11 +1006,11 @@ namespace VeraCrypt
size_t newMountedCount = Core->GetMountedVolumes().size();
if (newMountedCount < mountedCount)
{
if (newMountedCount == 0 && GetPreferences().DisplayMessageAfterHotkeyDismount)
- Gui->ShowInfo ("MOUNTED_VOLUMES_DISMOUNTED");
+ Gui->ShowInfo ("MOUNTED_VOLUMES_UNMOUNTED");
else if (GetPreferences().BeepAfterHotkeyMountDismount)
MessageBeep((UINT) -1);
}
}
break;
@@ -1015,11 +1022,11 @@ namespace VeraCrypt
WipeCache();
Gui->DismountAllVolumes (true, true);
if (mounted && GetPreferences().DisplayMessageAfterHotkeyDismount)
- Gui->ShowInfo ("VOLUMES_DISMOUNTED_CACHE_WIPED");
+ Gui->ShowInfo ("VOLUMES_UNMOUNTED_CACHE_WIPED");
else if (mounted && GetPreferences().BeepAfterHotkeyMountDismount)
MessageBeep((UINT) -1);
if (event.GetId() == Hotkey::Id::ForceDismountAllWipeCacheExit)
Close (true);
@@ -1066,10 +1073,21 @@ namespace VeraCrypt
PreferencesDialog dialog (this);
dialog.SelectPage (dialog.HotkeysPage);
dialog.ShowModal();
}
+ void MainFrame::OnLanguageMenuItemSelected (wxCommandEvent& event)
+ {
+#ifdef TC_MACOSX
+ if (Gui->IsInBackgroundMode())
+ Gui->SetBackgroundMode (false);
+#endif
+ PreferencesDialog dialog (this);
+ dialog.SelectPage (dialog.LanguagesPage);
+ dialog.ShowModal();
+ }
+
void MainFrame::OnLegalNoticesMenuItemSelected (wxCommandEvent& event)
{
#ifdef TC_MACOSX
if (Gui->IsInBackgroundMode())
Gui->SetBackgroundMode (false);
@@ -1129,11 +1147,11 @@ namespace VeraCrypt
#endif
wxMenu popup;
if (IsMountedSlotSelected())
{
- Gui->AppendToMenu (popup, LangString["DISMOUNT"], this, wxCommandEventHandler (MainFrame::OnDismountVolumeMenuItemSelected));
+ Gui->AppendToMenu (popup, LangString["UNMOUNT"], this, wxCommandEventHandler (MainFrame::OnDismountVolumeMenuItemSelected));
Gui->AppendToMenu (popup, LangString["OPEN"], this, wxCommandEventHandler (MainFrame::OnOpenVolumeMenuItemSelected));
Gui->AppendToMenu (popup, LangString["LINUX_DESELECT"], this, wxCommandEventHandler (MainFrame::OnClearSlotSelectionMenuItemSelected));
popup.AppendSeparator();
Gui->AppendToMenu (popup, LangString["IDPM_ADD_TO_FAVORITES"], this, wxCommandEventHandler (MainFrame::OnAddToFavoritesMenuItemSelected));
@@ -1424,11 +1442,11 @@ namespace VeraCrypt
}
#if defined(TC_UNIX) && !defined(TC_MACOSX)
try
{
- byte buf[128];
+ uint8 buf[128];
if (read (ShowRequestFifo, buf, sizeof (buf)) > 0 && Gui->IsInBackgroundMode())
Gui->SetBackgroundMode (false);
}
catch (...)
{
@@ -1601,11 +1619,11 @@ namespace VeraCrypt
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"]);
+ indicator_item_dismountall = gtk_menu_item_new_with_label (LangString["HK_UNMOUNT_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());
diff --git a/src/Main/Forms/MainFrame.h b/src/Main/Forms/MainFrame.h
index 5372adbb..9b2b4eb0 100644
--- a/src/Main/Forms/MainFrame.h
+++ b/src/Main/Forms/MainFrame.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -82,10 +82,11 @@ namespace VeraCrypt
void InitControls ();
void InitEvents ();
void InitMessageFilter ();
void InitPreferences ();
void InitTaskBarIcon ();
+ void InitWindowPrivacy();
bool IsFreeSlotSelected () const { return SlotListCtrl->GetSelectedItemCount() == 1 && Gui->GetListCtrlSubItemText (SlotListCtrl, SelectedItemIndex, ColumnPath).empty(); }
bool IsMountedSlotSelected () const { return SlotListCtrl->GetSelectedItemCount() == 1 && !Gui->GetListCtrlSubItemText (SlotListCtrl, SelectedItemIndex, ColumnPath).empty(); }
void LoadFavoriteVolumes ();
void LoadPreferences ();
void MountAllDevices ();
@@ -126,10 +127,11 @@ namespace VeraCrypt
void OnFavoriteVolumeMenuItemSelected (wxCommandEvent& event);
void OnFaqMenuItemSelected (wxCommandEvent& event) { Gui->OpenHomepageLink (this, L"faq"); }
void OnHiddenVolumeProtectionTriggered (shared_ptr <VolumeInfo> protectedVolume);
void OnHotkey (wxKeyEvent& event);
void OnHotkeysMenuItemSelected (wxCommandEvent& event);
+ void OnLanguageMenuItemSelected (wxCommandEvent& event);
void OnLegalNoticesMenuItemSelected (wxCommandEvent& event);
void OnListChanged ();
void OnListItemActivated (wxListEvent& event);
void OnListItemDeleted (long itemIndex);
void OnListItemDeselected (wxListEvent& event);
diff --git a/src/Main/Forms/MountOptionsDialog.cpp b/src/Main/Forms/MountOptionsDialog.cpp
index 85a06d1e..32b7ae57 100644
--- a/src/Main/Forms/MountOptionsDialog.cpp
+++ b/src/Main/Forms/MountOptionsDialog.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -32,18 +32,31 @@ namespace VeraCrypt
: MountOptionsDialogBase (parent, wxID_ANY, wxString()
#ifdef __WXGTK__ // GTK apparently needs wxRESIZE_BORDER to support dynamic resizing
, wxDefaultPosition, wxSize (-1,-1), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
#endif
), Options (options)
+#ifdef TC_UNIX
+ , m_showRedBorder(false)
+#endif
{
if (!title.empty())
this->SetTitle (title);
else if (options.Path && !options.Path->IsEmpty())
this->SetTitle (StringFormatter (LangString["ENTER_PASSWORD_FOR"], wstring (*options.Path)));
else
this->SetTitle (LangString["ENTER_TC_VOL_PASSWORD"]);
+#ifdef TC_UNIX
+ if (Gui->InsecureMountAllowed())
+ {
+ this->SetTitle (LangString["INSECURE_MODE"] + L" - " + this->GetTitle());
+ m_showRedBorder = true;
+ Bind(wxEVT_PAINT, &MountOptionsDialog::OnPaint, this);
+ Bind(wxEVT_SIZE, &MountOptionsDialog::OnSize, this);
+ }
+#endif
+
if (disableMountOptions)
OptionsButton->Show (false);
#ifdef TC_MACOSX
@@ -228,6 +241,29 @@ namespace VeraCrypt
Fit();
Layout();
MainSizer->Fit( this );
}
+
+#ifdef TC_UNIX
+ void MountOptionsDialog::OnPaint(wxPaintEvent& event)
+ {
+ wxPaintDC dc(this);
+ if (m_showRedBorder)
+ {
+ wxSize size = GetClientSize();
+ wxPen pen(*wxRED, 3); // 3 pixels width
+ dc.SetPen(pen);
+ dc.SetBrush(*wxTRANSPARENT_BRUSH);
+ dc.DrawRectangle(0, 0, size.GetWidth(), size.GetHeight());
+ }
+ event.Skip();
+ }
+
+ void MountOptionsDialog::OnSize(wxSizeEvent& event)
+ {
+ event.Skip();
+ if (m_showRedBorder)
+ Refresh();
+ }
+#endif
}
diff --git a/src/Main/Forms/MountOptionsDialog.h b/src/Main/Forms/MountOptionsDialog.h
index 6366ce85..b9bf38ea 100644
--- a/src/Main/Forms/MountOptionsDialog.h
+++ b/src/Main/Forms/MountOptionsDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -38,11 +38,20 @@ namespace VeraCrypt
void OnProtectionCheckBoxClick (wxCommandEvent& event);
void OnProtectionHyperlinkClick (wxHyperlinkEvent& event);
void OnReadOnlyCheckBoxClick (wxCommandEvent& event) { UpdateDialog(); }
void UpdateDialog ();
+#ifdef TC_UNIX
+ // Used for displaying a red border around the dialog window when insecure mode is enabled
+ void OnPaint(wxPaintEvent& event);
+ void OnSize(wxSizeEvent& event);
+#endif
+
MountOptions &Options;
+#ifdef TC_UNIX
+ bool m_showRedBorder;
+#endif
wxString OptionsButtonLabel;
VolumePasswordPanel *PasswordPanel;
VolumePasswordPanel *ProtectionPasswordPanel;
};
}
diff --git a/src/Main/Forms/NewSecurityTokenKeyfileDialog.cpp b/src/Main/Forms/NewSecurityTokenKeyfileDialog.cpp
index e52d2f60..09dfe5d5 100644
--- a/src/Main/Forms/NewSecurityTokenKeyfileDialog.cpp
+++ b/src/Main/Forms/NewSecurityTokenKeyfileDialog.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/NewSecurityTokenKeyfileDialog.h b/src/Main/Forms/NewSecurityTokenKeyfileDialog.h
index faa76283..f956462f 100644
--- a/src/Main/Forms/NewSecurityTokenKeyfileDialog.h
+++ b/src/Main/Forms/NewSecurityTokenKeyfileDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/PreferencesDialog.cpp b/src/Main/Forms/PreferencesDialog.cpp
index 91204389..4a6eaec0 100644
--- a/src/Main/Forms/PreferencesDialog.cpp
+++ b/src/Main/Forms/PreferencesDialog.cpp
@@ -2,20 +2,23 @@
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 all other portions of this file are Copyright (c) 2013-2025 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 "System.h"
#include <wx/dynlib.h>
#ifdef TC_WINDOWS
#include <wx/msw/registry.h>
+#else
+#include <wx/dir.h>
+#include <wx/arrstr.h>
#endif
#include "Common/SecurityToken.h"
#include "Main/Main.h"
#include "Main/Application.h"
#include "Main/GraphicUserInterface.h"
@@ -66,10 +69,91 @@ namespace VeraCrypt
prfInitialIndex = index;
}
}
Pkcs5PrfChoice->Select (prfInitialIndex);
+ // Language for non-Windows
+#ifndef TC_WINDOWS
+#if defined (TC_MACOSX)
+ wxDir languagesFolder(StringConverter::ToSingle (Application::GetExecutableDirectory()) + "/../Resources/languages/");
+#else
+ wxDir languagesFolder("/usr/share/veracrypt/languages/");
+#endif
+ wxArrayString langArray;
+ LanguageListBox->Append("System default");
+ LanguageListBox->Append("English");
+
+ langEntries = {
+ {"system", L"System default"},
+ {"ar", L"العربية"},
+ {"be", L"Беларуская"},
+ {"bg", L"Български"},
+ {"ca", L"Català"},
+ {"co", L"Corsu"},
+ {"cs", L"Čeština"},
+ {"da", L"Dansk"},
+ {"de", L"Deutsch"},
+ {"el", L"Ελληνικά"},
+ {"en", L"English"},
+ {"es", L"Español"},
+ {"et", L"Eesti"},
+ {"eu", L"Euskara"},
+ {"fa", L"فارسي"},
+ {"fi", L"Suomi"},
+ {"fr", L"Français"},
+ {"he", L"עברית"},
+ {"hu", L"Magyar"},
+ {"id", L"Bahasa Indonesia"},
+ {"it", L"Italiano"},
+ {"ja", L"日本語"},
+ {"ka", L"ქართული"},
+ {"ko", L"한국어"},
+ {"lv", L"Latviešu"},
+ {"nb", L"Norsk Bokmål"},
+ {"nl", L"Nederlands"},
+ {"nn", L"Norsk Nynorsk"},
+ {"pl", L"Polski"},
+ {"ro", L"Română"},
+ {"ru", L"Русский"},
+ {"pt-br", L"Português-Brasil"},
+ {"sk", L"Slovenčina"},
+ {"sl", L"Slovenščina"},
+ {"sv", L"Svenska"},
+ {"th", L"ภาษาไทย"},
+ {"tr", L"Türkçe"},
+ {"uk", L"Українська"},
+ {"uz", L"Ўзбекча"},
+ {"vi", L"Tiếng Việt"},
+ {"zh-cn", L"简体中文"},
+ {"zh-hk", L"繁體中文(香港)"},
+ {"zh-tw", L"繁體中文"}
+ };
+
+ if (wxDir::Exists(languagesFolder.GetName())) {
+ size_t langCount;
+ langCount = wxDir::GetAllFiles(languagesFolder.GetName(), &langArray, "*.xml", wxDIR_FILES);
+ for (size_t i = 0; i < langCount; ++i) {
+ wxFileName filename(langArray[i]);
+
+ // Get the name part of the file (without extension)
+ wxString basename = filename.GetName();
+
+ // Check if the basename matches the pattern "Language.langId"
+ if (basename.StartsWith("Language.")) {
+ wxString langId = basename.AfterFirst('.');
+
+ // Verify if the language ID exists in langEntries map
+ wxString langNative = langEntries[langId];
+ if (!langNative.empty()) {
+ LanguageListBox->Append(langNative);
+ }
+ }
+ }
+ }
+#endif
+
+
// Keyfiles
TC_CHECK_BOX_VALIDATOR (UseKeyfiles);
DefaultKeyfilesPanel = new KeyfilesPanel (DefaultKeyfilesPage, make_shared <KeyfileList> (Preferences.DefaultKeyfiles));
DefaultKeyfilesSizer->Add (DefaultKeyfilesPanel, 1, wxALL | wxEXPAND);
@@ -236,10 +320,19 @@ namespace VeraCrypt
if (PreferencesNotebook->GetPage (pageIndex) == page)
PreferencesNotebook->ChangeSelection (pageIndex);
}
}
+ void PreferencesDialog::OnSysDefaultLangButtonClick (wxCommandEvent& event)
+ {
+ // SetStringSelection()'s Assert currently broken in sorted ListBoxes on macOS, workaround:
+ int itemIndex = LanguageListBox->FindString("System default", true);
+ if (itemIndex != wxNOT_FOUND) {
+ LanguageListBox->SetSelection(itemIndex);
+ }
+ }
+
void PreferencesDialog::OnAssignHotkeyButtonClick (wxCommandEvent& event)
{
#ifdef TC_WINDOWS
foreach (long item, Gui->GetListCtrlSelectedItems (HotkeyListCtrl))
{
@@ -326,23 +419,23 @@ namespace VeraCrypt
}
void PreferencesDialog::OnDismountOnPowerSavingCheckBoxClick (wxCommandEvent& event)
{
if (event.IsChecked() && !ForceAutoDismountCheckBox->IsChecked())
- Gui->ShowWarning ("WARN_PREF_AUTO_DISMOUNT");
+ Gui->ShowWarning ("WARN_PREF_AUTO_UNMOUNT");
}
void PreferencesDialog::OnDismountOnScreenSaverCheckBoxClick (wxCommandEvent& event)
{
if (event.IsChecked() && !ForceAutoDismountCheckBox->IsChecked())
- Gui->ShowWarning ("WARN_PREF_AUTO_DISMOUNT");
+ Gui->ShowWarning ("WARN_PREF_AUTO_UNMOUNT");
}
void PreferencesDialog::OnForceAutoDismountCheckBoxClick (wxCommandEvent& event)
{
if (!event.IsChecked())
- ForceAutoDismountCheckBox->SetValue (!Gui->AskYesNo (LangString["CONFIRM_NO_FORCED_AUTODISMOUNT"], false, true));
+ ForceAutoDismountCheckBox->SetValue (!Gui->AskYesNo (LangString["CONFIRM_NO_FORCED_AUTOUNMOUNT"], false, true));
}
void PreferencesDialog::OnHotkeyListItemDeselected (wxListEvent& event)
{
UpdateHotkeyButtons();
@@ -353,10 +446,17 @@ namespace VeraCrypt
UpdateHotkeyButtons();
HotkeyTextCtrl->ChangeValue (LangString ["PRESS_A_KEY_TO_ASSIGN"]);
AssignHotkeyButton->Enable (false);
}
+ // Fixes an issue where going through PreferencesNotebook tabs would unintentionally select the first entry
+ // in the LanguageListBox and thus cause a language change on OKButton press.
+ void PreferencesDialog::OnPageChanged(wxBookCtrlEvent &event)
+ {
+ LanguageListBox->DeselectAll();
+ }
+
void PreferencesDialog::OnOKButtonClick (wxCommandEvent& event)
{
#ifdef TC_WINDOWS
HotkeyTextCtrl->SetValidator (wxTextValidator (wxFILTER_NONE));
#endif
@@ -386,10 +486,23 @@ namespace VeraCrypt
Preferences.DefaultMountOptions.ProtectionKdf = selectedKdf;
bool securityTokenModuleChanged = (Preferences.SecurityTokenModule != wstring (Pkcs11ModulePathTextCtrl->GetValue()));
Preferences.SecurityTokenModule = wstring (Pkcs11ModulePathTextCtrl->GetValue());
+ if (LanguageListBox->GetSelection() != wxNOT_FOUND) {
+ wxString langToFind = LanguageListBox->GetString(LanguageListBox->GetSelection());
+ for (map<wxString, std::wstring>::const_iterator each = langEntries.begin(); each != langEntries.end(); ++each) {
+ if (each->second == langToFind) {
+ Preferences.Language = each->first;
+#ifdef DEBUG
+ cout << "Lang set to: " << each->first << endl;
+#endif
+ }
+ }
+ Gui->ShowInfo (LangString["LINUX_RESTART_FOR_LANGUAGE_CHANGE"]);
+ }
+
Gui->SetPreferences (Preferences);
try
{
if (securityTokenModuleChanged)
diff --git a/src/Main/Forms/PreferencesDialog.h b/src/Main/Forms/PreferencesDialog.h
index 0cd1482a..8e1e7363 100644
--- a/src/Main/Forms/PreferencesDialog.h
+++ b/src/Main/Forms/PreferencesDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -38,13 +38,15 @@ namespace VeraCrypt
void OnHotkeyListItemDeselected (wxListEvent& event);
void OnHotkeyListItemSelected (wxListEvent& event);
void OnNoHardwareCryptoCheckBoxClick (wxCommandEvent& event);
void OnNoKernelCryptoCheckBoxClick (wxCommandEvent& event);
void OnOKButtonClick (wxCommandEvent& event);
+ void OnPageChanged (wxBookCtrlEvent& event);
void OnPreserveTimestampsCheckBoxClick (wxCommandEvent& event);
void OnRemoveHotkeyButtonClick (wxCommandEvent& event);
void OnSelectPkcs11ModuleButtonClick (wxCommandEvent& event);
+ void OnSysDefaultLangButtonClick (wxCommandEvent& event);
void OnTimer ();
void UpdateHotkeyButtons();
enum
{
@@ -56,9 +58,10 @@ namespace VeraCrypt
int LastVirtualKeyPressed;
unique_ptr <wxTimer> mTimer;
UserPreferences Preferences;
bool RestoreValidatorBell;
HotkeyList UnregisteredHotkeys;
+ map<wxString, wstring> langEntries;
};
}
#endif // TC_HEADER_Main_Forms_PreferencesDialog
diff --git a/src/Main/Forms/ProgressWizardPage.cpp b/src/Main/Forms/ProgressWizardPage.cpp
index a827b718..83c32ba9 100644
--- a/src/Main/Forms/ProgressWizardPage.cpp
+++ b/src/Main/Forms/ProgressWizardPage.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/ProgressWizardPage.h b/src/Main/Forms/ProgressWizardPage.h
index 34f5cf4d..6a7a732c 100644
--- a/src/Main/Forms/ProgressWizardPage.h
+++ b/src/Main/Forms/ProgressWizardPage.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/RandomPoolEnrichmentDialog.cpp b/src/Main/Forms/RandomPoolEnrichmentDialog.cpp
index e5ef160b..3fc2e113 100644
--- a/src/Main/Forms/RandomPoolEnrichmentDialog.cpp
+++ b/src/Main/Forms/RandomPoolEnrichmentDialog.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -61,16 +61,16 @@ namespace VeraCrypt
void RandomPoolEnrichmentDialog::OnMouseMotion (wxMouseEvent& event)
{
event.Skip();
- RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&event), sizeof (event)));
+ RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&event), sizeof (event)));
long coord = event.GetX();
- RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord)));
+ RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&coord), sizeof (coord)));
coord = event.GetY();
- RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord)));
+ RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&coord), sizeof (coord)));
if (ShowRandomPoolCheckBox->IsChecked())
ShowBytes (RandomPoolStaticText, RandomNumberGenerator::PeekPool().GetRange (0, 24));
else
HideBytes (RandomPoolStaticText, 24);
diff --git a/src/Main/Forms/RandomPoolEnrichmentDialog.h b/src/Main/Forms/RandomPoolEnrichmentDialog.h
index a29109f1..2b2745e3 100644
--- a/src/Main/Forms/RandomPoolEnrichmentDialog.h
+++ b/src/Main/Forms/RandomPoolEnrichmentDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/SecurityTokenKeyfilesDialog.cpp b/src/Main/Forms/SecurityTokenKeyfilesDialog.cpp
index 8f51cfa8..19eb196d 100644
--- a/src/Main/Forms/SecurityTokenKeyfilesDialog.cpp
+++ b/src/Main/Forms/SecurityTokenKeyfilesDialog.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -101,11 +101,11 @@ namespace VeraCrypt
if (!files.empty())
{
wxBusyCursor busy;
- vector <byte> keyfileData;
+ vector <uint8> keyfileData;
keyfile->GetKeyfileData (keyfileData);
BufferPtr keyfileDataBuf (&keyfileData.front(), keyfileData.size());
finally_do_arg (BufferPtr, keyfileDataBuf, { finally_arg.Erase(); });
@@ -139,11 +139,11 @@ namespace VeraCrypt
File keyfile;
keyfile.Open (keyfilePath, File::OpenRead, File::ShareReadWrite, File::PreserveTimestamps);
if (keyfile.Length() > 0)
{
- vector <byte> keyfileData (keyfile.Length());
+ vector <uint8> keyfileData (keyfile.Length());
BufferPtr keyfileDataBuf (&keyfileData.front(), keyfileData.size());
keyfile.ReadCompleteBuffer (keyfileDataBuf);
finally_do_arg (BufferPtr, keyfileDataBuf, { finally_arg.Erase(); });
diff --git a/src/Main/Forms/SecurityTokenKeyfilesDialog.h b/src/Main/Forms/SecurityTokenKeyfilesDialog.h
index 92119e1e..ec6bafdb 100644
--- a/src/Main/Forms/SecurityTokenKeyfilesDialog.h
+++ b/src/Main/Forms/SecurityTokenKeyfilesDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/SelectDirectoryWizardPage.cpp b/src/Main/Forms/SelectDirectoryWizardPage.cpp
index a81b9fea..1831996a 100644
--- a/src/Main/Forms/SelectDirectoryWizardPage.cpp
+++ b/src/Main/Forms/SelectDirectoryWizardPage.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/SelectDirectoryWizardPage.h b/src/Main/Forms/SelectDirectoryWizardPage.h
index 39517c56..069fab5f 100644
--- a/src/Main/Forms/SelectDirectoryWizardPage.h
+++ b/src/Main/Forms/SelectDirectoryWizardPage.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/SingleChoiceWizardPage.h b/src/Main/Forms/SingleChoiceWizardPage.h
index 2398672d..2f137583 100644
--- a/src/Main/Forms/SingleChoiceWizardPage.h
+++ b/src/Main/Forms/SingleChoiceWizardPage.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/TrueCrypt.fbp b/src/Main/Forms/TrueCrypt.fbp
index 498b6f83..3c911652 100644
--- a/src/Main/Forms/TrueCrypt.fbp
+++ b/src/Main/Forms/TrueCrypt.fbp
@@ -466,10 +466,24 @@
<property name="checked">0</property>
<property name="enabled">1</property>
<property name="help"></property>
<property name="id">wxID_ANY</property>
<property name="kind">wxITEM_NORMAL</property>
+ <property name="label">IDM_LANGUAGE</property>
+ <property name="name">LanguageMenuItem</property>
+ <property name="permission">none</property>
+ <property name="shortcut"></property>
+ <property name="unchecked_bitmap"></property>
+ <event name="OnMenuSelection">OnLanguageMenuItemSelected</event>
+ </object>
+ <object class="wxMenuItem" expanded="0">
+ <property name="bitmap"></property>
+ <property name="checked">0</property>
+ <property name="enabled">1</property>
+ <property name="help"></property>
+ <property name="id">wxID_ANY</property>
+ <property name="kind">wxITEM_NORMAL</property>
<property name="label">IDM_HOTKEY_SETTINGS</property>
<property name="name">HotkeysMenuItem</property>
<property name="permission">protected</property>
<property name="shortcut"></property>
<property name="unchecked_bitmap"></property>
@@ -10862,10 +10876,11 @@
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
+ <event name="OnNotebookPageChanged">OnPageChanged</event>
<object class="notebookpage" expanded="0">
<property name="bitmap"></property>
<property name="label">LINUX_PREF_TAB_SECURITY</property>
<property name="select">1</property>
<object class="wxPanel" expanded="0">
@@ -10937,11 +10952,11 @@
<property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="0">
<property name="id">wxID_ANY</property>
- <property name="label">IDT_AUTO_DISMOUNT</property>
+ <property name="label">IDT_AUTO_UNMOUNT</property>
<property name="minimum_size"></property>
<property name="name">AutoDismountSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">protected</property>
@@ -10949,11 +10964,11 @@
<property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="0">
<property name="id">wxID_ANY</property>
- <property name="label">LINUX_DISMOUNT_ALL_WHEN</property>
+ <property name="label">LINUX_UNMOUNT_ALL_WHEN</property>
<property name="minimum_size"></property>
<property name="name">sbSizer13</property>
<property name="orient">wxVERTICAL</property>
<property name="parent">1</property>
<property name="permission">none</property>
@@ -10988,11 +11003,11 @@
<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_PREF_DISMOUNT_LOGOFF</property>
+ <property name="label">IDC_PREF_UNMOUNT_LOGOFF</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>
@@ -11052,11 +11067,11 @@
<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_PREF_DISMOUNT_SCREENSAVER</property>
+ <property name="label">IDC_PREF_UNMOUNT_SCREENSAVER</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>
@@ -11193,11 +11208,11 @@
<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_PREF_DISMOUNT_INACTIVE</property>
+ <property name="label">IDC_PREF_UNMOUNT_INACTIVE</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>
@@ -11382,11 +11397,11 @@
<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_PREF_FORCE_AUTO_DISMOUNT</property>
+ <property name="label">IDC_PREF_FORCE_AUTO_UNMOUNT</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>
@@ -11604,11 +11619,11 @@
<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_PREF_WIPE_CACHE_ON_AUTODISMOUNT</property>
+ <property name="label">IDC_PREF_WIPE_CACHE_ON_AUTOUNMOUNT</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>
@@ -12598,11 +12613,11 @@
<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">TASKICON_PREF_DISMOUNT_VOL</property>
+ <property name="label">TASKICON_PREF_UNMOUNT_VOL</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>
@@ -13022,11 +13037,11 @@
<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">LINUX_CLOSE_EXPL_ON_DISMOUNT</property>
+ <property name="label">LINUX_CLOSE_EXPL_ON_UNMOUNT</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>
@@ -14830,11 +14845,11 @@
<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">LINUX_CONFIRM_AFTER_DISMOUNT</property>
+ <property name="label">LINUX_CONFIRM_AFTER_UNMOUNT</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>
@@ -14870,10 +14885,513 @@
</object>
</object>
</object>
</object>
</object>
+ <object class="notebookpage" expanded="0">
+ <property name="bitmap"></property>
+ <property name="label">LINUX_LANGUAGE</property>
+ <property name="select">0</property>
+ <object class="wxPanel" 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="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="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">LanguagesPage</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">public</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="subclass">; ; forward_declare</property>
+ <property name="toolbar_pane">0</property>
+ <property name="tooltip"></property>
+ <property name="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style">wxTAB_TRAVERSAL</property>
+ <object class="wxBoxSizer" expanded="0">
+ <property name="minimum_size"></property>
+ <property name="name">bSizer170</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="wxBoxSizer" expanded="0">
+ <property name="minimum_size"></property>
+ <property name="name">bSizer171</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="wxBoxSizer" expanded="0">
+ <property name="minimum_size"></property>
+ <property name="name">bSizer173</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALL|wxEXPAND</property>
+ <property name="proportion">1</property>
+ <object class="wxStaticBoxSizer" expanded="0">
+ <property name="id">wxID_ANY</property>
+ <property name="label">LINUX_LANGUAGE</property>
+ <property name="minimum_size"></property>
+ <property name="name">sbSizer49</property>
+ <property name="orient">wxVERTICAL</property>
+ <property name="parent">1</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxBOTTOM</property>
+ <property name="proportion">0</property>
+ <object class="wxBoxSizer" expanded="0">
+ <property name="minimum_size"></property>
+ <property name="name">bSizer174</property>
+ <property name="orient">wxHORIZONTAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxLEFT|wxTOP</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" 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="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">IDT_ACTIVE_LANG_PACK</property>
+ <property name="markup">0</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">m_staticText73</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="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <property name="wrap">-1</property>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxLEFT|wxRIGHT|wxTOP</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" 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="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">CURRENT_LANGUAGE_PACK</property>
+ <property name="markup">0</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">m_staticText74</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="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <property name="wrap">-1</property>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag"></property>
+ <property name="proportion">0</property>
+ <object class="wxWrapSizer" expanded="0">
+ <property name="flags">wxWRAPSIZER_DEFAULT_FLAGS</property>
+ <property name="minimum_size"></property>
+ <property name="name">wSizer1</property>
+ <property name="orient">wxHORIZONTAL</property>
+ <property name="permission">none</property>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxBOTTOM|wxLEFT</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" 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="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">IDT_LANGPACK_AUTHORS</property>
+ <property name="markup">0</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">m_staticText72</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="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <property name="wrap">-1</property>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT</property>
+ <property name="proportion">0</property>
+ <object class="wxStaticText" 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="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">LANGUAGE_TRANSLATORS</property>
+ <property name="markup">0</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">m_staticText71</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="window_extra_style"></property>
+ <property name="window_name"></property>
+ <property name="window_style"></property>
+ <property name="wrap">-1</property>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxEXPAND|wxLEFT|wxRIGHT|wxTOP</property>
+ <property name="proportion">1</property>
+ <object class="wxListBox" 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="choices"></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="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">-1,-1</property>
+ <property name="moveable">1</property>
+ <property name="name">LanguageListBox</property>
+ <property name="pane_border">1</property>
+ <property name="pane_position"></property>
+ <property name="pane_size"></property>
+ <property name="permission">public</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">wxLB_SINGLE|wxLB_SORT</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>
+ </object>
+ </object>
+ <object class="sizeritem" expanded="0">
+ <property name="border">5</property>
+ <property name="flag">wxALIGN_BOTTOM|wxALL|wxEXPAND</property>
+ <property name="proportion">0</property>
+ <object class="wxButton" 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="auth_needed">0</property>
+ <property name="best_size"></property>
+ <property name="bg"></property>
+ <property name="bitmap"></property>
+ <property name="caption"></property>
+ <property name="caption_visible">1</property>
+ <property name="center_pane">0</property>
+ <property name="close_button">1</property>
+ <property name="context_help"></property>
+ <property name="context_menu">1</property>
+ <property name="current"></property>
+ <property name="default">0</property>
+ <property name="default_pane">0</property>
+ <property name="disabled"></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="focus"></property>
+ <property name="font"></property>
+ <property name="gripper">0</property>
+ <property name="hidden">0</property>
+ <property name="id">wxID_ANY</property>
+ <property name="label">LINUX_SELECT_SYS_DEFAULT_LANG</property>
+ <property name="margins"></property>
+ <property name="markup">0</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">SysDefaultLangButton</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="position"></property>
+ <property name="pressed"></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="OnButtonClick">OnSysDefaultLangButtonClick</event>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
@@ -17268,11 +17786,11 @@
<property name="name">bSizer137</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
- <property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
+ <property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxTOP</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -17342,11 +17860,11 @@
<event name="OnButtonClick">OnAddFilesButtonClick</event>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
- <property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
+ <property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxTOP</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -17416,11 +17934,11 @@
<event name="OnButtonClick">OnAddDirectoryButtonClick</event>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
- <property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
+ <property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxTOP</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -17490,11 +18008,11 @@
<event name="OnButtonClick">OnAddSecurityTokenSignatureButtonClick</event>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
- <property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
+ <property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxTOP</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -17564,11 +18082,11 @@
<event name="OnButtonClick">OnRemoveButtonClick</event>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
- <property name="flag">wxEXPAND|wxALL</property>
+ <property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@@ -22207,48 +22725,48 @@
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property>
- <object class="wxBoxSizer" expanded="1">
+ <object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property>
<property name="name">bSizer98</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
- <object class="wxBoxSizer" expanded="1">
+ <object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property>
<property name="name">bSizer99</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
- <object class="spacer" expanded="1">
+ <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="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
- <object class="wxBoxSizer" expanded="1">
+ <object class="wxBoxSizer" expanded="0">
<property name="minimum_size"></property>
<property name="name">bSizer100</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
- <object class="wxTextCtrl" expanded="1">
+ <object class="wxTextCtrl" 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>
@@ -22305,15 +22823,15 @@
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnText">OnVolumeSizeTextChanged</event>
</object>
</object>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
- <object class="wxChoice" expanded="1">
+ <object class="wxChoice" 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>
@@ -22372,21 +22890,21 @@
<event name="OnChoice">OnVolumeSizePrefixSelected</event>
</object>
</object>
</object>
</object>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
- <object class="spacer" expanded="1">
+ <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="1">
+ <object class="sizeritem" expanded="0">
<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>
@@ -22461,11 +22979,11 @@
</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">
+ <object class="wxStaticText" 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>
@@ -22518,25 +23036,25 @@
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
- <object class="sizeritem" expanded="1">
+ <object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
- <object class="spacer" expanded="1">
+ <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="1">
+ <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">
+ <object class="wxStaticText" 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>
diff --git a/src/Main/Forms/VolumeCreationProgressWizardPage.cpp b/src/Main/Forms/VolumeCreationProgressWizardPage.cpp
index 5739949c..9afb19c7 100644
--- a/src/Main/Forms/VolumeCreationProgressWizardPage.cpp
+++ b/src/Main/Forms/VolumeCreationProgressWizardPage.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/VolumeCreationProgressWizardPage.h b/src/Main/Forms/VolumeCreationProgressWizardPage.h
index fad4ac93..d3484aef 100644
--- a/src/Main/Forms/VolumeCreationProgressWizardPage.h
+++ b/src/Main/Forms/VolumeCreationProgressWizardPage.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/VolumeCreationWizard.cpp b/src/Main/Forms/VolumeCreationWizard.cpp
index 2653ff66..bbf9fe0d 100644
--- a/src/Main/Forms/VolumeCreationWizard.cpp
+++ b/src/Main/Forms/VolumeCreationWizard.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -35,10 +35,23 @@
#include "VolumeSizeWizardPage.h"
#include "WaitDialog.h"
namespace VeraCrypt
{
+ class OpenOuterVolumeFunctor : public Functor
+ {
+ public:
+ OpenOuterVolumeFunctor (const DirectoryPath &outerVolumeMountPoint) : OuterVolumeMountPoint (outerVolumeMountPoint) { }
+
+ virtual void operator() ()
+ {
+ Gui->OpenExplorerWindow (OuterVolumeMountPoint);
+ }
+
+ DirectoryPath OuterVolumeMountPoint;
+ };
+
#ifdef TC_MACOSX
bool VolumeCreationWizard::ProcessEvent(wxEvent& event)
{
if(GraphicUserInterface::HandlePasswordEntryCustomEvent (event))
@@ -336,22 +349,10 @@ namespace VeraCrypt
Close();
return new InfoWizardPage (GetPageParent());
}
- struct OpenOuterVolumeFunctor : public Functor
- {
- OpenOuterVolumeFunctor (const DirectoryPath &outerVolumeMountPoint) : OuterVolumeMountPoint (outerVolumeMountPoint) { }
-
- virtual void operator() ()
- {
- Gui->OpenExplorerWindow (OuterVolumeMountPoint);
- }
-
- DirectoryPath OuterVolumeMountPoint;
- };
-
InfoWizardPage *page = new InfoWizardPage (GetPageParent(), LangString["LINUX_OPEN_OUTER_VOL"],
shared_ptr <Functor> (new OpenOuterVolumeFunctor (MountedOuterVolume->MountPoint)));
page->SetPageTitle (LangString["HIDVOL_HOST_FILLING_TITLE"]);
@@ -388,16 +389,16 @@ namespace VeraCrypt
void VolumeCreationWizard::OnMouseMotion (wxMouseEvent& event)
{
event.Skip();
if (!IsWorkInProgress() && RandomNumberGenerator::IsRunning())
{
- RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&event), sizeof (event)));
+ RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&event), sizeof (event)));
long coord = event.GetX();
- RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord)));
+ RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&coord), sizeof (coord)));
coord = event.GetY();
- RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord)));
+ RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&coord), sizeof (coord)));
VolumeCreationProgressWizardPage *page = dynamic_cast <VolumeCreationProgressWizardPage *> (GetCurrentPage());
if (page)
{
page->IncrementEntropyProgress ();
@@ -440,11 +441,11 @@ namespace VeraCrypt
void VolumeCreationWizard::OnRandomPoolUpdateTimer ()
{
if (!IsWorkInProgress())
{
wxLongLong time = wxGetLocalTimeMillis();
- RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&time), sizeof (time)));
+ RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <uint8 *> (&time), sizeof (time)));
}
}
void VolumeCreationWizard::OnVolumeCreatorFinished ()
{
@@ -619,11 +620,11 @@ namespace VeraCrypt
if (forward)
{
if (Core->IsVolumeMounted (SelectedVolumePath))
{
- Gui->ShowInfo ("DISMOUNT_FIRST");
+ Gui->ShowInfo ("UNMOUNT_FIRST");
return GetCurrentStep();
}
if (SelectedVolumePath.IsDevice())
{
@@ -973,11 +974,11 @@ namespace VeraCrypt
if (SelectedVolumeType != VolumeType::Hidden || OuterVolume)
{
if (OuterVolume && VolumeSize > TC_MAX_FAT_SECTOR_COUNT * SectorSize)
{
uint64 limit = TC_MAX_FAT_SECTOR_COUNT * SectorSize / BYTES_PER_TB;
- wstring err = StringFormatter (LangString["LINUX_ERROR_SIZE_HIDDEN_VOL"], limit, limit * 1024);
+ wstring err = static_cast<wstring>(StringFormatter (LangString["LINUX_ERROR_SIZE_HIDDEN_VOL"], limit, limit * 1024));
if (SectorSize < 4096)
{
err += LangString["LINUX_MAX_SIZE_HINT"];
#if defined (TC_LINUX)
diff --git a/src/Main/Forms/VolumeCreationWizard.h b/src/Main/Forms/VolumeCreationWizard.h
index fd4b3e06..9cae5899 100644
--- a/src/Main/Forms/VolumeCreationWizard.h
+++ b/src/Main/Forms/VolumeCreationWizard.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/VolumeFormatOptionsWizardPage.cpp b/src/Main/Forms/VolumeFormatOptionsWizardPage.cpp
index 8d632059..5c2a087f 100644
--- a/src/Main/Forms/VolumeFormatOptionsWizardPage.cpp
+++ b/src/Main/Forms/VolumeFormatOptionsWizardPage.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/VolumeFormatOptionsWizardPage.h b/src/Main/Forms/VolumeFormatOptionsWizardPage.h
index b38f6e99..b9c21882 100644
--- a/src/Main/Forms/VolumeFormatOptionsWizardPage.h
+++ b/src/Main/Forms/VolumeFormatOptionsWizardPage.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/VolumeLocationWizardPage.cpp b/src/Main/Forms/VolumeLocationWizardPage.cpp
index 313d7fee..f1a6eb43 100644
--- a/src/Main/Forms/VolumeLocationWizardPage.cpp
+++ b/src/Main/Forms/VolumeLocationWizardPage.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/VolumeLocationWizardPage.h b/src/Main/Forms/VolumeLocationWizardPage.h
index 17ed39c2..709ab0b4 100644
--- a/src/Main/Forms/VolumeLocationWizardPage.h
+++ b/src/Main/Forms/VolumeLocationWizardPage.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/VolumePasswordPanel.cpp b/src/Main/Forms/VolumePasswordPanel.cpp
index 32b92edc..7247c3ed 100644
--- a/src/Main/Forms/VolumePasswordPanel.cpp
+++ b/src/Main/Forms/VolumePasswordPanel.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -170,13 +170,11 @@ namespace VeraCrypt
UseKeyfilesCheckBox->SetValue (true);
}
void VolumePasswordPanel::SetPimValidator ()
{
- wxTextValidator validator (wxFILTER_INCLUDE_CHAR_LIST); // wxFILTER_NUMERIC does not exclude - . , etc.
- const wxChar *valArr[] = { L"0", L"1", L"2", L"3", L"4", L"5", L"6", L"7", L"8", L"9" };
- validator.SetIncludes (wxArrayString (array_capacity (valArr), (const wxChar **) &valArr));
+ wxTextValidator validator (wxFILTER_DIGITS);
VolumePimTextCtrl->SetValidator (validator);
}
void VolumePasswordPanel::DisplayPassword (bool display, wxTextCtrl **textCtrl, int row)
{
@@ -214,11 +212,11 @@ namespace VeraCrypt
shared_ptr <VolumePassword> VolumePasswordPanel::GetPassword (wxTextCtrl *textCtrl, bool bLegacyPassword) const
{
shared_ptr <VolumePassword> password;
wchar_t passwordBuf[VolumePassword::MaxSize + 1];
size_t maxPasswordLength = (bLegacyPassword || CmdLine->ArgUseLegacyPassword)? VolumePassword::MaxLegacySize: VolumePassword::MaxSize;
- finally_do_arg (BufferPtr, BufferPtr (reinterpret_cast <byte *> (passwordBuf), sizeof (passwordBuf)), { finally_arg.Erase(); });
+ finally_do_arg (BufferPtr, BufferPtr (reinterpret_cast <uint8 *> (passwordBuf), sizeof (passwordBuf)), { finally_arg.Erase(); });
#ifdef TC_WINDOWS
int len = GetWindowText (static_cast <HWND> (textCtrl->GetHandle()), passwordBuf, VolumePassword::MaxSize + 1);
password = ToUTF8Password (passwordBuf, len, maxPasswordLength);
#else
@@ -465,10 +463,11 @@ namespace VeraCrypt
wxWindow* layoutParent = TopOwnerParent? TopOwnerParent : GetParent();
PimCheckBox->Show (false);
VolumePimStaticText->Show (true);
VolumePimTextCtrl->Show (true);
VolumePimHelpStaticText->Show (true);
+ VolumePimTextCtrl->SetFocus();
if (DisplayPasswordCheckBox->IsChecked ())
DisplayPassword (true, &VolumePimTextCtrl, 3);
else
{
diff --git a/src/Main/Forms/VolumePasswordPanel.h b/src/Main/Forms/VolumePasswordPanel.h
index 7019e8fd..23180399 100644
--- a/src/Main/Forms/VolumePasswordPanel.h
+++ b/src/Main/Forms/VolumePasswordPanel.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/VolumePasswordWizardPage.cpp b/src/Main/Forms/VolumePasswordWizardPage.cpp
index 859a613a..4f848896 100644
--- a/src/Main/Forms/VolumePasswordWizardPage.cpp
+++ b/src/Main/Forms/VolumePasswordWizardPage.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/VolumePasswordWizardPage.h b/src/Main/Forms/VolumePasswordWizardPage.h
index 525db216..128b76a3 100644
--- a/src/Main/Forms/VolumePasswordWizardPage.h
+++ b/src/Main/Forms/VolumePasswordWizardPage.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/VolumePimWizardPage.cpp b/src/Main/Forms/VolumePimWizardPage.cpp
index c4f7014b..6500affb 100644
--- a/src/Main/Forms/VolumePimWizardPage.cpp
+++ b/src/Main/Forms/VolumePimWizardPage.cpp
@@ -21,10 +21,11 @@
namespace VeraCrypt
{
VolumePimWizardPage::VolumePimWizardPage (wxPanel* parent)
: VolumePimWizardPageBase (parent)
{
+ VolumePimTextCtrl->SetMinSize (wxSize (Gui->GetCharWidth (VolumePimTextCtrl) * 15, -1));
SetPimValidator ();
}
VolumePimWizardPage::~VolumePimWizardPage ()
{
@@ -89,13 +90,11 @@ namespace VeraCrypt
Layout();
}
void VolumePimWizardPage::SetPimValidator ()
{
- wxTextValidator validator (wxFILTER_INCLUDE_CHAR_LIST); // wxFILTER_NUMERIC does not exclude - . , etc.
- const wxChar *valArr[] = { L"0", L"1", L"2", L"3", L"4", L"5", L"6", L"7", L"8", L"9" };
- validator.SetIncludes (wxArrayString (array_capacity (valArr), (const wxChar **) &valArr));
+ wxTextValidator validator (wxFILTER_DIGITS);
VolumePimTextCtrl->SetValidator (validator);
}
void VolumePimWizardPage::OnDisplayPimCheckBoxClick( wxCommandEvent& event )
{
diff --git a/src/Main/Forms/VolumePropertiesDialog.cpp b/src/Main/Forms/VolumePropertiesDialog.cpp
index 3bba33bc..c0c944ae 100644
--- a/src/Main/Forms/VolumePropertiesDialog.cpp
+++ b/src/Main/Forms/VolumePropertiesDialog.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/VolumePropertiesDialog.h b/src/Main/Forms/VolumePropertiesDialog.h
index 277c8290..05dc490a 100644
--- a/src/Main/Forms/VolumePropertiesDialog.h
+++ b/src/Main/Forms/VolumePropertiesDialog.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/VolumeSizeWizardPage.cpp b/src/Main/Forms/VolumeSizeWizardPage.cpp
index 83fdd40f..5d4f5e82 100644
--- a/src/Main/Forms/VolumeSizeWizardPage.cpp
+++ b/src/Main/Forms/VolumeSizeWizardPage.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -71,13 +71,11 @@ namespace VeraCrypt
}
}
VolumeSizeTextCtrl->SetMinSize (wxSize (Gui->GetCharWidth (VolumeSizeTextCtrl) * 20, -1));
- wxTextValidator validator (wxFILTER_INCLUDE_CHAR_LIST); // wxFILTER_NUMERIC does not exclude - . , etc.
- const wxChar *valArr[] = { L"0", L"1", L"2", L"3", L"4", L"5", L"6", L"7", L"8", L"9" };
- validator.SetIncludes (wxArrayString (array_capacity (valArr), (const wxChar **) &valArr));
+ wxTextValidator validator (wxFILTER_DIGITS);
VolumeSizeTextCtrl->SetValidator (validator);
}
uint64 VolumeSizeWizardPage::GetVolumeSize () const
{
diff --git a/src/Main/Forms/VolumeSizeWizardPage.h b/src/Main/Forms/VolumeSizeWizardPage.h
index 754bd691..e2d928e6 100644
--- a/src/Main/Forms/VolumeSizeWizardPage.h
+++ b/src/Main/Forms/VolumeSizeWizardPage.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/WaitDialog.cpp b/src/Main/Forms/WaitDialog.cpp
index d53656f9..2489a17b 100644
--- a/src/Main/Forms/WaitDialog.cpp
+++ b/src/Main/Forms/WaitDialog.cpp
@@ -1,15 +1,18 @@
/*
- Copyright (c) 2013-2017 IDRIX. All rights reserved.
+ Copyright (c) 2013-2025 IDRIX. All rights reserved.
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 "System.h"
#include "Volume/EncryptionModeXTS.h"
+#ifdef WOLFCRYPT_BACKEND
+#include "Volume/EncryptionModeWolfCryptXTS.h"
+#endif
#include "Main/GraphicUserInterface.h"
#include "Common/PCSCException.h"
#include "Common/SecurityToken.h"
#include "WaitDialog.h"
@@ -112,8 +115,11 @@ namespace VeraCrypt
VC_CONVERT_EXCEPTION (EMVCPLCNotFound);
VC_CONVERT_EXCEPTION (InvalidEMVPath);
VC_CONVERT_EXCEPTION (EMVKeyfileDataNotFound);
VC_CONVERT_EXCEPTION (EMVPANNotFound);
+ VC_CONVERT_EXCEPTION (MountPointBlocked);
+ VC_CONVERT_EXCEPTION (MountPointNotAllowed);
+
throw *ex;
}
}
diff --git a/src/Main/Forms/WaitDialog.h b/src/Main/Forms/WaitDialog.h
index 89de8718..fd3a80be 100644
--- a/src/Main/Forms/WaitDialog.h
+++ b/src/Main/Forms/WaitDialog.h
@@ -1,7 +1,7 @@
/*
- Copyright (c) 2013-2018 IDRIX. All rights reserved.
+ Copyright (c) 2013-2025 IDRIX. All rights reserved.
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.
*/
@@ -78,11 +78,11 @@ namespace VeraCrypt
m_thread->Run();
m_timer.Start(100);
m_bThreadRunning = true;
}
- int GetCharWidth (wxWindow *window) const
+ static int ComputeCharWidth (wxWindow *window)
{
int width;
int height;
window->GetTextExtent (L"a", &width, &height);
@@ -177,11 +177,11 @@ namespace VeraCrypt
void OnPinRequest(wxCommandEvent &e)
{
wxPasswordEntryDialog dialog (this, wxString::Format (LangString["ENTER_TOKEN_PASSWORD"], e.GetString()), LangString["IDD_TOKEN_PASSWORD"]);
- dialog.SetSize (wxSize (GetCharWidth (&dialog) * 50, -1));
+ dialog.SetSize (wxSize (ComputeCharWidth (&dialog) * 50, -1));
if (dialog.ShowModal() != wxID_OK)
m_queue.Post(wxT(""));
else
m_queue.Post(dialog.GetValue());
diff --git a/src/Main/Forms/WizardFrame.cpp b/src/Main/Forms/WizardFrame.cpp
index 1a6d1eea..298de6ae 100644
--- a/src/Main/Forms/WizardFrame.cpp
+++ b/src/Main/Forms/WizardFrame.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/WizardFrame.h b/src/Main/Forms/WizardFrame.h
index 86a53957..c5ea5950 100644
--- a/src/Main/Forms/WizardFrame.h
+++ b/src/Main/Forms/WizardFrame.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Forms/WizardPage.h b/src/Main/Forms/WizardPage.h
index 1bc5b82e..b6b1ca81 100644
--- a/src/Main/Forms/WizardPage.h
+++ b/src/Main/Forms/WizardPage.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp
index 16db8f83..75b326e5 100644
--- a/src/Main/GraphicUserInterface.cpp
+++ b/src/Main/GraphicUserInterface.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -35,10 +35,36 @@
#include "Forms/RandomPoolEnrichmentDialog.h"
#include "Forms/SecurityTokenKeyfilesDialog.h"
namespace VeraCrypt
{
+ class AdminPasswordGUIRequestHandler : public GetStringFunctor
+ {
+ public:
+ virtual void operator() (string &passwordStr)
+ {
+
+ wxString sValue;
+ if (Gui->GetWaitDialog())
+ {
+ Gui->GetWaitDialog()->RequestAdminPassword(sValue);
+ if (sValue.IsEmpty())
+ throw UserAbort (SRC_POS);
+ }
+ else
+ {
+ wxPasswordEntryDialog dialog (Gui->GetActiveWindow(), LangString["LINUX_ADMIN_PW_QUERY"], LangString["LINUX_ADMIN_PW_QUERY_TITLE"]);
+ if (dialog.ShowModal() != wxID_OK)
+ throw UserAbort (SRC_POS);
+ sValue = dialog.GetValue();
+ }
+ wstring wPassword (sValue); // A copy of the password is created here by wxWidgets, which cannot be erased
+ finally_do_arg (wstring *, &wPassword, { StringConverter::Erase (*finally_arg); });
+
+ StringConverter::ToSingle (wPassword, passwordStr);
+ }
+ };
#ifdef TC_MACOSX
int GraphicUserInterface::g_customIdCmdV = 0;
int GraphicUserInterface::g_customIdCmdA = 0;
#endif
@@ -129,11 +155,11 @@ namespace VeraCrypt
throw UserAbort (SRC_POS);
#ifdef TC_WINDOWS
if (Core->IsVolumeMounted (*volumePath))
{
- ShowInfo ("DISMOUNT_FIRST");
+ ShowInfo ("UNMOUNT_FIRST");
return;
}
#endif
#ifdef TC_UNIX
@@ -163,10 +189,11 @@ namespace VeraCrypt
normalVolumeMountOptions.Path = volumePath;
hiddenVolumeMountOptions.Path = volumePath;
VolumeType::Enum volumeType = VolumeType::Normal;
+ bool masterKeyVulnerable = false;
// Open both types of volumes
while (true)
{
shared_ptr <Volume> volume;
@@ -245,10 +272,17 @@ namespace VeraCrypt
else
ShowWarning ("HEADER_DAMAGED_AUTO_USED_HEADER_BAK");
}
}
+ // check if volume master key is vulnerable
+ if (volume->IsMasterKeyVulnerable())
+ {
+ masterKeyVulnerable = true;
+ ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
+ }
+
if (volumeType == VolumeType::Hidden)
hiddenVolume = volume;
else
normalVolume = volume;
@@ -338,10 +372,14 @@ namespace VeraCrypt
backupFile.Write (newHeaderBuffer);
}
ShowWarning ("VOL_HEADER_BACKED_UP");
+
+ // display again warning that master key is vulnerable
+ if (masterKeyVulnerable)
+ ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
}
void GraphicUserInterface::BeginInteractiveBusyState (wxWindow *window)
{
static unique_ptr <wxCursor> arrowWaitCursor;
@@ -450,37 +488,11 @@ namespace VeraCrypt
return dynamic_cast <wxTopLevelWindow *> (ActiveFrame ? ActiveFrame : GetTopWindow());
}
shared_ptr <GetStringFunctor> GraphicUserInterface::GetAdminPasswordRequestHandler ()
{
- struct AdminPasswordRequestHandler : public GetStringFunctor
- {
- virtual void operator() (string &passwordStr)
- {
-
- wxString sValue;
- if (Gui->GetWaitDialog())
- {
- Gui->GetWaitDialog()->RequestAdminPassword(sValue);
- if (sValue.IsEmpty())
- throw UserAbort (SRC_POS);
- }
- else
- {
- wxPasswordEntryDialog dialog (Gui->GetActiveWindow(), LangString["LINUX_ADMIN_PW_QUERY"], LangString["LINUX_ADMIN_PW_QUERY_TITLE"]);
- if (dialog.ShowModal() != wxID_OK)
- throw UserAbort (SRC_POS);
- sValue = dialog.GetValue();
- }
- wstring wPassword (sValue); // A copy of the password is created here by wxWidgets, which cannot be erased
- finally_do_arg (wstring *, &wPassword, { StringConverter::Erase (*finally_arg); });
-
- StringConverter::ToSingle (wPassword, passwordStr);
- }
- };
-
- return shared_ptr <GetStringFunctor> (new AdminPasswordRequestHandler);
+ return shared_ptr <GetStringFunctor> (new AdminPasswordGUIRequestHandler);
}
int GraphicUserInterface::GetCharHeight (wxWindow *window) const
{
int width;
@@ -812,10 +824,23 @@ namespace VeraCrypt
{
ShowInfo (StringFormatter (LangString["VOLUME_ALREADY_MOUNTED"], wstring (*options.Path)));
return volume;
}
+
+ // check if the volume path exists using stat function. Only ENOENT error is handled to exclude permission denied error
+ struct stat statBuf;
+ if (stat (string (*options.Path).c_str(), &statBuf) != 0)
+ {
+ if (errno == ENOENT)
+ {
+ SystemException ex (SRC_POS);
+ ShowError (ex);
+ return volume;
+ }
+ }
+
try
{
if ((!options.Password || options.Password->IsEmpty())
&& (!options.Keyfiles || options.Keyfiles->empty())
&& !Core->IsPasswordCacheEmpty())
@@ -990,11 +1015,11 @@ namespace VeraCrypt
try
{
int showFifo = open (string (MainFrame::GetShowRequestFifoPath()).c_str(), O_WRONLY | O_NONBLOCK);
throw_sys_if (showFifo == -1);
- byte buf[1] = { 1 };
+ uint8 buf[1] = { 1 };
if (write (showFifo, buf, 1) == 1)
{
close (showFifo);
Gui->ShowInfo (LangString["LINUX_VC_RUNNING_ALREADY"]);
Application::SetExitCode (0);
@@ -1055,11 +1080,16 @@ namespace VeraCrypt
#ifdef wxHAS_POWER_EVENTS
Gui->Connect (wxEVT_POWER_SUSPENDING, wxPowerEventHandler (GraphicUserInterface::OnPowerSuspending));
#endif
mMainFrame = new MainFrame (nullptr);
-
+#if defined(TC_UNIX)
+ if (CmdLine->ArgAllowInsecureMount)
+ {
+ mMainFrame->SetTitle (mMainFrame->GetTitle() + wxT(" ") + LangString["INSECURE_MODE"]);
+ }
+#endif
if (CmdLine->StartBackgroundTask)
{
UserPreferences prefs = GetPreferences ();
prefs.BackgroundTaskEnabled = true;
SetPreferences (prefs);
@@ -1124,11 +1154,11 @@ namespace VeraCrypt
if (GetPreferences().BackgroundTaskEnabled && GetPreferences().DismountOnPowerSaving && volumeCount > 0)
{
OnAutoDismountAllEvent();
if (Core->GetMountedVolumes().size() < volumeCount)
- ShowInfoTopMost (LangString["MOUNTED_VOLUMES_AUTO_DISMOUNTED"]);
+ ShowInfoTopMost (LangString["MOUNTED_VOLUMES_AUTO_UNMOUNTED"]);
}
}
#endif
void GraphicUserInterface::OnSignal (int signal)
@@ -1386,11 +1416,11 @@ namespace VeraCrypt
throw UserAbort (SRC_POS);
#ifdef TC_WINDOWS
if (Core->IsVolumeMounted (*volumePath))
{
- ShowInfo ("DISMOUNT_FIRST");
+ ShowInfo ("UNMOUNT_FIRST");
return;
}
#endif
#ifdef TC_UNIX
@@ -1438,10 +1468,11 @@ namespace VeraCrypt
}
/* force the display of the random enriching interface */
RandomNumberGenerator::SetEnrichedByUserStatus (false);
+ bool masterKeyVulnerable = false;
if (restoreInternalBackup)
{
// Restore header from the internal backup
shared_ptr <Volume> volume;
MountOptions options;
@@ -1490,10 +1521,12 @@ namespace VeraCrypt
{
ShowError ("VOLUME_HAS_NO_BACKUP_HEADER");
return;
}
+ masterKeyVulnerable = volume->IsMasterKeyVulnerable();
+
RandomNumberGenerator::Start();
UserEnrichRandomPool (nullptr);
// Re-encrypt volume header
wxBusyCursor busy;
@@ -1588,10 +1621,11 @@ namespace VeraCrypt
ExecuteWaitThreadRoutine (parent, &decryptRoutine);
if (decryptRoutine.m_bResult)
{
+ masterKeyVulnerable = layout->GetHeader()->IsMasterKeyVulnerable();
decryptedLayout = layout;
break;
}
}
@@ -1643,10 +1677,16 @@ namespace VeraCrypt
volumeFile.Write (newHeaderBuffer);
}
}
ShowInfo ("VOL_HEADER_RESTORED");
+
+ // display warning if the volume master key is vulnerable
+ if (masterKeyVulnerable)
+ {
+ ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
+ }
}
DevicePath GraphicUserInterface::SelectDevice (wxWindow *parent) const
{
try
@@ -1850,10 +1890,18 @@ namespace VeraCrypt
width += GetScrollbarWidth (listCtrl);
#endif
listCtrl->SetMinSize (wxSize (width, listCtrl->GetMinSize().GetHeight()));
}
+
+ void GraphicUserInterface::SetContentProtection (bool enable) const
+ {
+#if defined(TC_WINDOWS) || defined(TC_MACOSX)
+ GetActiveWindow()->SetContentProtection(enable ? wxCONTENT_PROTECTION_ENABLED : wxCONTENT_PROTECTION_NONE);
+#endif
+ }
+
void GraphicUserInterface::ShowErrorTopMost (const wxString &message) const
{
ShowMessage (message, wxOK | wxICON_ERROR, true);
}
diff --git a/src/Main/GraphicUserInterface.h b/src/Main/GraphicUserInterface.h
index d48b7973..9b6d3cb8 100644
--- a/src/Main/GraphicUserInterface.h
+++ b/src/Main/GraphicUserInterface.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -84,10 +84,11 @@ namespace VeraCrypt
virtual void SetActiveFrame (wxFrame *frame) { ActiveFrame = frame; }
virtual void SetBackgroundMode (bool state);
virtual void SetListCtrlColumnWidths (wxListCtrl *listCtrl, list <int> columnWidthPermilles, bool hasVerticalScrollbar = true) const;
virtual void SetListCtrlHeight (wxListCtrl *listCtrl, size_t rowCount) const;
virtual void SetListCtrlWidth (wxListCtrl *listCtrl, size_t charCount, bool hasVerticalScrollbar = true) const;
+ virtual void SetContentProtection(bool enable) const;
virtual void ShowErrorTopMost (char *langStringId) const { ShowErrorTopMost (LangString[langStringId]); }
virtual void ShowErrorTopMost (const wxString &message) const;
virtual void ShowInfoTopMost (char *langStringId) const { ShowInfoTopMost (LangString[langStringId]); }
virtual void ShowInfoTopMost (const wxString &message) const;
virtual void ShowWarningTopMost (char *langStringId) const { ShowWarningTopMost (LangString[langStringId]); }
diff --git a/src/Main/Hotkey.cpp b/src/Main/Hotkey.cpp
index 8715dc01..ed6a2aff 100644
--- a/src/Main/Hotkey.cpp
+++ b/src/Main/Hotkey.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -25,14 +25,14 @@ namespace VeraCrypt
#ifdef TC_WINDOWS
#define TC_HOTKEY(ID,LANG) hotkeys.push_back (shared_ptr <Hotkey> (new Hotkey (Id::##ID, L###ID, LangString[LANG])))
TC_HOTKEY (CloseAllSecurityTokenSessions, "IDM_CLOSE_ALL_TOKEN_SESSIONS");
- TC_HOTKEY (DismountAll, "HK_DISMOUNT_ALL");
- TC_HOTKEY (DismountAllWipeCache, "HK_DISMOUNT_ALL_AND_WIPE");
- TC_HOTKEY (ForceDismountAllWipeCache, "HK_FORCE_DISMOUNT_ALL_AND_WIPE");
- TC_HOTKEY (ForceDismountAllWipeCacheExit, "HK_FORCE_DISMOUNT_ALL_AND_WIPE_AND_EXIT");
+ TC_HOTKEY (DismountAll, "HK_UNMOUNT_ALL");
+ TC_HOTKEY (DismountAllWipeCache, "HK_UNMOUNT_ALL_AND_WIPE");
+ TC_HOTKEY (ForceDismountAllWipeCache, "HK_FORCE_UNMOUNT_ALL_AND_WIPE");
+ TC_HOTKEY (ForceDismountAllWipeCacheExit, "HK_FORCE_UNMOUNT_ALL_AND_WIPE_AND_EXIT");
TC_HOTKEY (MountAllDevices, "HK_AUTOMOUNT_DEVICES");
TC_HOTKEY (MountAllFavorites, "HK_MOUNT_FAVORITE_VOLUMES");
TC_HOTKEY (ShowHideApplication, "HK_SHOW_HIDE_MAIN_WINDOW");
TC_HOTKEY (WipeCache, "HK_WIPE_CACHE");
diff --git a/src/Main/Hotkey.h b/src/Main/Hotkey.h
index 1ebd6bc7..b526da46 100644
--- a/src/Main/Hotkey.h
+++ b/src/Main/Hotkey.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/LanguageStrings.cpp b/src/Main/LanguageStrings.cpp
index 71914ec7..24649ab7 100644
--- a/src/Main/LanguageStrings.cpp
+++ b/src/Main/LanguageStrings.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -41,11 +41,11 @@ namespace VeraCrypt
return wstring (LangString[key]);
}
void LanguageStrings::Init ()
{
- static byte LanguageXml[] =
+ static uint8 LanguageXml[] =
{
# include "Common/Language.xml.h"
, 0
};
string def = string ((const char*) LanguageXml);
@@ -54,15 +54,20 @@ namespace VeraCrypt
wxString text = node.InnerText;
text.Replace (L"\\n", L"\n");
Map[StringConverter::ToSingle (wstring (node.Attributes[L"key"]))] = text;
}
- foreach (XmlNode node, XmlParser (Resources::GetLanguageXml()).GetNodes (L"entry"))
+ string translatedXml = Resources::GetLanguageXml();
+ foreach (XmlNode node, XmlParser (translatedXml).GetNodes (L"entry"))
{
wxString text = node.InnerText;
text.Replace (L"\\n", L"\n");
Map[StringConverter::ToSingle (wstring (node.Attributes[L"key"]))] = text;
}
+
+ XmlNode node = XmlParser (translatedXml).GetNodes (L"language").front();
+ Map["LANGUAGE_TRANSLATORS"] = wxString (node.Attributes[L"translators"]);
+ Map["CURRENT_LANGUAGE_PACK"] = wxString (node.Attributes[L"name"]);
}
LanguageStrings LangString;
}
diff --git a/src/Main/LanguageStrings.h b/src/Main/LanguageStrings.h
index f69928c1..c2341158 100644
--- a/src/Main/LanguageStrings.h
+++ b/src/Main/LanguageStrings.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Main.h b/src/Main/Main.h
index f0dade49..87f88976 100644
--- a/src/Main/Main.h
+++ b/src/Main/Main.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Main.make b/src/Main/Main.make
index 90b8b126..178c4669 100755
--- a/src/Main/Main.make
+++ b/src/Main/Main.make
@@ -100,11 +100,11 @@ WX_LIBS = $(shell $(WX_CONFIG) --debug $(WX_CONFIG_ARGS) --libs $(WX_CONFIG_LIBS
endif
#------ FUSE configuration ------
-FUSE_LIBS = $(shell $(PKG_CONFIG) fuse --libs)
+FUSE_LIBS = $(shell $(PKG_CONFIG) $(VC_FUSE_PACKAGE) --libs)
#------ Executable ------
export TC_VERSION := $(shell grep VERSION_STRING ../Common/Tcdefs.h | head -n 1 | cut -d'"' -f 2)
@@ -125,19 +125,43 @@ PACKAGE_NAME := $(APPNAME)_$(TC_VERSION)_$(PLATFORM_ARCH)_legacy.tar.gz
else
PACKAGE_NAME := $(APPNAME)_$(TC_VERSION)_$(PLATFORM_ARCH).tar.gz
endif
endif
+# Determine GUI/GTK conditions
+GUI_CONDITION := $(filter gui,$(INSTALLER_TYPE))
+GTK2_CONDITION := $(filter 2,$(GTK_VERSION))
+
ifeq "$(origin NOSSE2)" "command line"
INTERNAL_INSTALLER_NAME := veracrypt_install_$(INSTALLER_TYPE)_$(CPU_ARCH)_legacy.sh
+
+ifneq (,$(GUI_CONDITION))
+ifneq (,$(GTK2_CONDITION))
+INSTALLER_NAME := veracrypt-$(TC_VERSION)-setup-gtk2-gui-$(CPU_ARCH)-legacy
+else
INSTALLER_NAME := veracrypt-$(TC_VERSION)-setup-$(INSTALLER_TYPE)-$(CPU_ARCH)-legacy
+endif
+else
+INSTALLER_NAME := veracrypt-$(TC_VERSION)-setup-$(INSTALLER_TYPE)-$(CPU_ARCH)-legacy
+endif
+
else
INTERNAL_INSTALLER_NAME := veracrypt_install_$(INSTALLER_TYPE)_$(CPU_ARCH).sh
+
+ifneq (,$(GUI_CONDITION))
+ifneq (,$(GTK2_CONDITION))
+INSTALLER_NAME := veracrypt-$(TC_VERSION)-setup-gtk2-gui-$(CPU_ARCH)
+else
+INSTALLER_NAME := veracrypt-$(TC_VERSION)-setup-$(INSTALLER_TYPE)-$(CPU_ARCH)
+endif
+else
INSTALLER_NAME := veracrypt-$(TC_VERSION)-setup-$(INSTALLER_TYPE)-$(CPU_ARCH)
endif
endif
+
+endif
#-----------------------------------
#------ FreeBSD package naming ------
ifeq "$(PLATFORM)" "FreeBSD"
@@ -149,12 +173,25 @@ PACKAGE_NAME := $(APPNAME)_$(TC_VERSION)_$(SYSTEMNAME)_console_$(PLATFORM_ARCH).
else
INSTALLER_TYPE := gui
PACKAGE_NAME := $(APPNAME)_$(TC_VERSION)_$(SYSTEMNAME)_$(PLATFORM_ARCH).tar.gz
endif
+# Determine GUI/GTK conditions
+GUI_CONDITION := $(filter gui,$(INSTALLER_TYPE))
+GTK2_CONDITION := $(filter 2,$(GTK_VERSION))
+
INTERNAL_INSTALLER_NAME := veracrypt_install_f$(SYSTEMNAME)_$(INSTALLER_TYPE)_$(CPU_ARCH).sh
+
+ifneq (,$(GUI_CONDITION))
+ifneq (,$(GTK2_CONDITION))
+INSTALLER_NAME := veracrypt-$(TC_VERSION)-$(SYSTEMNAME)-setup-gtk2-gui-$(CPU_ARCH)
+else
+INSTALLER_NAME := veracrypt-$(TC_VERSION)-$(SYSTEMNAME)-setup-$(INSTALLER_TYPE)-$(CPU_ARCH)
+endif
+else
INSTALLER_NAME := veracrypt-$(TC_VERSION)-$(SYSTEMNAME)-setup-$(INSTALLER_TYPE)-$(CPU_ARCH)
+endif
endif
#-----------------------------------
$(APPNAME): $(LIBS) $(OBJS)
@@ -208,23 +245,34 @@ ifdef VC_LEGACY_BUILD
sed -e 's/_VERSION_/$(patsubst %a,%.1,$(patsubst %b,%.2,$(TC_VERSION)))/' ../Build/Resources/MacOSX/Info.plist.legacy.xml >$(APPNAME).app/Contents/Info.plist
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
+ifneq ("$(LOCAL_DEVELOPMENT_BUILD)","true")
codesign -s "Developer ID Application: IDRIX (Z933746L2S)" --timestamp $(APPNAME).app
+endif
install: prepare
cp -R $(APPNAME).app /Applications/.
package: prepare
ifdef VC_LEGACY_BUILD
/usr/local/bin/packagesbuild $(BASE_DIR)/Setup/MacOSX/veracrypt_Legacy.pkgproj
productsign --sign "Developer ID Installer: IDRIX (Z933746L2S)" --timestamp "$(BASE_DIR)/Setup/MacOSX/VeraCrypt Legacy $(TC_VERSION).pkg" $(BASE_DIR)/Setup/MacOSX/VeraCrypt_$(TC_VERSION).pkg
rm -f $(APPNAME)_Legacy_$(TC_VERSION).dmg
else
+ifeq "$(VC_OSX_FUSET)" "1"
+ /usr/local/bin/packagesbuild $(BASE_DIR)/Setup/MacOSX/veracrypt_fuse-t.pkgproj
+else
/usr/local/bin/packagesbuild $(BASE_DIR)/Setup/MacOSX/veracrypt.pkgproj
+endif
+ifneq ("$(LOCAL_DEVELOPMENT_BUILD)","true")
productsign --sign "Developer ID Installer: IDRIX (Z933746L2S)" --timestamp "$(BASE_DIR)/Setup/MacOSX/VeraCrypt $(TC_VERSION).pkg" $(BASE_DIR)/Setup/MacOSX/VeraCrypt_$(TC_VERSION).pkg
+else
+ # copy the unsigned package to the expected location
+ cp "$(BASE_DIR)/Setup/MacOSX/VeraCrypt $(TC_VERSION).pkg" $(BASE_DIR)/Setup/MacOSX/VeraCrypt_$(TC_VERSION).pkg
+endif
rm -f $(APPNAME)_$(TC_VERSION).dmg
endif
rm -f "$(BASE_DIR)/Setup/MacOSX/template.dmg"
rm -fr "$(BASE_DIR)/Setup/MacOSX/VeraCrypt_dmg"
mkdir -p "$(BASE_DIR)/Setup/MacOSX/VeraCrypt_dmg"
@@ -308,10 +356,12 @@ prepare: $(APPNAME)
cp $(BASE_DIR)/Main/$(APPNAME) $(BASE_DIR)/Setup/FreeBSD/usr/bin/$(APPNAME)
cp $(BASE_DIR)/Setup/Linux/$(APPNAME)-uninstall.sh $(BASE_DIR)/Setup/FreeBSD/usr/bin/$(APPNAME)-uninstall.sh
chmod +x $(BASE_DIR)/Setup/FreeBSD/usr/bin/$(APPNAME)-uninstall.sh
cp $(BASE_DIR)/License.txt $(BASE_DIR)/Setup/FreeBSD/usr/share/doc/$(APPNAME)/License.txt
cp -R $(BASE_DIR)/../doc/html/* "$(BASE_DIR)/Setup/FreeBSD/usr/share/doc/$(APPNAME)/HTML"
+ mkdir -p $(BASE_DIR)/Setup/FreeBSD/usr/share/veracrypt/languages
+ cp -r $(BASE_DIR)/../Translations/* $(BASE_DIR)/Setup/FreeBSD/usr/share/veracrypt/languages/
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
diff --git a/src/Main/Resources.cpp b/src/Main/Resources.cpp
index 58030c1e..5e5b68c8 100644
--- a/src/Main/Resources.cpp
+++ b/src/Main/Resources.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -21,10 +21,11 @@
#include "Application.h"
#endif
#include "Platform/File.h"
#include "Platform/StringConverter.h"
#include <stdio.h>
+#include "UserPreferences.h"
#endif
namespace VeraCrypt
{
@@ -37,18 +38,17 @@ namespace VeraCrypt
hRes = FindResource (NULL, resourceName, resourceType);
throw_sys_if (!hRes);
hResL = LoadResource (NULL, hRes);
throw_sys_if (!hResL);
- const byte *resPtr = (const byte *) LockResource (hResL);
+ const uint8 *resPtr = (const uint8 *) LockResource (hResL);
throw_sys_if (!resPtr);
return ConstBufferPtr (resPtr, SizeofResource (NULL, hRes));
}
#endif // TC_WINDOWS
-
string Resources::GetLanguageXml ()
{
#ifdef TC_WINDOWS
ConstBufferPtr res = GetWindowsResource (L"XML", L"IDR_LANGUAGE");
Buffer strBuf (res.Size() + 1);
@@ -66,70 +66,82 @@ namespace VeraCrypt
#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);
+
+ UserPreferences Preferences;
+ Preferences.Load();
+ string preferredLang = string(Preferences.Language.begin(), Preferences.Language.end());
#ifdef DEBUG
- std::cout << lang << std::endl;
+ std::cout << "Config language: " << preferredLang << std::endl;
#endif
- if ( lang.size() > 1 ){
- int found = lang.find(".");
- if ( found > 1 ){
- string langTag = lang.substr (0,found);
- string lowerLangTag(StringConverter::ToLower (langTag) );
- int foundUnderscore = lowerLangTag.find("_");
- if ( foundUnderscore > 0 ) {
- lowerLangTag.replace(foundUnderscore,1,1,'-');
- filename = filenamePrefix + lowerLangTag + filenamePost;
- FilesystemPath xml(filename);
- if (! xml.IsFile()){
- string shortLangTag = lowerLangTag.substr(0,foundUnderscore);
- filename = filenamePrefix + shortLangTag + filenamePost;
+
+ if (preferredLang == "system") {
+ if (const char *env_p = getenv("LANG")) {
+ string lang(env_p);
+#ifdef DEBUG
+ std::cout << "env $LANG: " << lang << std::endl;
+#endif
+ if (lang.size() > 1) {
+ int found = lang.find(".");
+ if (found > 1) {
+ string langTag = lang.substr(0, found);
+ string lowerLangTag(StringConverter::ToLower(langTag));
+ int foundUnderscore = lowerLangTag.find("_");
+ if (foundUnderscore > 0) {
+ lowerLangTag.replace(foundUnderscore, 1, 1, '-');
+ filename = filenamePrefix + lowerLangTag + filenamePost;
FilesystemPath xml(filename);
- if (! xml.IsFile()){
+ if (!xml.IsFile()) {
+ string shortLangTag = lowerLangTag.substr(0, foundUnderscore);
+ filename = filenamePrefix + shortLangTag + filenamePost;
+ FilesystemPath xml(filename);
+ if (!xml.IsFile()) {
+ filename = filenamePrefix + defaultLang + filenamePost;
+ }
+ }
+ } else {
+ filename = filenamePrefix + langTag + filenamePost;
+ FilesystemPath xml(filename);
+ if (!xml.IsFile()) {
filename = filenamePrefix + defaultLang + filenamePost;
}
}
- }else{
- filename = filenamePrefix + langTag + filenamePost;
+ } else {
+ string lowerLang(StringConverter::ToLower(lang));
+ filename = filenamePrefix + lowerLang + filenamePost;
FilesystemPath xml(filename);
- if (! xml.IsFile()){
- filename = filenamePrefix + defaultLang + filenamePost;
- }
- }
- }else{
- string lowerLang(StringConverter::ToLower (lang) );
- filename = filenamePrefix + lowerLang + filenamePost;
- FilesystemPath xml(filename);
- if (! xml.IsFile()){
- int foundUnderscore = lowerLang.find("_");
- if ( foundUnderscore > 0 ) {
- lowerLang.replace(foundUnderscore,1,1,'-');
- filename = filenamePrefix + lowerLang + filenamePost;
- FilesystemPath xml(filename);
- if (! xml.IsFile()){
- filename = filenamePrefix + defaultLang + filenamePost;
+ if (!xml.IsFile()) {
+ int foundUnderscore = lowerLang.find("_");
+ if (foundUnderscore > 0) {
+ lowerLang.replace(foundUnderscore, 1, 1, '-');
+ filename = filenamePrefix + lowerLang + filenamePost;
+ FilesystemPath xml(filename);
+ if (!xml.IsFile()) {
+ filename = filenamePrefix + defaultLang + filenamePost;
+ }
}
}
}
}
}
+ } else {
+ filename = filenamePrefix + preferredLang + filenamePost;
}
FilesystemPath xml(filename);
if ( xml.IsFile() ){
File file;
file.Open (xml, File::OpenRead, File::ShareRead);
- vector <byte> keyfileData (file.Length());
+ vector <uint8> keyfileData (file.Length());
BufferPtr keyfileDataBuf (&keyfileData.front(), keyfileData.size());
file.ReadCompleteBuffer (keyfileDataBuf);
file.Close();
string langxml(keyfileData.begin(), keyfileData.end());
return langxml;
}
- static byte LanguageXml[] =
+ static uint8 LanguageXml[] =
{
# include "Common/Language.xml.h"
, 0
};
@@ -144,11 +156,11 @@ namespace VeraCrypt
Buffer strBuf (res.Size() + 1);
strBuf.Zero();
strBuf.CopyFrom (res);
return string (reinterpret_cast <char *> (strBuf.Ptr()));
#else
- static byte License[] =
+ static uint8 License[] =
{
# include "License.txt.h"
, 0
};
@@ -162,11 +174,11 @@ namespace VeraCrypt
wxBitmap Resources::GetDriveIconBitmap ()
{
#ifdef TC_WINDOWS
return wxBitmap (L"IDB_DRIVE_ICON", wxBITMAP_TYPE_BMP_RESOURCE).ConvertToImage().Resize (wxSize (16, 12), wxPoint (0, 0));
#else
- static const byte DriveIcon[] =
+ static const uint8 DriveIcon[] =
{
# include "Mount/Drive_icon_96dpi.bmp.h"
};
wxMemoryInputStream stream (DriveIcon, sizeof (DriveIcon));
@@ -178,11 +190,11 @@ namespace VeraCrypt
{
#ifdef TC_WINDOWS
wxImage image = wxBitmap (L"IDB_DRIVE_ICON_MASK", wxBITMAP_TYPE_BMP_RESOURCE).ConvertToImage().Resize (wxSize (16, 12), wxPoint (0, 0));
return wxBitmap (image.ConvertToMono (0, 0, 0), 1);
#else
- static const byte DriveIconMask[] =
+ static const uint8 DriveIconMask[] =
{
# include "Mount/Drive_icon_mask_96dpi.bmp.h"
};
wxMemoryInputStream stream (DriveIconMask, sizeof (DriveIconMask));
@@ -201,11 +213,11 @@ namespace VeraCrypt
wxBitmap Resources::GetLogoBitmap ()
{
#ifdef TC_WINDOWS
return wxBitmap (L"IDB_LOGO", wxBITMAP_TYPE_BMP_RESOURCE);
#else
- static const byte Logo[] =
+ static const uint8 Logo[] =
{
# include "Mount/Logo_96dpi.bmp.h"
};
wxMemoryInputStream stream (Logo, sizeof (Logo));
@@ -216,11 +228,11 @@ namespace VeraCrypt
wxBitmap Resources::GetTextualLogoBitmap ()
{
#ifdef TC_WINDOWS
return wxBitmap (L"IDB_TEXTUAL_LOGO", wxBITMAP_TYPE_BMP_RESOURCE);
#else
- static const byte Logo[] =
+ static const uint8 Logo[] =
{
# include "Common/Textual_logo_96dpi.bmp.h"
};
wxMemoryInputStream stream (Logo, sizeof (Logo));
@@ -241,11 +253,11 @@ namespace VeraCrypt
wxBitmap Resources::GetVolumeCreationWizardBitmap (int height)
{
#ifdef TC_WINDOWS
return wxBitmap (L"IDB_VOLUME_WIZARD_BITMAP", wxBITMAP_TYPE_BMP_RESOURCE);
#else
- static const byte VolumeWizardIcon[] =
+ static const uint8 VolumeWizardIcon[] =
{
# include "Format/VeraCrypt_Wizard.bmp.h"
};
wxMemoryInputStream stream (VolumeWizardIcon, sizeof (VolumeWizardIcon));
diff --git a/src/Main/Resources.h b/src/Main/Resources.h
index 734c2ede..c2948618 100644
--- a/src/Main/Resources.h
+++ b/src/Main/Resources.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/StringFormatter.cpp b/src/Main/StringFormatter.cpp
index e64f85c3..2cae84bf 100644
--- a/src/Main/StringFormatter.cpp
+++ b/src/Main/StringFormatter.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/StringFormatter.h b/src/Main/StringFormatter.h
index 33a47a35..7ffcf5da 100644
--- a/src/Main/StringFormatter.h
+++ b/src/Main/StringFormatter.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -50,10 +50,13 @@ namespace VeraCrypt
{
public:
StringFormatter (const wxString &format, StringFormatterArg arg0 = StringFormatterArg(), StringFormatterArg arg1 = StringFormatterArg(), StringFormatterArg arg2 = StringFormatterArg(), StringFormatterArg arg3 = StringFormatterArg(), StringFormatterArg arg4 = StringFormatterArg(), StringFormatterArg arg5 = StringFormatterArg(), StringFormatterArg arg6 = StringFormatterArg(), StringFormatterArg arg7 = StringFormatterArg(), StringFormatterArg arg8 = StringFormatterArg(), StringFormatterArg arg9 = StringFormatterArg());
virtual ~StringFormatter ();
+#if (__cplusplus >= 201103L)
+ explicit
+#endif
operator wstring () const { return wstring (FormattedString); }
operator wxString () const { return FormattedString; }
operator StringFormatterArg () const { return FormattedString; }
protected:
diff --git a/src/Main/System.cpp b/src/Main/System.cpp
index 3f2200dd..709101ad 100644
--- a/src/Main/System.cpp
+++ b/src/Main/System.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/System.h b/src/Main/System.h
index 9d7ebc91..1af8e1ae 100644
--- a/src/Main/System.h
+++ b/src/Main/System.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/SystemPrecompiled.h b/src/Main/SystemPrecompiled.h
index 07021786..1331d399 100644
--- a/src/Main/SystemPrecompiled.h
+++ b/src/Main/SystemPrecompiled.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp
index 7b79478f..5217199d 100644
--- a/src/Main/TextUserInterface.cpp
+++ b/src/Main/TextUserInterface.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
@@ -28,10 +28,31 @@
#include "Application.h"
#include "TextUserInterface.h"
namespace VeraCrypt
{
+ class AdminPasswordTextRequestHandler : public GetStringFunctor
+ {
+ public:
+ AdminPasswordTextRequestHandler (TextUserInterface *userInterface) : UI (userInterface) { }
+ virtual void operator() (string &passwordStr)
+ {
+ UI->ShowString (_("Enter your user password or administrator password: "));
+
+ TextUserInterface::SetTerminalEcho (false);
+ finally_do ({ TextUserInterface::SetTerminalEcho (true); });
+
+ wstring wPassword (UI->ReadInputStreamLine());
+ finally_do_arg (wstring *, &wPassword, { StringConverter::Erase (*finally_arg); });
+
+ UI->ShowString (L"\n");
+
+ StringConverter::ToSingle (wPassword, passwordStr);
+ }
+ TextUserInterface *UI;
+ };
+
TextUserInterface::TextUserInterface ()
{
#ifdef TC_UNIX
signal (SIGHUP, OnSignal);
signal (SIGINT, OnSignal);
@@ -98,11 +119,11 @@ namespace VeraCrypt
SetTerminalEcho (false);
finally_do ({ TextUserInterface::SetTerminalEcho (true); });
wchar_t passwordBuf[4096];
- finally_do_arg (BufferPtr, BufferPtr (reinterpret_cast <byte *> (passwordBuf), sizeof (passwordBuf)), { finally_arg.Erase(); });
+ finally_do_arg (BufferPtr, BufferPtr (reinterpret_cast <uint8 *> (passwordBuf), sizeof (passwordBuf)), { finally_arg.Erase(); });
shared_ptr<VolumePassword> password;
bool verPhase = false;
while (true)
@@ -267,11 +288,11 @@ namespace VeraCrypt
if (!volumePath)
throw UserAbort (SRC_POS);
#ifdef TC_WINDOWS
if (Core->IsVolumeMounted (*volumePath))
- throw_err (LangString["DISMOUNT_FIRST"]);
+ throw_err (LangString["UNMOUNT_FIRST"]);
#endif
ShowInfo ("EXTERNAL_VOL_HEADER_BAK_FIRST_INFO");
shared_ptr <Pkcs5Kdf> kdf;
@@ -291,10 +312,11 @@ namespace VeraCrypt
normalVolumeMountOptions.EMVSupportEnabled = true;
hiddenVolumeMountOptions.EMVSupportEnabled = true;
VolumeType::Enum volumeType = VolumeType::Normal;
+ bool masterKeyVulnerable = false;
// Open both types of volumes
while (true)
{
shared_ptr <Volume> volume;
@@ -364,10 +386,17 @@ namespace VeraCrypt
else
ShowInfo ("HEADER_DAMAGED_AUTO_USED_HEADER_BAK");
}
}
+ // check if volume master key is vulnerable
+ if (volume->IsMasterKeyVulnerable())
+ {
+ masterKeyVulnerable = true;
+ ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
+ }
+
if (volumeType == VolumeType::Hidden)
hiddenVolume = volume;
else
normalVolume = volume;
@@ -431,10 +460,14 @@ namespace VeraCrypt
backupFile.Write (newHeaderBuffer);
ShowString (L"\n");
ShowInfo ("VOL_HEADER_BACKED_UP");
+
+ // display again warning that master key is vulnerable
+ if (masterKeyVulnerable)
+ ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
}
void TextUserInterface::ChangePassword (shared_ptr <VolumePath> volumePath, shared_ptr <VolumePassword> password, int pim, shared_ptr <Hash> currentHash, shared_ptr <KeyfileList> keyfiles, shared_ptr <VolumePassword> newPassword, int newPim, shared_ptr <KeyfileList> newKeyfiles, shared_ptr <Hash> newHash) const
{
shared_ptr <Volume> volume;
@@ -509,10 +542,16 @@ namespace VeraCrypt
}
break;
}
+ // display warning if volume master key is vulnerable
+ if (volume->IsMasterKeyVulnerable())
+ {
+ ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
+ }
+
// New password
if (!newPassword.get() && !Preferences.NonInteractive)
newPassword = AskPassword (_("Enter new password"), true);
// New PIM
@@ -666,24 +705,27 @@ namespace VeraCrypt
wxString parentDir = wxFileName (wstring (options->Path)).GetPath();
if (parentDir.IsEmpty())
{
parentDir = wxT(".");
}
- if (wxDirExists(parentDir) && wxGetDiskSpace (parentDir, nullptr, &diskSpace))
+ if (options->Type == VolumeType::Normal && wxDirExists(parentDir) && wxGetDiskSpace (parentDir, nullptr, &diskSpace))
{
AvailableDiskSpace = (uint64) diskSpace.GetValue ();
if (maxVolumeSize > AvailableDiskSpace)
maxVolumeSize = AvailableDiskSpace;
}
}
if (options->Size == (uint64) (-1))
{
- if (AvailableDiskSpace)
+ if (options->Type == VolumeType::Hidden) {
+ throw_err (_("Please do not use maximum size for hidden volume. As we do not mount the outer volume to determine the available space, it is your responsibility to choose a value so that the hidden volume does not overlap the outer volume."));
+ }
+ else if (AvailableDiskSpace)
{
// caller requesting maximum size
- // we use maxVolumeSize because it is guaranteed to be less of equal to AvailableDiskSpace
+ // we use maxVolumeSize because it is guaranteed to be less or equal to AvailableDiskSpace for outer volumes
options->Size = maxVolumeSize;
}
else
{
throw_err (_("Failed to get available disk space on the selected target."));
@@ -700,18 +742,21 @@ namespace VeraCrypt
{
if (Preferences.NonInteractive)
throw MissingArgument (SRC_POS);
uint64 multiplier = 1024 * 1024;
- 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): "));
+ wxString sizeStr = AskString (options->Type == VolumeType::Hidden ? _("\nEnter hidden volume size (sizeK/size[M]/sizeG/sizeT): ") : _("\nEnter volume size (sizeK/size[M]/sizeG.sizeT/max): "));
if (sizeStr.CmpNoCase(wxT("max")) == 0)
{
multiplier = 1;
- if (AvailableDiskSpace)
+ if (options->Type == VolumeType::Hidden) {
+ throw_err (_("Please do not use maximum size for hidden volume. As we do not mount the outer volume to determine the available space, it is your responsibility to choose a value so that the hidden volume does not overlap the outer volume."));
+ }
+ else if (AvailableDiskSpace)
{
// caller requesting maximum size
- // we use maxVolumeSize because it is guaranteed to be less of equal to AvailableDiskSpace
+ // we use maxVolumeSize because it is guaranteed to be less or equal to AvailableDiskSpace for outer volumes
options->Size = maxVolumeSize;
}
else
{
throw_err (_("Failed to get available disk space on the selected target."));
@@ -1069,11 +1114,11 @@ namespace VeraCrypt
if (keyfilePath.empty())
throw UserAbort (SRC_POS);
shared_ptr<TokenKeyfile> tokenKeyfile = Token::getTokenKeyfile(keyfilePath);
- vector <byte> keyfileData;
+ vector <uint8> keyfileData;
tokenKeyfile->GetKeyfileData (keyfileData);
BufferPtr keyfileDataBuf (&keyfileData.front(), keyfileData.size());
finally_do_arg (BufferPtr, keyfileDataBuf, { finally_arg.Erase(); });
@@ -1087,31 +1132,11 @@ namespace VeraCrypt
keyfile.Write (keyfileDataBuf);
}
shared_ptr <GetStringFunctor> TextUserInterface::GetAdminPasswordRequestHandler ()
{
- struct AdminPasswordRequestHandler : public GetStringFunctor
- {
- AdminPasswordRequestHandler (TextUserInterface *userInterface) : UI (userInterface) { }
- virtual void operator() (string &passwordStr)
- {
- UI->ShowString (_("Enter your user password or administrator password: "));
-
- TextUserInterface::SetTerminalEcho (false);
- finally_do ({ TextUserInterface::SetTerminalEcho (true); });
-
- wstring wPassword (UI->ReadInputStreamLine());
- finally_do_arg (wstring *, &wPassword, { StringConverter::Erase (*finally_arg); });
-
- UI->ShowString (L"\n");
-
- StringConverter::ToSingle (wPassword, passwordStr);
- }
- TextUserInterface *UI;
- };
-
- return shared_ptr <GetStringFunctor> (new AdminPasswordRequestHandler (this));
+ return shared_ptr <GetStringFunctor> (new AdminPasswordTextRequestHandler (this));
}
void TextUserInterface::ImportTokenKeyfiles () const
{
list <shared_ptr<TokenInfo>> tokens = Token::GetAvailableTokens();
@@ -1156,11 +1181,11 @@ namespace VeraCrypt
File keyfile;
keyfile.Open (keyfilePath, File::OpenRead, File::ShareReadWrite, File::PreserveTimestamps);
if (keyfile.Length() > 0)
{
- vector <byte> keyfileData (keyfile.Length());
+ vector <uint8> keyfileData (keyfile.Length());
BufferPtr keyfileDataBuf (&keyfileData.front(), keyfileData.size());
keyfile.ReadCompleteBuffer (keyfileDataBuf);
finally_do_arg (BufferPtr, keyfileDataBuf, { finally_arg.Erase(); });
@@ -1308,10 +1333,22 @@ namespace VeraCrypt
{
ShowInfo (StringFormatter (LangString["VOLUME_ALREADY_MOUNTED"], wstring (*options.Path)));
return volume;
}
+ // check if the volume path exists using stat function. Only ENOENT error is handled to exclude permission denied error
+ struct stat statBuf;
+ if (stat (string (*options.Path).c_str(), &statBuf) != 0)
+ {
+ if (errno == ENOENT)
+ {
+ SystemException ex (SRC_POS);
+ ShowError (ex);
+ return volume;
+ }
+ }
+
// Mount point
if (!options.MountPoint && !options.NoFilesystem)
options.MountPoint.reset (new DirectoryPath (AskString (_("Enter mount directory [default]: "))));
VolumePassword password;
@@ -1407,11 +1444,10 @@ namespace VeraCrypt
}
catch (PasswordException &e)
{
ShowInfo (e);
options.Password.reset();
- options.Pim = -1;
}
}
#ifdef TC_LINUX
if (!Preferences.NonInteractive && !Preferences.DisableKernelEncryptionModeWarning
@@ -1499,11 +1535,11 @@ namespace VeraCrypt
if (!volumePath)
throw UserAbort (SRC_POS);
#ifdef TC_WINDOWS
if (Core->IsVolumeMounted (*volumePath))
- throw_err (LangString["DISMOUNT_FIRST"]);
+ throw_err (LangString["UNMOUNT_FIRST"]);
#endif
// Ask whether to restore internal or external backup
bool restoreInternalBackup;
shared_ptr <Pkcs5Kdf> kdf;
@@ -1531,10 +1567,11 @@ namespace VeraCrypt
}
/* force the display of the random enriching interface */
RandomNumberGenerator::SetEnrichedByUserStatus (false);
+ bool masterKeyVulnerable = false;
if (restoreInternalBackup)
{
// Restore header from the internal backup
shared_ptr <Volume> volume;
MountOptions options;
@@ -1578,10 +1615,12 @@ namespace VeraCrypt
if (typeid (*layout) == typeid (VolumeLayoutV1Normal))
{
throw_err (LangString ["VOLUME_HAS_NO_BACKUP_HEADER"]);
}
+ masterKeyVulnerable = volume->IsMasterKeyVulnerable();
+
RandomNumberGenerator::Start();
UserEnrichRandomPool();
// Re-encrypt volume header
SecureBuffer newHeaderBuffer (volume->GetLayout()->GetHeaderSize());
@@ -1665,10 +1704,11 @@ namespace VeraCrypt
// Decrypt header
shared_ptr <VolumePassword> passwordKey = Keyfile::ApplyListToPassword (options.Keyfiles, options.Password, options.EMVSupportEnabled);
if (layout->GetHeader()->Decrypt (headerBuffer, *passwordKey, options.Pim, kdf, layout->GetSupportedKeyDerivationFunctions(), layout->GetSupportedEncryptionAlgorithms(), layout->GetSupportedEncryptionModes()))
{
decryptedLayout = layout;
+ masterKeyVulnerable = layout->GetHeader()->IsMasterKeyVulnerable();
break;
}
}
if (!decryptedLayout)
@@ -1715,10 +1755,15 @@ namespace VeraCrypt
}
}
ShowString (L"\n");
ShowInfo ("VOL_HEADER_RESTORED");
+ // display warning if the volume master key is vulnerable
+ if (masterKeyVulnerable)
+ {
+ ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
+ }
}
void TextUserInterface::SetTerminalEcho (bool enable)
{
if (CmdLine->ArgDisplayPassword)
@@ -1777,11 +1822,11 @@ namespace VeraCrypt
finally_do ({ TextUserInterface::SetTerminalEcho (true); });
while (randCharsRequired > 0)
{
wstring randStr = AskString();
- RandomNumberGenerator::AddToPool (ConstBufferPtr ((byte *) randStr.c_str(), randStr.size() * sizeof (wchar_t)));
+ RandomNumberGenerator::AddToPool (ConstBufferPtr ((uint8 *) randStr.c_str(), randStr.size() * sizeof (wchar_t)));
randCharsRequired -= randStr.size();
if (randCharsRequired > 0)
ShowInfo (StringFormatter (_("Characters remaining: {0}"), randCharsRequired));
diff --git a/src/Main/TextUserInterface.h b/src/Main/TextUserInterface.h
index becb1d59..091e4cbd 100644
--- a/src/Main/TextUserInterface.h
+++ b/src/Main/TextUserInterface.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -17,13 +17,15 @@
#include "Main.h"
#include "UserInterface.h"
namespace VeraCrypt
{
+ class AdminPasswordTextRequestHandler;
class TextUserInterface : public UserInterface
{
public:
+ friend class AdminPasswordTextRequestHandler;
TextUserInterface ();
virtual ~TextUserInterface ();
virtual FilePath AskFilePath (const wxString &message = wxEmptyString) const;
virtual shared_ptr <KeyfileList> AskKeyfiles (const wxString &message = L"") const;
diff --git a/src/Main/Unix/Main.cpp b/src/Main/Unix/Main.cpp
index 39a2eaba..4197dcaf 100644
--- a/src/Main/Unix/Main.cpp
+++ b/src/Main/Unix/Main.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -74,11 +74,11 @@ int main (int argc, char **argv)
#else
bool forceTextUI = false;
#endif
#ifdef __WXGTK__
- if (!getenv ("DISPLAY"))
+ if (!getenv ("DISPLAY") && !getenv ("WAYLAND_DISPLAY"))
forceTextUI = true;
#endif
// Initialize application
if (forceTextUI || (argc > 1 && (strcmp (argv[1], "-t") == 0 || strcmp (argv[1], "--text") == 0)))
diff --git a/src/Main/UserInterface.cpp b/src/Main/UserInterface.cpp
index 8d046f87..b507d9a3 100644
--- a/src/Main/UserInterface.cpp
+++ b/src/Main/UserInterface.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -30,10 +30,19 @@
#include "FavoriteVolume.h"
#include "UserInterface.h"
namespace VeraCrypt
{
+ class AdminPasswordRequestHandler : public GetStringFunctor
+ {
+ public:
+ virtual void operator() (string &str)
+ {
+ throw ElevationFailed (SRC_POS, "sudo", 1, "");
+ }
+ };
+
UserInterface::UserInterface ()
{
}
UserInterface::~UserInterface ()
@@ -211,11 +220,11 @@ namespace VeraCrypt
if (Preferences.Verbose)
{
if (!message.IsEmpty())
message += L'\n';
- message += StringFormatter (LangString["LINUX_VOL_DISMOUNTED"], wstring (volume->Path));
+ message += StringFormatter (LangString["LINUX_VOL_UNMOUNTED"], wstring (volume->Path));
}
}
if (twoPassMode && firstPass)
{
@@ -388,11 +397,11 @@ namespace VeraCrypt
errOutput += wxString (LangString["LINUX_CANT_GET_ADMIN_PRIV"]) + (StringConverter::Trim (execEx->GetErrorOutput()).empty() ? L". " : L": ");
errOutput += StringConverter::ToWide (execEx->GetErrorOutput());
if (errOutput.empty())
- return errOutput + StringFormatter (LangString["LINUX_COMMAND_GET_ERROR"], execEx->GetCommand(), execEx->GetExitCode());
+ return errOutput + static_cast<wstring>(StringFormatter (LangString["LINUX_COMMAND_GET_ERROR"], execEx->GetCommand(), execEx->GetExitCode()));
return wxString (errOutput).Trim (true);
}
// PasswordIncorrect
@@ -485,12 +494,12 @@ namespace VeraCrypt
EX2MSG (PasswordIncorrect, LangString["PASSWORD_WRONG"]);
EX2MSG (PasswordKeyfilesIncorrect, LangString["PASSWORD_OR_KEYFILE_WRONG"]);
EX2MSG (PasswordOrKeyboardLayoutIncorrect, LangString["PASSWORD_OR_KEYFILE_WRONG"] + LangString["LINUX_EX2MSG_PASSWORDORKEYBOARDLAYOUTINCORRECT"]);
EX2MSG (PasswordOrMountOptionsIncorrect, LangString["PASSWORD_OR_KEYFILE_OR_MODE_WRONG"] + LangString["LINUX_EX2MSG_PASSWORDORMOUNTOPTIONSINCORRECT"]);
EX2MSG (PasswordTooLong, StringFormatter (LangString["LINUX_EX2MSG_PASSWORDTOOLONG"], (int) VolumePassword::MaxSize));
- EX2MSG (PasswordUTF8TooLong, LangString["PASSWORD_UTF8_TOO_LONG"]);
- EX2MSG (PasswordLegacyUTF8TooLong, LangString["LEGACY_PASSWORD_UTF8_TOO_LONG"]);
+ EX2MSG (PasswordUTF8TooLong, StringFormatter (LangString["PASSWORD_UTF8_TOO_LONG"], (int) VolumePassword::MaxSize));
+ EX2MSG (PasswordLegacyUTF8TooLong, StringFormatter (LangString["LEGACY_PASSWORD_UTF8_TOO_LONG"], (int) VolumePassword::MaxLegacySize));
EX2MSG (PasswordUTF8Invalid, LangString["PASSWORD_UTF8_INVALID"]);
EX2MSG (PartitionDeviceRequired, LangString["LINUX_EX2MSG_PARTITIONDEVICEREQUIRED"]);
EX2MSG (ProtectionPasswordIncorrect, LangString["LINUX_EX2MSG_PROTECTIONPASSWORDINCORRECT"]);
EX2MSG (ProtectionPasswordKeyfilesIncorrect, LangString["LINUX_EX2MSG_PROTECTIONPASSWORDKEYFILESINCORRECT"]);
EX2MSG (RootDeviceUnavailable, LangString["NODRIVER"]);
@@ -508,13 +517,13 @@ namespace VeraCrypt
EX2MSG (EMVUnknownCardType, LangString["EMV_UNKNOWN_CARD_TYPE"]);
EX2MSG (EMVSelectAIDFailed, LangString["EMV_SELECT_AID_FAILED"]);
EX2MSG (EMVIccCertNotFound, LangString["EMV_ICC_CERT_NOTFOUND"]);
EX2MSG (EMVIssuerCertNotFound, LangString["EMV_ISSUER_CERT_NOTFOUND"]);
EX2MSG (EMVCPLCNotFound, LangString["EMV_CPLC_NOTFOUND"]);
- EX2MSG (InvalidEMVPath, LangString["EMV_PAN_NOTFOUND"]);
- EX2MSG (EMVKeyfileDataNotFound, LangString["INVALID_EMV_PATH"]);
- EX2MSG (EMVPANNotFound, LangString["EMV_KEYFILE_DATA_NOTFOUND"]);
+ EX2MSG (InvalidEMVPath, LangString["INVALID_EMV_PATH"]);
+ EX2MSG (EMVKeyfileDataNotFound, LangString["EMV_KEYFILE_DATA_NOTFOUND"]);
+ EX2MSG (EMVPANNotFound, LangString["EMV_PAN_NOTFOUND"]);
#if defined (TC_LINUX)
EX2MSG (TerminalNotFound, LangString["LINUX_EX2MSG_TERMINALNOTFOUND"]);
EX2MSG (UnsupportedSectorSize, LangString["SECTOR_SIZE_UNSUPPORTED"]);
EX2MSG (UnsupportedSectorSizeHiddenVolumeProtection, LangString["LINUX_EX2MSG_UNSUPPORTEDSECTORSIZEHIDDENVOLUMEPROTECTION"]);
@@ -530,10 +539,13 @@ namespace VeraCrypt
#ifdef TC_MACOSX
EX2MSG (HigherFuseVersionRequired, LangString["LINUX_EX2MSG_HIGHERFUSEVERSIONREQUIRED"]);
#endif
+ EX2MSG (MountPointBlocked, LangString["MOUNTPOINT_BLOCKED"]);
+ EX2MSG (MountPointNotAllowed, LangString["MOUNTPOINT_NOTALLOWED"]);
+
#undef EX2MSG
return L"";
}
void UserInterface::Init ()
@@ -542,37 +554,35 @@ namespace VeraCrypt
SetClassName (Application::GetName());
#ifdef CRYPTOPP_CPUID_AVAILABLE
DetectX86Features ();
#endif
+#if CRYPTOPP_BOOL_ARMV8
+ DetectArmFeatures();
+#endif
LangString.Init();
Core->Init();
CmdLine.reset (new CommandLineInterface (argc, argv, InterfaceType));
SetPreferences (CmdLine->Preferences);
Core->SetApplicationExecutablePath (Application::GetExecutablePath());
+ Core->SetUserEnvPATH (getenv ("PATH"));
if (!Preferences.NonInteractive)
{
Core->SetAdminPasswordCallback (GetAdminPasswordRequestHandler());
}
else
{
- struct AdminPasswordRequestHandler : public GetStringFunctor
- {
- virtual void operator() (string &str)
- {
- throw ElevationFailed (SRC_POS, "sudo", 1, "");
- }
- };
-
Core->SetAdminPasswordCallback (shared_ptr <GetStringFunctor> (new AdminPasswordRequestHandler));
}
-#if defined(TC_LINUX ) || defined (TC_FREEBSD)
Core->ForceUseDummySudoPassword (CmdLine->ArgUseDummySudoPassword);
+
+#if defined(TC_UNIX)
+ Core->SetAllowInsecureMount (CmdLine->ArgAllowInsecureMount);
#endif
Core->WarningEvent.Connect (EventConnector <UserInterface> (this, &UserInterface::OnWarning));
Core->VolumeMountedEvent.Connect (EventConnector <UserInterface> (this, &UserInterface::OnVolumeMounted));
@@ -649,10 +659,11 @@ namespace VeraCrypt
foreach_ref (const VolumeInfo &v, Core->GetMountedVolumes())
mountedVolumes.insert (v.Path);
bool protectedVolumeMounted = false;
bool legacyVolumeMounted = false;
+ bool vulnerableVolumeMounted = false;
foreach_ref (const HostDevice &device, devices)
{
if (mountedVolumes.find (wstring (device.Path)) != mountedVolumes.end())
continue;
@@ -691,10 +702,14 @@ namespace VeraCrypt
if (newMountedVolumes.back()->Protection == VolumeProtection::HiddenVolumeReadOnly)
protectedVolumeMounted = true;
if (newMountedVolumes.back()->EncryptionAlgorithmMinBlockSize == 8)
legacyVolumeMounted = true;
+
+ if (newMountedVolumes.back()->MasterKeyVulnerable)
+ vulnerableVolumeMounted = true;
+
}
catch (DriverError&) { }
catch (MissingVolumeData&) { }
catch (PasswordException&) { }
catch (SystemException&) { }
@@ -705,10 +720,13 @@ namespace VeraCrypt
{
ShowWarning (LangString [options.Keyfiles && !options.Keyfiles->empty() ? "PASSWORD_OR_KEYFILE_WRONG_AUTOMOUNT" : "PASSWORD_WRONG_AUTOMOUNT"]);
}
else
{
+ if (vulnerableVolumeMounted)
+ ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
+
if (someVolumesShared)
ShowWarning ("DEVICE_IN_USE_INFO");
if (legacyVolumeMounted)
ShowWarning ("WARN_64_BIT_BLOCK_CIPHER");
@@ -738,21 +756,24 @@ namespace VeraCrypt
continue;
}
favorite.ToMountOptions (options);
+ bool mountPerformed = false;
if (Preferences.NonInteractive)
{
BusyScope busy (this);
newMountedVolumes.push_back (Core->MountVolume (options));
+ mountPerformed = true;
}
else
{
try
{
BusyScope busy (this);
newMountedVolumes.push_back (Core->MountVolume (options));
+ mountPerformed = true;
}
catch (...)
{
UserPreferences prefs = GetPreferences();
if (prefs.CloseSecurityTokenSessionsAfterMount)
@@ -766,10 +787,13 @@ namespace VeraCrypt
if (!volume)
break;
newMountedVolumes.push_back (volume);
}
}
+
+ if (mountPerformed && newMountedVolumes.back()->MasterKeyVulnerable)
+ ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
}
if (!newMountedVolumes.empty() && GetPreferences().CloseSecurityTokenSessionsAfterMount)
SecurityToken::CloseAllSessions();
@@ -802,10 +826,13 @@ namespace VeraCrypt
{
throw_err (LangString["FILE_IN_USE_FAILED"]);
}
}
+ if (volume->MasterKeyVulnerable)
+ ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
+
if (volume->EncryptionAlgorithmMinBlockSize == 8)
ShowWarning ("WARN_64_BIT_BLOCK_CIPHER");
if (VolumeHasUnrecommendedExtension (*options.Path))
ShowWarning ("EXE_FILE_EXTENSION_MOUNT_WARNING");
@@ -853,10 +880,37 @@ namespace VeraCrypt
{
ExceptionEventArgs &e = dynamic_cast <ExceptionEventArgs &> (args);
ShowWarning (e.mException);
}
+#if !defined(TC_WINDOWS) && !defined(TC_MACOSX)
+// Define file manager structures with their required parameters
+struct FileManager {
+ const char* name;
+ const char* const* baseArgs;
+ size_t baseArgsCount;
+};
+
+// Array of supported file managers with their parameters
+static const char* const gioArgs[] = {"open"};
+static const char* const kioclient5Args[] = {"exec"};
+static const char* const kfmclientArgs[] = {"openURL"};
+static const char* const exoOpenArgs[] = {"--launch", "FileManager"};
+
+const FileManager fileManagers[] = {
+ {"gio", gioArgs, 1},
+ {"kioclient5", kioclient5Args, 1},
+ {"kfmclient", kfmclientArgs, 1},
+ {"exo-open", exoOpenArgs, 2},
+ {"nautilus", NULL, 0},
+ {"dolphin", NULL, 0},
+ {"caja", NULL, 0},
+ {"thunar", NULL, 0},
+ {"pcmanfm", NULL, 0}
+};
+#endif
+
void UserInterface::OpenExplorerWindow (const DirectoryPath &path)
{
if (path.IsEmpty())
return;
@@ -872,69 +926,58 @@ namespace VeraCrypt
#elif defined (TC_MACOSX)
args.push_back (string (path));
try
{
- Process::Execute ("open", args);
+ Process::Execute ("/usr/bin/open", args);
}
catch (exception &e) { ShowError (e); }
#else
- // MIME handler for directory seems to be unavailable through wxWidgets
- wxString desktop = GetTraits()->GetDesktopEnvironment();
- bool xdgOpenPresent = wxFileName::IsFileExecutable (wxT("/usr/bin/xdg-open")) || wxFileName::IsFileExecutable (wxT("/usr/local/bin/xdg-open"));
- bool nautilusPresent = wxFileName::IsFileExecutable (wxT("/usr/bin/nautilus")) || wxFileName::IsFileExecutable (wxT("/usr/local/bin/nautilus"));
-
- if (desktop == L"GNOME" || (desktop.empty() && !xdgOpenPresent && nautilusPresent))
+ string directoryPath = string(path);
+ // Primary attempt: Use xdg-open
+ string errorMsg;
+ string binPath = Process::FindSystemBinary("xdg-open", errorMsg);
+ if (!binPath.empty())
{
- // args.push_back ("--no-default-window"); // This option causes nautilus not to launch under FreeBSD 11
- args.push_back ("--no-desktop");
- args.push_back (string (path));
try
{
- Process::Execute ("nautilus", args, 2000);
+ args.push_back(directoryPath);
+ Process::Execute(binPath, args, 2000);
+ return;
}
catch (TimeOut&) { }
- catch (exception &e) { ShowError (e); }
+ catch (exception&) {}
}
- else if (desktop == L"KDE")
- {
- try
- {
- args.push_back (string (path));
- Process::Execute ("dolphin", args, 2000);
- }
- catch (TimeOut&) { }
- catch (exception&)
- {
+
+ // Fallback attempts: Try known file managers
+ const size_t numFileManagers = sizeof(fileManagers) / sizeof(fileManagers[0]);
+ for (size_t i = 0; i < numFileManagers; ++i) {
+ const FileManager& fm = fileManagers[i];
+ string fmPath = Process::FindSystemBinary(fm.name, errorMsg);
+ if (!fmPath.empty()) {
args.clear();
- args.push_back ("openURL");
- args.push_back (string (path));
- try
- {
- Process::Execute ("kfmclient", args, 2000);
+
+ // Add base arguments first
+ for (size_t j = 0; j < fm.baseArgsCount; ++j) {
+ args.push_back(fm.baseArgs[j]);
+ }
+
+ // Add path argument
+ args.push_back(directoryPath);
+
+ try {
+ Process::Execute(fmPath, args, 2000);
+ return; // Success
}
catch (TimeOut&) { }
- catch (exception &e) { ShowError (e); }
- }
- }
- else if (xdgOpenPresent)
- {
- // Fallback on the standard xdg-open command
- // which is not always available by default
- args.push_back (string (path));
- try
- {
- Process::Execute ("xdg-open", args, 2000);
+ catch (exception &) {}
}
- catch (TimeOut&) { }
- catch (exception &e) { ShowError (e); }
- }
- else
- {
- ShowWarning (wxT("Unable to find a file manager to open the mounted volume"));
}
+
+ ShowWarning(wxT("Unable to find a file manager to open the mounted volume.\n"
+ "Please install xdg-utils or set a default file manager."));
#endif
}
bool UserInterface::ProcessCommandLine ()
{
@@ -1131,11 +1174,11 @@ namespace VeraCrypt
" 1) Create an outer volume with no filesystem.\n"
" 2) Create a hidden volume within the outer volume.\n"
" 3) Mount the outer volume using hidden volume protection.\n"
" 4) Create a filesystem on the virtual device of the outer volume.\n"
" 5) Mount the new filesystem and fill it with data.\n"
- " 6) Dismount the outer volume.\n"
+ " 6) Unmount the outer volume.\n"
" If at any step the hidden volume protection is triggered, start again from 1).\n"
"\n"
"--create-keyfile[=FILE_PATH]\n"
" Create a new keyfile containing pseudo-random data.\n"
"\n"
@@ -1143,13 +1186,13 @@ namespace VeraCrypt
" Change a password and/or keyfile(s) of a volume. Most options are requested\n"
" from the user if not specified on command line. PKCS-5 PRF HMAC hash\n"
" algorithm can be changed with option --hash. See also options -k,\n"
" --new-keyfiles, --new-password, -p, --random-source.\n"
"\n"
- "-d, --dismount[=MOUNTED_VOLUME]\n"
- " Dismount a mounted volume. If MOUNTED_VOLUME is not specified, all\n"
- " volumes are dismounted. See below for description of MOUNTED_VOLUME.\n"
+ "-u, --unmount[=MOUNTED_VOLUME]\n"
+ " Unmount a mounted volume. If MOUNTED_VOLUME is not specified, all\n"
+ " volumes are unmounted. See below for description of MOUNTED_VOLUME.\n"
"\n"
"--delete-token-keyfiles\n"
" Delete keyfiles from security tokens. See also command --list-token-keyfiles.\n"
"\n"
"--export-token-keyfile\n"
@@ -1216,11 +1259,11 @@ namespace VeraCrypt
" with option -t. Default type is 'auto'. When creating a new volume, this\n"
" option specifies the filesystem to be created on the new volume.\n"
" Filesystem type 'none' disables mounting or creating a filesystem.\n"
"\n"
"--force\n"
- " Force mounting of a volume in use, dismounting of a volume in use, or\n"
+ " Force mounting of a volume in use, unmounting of a volume in use, or\n"
" overwriting a file. Note that this option has no effect on some platforms.\n"
"\n"
"--fs-options=OPTIONS\n"
" Filesystem mount options. The OPTIONS argument is passed to mount(8)\n"
" command with option -o when a filesystem on a VeraCrypt volume is mounted.\n"
@@ -1252,11 +1295,11 @@ namespace VeraCrypt
" headerbak: Use backup headers when mounting a volume.\n"
" nokernelcrypto: Do not use kernel cryptographic services.\n"
" readonly|ro: Mount volume as read-only.\n"
" system: Mount partition using system encryption.\n"
" timestamp|ts: Do not restore host-file modification timestamp when a volume\n"
- " is dismounted (note that the operating system under certain circumstances\n"
+ " is unmounted (note that the operating system under certain circumstances\n"
" does not alter host-file timestamps, which may be mistakenly interpreted\n"
" to mean that this option does not work).\n"
" See also option --fs-options.\n"
"\n"
"--new-keyfiles=KEYFILE1[,KEYFILE2,KEYFILE3,...]\n"
@@ -1287,11 +1330,11 @@ namespace VeraCrypt
" outer volume is mounted with all sectors belonging to the hidden volume\n"
" protected against write operations. When a write to the protected area is\n"
" prevented, the whole volume is switched to read-only mode. Verbose list\n"
" (-v -l) can be used to query the state of the hidden volume protection.\n"
" Warning message is displayed when a volume switched to read-only is being\n"
- " dismounted.\n"
+ " unmounted.\n"
"\n"
"--protection-keyfiles=KEYFILE1[,KEYFILE2,KEYFILE3,...]\n"
" Use specified keyfiles to open a hidden volume to be protected. This option\n"
" may be used only when mounting an outer volume with hidden volume protected.\n"
" See also options -k and --protect-hidden.\n"
@@ -1308,11 +1351,11 @@ namespace VeraCrypt
"--random-source=FILE\n"
" Use FILE as a source of random data (e.g., when creating a volume) instead\n"
" of requiring the user to type random characters.\n"
"\n"
"--slot=SLOT\n"
- " Use specified slot number when mounting, dismounting, or listing a volume.\n"
+ " Use specified slot number when mounting, unmounting, or listing a volume.\n"
"\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"
@@ -1353,15 +1396,15 @@ namespace VeraCrypt
"veracrypt --filesystem=none volume.hc\n"
"\n"
"Mount a volume prompting only for its password:\n"
"veracrypt -t -k \"\" --pim=0 --protect-hidden=no volume.hc /media/veracrypt1\n"
"\n"
- "Dismount a volume:\n"
- "veracrypt -d volume.hc\n"
+ "Unmount a volume:\n"
+ "veracrypt -u volume.hc\n"
"\n"
- "Dismount all mounted volumes:\n"
- "veracrypt -d\n"
+ "Unmount all mounted volumes:\n"
+ "veracrypt -u\n"
);
#ifndef TC_NO_GUI
if (Application::GetUserInterfaceType() == UserInterfaceType::Graphic)
{
@@ -1514,11 +1557,11 @@ namespace VeraCrypt
throw TestFailed (SRC_POS);
EncryptionTest::TestAll();
// StringFormatter
- if (StringFormatter (L"{9} {8} {7} {6} {5} {4} {3} {2} {1} {0} {{0}}", "1", L"2", '3', L'4', 5, 6, 7, 8, 9, 10) != L"10 9 8 7 6 5 4 3 2 1 {0}")
+ if (static_cast<wstring>(StringFormatter (L"{9} {8} {7} {6} {5} {4} {3} {2} {1} {0} {{0}}", "1", L"2", '3', L'4', 5, 6, 7, 8, 9, 10)) != L"10 9 8 7 6 5 4 3 2 1 {0}")
throw TestFailed (SRC_POS);
try
{
StringFormatter (L"{0} {1}", 1);
throw TestFailed (SRC_POS);
@@ -1612,10 +1655,17 @@ namespace VeraCrypt
}
return sResult;
}
+#ifdef TC_UNIX
+ bool UserInterface::InsecureMountAllowed () const
+ {
+ return CmdLine->ArgAllowInsecureMount;
+ }
+#endif
+
#define VC_CONVERT_EXCEPTION(NAME) if (dynamic_cast<NAME*> (ex)) throw (NAME&) *ex;
void UserInterface::ThrowException (Exception* ex)
{
VC_CONVERT_EXCEPTION (PasswordIncorrect);
@@ -1700,8 +1750,11 @@ namespace VeraCrypt
VC_CONVERT_EXCEPTION (EMVCPLCNotFound);
VC_CONVERT_EXCEPTION (InvalidEMVPath);
VC_CONVERT_EXCEPTION (EMVKeyfileDataNotFound);
VC_CONVERT_EXCEPTION (EMVPANNotFound);
+ VC_CONVERT_EXCEPTION (MountPointBlocked);
+ VC_CONVERT_EXCEPTION (MountPointNotAllowed);
+
throw *ex;
}
}
diff --git a/src/Main/UserInterface.h b/src/Main/UserInterface.h
index 41415e9d..d04f0214 100644
--- a/src/Main/UserInterface.h
+++ b/src/Main/UserInterface.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -84,11 +84,13 @@ namespace VeraCrypt
virtual void Yield () const = 0;
virtual WaitThreadUI* GetWaitThreadUI(WaitThreadRoutine *pRoutine) const { return new WaitThreadUI(pRoutine);}
virtual wxDateTime VolumeTimeToDateTime (VolumeTime volumeTime) const { return wxDateTime ((time_t) (volumeTime / 1000ULL / 1000 / 10 - 134774ULL * 24 * 3600)); }
virtual wxString VolumeTimeToString (VolumeTime volumeTime) const;
virtual wxString VolumeTypeToString (VolumeType::Enum type, VolumeProtection::Enum protection) const;
-
+#ifdef TC_UNIX
+ virtual bool InsecureMountAllowed () const;
+#endif
Event PreferencesUpdatedEvent;
struct BusyScope
{
BusyScope (const UserInterface *userInterface) : UI (userInterface) { UI->BeginBusyState (); }
diff --git a/src/Main/UserInterfaceException.h b/src/Main/UserInterfaceException.h
index 8a8c7a60..8886a655 100644
--- a/src/Main/UserInterfaceException.h
+++ b/src/Main/UserInterfaceException.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/UserInterfaceType.h b/src/Main/UserInterfaceType.h
index 41208ccb..0afa36a8 100644
--- a/src/Main/UserInterfaceType.h
+++ b/src/Main/UserInterfaceType.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/UserPreferences.cpp b/src/Main/UserPreferences.cpp
index b5a1f42c..d9d07b6d 100644
--- a/src/Main/UserPreferences.cpp
+++ b/src/Main/UserPreferences.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -90,10 +90,11 @@ namespace VeraCrypt
TC_CONFIG_SET (DismountOnScreenSaver);
TC_CONFIG_SET (DisplayMessageAfterHotkeyDismount);
TC_CONFIG_SET (BackgroundTaskEnabled);
if (configMap.count(L"FilesystemOptions") > 0) { SetValue (configMap[L"FilesystemOptions"], DefaultMountOptions.FilesystemOptions); configMap.erase (L"FilesystemOptions"); }
TC_CONFIG_SET (ForceAutoDismount);
+ TC_CONFIG_SET (Language);
TC_CONFIG_SET (LastSelectedSlotNumber);
TC_CONFIG_SET (MaxVolumeIdleTime);
TC_CONFIG_SET (MountDevicesOnLogon);
TC_CONFIG_SET (MountFavoritesOnLogon);
@@ -212,10 +213,11 @@ namespace VeraCrypt
TC_CONFIG_ADD (DismountOnScreenSaver);
TC_CONFIG_ADD (DisplayMessageAfterHotkeyDismount);
TC_CONFIG_ADD (BackgroundTaskEnabled);
formatter.AddEntry (L"FilesystemOptions", DefaultMountOptions.FilesystemOptions);
TC_CONFIG_ADD (ForceAutoDismount);
+ TC_CONFIG_ADD (Language);
TC_CONFIG_ADD (LastSelectedSlotNumber);
TC_CONFIG_ADD (MaxVolumeIdleTime);
TC_CONFIG_ADD (MountDevicesOnLogon);
TC_CONFIG_ADD (MountFavoritesOnLogon);
formatter.AddEntry (L"MountVolumesReadOnly", DefaultMountOptions.Protection == VolumeProtection::ReadOnly);
@@ -238,11 +240,11 @@ namespace VeraCrypt
// add unknown config entries by iterating over all elements of the UnknownConfigMapEntries map
for (map<wxString, wxString>::const_iterator it = UnknownConfigMapEntries.begin(); it != UnknownConfigMapEntries.end(); ++it)
{
formatter.AddEntry(it->first.c_str(), it->second);
- }
+ }
XmlWriter writer (Application::GetConfigFilePath (GetPreferencesFileName(), true));
writer.WriteNode (formatter.XmlConfig);
writer.Close();
diff --git a/src/Main/UserPreferences.h b/src/Main/UserPreferences.h
index 3f60b533..2c5cff9f 100644
--- a/src/Main/UserPreferences.h
+++ b/src/Main/UserPreferences.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -37,10 +37,11 @@ namespace VeraCrypt
DismountOnLogOff (true),
DismountOnPowerSaving (false),
DismountOnScreenSaver (false),
DisplayMessageAfterHotkeyDismount (false),
ForceAutoDismount (true),
+ Language (L"system"),
LastSelectedSlotNumber (0),
MaxVolumeIdleTime (60),
MountDevicesOnLogon (false),
MountFavoritesOnLogon (false),
NonInteractive (false),
@@ -79,10 +80,11 @@ namespace VeraCrypt
bool DismountOnLogOff;
bool DismountOnPowerSaving;
bool DismountOnScreenSaver;
bool DisplayMessageAfterHotkeyDismount;
bool ForceAutoDismount;
+ wstring Language;
uint64 LastSelectedSlotNumber;
int32 MaxVolumeIdleTime;
bool MountDevicesOnLogon;
bool MountFavoritesOnLogon;
bool NonInteractive;
diff --git a/src/Main/VolumeHistory.cpp b/src/Main/VolumeHistory.cpp
index ba33a04a..8b8c5f62 100644
--- a/src/Main/VolumeHistory.cpp
+++ b/src/Main/VolumeHistory.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/VolumeHistory.h b/src/Main/VolumeHistory.h
index fdbb099b..02d6bfe1 100644
--- a/src/Main/VolumeHistory.h
+++ b/src/Main/VolumeHistory.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages.
*/
diff --git a/src/Main/Xml.cpp b/src/Main/Xml.cpp
index 6d0faa18..e7efc39e 100644
--- a/src/Main/Xml.cpp
+++ b/src/Main/Xml.cpp
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/
@@ -106,11 +106,11 @@ namespace VeraCrypt
if (MemOutStream.get())
{
*TextOutStream << L"</VeraCrypt>" << endl;
wxStreamBuffer *buf = MemOutStream->GetOutputStreamBuffer();
- OutFile.Write (ConstBufferPtr (reinterpret_cast <byte *> (buf->GetBufferStart()), buf->GetBufferSize()));
+ OutFile.Write (ConstBufferPtr (reinterpret_cast <uint8 *> (buf->GetBufferStart()), buf->GetBufferSize()));
OutFile.Close();
TextOutStream.reset();
MemOutStream.reset();
}
diff --git a/src/Main/Xml.h b/src/Main/Xml.h
index 27f0b828..3d6dea67 100644
--- a/src/Main/Xml.h
+++ b/src/Main/Xml.h
@@ -2,11 +2,11 @@
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 all other portions of this file are Copyright (c) 2013-2025 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.
*/