VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main/Forms')
-rw-r--r--src/Main/Forms/AboutDialog.cpp10
-rw-r--r--src/Main/Forms/ChangePasswordDialog.cpp5
-rw-r--r--src/Main/Forms/MainFrame.cpp7
-rw-r--r--src/Main/Forms/MainFrame.h1
-rw-r--r--src/Main/Forms/PreferencesDialog.cpp73
-rw-r--r--src/Main/Forms/PreferencesDialog.h45
-rw-r--r--src/Main/Forms/VolumeCreationWizard.cpp25
-rw-r--r--src/Main/Forms/WaitDialog.h4
8 files changed, 100 insertions, 70 deletions
diff --git a/src/Main/Forms/AboutDialog.cpp b/src/Main/Forms/AboutDialog.cpp
index e3768361..01c579d5 100644
--- a/src/Main/Forms/AboutDialog.cpp
+++ b/src/Main/Forms/AboutDialog.cpp
@@ -27,7 +27,11 @@ namespace VeraCrypt
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");
@@ -57,7 +61,7 @@ namespace VeraCrypt
L"Paulo Barreto, Brian Gladman, Wei Dai, Peter Gutmann, and many others.\n\n"
L"Portions of this software:\n"
- L"Copyright \xA9 2013-2023 IDRIX. All rights reserved.\n"
+ L"Copyright \xA9 2013-2024 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"
@@ -70,7 +74,7 @@ namespace VeraCrypt
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-2024 IDRIX. All rights reserved.\n\n"
L"This software uses wxWidgets library, which is copyright \xA9 1998-2011 Julian Smart, Robert Roebling et al.\n\n"
diff --git a/src/Main/Forms/ChangePasswordDialog.cpp b/src/Main/Forms/ChangePasswordDialog.cpp
index 397ee693..39da8e60 100644
--- a/src/Main/Forms/ChangePasswordDialog.cpp
+++ b/src/Main/Forms/ChangePasswordDialog.cpp
@@ -171,6 +171,7 @@ namespace VeraCrypt
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
@@ -193,6 +194,7 @@ namespace VeraCrypt
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)
@@ -214,6 +216,9 @@ namespace VeraCrypt
throw ParameterIncorrect (SRC_POS);
}
+ if (masterKeyVulnerable)
+ Gui->ShowWarning ("ERR_XTS_MASTERKEY_VULNERABLE");
+
EndModal (wxID_OK);
}
catch (UnportablePassword &e)
diff --git a/src/Main/Forms/MainFrame.cpp b/src/Main/Forms/MainFrame.cpp
index 6355f139..77f371d8 100644
--- a/src/Main/Forms/MainFrame.cpp
+++ b/src/Main/Forms/MainFrame.cpp
@@ -84,6 +84,7 @@ namespace VeraCrypt
InitTaskBarIcon();
InitEvents();
InitMessageFilter();
+ InitWindowPrivacy();
if (!GetPreferences().SecurityTokenModule.IsEmpty() && !SecurityToken::IsInitialized())
{
@@ -470,6 +471,12 @@ namespace VeraCrypt
#endif
}
+
+ void MainFrame::InitWindowPrivacy ()
+ {
+ Gui->SetContentProtection(!CmdLine->ArgAllowScreencapture);
+ }
+
void MainFrame::InitPreferences ()
{
try
diff --git a/src/Main/Forms/MainFrame.h b/src/Main/Forms/MainFrame.h
index ab70eae3..ed1c44f7 100644
--- a/src/Main/Forms/MainFrame.h
+++ b/src/Main/Forms/MainFrame.h
@@ -84,6 +84,7 @@ namespace VeraCrypt
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 ();
diff --git a/src/Main/Forms/PreferencesDialog.cpp b/src/Main/Forms/PreferencesDialog.cpp
index c4d5140f..4e7644b6 100644
--- a/src/Main/Forms/PreferencesDialog.cpp
+++ b/src/Main/Forms/PreferencesDialog.cpp
@@ -82,15 +82,70 @@ namespace VeraCrypt
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, wxEmptyString, wxDIR_FILES);
+ langCount = wxDir::GetAllFiles(languagesFolder.GetName(), &langArray, "*.xml", wxDIR_FILES);
for (size_t i = 0; i < langCount; ++i) {
wxFileName filename(langArray[i]);
- wxString langId = filename.GetName().AfterLast('.');
- wxString langNative = langEntries[langId];
- if (!langNative.empty()) {
- LanguageListBox->Append(langNative);
+
+ // 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);
+ }
}
}
}
@@ -435,11 +490,11 @@ namespace VeraCrypt
if (LanguageListBox->GetSelection() != wxNOT_FOUND) {
wxString langToFind = LanguageListBox->GetString(LanguageListBox->GetSelection());
- for (const auto &each: langEntries) {
- if (each.second == langToFind) {
- Preferences.Language = each.first;
+ 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;
+ cout << "Lang set to: " << each->first << endl;
#endif
}
}
diff --git a/src/Main/Forms/PreferencesDialog.h b/src/Main/Forms/PreferencesDialog.h
index 50e8489e..5e7f7e71 100644
--- a/src/Main/Forms/PreferencesDialog.h
+++ b/src/Main/Forms/PreferencesDialog.h
@@ -60,50 +60,7 @@ namespace VeraCrypt
UserPreferences Preferences;
bool RestoreValidatorBell;
HotkeyList UnregisteredHotkeys;
- map<wxString, wstring> 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"},
- {"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"繁體中文"}
- };
+ map<wxString, wstring> langEntries;
};
}
diff --git a/src/Main/Forms/VolumeCreationWizard.cpp b/src/Main/Forms/VolumeCreationWizard.cpp
index 3f09e39f..311738ca 100644
--- a/src/Main/Forms/VolumeCreationWizard.cpp
+++ b/src/Main/Forms/VolumeCreationWizard.cpp
@@ -37,6 +37,19 @@
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)
@@ -338,18 +351,6 @@ namespace VeraCrypt
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)));
diff --git a/src/Main/Forms/WaitDialog.h b/src/Main/Forms/WaitDialog.h
index 89de8718..53f5048b 100644
--- a/src/Main/Forms/WaitDialog.h
+++ b/src/Main/Forms/WaitDialog.h
@@ -80,7 +80,7 @@ namespace VeraCrypt
m_bThreadRunning = true;
}
- int GetCharWidth (wxWindow *window) const
+ static int ComputeCharWidth (wxWindow *window)
{
int width;
int height;
@@ -179,7 +179,7 @@ namespace VeraCrypt
{
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(""));