mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-12 03:18:26 -06:00
Remove trailing whitespace
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -104,7 +104,7 @@ namespace VeraCrypt
|
||||
|
||||
if (parser.Parse () > 0)
|
||||
throw_err (_("Incorrect command line specified."));
|
||||
|
||||
|
||||
if (parser.Found (L"help"))
|
||||
{
|
||||
ArgCommand = CommandId::Help;
|
||||
@@ -192,7 +192,7 @@ namespace VeraCrypt
|
||||
ArgCommand = CommandId::CreateKeyfile;
|
||||
param1IsFile = true;
|
||||
}
|
||||
|
||||
|
||||
if (parser.Found (L"delete-token-keyfiles"))
|
||||
{
|
||||
CheckCommandSingle();
|
||||
@@ -205,7 +205,7 @@ namespace VeraCrypt
|
||||
ArgCommand = CommandId::DismountVolumes;
|
||||
param1IsMountedVolumeSpec = true;
|
||||
}
|
||||
|
||||
|
||||
if (parser.Found (L"export-token-keyfile"))
|
||||
{
|
||||
CheckCommandSingle();
|
||||
@@ -294,7 +294,7 @@ namespace VeraCrypt
|
||||
else
|
||||
{
|
||||
ArgMountOptions.FilesystemType = wstring (str);
|
||||
|
||||
|
||||
if (str.IsSameAs (L"FAT", false))
|
||||
ArgFilesystem = VolumeCreationOptions::FilesystemType::FAT;
|
||||
#ifdef TC_LINUX
|
||||
@@ -309,7 +309,7 @@ namespace VeraCrypt
|
||||
else if (str.IsSameAs (L"exFAT", false))
|
||||
ArgFilesystem = VolumeCreationOptions::FilesystemType::exFAT;
|
||||
#elif defined (TC_MACOSX)
|
||||
else if ( str.IsSameAs (L"HFS", false)
|
||||
else if ( str.IsSameAs (L"HFS", false)
|
||||
|| str.IsSameAs (L"HFS+", false)
|
||||
|| str.IsSameAs (L"MacOsExt", false)
|
||||
)
|
||||
@@ -328,7 +328,7 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
ArgForce = parser.Found (L"force");
|
||||
|
||||
|
||||
ArgTrueCryptMode = parser.Found (L"truecrypt");
|
||||
|
||||
#if !defined(TC_WINDOWS) && !defined(TC_MACOSX)
|
||||
@@ -402,7 +402,7 @@ namespace VeraCrypt
|
||||
|
||||
if (parser.Found (L"new-password", &str))
|
||||
ArgNewPassword = ToUTF8Password (str.c_str());
|
||||
|
||||
|
||||
if (parser.Found (L"new-pim", &str))
|
||||
{
|
||||
try
|
||||
@@ -419,7 +419,7 @@ namespace VeraCrypt
|
||||
else if (ArgNewPim > 0 && ArgTrueCryptMode)
|
||||
throw_err (LangString["PIM_NOT_SUPPORTED_FOR_TRUECRYPT_MODE"]);
|
||||
}
|
||||
|
||||
|
||||
if (parser.Found (L"non-interactive"))
|
||||
{
|
||||
if (interfaceType != UserInterfaceType::Text)
|
||||
@@ -478,13 +478,13 @@ namespace VeraCrypt
|
||||
ArgMountOptions.ProtectionKeyfiles = ToKeyfileList (str);
|
||||
ArgMountOptions.Protection = VolumeProtection::HiddenVolumeReadOnly;
|
||||
}
|
||||
|
||||
|
||||
if (parser.Found (L"protection-password", &str))
|
||||
{
|
||||
ArgMountOptions.ProtectionPassword = ToUTF8Password (str.c_str());
|
||||
ArgMountOptions.Protection = VolumeProtection::HiddenVolumeReadOnly;
|
||||
}
|
||||
|
||||
|
||||
if (parser.Found (L"protection-pim", &str))
|
||||
{
|
||||
int pim = -1;
|
||||
@@ -609,7 +609,7 @@ namespace VeraCrypt
|
||||
// Parameters
|
||||
if (parser.GetParamCount() > 0)
|
||||
{
|
||||
// in case of GUI interface, we load the preference when only
|
||||
// in case of GUI interface, we load the preference when only
|
||||
// specifying volume path without any option/switch
|
||||
if (Application::GetUserInterfaceType() != UserInterfaceType::Text)
|
||||
{
|
||||
@@ -634,7 +634,7 @@ namespace VeraCrypt
|
||||
if (param1IsVolume)
|
||||
{
|
||||
wxFileName volPath (parser.GetParam (0));
|
||||
|
||||
|
||||
#ifdef TC_WINDOWS
|
||||
if (!parser.GetParam (0).StartsWith (L"\\Device\\"))
|
||||
#endif
|
||||
@@ -699,7 +699,7 @@ namespace VeraCrypt
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (token.empty() && !tokenizer.HasMoreTokens())
|
||||
break;
|
||||
|
||||
@@ -758,7 +758,7 @@ namespace VeraCrypt
|
||||
filteredVolumes.push_back (volume);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!mountedVolumeSpec.IsEmpty() && filteredVolumes.size() < 1)
|
||||
throw_err (_("No such volume is mounted."));
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -95,7 +95,7 @@ namespace VeraCrypt
|
||||
CommandLineInterface (const CommandLineInterface &);
|
||||
CommandLineInterface &operator= (const CommandLineInterface &);
|
||||
};
|
||||
|
||||
|
||||
shared_ptr<VolumePassword> ToUTF8Password (const wchar_t* str, size_t charCount = (size_t) -1);
|
||||
shared_ptr<SecureBuffer> ToUTF8Buffer (const wchar_t* str, size_t charCount = (size_t) -1);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -111,7 +111,7 @@ namespace VeraCrypt
|
||||
std::set_terminate (DefaultTerminateHandler);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
uint32 FatalErrorHandler::GetAppChecksum ()
|
||||
{
|
||||
uint32 checkSum = 0;
|
||||
@@ -130,7 +130,7 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
wstring FatalErrorHandler::GetCallStack (int depth)
|
||||
{
|
||||
{
|
||||
#if wxUSE_STACKWALKER == 1
|
||||
|
||||
class StackWalker : public wxStackWalker
|
||||
@@ -176,7 +176,7 @@ namespace VeraCrypt
|
||||
return stackWalker.StackVars.str();
|
||||
|
||||
#else // wxUSE_STACKWALKER
|
||||
|
||||
|
||||
return wstring();
|
||||
|
||||
#endif // wxUSE_STACKWALKER
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -31,7 +31,7 @@ namespace VeraCrypt
|
||||
wstring attr = wstring (node.Attributes[L"slotnumber"]);
|
||||
if (!attr.empty())
|
||||
slotNumber = StringConverter::ToUInt64 (attr);
|
||||
|
||||
|
||||
bool readOnly = false;
|
||||
attr = wstring (node.Attributes[L"readonly"]);
|
||||
if (!attr.empty())
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -21,7 +21,7 @@ namespace VeraCrypt
|
||||
{
|
||||
public:
|
||||
AboutDialog (wxWindow* parent);
|
||||
|
||||
|
||||
void OnWebsiteHyperlinkClick (wxHyperlinkEvent& event) { Gui->OpenHomepageLink (this, L"main"); }
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -68,7 +68,7 @@ namespace VeraCrypt
|
||||
|
||||
wxBusyCursor busy;
|
||||
Buffer buffer ((size_t) Gui->GetSelectedData <size_t> (BufferSizeChoice));
|
||||
|
||||
|
||||
BenchmarkThreadRoutine routine(this, results, buffer);
|
||||
Gui->ExecuteWaitThreadRoutine (this, &routine);
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace VeraCrypt
|
||||
foreach (const BenchmarkResult &result, results)
|
||||
{
|
||||
vector <wstring> fields (BenchmarkListCtrl->GetColumnCount());
|
||||
|
||||
|
||||
fields[ColumnAlgorithm] = result.AlgorithmName;
|
||||
fields[ColumnEncryption] = Gui->SpeedToString (result.EncryptionSpeed);
|
||||
fields[ColumnDecryption] = Gui->SpeedToString (result.DecryptionSpeed);
|
||||
@@ -85,10 +85,10 @@ namespace VeraCrypt
|
||||
|
||||
Gui->AppendToListCtrl (BenchmarkListCtrl, fields);
|
||||
}
|
||||
|
||||
|
||||
BenchmarkListCtrl->SetColumnWidth(0, wxLIST_AUTOSIZE);
|
||||
}
|
||||
|
||||
|
||||
void BenchmarkDialog::DoBenchmark (list<BenchmarkResult>& results, Buffer& buffer)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -42,7 +42,7 @@ namespace VeraCrypt
|
||||
|
||||
void DoBenchmark (list<BenchmarkResult>& results, Buffer& buffer);
|
||||
void OnBenchmarkButtonClick (wxCommandEvent& event);
|
||||
|
||||
|
||||
class BenchmarkThreadRoutine : public WaitThreadRoutine
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -59,7 +59,7 @@ namespace VeraCrypt
|
||||
NewPasswordPanel = new VolumePasswordPanel (this, NULL, newPassword, true, newKeyfiles, false, enableNewPassword, enableNewKeyfiles, enableNewPassword, enablePkcs5Prf);
|
||||
NewPasswordPanel->UpdateEvent.Connect (EventConnector <ChangePasswordDialog> (this, &ChangePasswordDialog::OnPasswordPanelUpdate));
|
||||
NewPasswordPanelSizer->Add (NewPasswordPanel, 1, wxALL | wxEXPAND);
|
||||
|
||||
|
||||
if (mode == Mode::RemoveAllKeyfiles)
|
||||
NewSizer->Show (false);
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace VeraCrypt
|
||||
CurrentPasswordPanel->SetFocusToPimTextCtrl();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
shared_ptr <VolumePassword> newPassword;
|
||||
int newPim = 0;
|
||||
if (DialogMode == Mode::ChangePasswordAndKeyfiles)
|
||||
@@ -110,7 +110,7 @@ namespace VeraCrypt
|
||||
catch (PasswordException& e)
|
||||
{
|
||||
Gui->ShowWarning (e);
|
||||
NewPasswordPanel->SetFocusToPasswordTextCtrl();
|
||||
NewPasswordPanel->SetFocusToPasswordTextCtrl();
|
||||
return;
|
||||
}
|
||||
newPim = NewPasswordPanel->GetVolumePim();
|
||||
@@ -126,7 +126,7 @@ namespace VeraCrypt
|
||||
{
|
||||
if (newPim > 0 && newPim < 485)
|
||||
{
|
||||
Gui->ShowError ("PIM_REQUIRE_LONG_PASSWORD");
|
||||
Gui->ShowError ("PIM_REQUIRE_LONG_PASSWORD");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ namespace VeraCrypt
|
||||
|
||||
if (passwordEmpty && keyfilesEmpty)
|
||||
ok = false;
|
||||
|
||||
|
||||
if (CurrentPasswordPanel->GetVolumePim () == -1)
|
||||
ok = false;
|
||||
|
||||
@@ -251,7 +251,7 @@ namespace VeraCrypt
|
||||
ok = false;
|
||||
|
||||
if (DialogMode == Mode::ChangePasswordAndKeyfiles
|
||||
&& ( (NewPasswordPanel->GetPassword()->IsEmpty() && newKeyfilesEmpty)
|
||||
&& ( (NewPasswordPanel->GetPassword()->IsEmpty() && newKeyfilesEmpty)
|
||||
|| !NewPasswordPanel->PasswordsMatch()
|
||||
|| (NewPasswordPanel->GetVolumePim() == -1)
|
||||
)
|
||||
@@ -265,12 +265,12 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
OKButton->Enable (ok);
|
||||
|
||||
|
||||
if (DialogMode == Mode::ChangePasswordAndKeyfiles)
|
||||
{
|
||||
bool pimChanged = (CurrentPasswordPanel->GetVolumePim() != NewPasswordPanel->GetVolumePim());
|
||||
NewPasswordPanel->UpdatePimHelpText(pimChanged);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -39,7 +39,7 @@ namespace VeraCrypt
|
||||
DeviceListCtrl->InsertColumn (ColumnMountPoint, LangString["MOUNT_POINT"], wxLIST_FORMAT_LEFT, 1);
|
||||
colPermilles.push_back (396);
|
||||
#endif
|
||||
|
||||
|
||||
wxImageList *imageList = new wxImageList (16, 12, true);
|
||||
imageList->Add (Resources::GetDriveIconBitmap(), Resources::GetDriveIconMaskBitmap());
|
||||
DeviceListCtrl->AssignImageList (imageList, wxIMAGE_LIST_SMALL);
|
||||
@@ -65,13 +65,13 @@ namespace VeraCrypt
|
||||
fields[ColumnMountPoint] = device.MountPoint;
|
||||
#endif
|
||||
fields[ColumnSize] = Gui->SizeToString (device.Size);
|
||||
Gui->AppendToListCtrl (DeviceListCtrl, fields, 0, &device);
|
||||
Gui->AppendToListCtrl (DeviceListCtrl, fields, 0, &device);
|
||||
|
||||
foreach_ref (HostDevice &partition, device.Partitions)
|
||||
{
|
||||
fields[ColumnDevice] =
|
||||
fields[ColumnDevice] =
|
||||
#ifndef TC_WINDOWS
|
||||
wstring (L" ") +
|
||||
wstring (L" ") +
|
||||
#endif
|
||||
wstring (partition.Path);
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace VeraCrypt
|
||||
StdButtonsOK->Disable();
|
||||
StdButtonsOK->SetDefault();
|
||||
}
|
||||
|
||||
|
||||
void DeviceSelectionDialog::OnListItemActivated (wxListEvent& event)
|
||||
{
|
||||
if (StdButtonsOK->IsEnabled())
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -32,7 +32,7 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
EncryptionAlgorithmChoice->Select (0);
|
||||
|
||||
|
||||
Hashes = Hash::GetAvailableAlgorithms();
|
||||
foreach (shared_ptr <Hash> hash, Hashes)
|
||||
{
|
||||
@@ -117,7 +117,7 @@ namespace VeraCrypt
|
||||
{
|
||||
Gui->OpenHomepageLink (this, L"hashalgorithms");
|
||||
}
|
||||
|
||||
|
||||
void EncryptionOptionsWizardPage::OnTestButtonClick (wxCommandEvent& event)
|
||||
{
|
||||
EncryptionTestDialog dialog (this);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -46,7 +46,7 @@ namespace VeraCrypt
|
||||
|
||||
Buffer key;
|
||||
GetTextCtrlData (KeyTextCtrl, key);
|
||||
|
||||
|
||||
if (key.Size() != ea->GetKeySize())
|
||||
throw_err (LangString["TEST_KEY_SIZE"]);
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace VeraCrypt
|
||||
|
||||
Buffer sector (ENCRYPTION_DATA_UNIT_SIZE);
|
||||
BufferPtr block = sector.GetRange (blockNumber * ea->GetMaxBlockSize(), ea->GetMaxBlockSize());
|
||||
|
||||
|
||||
block.CopyFrom (data);
|
||||
|
||||
if (encrypt)
|
||||
@@ -130,7 +130,7 @@ namespace VeraCrypt
|
||||
{
|
||||
return Gui->GetSelectedData <EncryptionAlgorithm> (EncryptionAlgorithmChoice)->GetNew();
|
||||
}
|
||||
|
||||
|
||||
void EncryptionTestDialog::GetTextCtrlData (wxTextCtrl *textCtrl, Buffer &buffer) const
|
||||
{
|
||||
vector <byte> data;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -32,7 +32,7 @@ namespace VeraCrypt
|
||||
Layout();
|
||||
Fit();
|
||||
Center();
|
||||
|
||||
|
||||
#ifdef TC_MACOSX
|
||||
// wxMac cannot insert items to wxListCtrl due to a bug
|
||||
MoveUpButton->Show (false);
|
||||
@@ -46,7 +46,7 @@ namespace VeraCrypt
|
||||
fields[ColumnVolumePath] = favorite->Path;
|
||||
fields[ColumnMountPoint] = favorite->MountPoint;
|
||||
Gui->AppendToListCtrl (FavoritesListCtrl, fields, -1, favorite.get());
|
||||
|
||||
|
||||
if (++itemCount > Favorites.size() - newItemCount)
|
||||
{
|
||||
FavoritesListCtrl->SetItemState (itemCount - 1, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
|
||||
@@ -57,7 +57,7 @@ namespace VeraCrypt
|
||||
UpdateButtons();
|
||||
FavoritesListCtrl->SetFocus();
|
||||
}
|
||||
|
||||
|
||||
void FavoriteVolumesDialog::OnMoveDownButtonClick (wxCommandEvent& event)
|
||||
{
|
||||
FreezeScope freeze (this);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -35,7 +35,7 @@ namespace VeraCrypt
|
||||
void OnRemoveAllButtonClick (wxCommandEvent& event);
|
||||
void OnRemoveButtonClick (wxCommandEvent& event);
|
||||
void UpdateButtons ();
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
ColumnVolumePath = 0,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
namespace VeraCrypt
|
||||
{
|
||||
KeyfileGeneratorDialog::KeyfileGeneratorDialog (wxWindow* parent) : KeyfileGeneratorDialogBase (parent)
|
||||
KeyfileGeneratorDialog::KeyfileGeneratorDialog (wxWindow* parent) : KeyfileGeneratorDialogBase (parent)
|
||||
{
|
||||
RandomNumberGenerator::Start();
|
||||
|
||||
|
||||
Hashes = Hash::GetAvailableAlgorithms();
|
||||
foreach (shared_ptr <Hash> hash, Hashes)
|
||||
{
|
||||
@@ -33,7 +33,7 @@ namespace VeraCrypt
|
||||
|
||||
HideBytes (RandomPoolStaticText, 24);
|
||||
MouseStaticText->Wrap (Gui->GetCharWidth (MouseStaticText) * 70);
|
||||
|
||||
|
||||
CollectedEntropy->SetRange (RNG_POOL_SIZE * 8);
|
||||
|
||||
MainSizer->SetMinSize (wxSize (-1, Gui->GetCharHeight (this) * 24));
|
||||
@@ -41,7 +41,7 @@ namespace VeraCrypt
|
||||
Layout();
|
||||
Fit();
|
||||
Center();
|
||||
|
||||
|
||||
MouseEventsCounter = 0;
|
||||
|
||||
foreach (wxWindow *c, this->GetChildren())
|
||||
@@ -57,36 +57,36 @@ namespace VeraCrypt
|
||||
try
|
||||
{
|
||||
int keyfilesCount = NumberOfKeyfiles->GetValue();
|
||||
int keyfilesSize = KeyfilesSize->GetValue();
|
||||
int keyfilesSize = KeyfilesSize->GetValue();
|
||||
bool useRandomSize = RandomSizeCheckBox->IsChecked();
|
||||
wxString keyfileBaseName = KeyfilesBaseName->GetValue();
|
||||
keyfileBaseName.Trim(true);
|
||||
keyfileBaseName.Trim(false);
|
||||
|
||||
|
||||
if (keyfileBaseName.IsEmpty())
|
||||
{
|
||||
Gui->ShowWarning("KEYFILE_EMPTY_BASE_NAME");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
wxFileName baseFileName = wxFileName::FileName (keyfileBaseName);
|
||||
if (!baseFileName.IsOk())
|
||||
{
|
||||
Gui->ShowWarning("KEYFILE_INVALID_BASE_NAME");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
DirectoryPath keyfilesDir = Gui->SelectDirectory (Gui->GetActiveWindow(), LangString["SELECT_KEYFILE_GENERATION_DIRECTORY"], false);
|
||||
if (keyfilesDir.IsEmpty())
|
||||
return;
|
||||
|
||||
|
||||
wxFileName dirFileName = wxFileName::DirName( wstring(keyfilesDir).c_str() );
|
||||
if (!dirFileName.IsDirWritable ())
|
||||
{
|
||||
Gui->ShowWarning(L"You don't have write permission on the selected directory");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
wxBusyCursor busy;
|
||||
for (int i = 0; i < keyfilesCount; i++)
|
||||
{
|
||||
@@ -95,26 +95,26 @@ namespace VeraCrypt
|
||||
{
|
||||
SecureBuffer sizeBuffer (sizeof(int));
|
||||
RandomNumberGenerator::GetData (sizeBuffer, true);
|
||||
|
||||
|
||||
memcpy(&bufferLen, sizeBuffer.Ptr(), sizeof(int));
|
||||
|
||||
/* since keyfilesSize < 1024 * 1024, we mask with 0x000FFFFF */
|
||||
bufferLen = (long) (((unsigned long) bufferLen) & 0x000FFFFF);
|
||||
|
||||
bufferLen %= ((1024*1024 - 64) + 1);
|
||||
bufferLen += 64;
|
||||
bufferLen += 64;
|
||||
}
|
||||
else
|
||||
bufferLen = keyfilesSize;
|
||||
|
||||
SecureBuffer keyfileBuffer (bufferLen);
|
||||
RandomNumberGenerator::GetData (keyfileBuffer, true);
|
||||
|
||||
|
||||
wstringstream convertStream;
|
||||
convertStream << i;
|
||||
wxString suffix = L"_";
|
||||
suffix += convertStream.str().c_str();
|
||||
|
||||
wxString suffix = L"_";
|
||||
suffix += convertStream.str().c_str();
|
||||
|
||||
wxFileName keyfileName;
|
||||
if (i == 0)
|
||||
{
|
||||
@@ -131,12 +131,12 @@ namespace VeraCrypt
|
||||
keyfileName.Assign(dirFileName.GetPath(), keyfileBaseName + suffix);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (keyfileName.Exists())
|
||||
{
|
||||
wxString msg = wxString::Format(LangString["KEYFILE_ALREADY_EXISTS"], keyfileName.GetFullPath());
|
||||
if (!Gui->AskYesNo (msg, false, true))
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
@@ -175,7 +175,7 @@ namespace VeraCrypt
|
||||
ShowBytes (RandomPoolStaticText, RandomNumberGenerator::PeekPool().GetRange (0, 24));
|
||||
else
|
||||
HideBytes (RandomPoolStaticText, 24);
|
||||
|
||||
|
||||
/* conservative estimate: 1 mouse move event brings 1 bit of entropy
|
||||
* https://security.stackexchange.com/questions/32844/for-how-much-time-should-i-randomly-move-the-mouse-for-generating-encryption-key/32848#32848
|
||||
*/
|
||||
@@ -183,7 +183,7 @@ namespace VeraCrypt
|
||||
if (MouseEventsCounter < (RNG_POOL_SIZE * 8))
|
||||
CollectedEntropy->SetValue (++MouseEventsCounter);
|
||||
}
|
||||
|
||||
|
||||
void KeyfileGeneratorDialog::OnShowRandomPoolCheckBoxClicked (wxCommandEvent& event)
|
||||
{
|
||||
if (!event.IsChecked())
|
||||
@@ -217,7 +217,7 @@ namespace VeraCrypt
|
||||
str[i] = L'X';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void KeyfileGeneratorDialog::HideBytes (wxStaticText *textCtrl, size_t len)
|
||||
{
|
||||
wxString str;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -32,7 +32,7 @@ namespace VeraCrypt
|
||||
void OnRandomSizeCheckBoxClicked( wxCommandEvent& event );
|
||||
void ShowBytes (wxStaticText *textCtrl, const ConstBufferPtr &buffer, bool appendDots = true);
|
||||
void HideBytes (wxStaticText *textCtrl, size_t len);
|
||||
|
||||
|
||||
HashList Hashes;
|
||||
int MouseEventsCounter;
|
||||
Mutex AccessMutex;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -35,7 +35,7 @@ namespace VeraCrypt
|
||||
Fit();
|
||||
Center();
|
||||
}
|
||||
|
||||
|
||||
void KeyfilesDialog::OnCreateKeyfileButttonClick (wxCommandEvent& event)
|
||||
{
|
||||
Gui->CreateKeyfile();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -84,7 +84,7 @@ namespace VeraCrypt
|
||||
|
||||
return keyfiles;
|
||||
}
|
||||
|
||||
|
||||
void KeyfilesPanel::OnAddDirectoryButtonClick (wxCommandEvent& event)
|
||||
{
|
||||
DirectoryPath dir = Gui->SelectDirectory (this, LangString["SELECT_KEYFILE_PATH"]);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -22,7 +22,7 @@ namespace VeraCrypt
|
||||
LegalNoticesTextCtrl->SetMinSize (wxSize (
|
||||
Gui->GetCharWidth (LegalNoticesTextCtrl) * 88,
|
||||
Gui->GetCharHeight (LegalNoticesTextCtrl) * 28));
|
||||
|
||||
|
||||
Layout();
|
||||
Fit();
|
||||
Center();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -208,7 +208,7 @@ namespace VeraCrypt
|
||||
wstring args = StringFormatter (repair ? L"/C echo {0} & chkdsk {1} /F /X & pause" : L"/C echo {0} & chkdsk {1} & pause",
|
||||
StringFormatter (LangString[repair ? "REPAIRING_FS" : "CHECKING_FS"], mountPoint), mountPoint);
|
||||
|
||||
ShellExecute (static_cast <HWND> (GetHandle()),
|
||||
ShellExecute (static_cast <HWND> (GetHandle()),
|
||||
L"runas",
|
||||
L"cmd.exe", args.c_str(), nullptr, SW_SHOW);
|
||||
#else
|
||||
@@ -260,7 +260,7 @@ namespace VeraCrypt
|
||||
void MainFrame::InitControls ()
|
||||
{
|
||||
LogoBitmap->SetBitmap (Resources::GetLogoBitmap());
|
||||
|
||||
|
||||
list <int> colPermilles;
|
||||
|
||||
#ifndef TC_WINDOWS
|
||||
@@ -280,7 +280,7 @@ namespace VeraCrypt
|
||||
MountAllDevicesButton->SetLabel (_("Mount All Devices"));
|
||||
#endif
|
||||
|
||||
#ifdef TC_WINDOWS
|
||||
#ifdef TC_WINDOWS
|
||||
SlotListCtrl->InsertColumn (ColumnSlot, LangString["DRIVE"], wxLIST_FORMAT_LEFT, 1);
|
||||
colPermilles.push_back (75);
|
||||
#else
|
||||
@@ -289,20 +289,20 @@ namespace VeraCrypt
|
||||
#endif
|
||||
|
||||
SlotListCtrl->InsertColumn (ColumnPath, LangString["VOLUME"], wxLIST_FORMAT_LEFT, 1);
|
||||
#ifdef TC_WINDOWS
|
||||
#ifdef TC_WINDOWS
|
||||
colPermilles.push_back (487);
|
||||
#else
|
||||
colPermilles.push_back (429);
|
||||
#endif
|
||||
|
||||
SlotListCtrl->InsertColumn (ColumnSize, LangString["SIZE"], wxLIST_FORMAT_RIGHT, 1);
|
||||
#ifdef TC_WINDOWS
|
||||
#ifdef TC_WINDOWS
|
||||
colPermilles.push_back (126);
|
||||
#else
|
||||
colPermilles.push_back (130);
|
||||
#endif
|
||||
|
||||
#ifdef TC_WINDOWS
|
||||
#ifdef TC_WINDOWS
|
||||
SlotListCtrl->InsertColumn (ColumnEA, LangString["ENCRYPTION_ALGORITHM_LV"], wxLIST_FORMAT_LEFT, 1);
|
||||
colPermilles.push_back (233);
|
||||
#else
|
||||
@@ -323,7 +323,7 @@ namespace VeraCrypt
|
||||
|
||||
#ifndef TC_WINDOWS
|
||||
int screenHeight = wxSystemSettings::GetMetric (wxSYS_SCREEN_Y);
|
||||
|
||||
|
||||
if (screenHeight < 480)
|
||||
slotListRowCount = 1;
|
||||
else if (screenHeight <= 600)
|
||||
@@ -355,7 +355,7 @@ namespace VeraCrypt
|
||||
SetMaxSize (GetSize());
|
||||
|
||||
Gui->SetListCtrlColumnWidths (SlotListCtrl, colPermilles);
|
||||
|
||||
|
||||
UpdateVolumeList();
|
||||
UpdateWipeCacheButton();
|
||||
}
|
||||
@@ -434,7 +434,7 @@ namespace VeraCrypt
|
||||
{
|
||||
MainFrame *frame = dynamic_cast <MainFrame *> (Gui->GetMainFrame());
|
||||
PDEV_BROADCAST_HDR hdr = (PDEV_BROADCAST_HDR) lParam;
|
||||
|
||||
|
||||
if (wParam == DBT_DEVICEREMOVECOMPLETE && hdr->dbch_devicetype == DBT_DEVTYP_VOLUME)
|
||||
{
|
||||
PDEV_BROADCAST_VOLUME vol = (PDEV_BROADCAST_VOLUME) lParam;
|
||||
@@ -504,15 +504,15 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
wxMenu *CreatePopupMenu ()
|
||||
{
|
||||
{
|
||||
auto_ptr <wxMenu> popup (new wxMenu);
|
||||
|
||||
Gui->AppendToMenu (*popup, LangString[Gui->IsInBackgroundMode() ? "SHOW_TC" : "HIDE_TC"], this, wxCommandEventHandler (TaskBarIcon::OnShowHideMenuItemSelected));
|
||||
|
||||
|
||||
popup->AppendSeparator();
|
||||
Gui->AppendToMenu (*popup, _("Mount All Favorite Volumes"), this, wxCommandEventHandler (TaskBarIcon::OnMountAllFavoritesMenuItemSelected))->Enable (!Busy);
|
||||
Gui->AppendToMenu (*popup, _("Dismount All Mounted Volumes"), this, wxCommandEventHandler (TaskBarIcon::OnDismountAllMenuItemSelected))->Enable (!Busy);
|
||||
|
||||
|
||||
// Favorite volumes
|
||||
if (Gui->GetPreferences().BackgroundTaskMenuMountItemsEnabled && !Frame->FavoriteVolumesMenuMap.empty())
|
||||
{
|
||||
@@ -628,7 +628,7 @@ namespace VeraCrypt
|
||||
Gui->SetPreferences (prefs);
|
||||
NoHistoryCheckBox->SetValue (!prefs.SaveHistory);
|
||||
}
|
||||
|
||||
|
||||
void MainFrame::MountAllDevices ()
|
||||
{
|
||||
try
|
||||
@@ -891,7 +891,7 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
void MainFrame::OnDefaultMountParametersMenuItemSelected(wxCommandEvent& event)
|
||||
{
|
||||
{
|
||||
#ifdef TC_MACOSX
|
||||
if (Gui->IsInBackgroundMode())
|
||||
Gui->SetBackgroundMode (false);
|
||||
@@ -921,7 +921,7 @@ namespace VeraCrypt
|
||||
if (volume->Path.IsDevice() && !Core->IsDevicePresent (volume->Path))
|
||||
removedVolumes.push_back (volume);
|
||||
}
|
||||
|
||||
|
||||
if (!removedVolumes.empty())
|
||||
Gui->AutoDismountVolumes (removedVolumes, true);
|
||||
}
|
||||
@@ -1035,7 +1035,7 @@ namespace VeraCrypt
|
||||
case Hotkey::Id::MountAllFavorites:
|
||||
{
|
||||
size_t mountedCount = Core->GetMountedVolumes().size();
|
||||
|
||||
|
||||
if (event.GetId() == Hotkey::Id::MountAllDevices)
|
||||
MountAllDevices();
|
||||
else
|
||||
@@ -1102,7 +1102,7 @@ namespace VeraCrypt
|
||||
if (SelectedItemIndex > itemIndex)
|
||||
--SelectedItemIndex;
|
||||
}
|
||||
|
||||
|
||||
void MainFrame::OnListItemDeselected (wxListEvent& event)
|
||||
{
|
||||
OnListItemSelectionChanged();
|
||||
@@ -1155,7 +1155,7 @@ namespace VeraCrypt
|
||||
else if (IsFreeSlotSelected())
|
||||
{
|
||||
Gui->AppendToMenu (popup, _("Mount Volume"), this, wxCommandEventHandler (MainFrame::OnMountVolumeMenuItemSelected));
|
||||
|
||||
|
||||
popup.AppendSeparator();
|
||||
|
||||
Gui->AppendToMenu (popup, LangString["SELECT_FILE_AND_MOUNT"], this, wxCommandEventHandler (MainFrame::OnSelectFileAndMountMenuItemSelected));
|
||||
@@ -1174,12 +1174,12 @@ namespace VeraCrypt
|
||||
SelectedItemIndex = event.GetIndex();
|
||||
OnListItemSelectionChanged();
|
||||
}
|
||||
|
||||
|
||||
void MainFrame::OnListItemSelectionChanged ()
|
||||
{
|
||||
if (SlotListCtrl->GetSelectedItemCount() < 1)
|
||||
SelectedItemIndex = -1;
|
||||
|
||||
|
||||
if (SelectedItemIndex >= 0)
|
||||
SelectedSlotNumber = (VolumeSlotNumber) SlotListCtrl->GetItemData (SelectedItemIndex);
|
||||
else
|
||||
@@ -1187,7 +1187,7 @@ namespace VeraCrypt
|
||||
|
||||
UpdateControls();
|
||||
}
|
||||
|
||||
|
||||
void MainFrame::OnManageSecurityTokenKeyfilesMenuItemSelected (wxCommandEvent& event)
|
||||
{
|
||||
try
|
||||
@@ -1280,7 +1280,7 @@ namespace VeraCrypt
|
||||
|
||||
SavePreferences();
|
||||
}
|
||||
|
||||
|
||||
void MainFrame::OnRestoreVolumeHeaderMenuItemSelected (wxCommandEvent& event)
|
||||
{
|
||||
if (!CheckVolumePathNotEmpty ())
|
||||
@@ -1307,7 +1307,7 @@ namespace VeraCrypt
|
||||
dialog.ShowModal();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MainFrame::OnSelectDeviceAndMountMenuItemSelected (wxCommandEvent& event)
|
||||
{
|
||||
DevicePath path = Gui->SelectDevice (this);
|
||||
@@ -1344,7 +1344,7 @@ namespace VeraCrypt
|
||||
if (!path.IsEmpty())
|
||||
SetVolumePath (path);
|
||||
}
|
||||
|
||||
|
||||
void MainFrame::OnTimer ()
|
||||
{
|
||||
try
|
||||
@@ -1502,7 +1502,7 @@ namespace VeraCrypt
|
||||
WipeCache();
|
||||
Gui->ShowInfo ("PASSWORD_CACHE_WIPED");
|
||||
}
|
||||
|
||||
|
||||
void MainFrame::OpenSelectedVolume () const
|
||||
{
|
||||
shared_ptr <VolumeInfo> selectedVolume = GetSelectedVolume();
|
||||
@@ -1577,7 +1577,7 @@ namespace VeraCrypt
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
void MainFrame::UpdateControls ()
|
||||
{
|
||||
bool mounted = IsMountedSlotSelected();
|
||||
@@ -1585,7 +1585,7 @@ namespace VeraCrypt
|
||||
VolumeButton->SetLabel (mounted ? LangString["DISMOUNT"] : wxString (_("Mount")));
|
||||
VolumePropertiesButton->Enable (mounted);
|
||||
|
||||
DismountVolumeMenuItem->Enable (mounted);
|
||||
DismountVolumeMenuItem->Enable (mounted);
|
||||
MountVolumeMenuItem->Enable (!mounted);
|
||||
VolumePropertiesMenuItem->Enable (mounted);
|
||||
AddToFavoritesMenuItem->Enable (mounted);
|
||||
@@ -1601,7 +1601,7 @@ namespace VeraCrypt
|
||||
bool listChanged = false;
|
||||
|
||||
MountedVolumes = Core->GetMountedVolumes();
|
||||
|
||||
|
||||
map < VolumeSlotNumber, shared_ptr <VolumeInfo> > mountedVolumesMap;
|
||||
foreach (shared_ptr <VolumeInfo> volume, MountedVolumes)
|
||||
{
|
||||
@@ -1632,7 +1632,7 @@ namespace VeraCrypt
|
||||
fields[ColumnPath] = volume->Path;
|
||||
fields[ColumnSize] = Gui->SizeToString (volume->Size);
|
||||
fields[ColumnType] = Gui->VolumeTypeToString (volume->Type, volume->TrueCryptMode, volume->Protection);
|
||||
|
||||
|
||||
if (volume->HiddenVolumeProtectionTriggered)
|
||||
{
|
||||
fields[ColumnType] += L"(!)";
|
||||
@@ -1667,7 +1667,7 @@ namespace VeraCrypt
|
||||
#else
|
||||
fields[ColumnSlot] = StringConverter::FromNumber (slotNumber);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef TC_WINDOWS
|
||||
if (Core->IsMountPointAvailable (fields[ColumnSlot]))
|
||||
#else
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -87,7 +87,7 @@ namespace VeraCrypt
|
||||
void OnCloseAllSecurityTokenSessionsMenuItemSelected (wxCommandEvent& event);
|
||||
void OnDonateMenuItemSelected (wxCommandEvent& event) { Gui->OpenHomepageLink (this, L"donate"); }
|
||||
void OnContactMenuItemSelected (wxCommandEvent& event) { Gui->OpenHomepageLink (this, L"contact"); }
|
||||
void OnCreateKeyfileMenuItemSelected (wxCommandEvent& event)
|
||||
void OnCreateKeyfileMenuItemSelected (wxCommandEvent& event)
|
||||
{
|
||||
#ifdef TC_MACOSX
|
||||
if (Gui->IsInBackgroundMode())
|
||||
@@ -161,7 +161,7 @@ namespace VeraCrypt
|
||||
void UpdateVolumeList ();
|
||||
void UpdateWipeCacheButton ();
|
||||
void WipeCache ();
|
||||
|
||||
|
||||
struct VolumeActivityMapEntry
|
||||
{
|
||||
VolumeActivityMapEntry () { }
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -85,21 +85,21 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
void MountOptionsDialog::OnOKButtonClick (wxCommandEvent& event)
|
||||
{
|
||||
{
|
||||
bool bUnsupportedKdf = false;
|
||||
|
||||
|
||||
/* verify that PIM values are valid before continuing*/
|
||||
int Pim = PasswordPanel->GetVolumePim();
|
||||
int ProtectionPim = (!ReadOnlyCheckBox->IsChecked() && ProtectionCheckBox->IsChecked())?
|
||||
ProtectionPasswordPanel->GetVolumePim() : 0;
|
||||
|
||||
|
||||
/* invalid PIM: set focus to PIM field and stop processing */
|
||||
if (-1 == Pim || (PartitionInSystemEncryptionScopeCheckBox->IsChecked() && Pim > MAX_BOOT_PIM_VALUE))
|
||||
{
|
||||
PasswordPanel->SetFocusToPimTextCtrl();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (-1 == ProtectionPim || (PartitionInSystemEncryptionScopeCheckBox->IsChecked() && ProtectionPim > MAX_BOOT_PIM_VALUE))
|
||||
{
|
||||
ProtectionPasswordPanel->SetFocusToPimTextCtrl();
|
||||
@@ -142,7 +142,7 @@ namespace VeraCrypt
|
||||
Gui->ShowWarning (e);
|
||||
return;
|
||||
}
|
||||
Options.Protection = VolumeProtection::HiddenVolumeReadOnly;
|
||||
Options.Protection = VolumeProtection::HiddenVolumeReadOnly;
|
||||
Options.ProtectionPim = ProtectionPim;
|
||||
Options.ProtectionKdf = ProtectionPasswordPanel->GetPkcs5Kdf(Options.TrueCryptMode, bUnsupportedKdf);
|
||||
if (bUnsupportedKdf)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -52,16 +52,16 @@ namespace VeraCrypt
|
||||
MountRemovableCheckBox->SetValidator (wxGenericValidator (&Preferences.DefaultMountOptions.Removable));
|
||||
|
||||
FilesystemOptionsTextCtrl->SetValue (Preferences.DefaultMountOptions.FilesystemOptions);
|
||||
|
||||
|
||||
TrueCryptModeCheckBox->SetValidator (wxGenericValidator (&Preferences.DefaultMountOptions.TrueCryptMode));
|
||||
|
||||
|
||||
int index, prfInitialIndex = 0;
|
||||
Pkcs5PrfChoice->Append (LangString["AUTODETECTION"]);
|
||||
Pkcs5PrfChoice->Append (LangString["AUTODETECTION"]);
|
||||
|
||||
foreach_ref (const Pkcs5Kdf &kdf, Pkcs5Kdf::GetAvailableAlgorithms(false))
|
||||
{
|
||||
index = Pkcs5PrfChoice->Append (kdf.GetName());
|
||||
if (Preferences.DefaultMountOptions.Kdf
|
||||
if (Preferences.DefaultMountOptions.Kdf
|
||||
&& (Preferences.DefaultMountOptions.Kdf->GetName() == kdf.GetName())
|
||||
)
|
||||
{
|
||||
@@ -157,7 +157,7 @@ namespace VeraCrypt
|
||||
colPermilles.push_back (358);
|
||||
|
||||
vector <wstring> fields (HotkeyListCtrl->GetColumnCount());
|
||||
|
||||
|
||||
UnregisteredHotkeys = Preferences.Hotkeys;
|
||||
Hotkey::UnregisterList (Gui->GetMainFrame(), UnregisteredHotkeys);
|
||||
|
||||
@@ -363,7 +363,7 @@ namespace VeraCrypt
|
||||
#endif
|
||||
if (!Validate())
|
||||
return;
|
||||
|
||||
|
||||
shared_ptr <Pkcs5Kdf> selectedKdf;
|
||||
if (Pkcs5PrfChoice->GetSelection () != 0)
|
||||
{
|
||||
@@ -383,7 +383,7 @@ namespace VeraCrypt
|
||||
Preferences.DefaultMountOptions.Protection = MountReadOnlyCheckBox->IsChecked() ? VolumeProtection::ReadOnly : VolumeProtection::None;
|
||||
Preferences.DefaultMountOptions.FilesystemOptions = FilesystemOptionsTextCtrl->GetValue();
|
||||
Preferences.DefaultKeyfiles = *DefaultKeyfilesPanel->GetKeyfiles();
|
||||
|
||||
|
||||
Preferences.DefaultMountOptions.Kdf = selectedKdf;
|
||||
Preferences.DefaultMountOptions.ProtectionKdf = selectedKdf;
|
||||
|
||||
@@ -403,7 +403,7 @@ namespace VeraCrypt
|
||||
}
|
||||
else
|
||||
{
|
||||
Gui->InitSecurityTokenLibrary();
|
||||
Gui->InitSecurityTokenLibrary();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -419,7 +419,7 @@ namespace VeraCrypt
|
||||
|
||||
EndModal (wxID_OK);
|
||||
}
|
||||
|
||||
|
||||
void PreferencesDialog::OnPreserveTimestampsCheckBoxClick (wxCommandEvent& event)
|
||||
{
|
||||
#ifdef TC_LINUX
|
||||
@@ -504,7 +504,7 @@ namespace VeraCrypt
|
||||
HotkeyAltCheckBox->SetValue (alt);
|
||||
HotkeyWinCheckBox->SetValue (win);
|
||||
|
||||
HotkeyTextCtrl->ChangeValue (Hotkey::GetVirtualKeyCodeString (LastVirtualKeyPressed));
|
||||
HotkeyTextCtrl->ChangeValue (Hotkey::GetVirtualKeyCodeString (LastVirtualKeyPressed));
|
||||
UpdateHotkeyButtons();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -53,7 +53,7 @@ namespace VeraCrypt
|
||||
};
|
||||
|
||||
KeyfilesPanel *DefaultKeyfilesPanel;
|
||||
int LastVirtualKeyPressed;
|
||||
int LastVirtualKeyPressed;
|
||||
auto_ptr <wxTimer> mTimer;
|
||||
UserPreferences Preferences;
|
||||
bool RestoreValidatorBell;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
namespace VeraCrypt
|
||||
{
|
||||
RandomPoolEnrichmentDialog::RandomPoolEnrichmentDialog (wxWindow* parent) : RandomPoolEnrichmentDialogBase (parent)
|
||||
RandomPoolEnrichmentDialog::RandomPoolEnrichmentDialog (wxWindow* parent) : RandomPoolEnrichmentDialogBase (parent)
|
||||
{
|
||||
RandomNumberGenerator::Start();
|
||||
|
||||
|
||||
Hashes = Hash::GetAvailableAlgorithms();
|
||||
foreach (shared_ptr <Hash> hash, Hashes)
|
||||
{
|
||||
@@ -35,7 +35,7 @@ namespace VeraCrypt
|
||||
|
||||
HideBytes (RandomPoolStaticText, 24);
|
||||
MouseStaticText->Wrap (Gui->GetCharWidth (MouseStaticText) * 70);
|
||||
|
||||
|
||||
CollectedEntropy->SetRange (RNG_POOL_SIZE * 8);
|
||||
|
||||
MainSizer->SetMinSize (wxSize (-1, Gui->GetCharHeight (this) * 24));
|
||||
@@ -43,7 +43,7 @@ namespace VeraCrypt
|
||||
Layout();
|
||||
Fit();
|
||||
Center();
|
||||
|
||||
|
||||
MouseEventsCounter = 0;
|
||||
|
||||
foreach (wxWindow *c, this->GetChildren())
|
||||
@@ -107,7 +107,7 @@ namespace VeraCrypt
|
||||
str[i] = L'X';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void RandomPoolEnrichmentDialog::HideBytes (wxStaticText *textCtrl, size_t len)
|
||||
{
|
||||
wxString str;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -30,7 +30,7 @@ namespace VeraCrypt
|
||||
void OnShowRandomPoolCheckBoxClicked (wxCommandEvent& event);
|
||||
void ShowBytes (wxStaticText *textCtrl, const ConstBufferPtr &buffer);
|
||||
void HideBytes (wxStaticText *textCtrl, size_t len);
|
||||
|
||||
|
||||
HashList Hashes;
|
||||
int MouseEventsCounter;
|
||||
Mutex AccessMutex;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -65,7 +65,7 @@ namespace VeraCrypt
|
||||
fields[ColumnSecurityTokenLabel] = key.Token.Label;
|
||||
fields[ColumnSecurityTokenKeyfileLabel] = key.Id;
|
||||
|
||||
Gui->AppendToListCtrl (SecurityTokenKeyfileListCtrl, fields, 0, &SecurityTokenKeyfileList[i++]);
|
||||
Gui->AppendToListCtrl (SecurityTokenKeyfileListCtrl, fields, 0, &SecurityTokenKeyfileList[i++]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace VeraCrypt
|
||||
{
|
||||
wxBusyCursor busy;
|
||||
SecurityToken::CreateKeyfile (newKeyfileDialog.GetSelectedSlotId(), keyfileData, StringConverter::ToSingle (newKeyfileDialog.GetKeyfileName()));
|
||||
|
||||
|
||||
FillSecurityTokenKeyfileListCtrl();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -25,7 +25,7 @@ namespace VeraCrypt
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void SelectDirectoryWizardPage::OnBrowseButtonClick (wxCommandEvent& event)
|
||||
{
|
||||
DirectoryPath dir = Gui->SelectDirectory (this);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -54,7 +54,7 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
VolumeCreationProgressWizardPage *Page;
|
||||
};
|
||||
};
|
||||
|
||||
RandomPoolTimer.reset (dynamic_cast <wxTimer *> (new Timer (this)));
|
||||
RandomPoolTimer->Start (30);
|
||||
@@ -73,9 +73,9 @@ namespace VeraCrypt
|
||||
{
|
||||
if (!event.IsChecked())
|
||||
{
|
||||
ShowAsterisks (RandomPoolSampleStaticText);
|
||||
ShowAsterisks (HeaderKeySampleStaticText);
|
||||
ShowAsterisks (MasterKeySampleStaticText);
|
||||
ShowAsterisks (RandomPoolSampleStaticText);
|
||||
ShowAsterisks (HeaderKeySampleStaticText);
|
||||
ShowAsterisks (MasterKeySampleStaticText);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -84,7 +84,7 @@ namespace VeraCrypt
|
||||
MasterKeySampleStaticText->SetLabel (L"");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void VolumeCreationProgressWizardPage::OnRandomPoolTimer ()
|
||||
{
|
||||
if (!VolumeCreatorRunning && DisplayKeysCheckBox->IsChecked())
|
||||
@@ -187,7 +187,7 @@ namespace VeraCrypt
|
||||
RealProgressBarRange = ProgressGauge->GetSize().GetWidth();
|
||||
ProgressGauge->SetRange (RealProgressBarRange);
|
||||
}
|
||||
|
||||
|
||||
void VolumeCreationProgressWizardPage::IncrementEntropyProgress ()
|
||||
{
|
||||
ScopeLock lock (AccessMutex);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -69,7 +69,7 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
VolumeCreationWizard *Wizard;
|
||||
};
|
||||
};
|
||||
|
||||
RandomPoolUpdateTimer.reset (dynamic_cast <wxTimer *> (new Timer (this)));
|
||||
RandomPoolUpdateTimer->Start (200);
|
||||
@@ -129,11 +129,11 @@ namespace VeraCrypt
|
||||
page->SetVolumePath (SelectedVolumePath);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
case Step::EncryptionOptions:
|
||||
{
|
||||
EncryptionOptionsWizardPage *page = new EncryptionOptionsWizardPage (GetPageParent());
|
||||
|
||||
|
||||
if (OuterVolume)
|
||||
page->SetPageTitle (LangString["CIPHER_HIDVOL_HOST_TITLE"]);
|
||||
else if (SelectedVolumeType == VolumeType::Hidden)
|
||||
@@ -170,10 +170,10 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
VolumeSizeWizardPage *page = new VolumeSizeWizardPage (GetPageParent(), SelectedVolumePath, SectorSize, freeSpaceText);
|
||||
|
||||
|
||||
page->SetPageTitle (pageTitle);
|
||||
page->SetPageText (pageText);
|
||||
|
||||
|
||||
if (!OuterVolume && SelectedVolumeType == VolumeType::Hidden)
|
||||
page->SetMaxVolumeSize (MaxHiddenVolumeSize);
|
||||
else
|
||||
@@ -194,29 +194,29 @@ namespace VeraCrypt
|
||||
VolumePasswordWizardPage *page = new VolumePasswordWizardPage (GetPageParent(), Password, Keyfiles);
|
||||
page->EnableUsePim (); // force displaying "Use PIM"
|
||||
page->SetPimSelected (Pim > 0);
|
||||
|
||||
|
||||
if (OuterVolume)
|
||||
page->SetPageTitle (LangString["PASSWORD_HIDVOL_HOST_TITLE"]);
|
||||
else if (SelectedVolumeType == VolumeType::Hidden)
|
||||
page->SetPageTitle (LangString["PASSWORD_HIDVOL_TITLE"]);
|
||||
else
|
||||
page->SetPageTitle (LangString["PASSWORD_TITLE"]);
|
||||
|
||||
|
||||
page->SetPageText (LangString[OuterVolume ? "PASSWORD_HIDDENVOL_HOST_HELP" : "PASSWORD_HELP"]);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
case Step::VolumePim:
|
||||
{
|
||||
VolumePimWizardPage *page = new VolumePimWizardPage (GetPageParent());
|
||||
|
||||
|
||||
if (OuterVolume)
|
||||
page->SetPageTitle (LangString["PIM_HIDVOL_HOST_TITLE"]);
|
||||
else if (SelectedVolumeType == VolumeType::Hidden)
|
||||
page->SetPageTitle (LangString["PIM_HIDVOL_TITLE"]);
|
||||
else
|
||||
page->SetPageTitle (LangString["PIM_TITLE"]);
|
||||
|
||||
|
||||
page->SetPageText (LangString["PIM_HELP"]);
|
||||
page->SetVolumePim (Pim);
|
||||
return page;
|
||||
@@ -244,14 +244,14 @@ namespace VeraCrypt
|
||||
|
||||
page->SetPageTitle (_("Format Options"));
|
||||
page->SetFilesystemType (SelectedFilesystemType);
|
||||
|
||||
|
||||
if (!OuterVolume && SelectedVolumeType == VolumeType::Hidden)
|
||||
QuickFormatEnabled = true;
|
||||
page->SetQuickFormat (QuickFormatEnabled);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
case Step::CrossPlatformSupport:
|
||||
{
|
||||
SingleChoiceWizardPage <bool> *page = new SingleChoiceWizardPage <bool> (GetPageParent(), wxEmptyString, true);
|
||||
@@ -289,7 +289,7 @@ namespace VeraCrypt
|
||||
InfoWizardPage *page = new InfoWizardPage (GetPageParent());
|
||||
page->SetPageTitle (LangString["FORMAT_FINISHED_TITLE"]);
|
||||
page->SetPageText (LangString["FORMAT_FINISHED_HELP"]);
|
||||
|
||||
|
||||
SetCancelButtonText (_("Exit"));
|
||||
return page;
|
||||
}
|
||||
@@ -318,16 +318,16 @@ 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;
|
||||
};
|
||||
|
||||
@@ -335,11 +335,11 @@ namespace VeraCrypt
|
||||
shared_ptr <Functor> (new OpenOuterVolumeFunctor (MountedOuterVolume->MountPoint)));
|
||||
|
||||
page->SetPageTitle (LangString["HIDVOL_HOST_FILLING_TITLE"]);
|
||||
|
||||
|
||||
page->SetPageText (StringFormatter (
|
||||
_("Outer volume has been successfully created and mounted as '{0}'. To this volume you should now copy some sensitive-looking files that you actually do NOT want to hide. The files will be there for anyone forcing you to disclose your password. You will reveal only the password for this outer volume, not for the hidden one. The files that you really care about will be stored in the hidden volume, which will be created later on. When you finish copying, click Next. Do not dismount the volume.\n\nNote: After you click Next, the outer volume will be analyzed to determine the size of uninterrupted area of free space whose end is aligned with the end of the volume. This area will accommodate the hidden volume, so it will limit its maximum possible size. The procedure ensures no data on the outer volume are overwritten by the hidden volume."),
|
||||
wstring (MountedOuterVolume->MountPoint)));
|
||||
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
@@ -373,12 +373,12 @@ namespace VeraCrypt
|
||||
if (!IsWorkInProgress() && RandomNumberGenerator::IsRunning())
|
||||
{
|
||||
RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&event), sizeof (event)));
|
||||
|
||||
|
||||
long coord = event.GetX();
|
||||
RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord)));
|
||||
coord = event.GetY();
|
||||
RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord)));
|
||||
|
||||
|
||||
VolumeCreationProgressWizardPage *page = dynamic_cast <VolumeCreationProgressWizardPage *> (GetCurrentPage());
|
||||
if (page)
|
||||
{
|
||||
@@ -386,7 +386,7 @@ namespace VeraCrypt
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void VolumeCreationWizard::OnProgressTimer ()
|
||||
{
|
||||
if (!IsWorkInProgress())
|
||||
@@ -408,7 +408,7 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
VolumeCreator::ProgressInfo progress = Creator->GetProgressInfo();
|
||||
|
||||
|
||||
VolumeCreationProgressWizardPage *page = dynamic_cast <VolumeCreationProgressWizardPage *> (GetCurrentPage());
|
||||
page->SetProgressValue (progress.SizeDone);
|
||||
|
||||
@@ -418,9 +418,9 @@ namespace VeraCrypt
|
||||
OnVolumeCreatorFinished ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void VolumeCreationWizard::OnRandomPoolUpdateTimer ()
|
||||
{
|
||||
{
|
||||
if (!IsWorkInProgress())
|
||||
{
|
||||
wxLongLong time = wxGetLocalTimeMillis();
|
||||
@@ -519,7 +519,7 @@ namespace VeraCrypt
|
||||
|
||||
if (SelectedFilesystemType == VolumeCreationOptions::FilesystemType::MacOsExt && VolumeSize >= 10 * BYTES_PER_MB)
|
||||
args.push_back ("-J");
|
||||
|
||||
|
||||
// Perform a quick NTFS formatting
|
||||
if (SelectedFilesystemType == VolumeCreationOptions::FilesystemType::NTFS)
|
||||
args.push_back ("-f");
|
||||
@@ -566,7 +566,7 @@ namespace VeraCrypt
|
||||
case Step::VolumeHostType:
|
||||
{
|
||||
SingleChoiceWizardPage <VolumeHostType::Enum> *page = dynamic_cast <SingleChoiceWizardPage <VolumeHostType::Enum> *> (GetCurrentPage());
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
SelectedVolumeHostType = page->GetSelection();
|
||||
@@ -657,7 +657,7 @@ namespace VeraCrypt
|
||||
try
|
||||
{
|
||||
mountPoint = Core->GetDeviceMountPoint (SelectedVolumePath);
|
||||
|
||||
|
||||
if (!mountPoint.IsEmpty())
|
||||
{
|
||||
if (mountPoint == "/")
|
||||
@@ -689,7 +689,7 @@ namespace VeraCrypt
|
||||
|
||||
return Step::EncryptionOptions;
|
||||
}
|
||||
|
||||
|
||||
case Step::EncryptionOptions:
|
||||
{
|
||||
EncryptionOptionsWizardPage *page = dynamic_cast <EncryptionOptionsWizardPage *> (GetCurrentPage());
|
||||
@@ -704,7 +704,7 @@ namespace VeraCrypt
|
||||
else
|
||||
return Step::VolumeSize;
|
||||
}
|
||||
|
||||
|
||||
case Step::VolumeSize:
|
||||
{
|
||||
VolumeSizeWizardPage *page = dynamic_cast <VolumeSizeWizardPage *> (GetCurrentPage());
|
||||
@@ -754,7 +754,7 @@ namespace VeraCrypt
|
||||
Gui->ShowWarning (e);
|
||||
return GetCurrentStep();
|
||||
}
|
||||
|
||||
|
||||
Kdf = page->GetPkcs5Kdf();
|
||||
Keyfiles = page->GetKeyfiles();
|
||||
|
||||
@@ -768,7 +768,7 @@ namespace VeraCrypt
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (page->IsPimSelected ())
|
||||
return Step::VolumePim;
|
||||
else
|
||||
@@ -776,7 +776,7 @@ namespace VeraCrypt
|
||||
// Clear PIM
|
||||
Pim = 0;
|
||||
|
||||
// Skip PIM
|
||||
// Skip PIM
|
||||
if (forward && OuterVolume)
|
||||
{
|
||||
// Use FAT to prevent problems with free space
|
||||
@@ -815,7 +815,7 @@ namespace VeraCrypt
|
||||
if (Pim > 0 && Pim < 485)
|
||||
{
|
||||
Gui->ShowError ("PIM_REQUIRE_LONG_PASSWORD");
|
||||
return GetCurrentStep();
|
||||
return GetCurrentStep();
|
||||
}
|
||||
}
|
||||
else if (Pim > 0 && Pim < 485)
|
||||
@@ -826,7 +826,7 @@ namespace VeraCrypt
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (forward && OuterVolume)
|
||||
{
|
||||
@@ -895,7 +895,7 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
if (forward && CrossPlatformSupport)
|
||||
Gui->ShowWarning (StringFormatter (_("Please note that the volume will not be formatted with a FAT filesystem and, therefore, you may be required to install additional filesystem drivers on platforms other than {0}, which will enable you to mount the volume."), SystemInfo::GetPlatformName()));
|
||||
Gui->ShowWarning (StringFormatter (_("Please note that the volume will not be formatted with a FAT filesystem and, therefore, you may be required to install additional filesystem drivers on platforms other than {0}, which will enable you to mount the volume."), SystemInfo::GetPlatformName()));
|
||||
|
||||
return Step::CreationProgress;
|
||||
}
|
||||
@@ -987,7 +987,7 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
VolumeCreationWizard *Wizard;
|
||||
};
|
||||
};
|
||||
|
||||
page->SetProgressRange (options->Size);
|
||||
page->SetProgressState (true);
|
||||
@@ -1055,7 +1055,7 @@ namespace VeraCrypt
|
||||
uint64 reservedSize = outerVolume->GetSize() / 200;
|
||||
if (reservedSize > 10 * BYTES_PER_MB)
|
||||
reservedSize = 10 * BYTES_PER_MB;
|
||||
|
||||
|
||||
if (MaxHiddenVolumeSize < reservedSize)
|
||||
MaxHiddenVolumeSize = 0;
|
||||
else
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -62,7 +62,7 @@ namespace VeraCrypt
|
||||
catch (exception &e) { Gui->ShowError (e); }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void VolumeLocationWizardPage::OnPageChanging (bool forward)
|
||||
{
|
||||
if (forward)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -43,7 +43,7 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
CacheCheckBox->Show (enableCache);
|
||||
|
||||
|
||||
if (!enablePassword && enableKeyfiles)
|
||||
{
|
||||
Layout();
|
||||
@@ -58,8 +58,8 @@ namespace VeraCrypt
|
||||
PasswordStaticText->Show (enablePassword);
|
||||
PasswordTextCtrl->Show (enablePassword);
|
||||
DisplayPasswordCheckBox->Show (enablePassword);
|
||||
|
||||
|
||||
|
||||
|
||||
EnablePimEntry = enablePassword && (!enableConfirmation || (enablePkcs5Prf && !isMountPassword));
|
||||
PimCheckBox->Show (EnablePimEntry);
|
||||
VolumePimStaticText->Show (false);
|
||||
@@ -71,12 +71,12 @@ namespace VeraCrypt
|
||||
|
||||
ConfirmPasswordStaticText->Show (enableConfirmation);
|
||||
ConfirmPasswordTextCtrl->Show (enableConfirmation);
|
||||
|
||||
|
||||
UseKeyfilesCheckBox->Show (enableKeyfiles);
|
||||
KeyfilesButton->Show (enableKeyfiles);
|
||||
|
||||
Pkcs5PrfStaticText->Show (enablePkcs5Prf);
|
||||
Pkcs5PrfChoice->Show (enablePkcs5Prf);
|
||||
Pkcs5PrfChoice->Show (enablePkcs5Prf);
|
||||
TrueCryptModeCheckBox->Show (!disableTruecryptMode);
|
||||
HeaderWipeCountText->Show (enablePkcs5Prf && !isMountPassword);
|
||||
HeaderWipeCount->Show (enablePkcs5Prf && !isMountPassword);
|
||||
@@ -104,20 +104,20 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
if (enablePkcs5Prf)
|
||||
{
|
||||
{
|
||||
int index, prfInitialIndex = 0;
|
||||
if (isMountPassword)
|
||||
{
|
||||
// case of password for mounting
|
||||
Pkcs5PrfChoice->Delete (0);
|
||||
Pkcs5PrfChoice->Append (LangString["AUTODETECTION"]);
|
||||
Pkcs5PrfChoice->Append (LangString["AUTODETECTION"]);
|
||||
}
|
||||
foreach_ref (const Pkcs5Kdf &kdf, Pkcs5Kdf::GetAvailableAlgorithms(false))
|
||||
{
|
||||
if (!kdf.IsDeprecated() || isMountPassword)
|
||||
{
|
||||
index = Pkcs5PrfChoice->Append (kdf.GetName());
|
||||
if (isMountPassword && options && options->Kdf
|
||||
if (isMountPassword && options && options->Kdf
|
||||
&& (options->Kdf->GetName() == kdf.GetName())
|
||||
)
|
||||
{
|
||||
@@ -199,7 +199,7 @@ namespace VeraCrypt
|
||||
int colspan = isPim? 1 : 2;
|
||||
|
||||
wxTextCtrl *newTextCtrl = new wxTextCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, display ? 0 : wxTE_PASSWORD);
|
||||
newTextCtrl->SetMaxLength (isPim? MAX_PIM_DIGITS : VolumePassword::MaxSize);
|
||||
newTextCtrl->SetMaxLength (isPim? MAX_PIM_DIGITS : VolumePassword::MaxSize);
|
||||
newTextCtrl->SetValue ((*textCtrl)->GetValue());
|
||||
newTextCtrl->SetMinSize ((*textCtrl)->GetSize());
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace VeraCrypt
|
||||
return shared_ptr <Pkcs5Kdf> ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int VolumePasswordPanel::GetVolumePim () const
|
||||
{
|
||||
if (VolumePimTextCtrl->IsEnabled () && VolumePimTextCtrl->IsShown ())
|
||||
@@ -279,7 +279,7 @@ namespace VeraCrypt
|
||||
long pim = 0;
|
||||
if (pimStr.IsEmpty())
|
||||
return 0;
|
||||
if (((size_t) wxNOT_FOUND == pimStr.find_first_not_of (wxT("0123456789")))
|
||||
if (((size_t) wxNOT_FOUND == pimStr.find_first_not_of (wxT("0123456789")))
|
||||
&& pimStr.ToLong (&pim)
|
||||
&& pim <= MAX_PIM_VALUE)
|
||||
return (int) pim;
|
||||
@@ -288,7 +288,7 @@ namespace VeraCrypt
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void VolumePasswordPanel::SetVolumePim (int pim)
|
||||
{
|
||||
@@ -306,7 +306,7 @@ namespace VeraCrypt
|
||||
{
|
||||
return TrueCryptModeCheckBox->GetValue ();
|
||||
}
|
||||
|
||||
|
||||
int VolumePasswordPanel::GetHeaderWipeCount () const
|
||||
{
|
||||
try
|
||||
@@ -393,10 +393,10 @@ namespace VeraCrypt
|
||||
void VolumePasswordPanel::OnDisplayPasswordCheckBoxClick (wxCommandEvent& event)
|
||||
{
|
||||
DisplayPassword (event.IsChecked(), &PasswordTextCtrl, 1);
|
||||
|
||||
|
||||
if (ConfirmPasswordTextCtrl->IsShown())
|
||||
DisplayPassword (event.IsChecked(), &ConfirmPasswordTextCtrl, 2);
|
||||
|
||||
|
||||
if (VolumePimTextCtrl->IsShown())
|
||||
DisplayPassword (event.IsChecked(), &VolumePimTextCtrl, 3);
|
||||
|
||||
@@ -467,7 +467,7 @@ namespace VeraCrypt
|
||||
VolumePimHelpStaticText->SetLabel(LangString["IDC_PIM_HELP"]);
|
||||
guiUpdated = true;
|
||||
}
|
||||
|
||||
|
||||
if (guiUpdated)
|
||||
{
|
||||
Layout();
|
||||
@@ -485,8 +485,8 @@ namespace VeraCrypt
|
||||
PimCheckBox->Show (false);
|
||||
VolumePimStaticText->Show (true);
|
||||
VolumePimTextCtrl->Show (true);
|
||||
VolumePimHelpStaticText->Show (true);
|
||||
|
||||
VolumePimHelpStaticText->Show (true);
|
||||
|
||||
if (DisplayPasswordCheckBox->IsChecked ())
|
||||
DisplayPassword (true, &VolumePimTextCtrl, 3);
|
||||
else
|
||||
@@ -494,12 +494,12 @@ namespace VeraCrypt
|
||||
Layout();
|
||||
Fit();
|
||||
}
|
||||
|
||||
|
||||
GetParent()->Layout();
|
||||
GetParent()->Fit();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void VolumePasswordPanel::OnTrueCryptModeChecked( wxCommandEvent& event )
|
||||
{
|
||||
bool bEnablePIM = !GetTrueCryptMode ();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -35,7 +35,7 @@ namespace VeraCrypt
|
||||
int GetHeaderWipeCount () const;
|
||||
void SetCacheCheckBoxValidator (const wxGenericValidator &validator) { CacheCheckBox->SetValidator (validator); }
|
||||
void SetFocusToPasswordTextCtrl () { PasswordTextCtrl->SetSelection (-1, -1); PasswordTextCtrl->SetFocus(); }
|
||||
void SetFocusToPimTextCtrl () { VolumePimTextCtrl->SetSelection (-1, -1); VolumePimTextCtrl->SetFocus(); }
|
||||
void SetFocusToPimTextCtrl () { VolumePimTextCtrl->SetSelection (-1, -1); VolumePimTextCtrl->SetFocus(); }
|
||||
void SetVolumePim (int pim);
|
||||
bool PasswordsMatch () const;
|
||||
void EnableUsePim () { PimCheckBox->Enable (true); PimCheckBox->Show (true); }
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -29,7 +29,7 @@ namespace VeraCrypt
|
||||
void EnableUsePim () { PasswordPanel->EnableUsePim (); }
|
||||
bool IsPimSelected () const { return PasswordPanel->IsUsePimChecked ();}
|
||||
void SetPimSelected (bool selected) const { PasswordPanel->SetUsePimChecked (selected);}
|
||||
|
||||
|
||||
shared_ptr <Pkcs5Kdf> GetPkcs5Kdf () const { bool bUnsupportedKdf; return PasswordPanel->GetPkcs5Kdf(bUnsupportedKdf); }
|
||||
bool IsValid ();
|
||||
void SetMaxStaticTextWidth (int width) { InfoStaticText->Wrap (width); }
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#include "System.h"
|
||||
@@ -29,7 +29,7 @@ namespace VeraCrypt
|
||||
VolumePimWizardPage::~VolumePimWizardPage ()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int VolumePimWizardPage::GetVolumePim () const
|
||||
{
|
||||
if (VolumePimTextCtrl->IsEnabled ())
|
||||
@@ -38,7 +38,7 @@ namespace VeraCrypt
|
||||
long pim = 0;
|
||||
if (pimStr.IsEmpty())
|
||||
return 0;
|
||||
if (((size_t) wxNOT_FOUND == pimStr.find_first_not_of (wxT("0123456789")))
|
||||
if (((size_t) wxNOT_FOUND == pimStr.find_first_not_of (wxT("0123456789")))
|
||||
&& pimStr.ToLong (&pim))
|
||||
return (int) pim;
|
||||
else
|
||||
@@ -66,7 +66,7 @@ namespace VeraCrypt
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void VolumePimWizardPage::OnPimChanged (wxCommandEvent& event)
|
||||
{
|
||||
OnPimValueChanged (GetVolumePim ());
|
||||
@@ -83,7 +83,7 @@ namespace VeraCrypt
|
||||
{
|
||||
VolumePimHelpStaticText->SetForegroundColour(*wxBLACK);
|
||||
VolumePimHelpStaticText->SetLabel(LangString["IDC_PIM_HELP"]);
|
||||
}
|
||||
}
|
||||
Fit();
|
||||
Layout();
|
||||
}
|
||||
@@ -99,15 +99,15 @@ namespace VeraCrypt
|
||||
void VolumePimWizardPage::OnDisplayPimCheckBoxClick( wxCommandEvent& event )
|
||||
{
|
||||
FreezeScope freeze (this);
|
||||
|
||||
|
||||
bool display = event.IsChecked ();
|
||||
|
||||
wxTextCtrl *newTextCtrl = new wxTextCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, display ? 0 : wxTE_PASSWORD);
|
||||
newTextCtrl->SetMaxLength (MAX_PIM_DIGITS);
|
||||
newTextCtrl->SetMaxLength (MAX_PIM_DIGITS);
|
||||
newTextCtrl->SetValue (VolumePimTextCtrl->GetValue());
|
||||
newTextCtrl->SetMinSize (VolumePimTextCtrl->GetSize());
|
||||
|
||||
PimSizer->Replace (VolumePimTextCtrl, newTextCtrl);
|
||||
PimSizer->Replace (VolumePimTextCtrl, newTextCtrl);
|
||||
VolumePimTextCtrl->Show (false);
|
||||
VolumePimTextCtrl->SetValue (wxString (L'X', VolumePimTextCtrl->GetLineLength(0)));
|
||||
GetVolumePim ();
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef VC_HEADER_Main_Forms_VolumePimWizardPage
|
||||
@@ -33,7 +33,7 @@ namespace VeraCrypt
|
||||
void SetMaxStaticTextWidth (int width) { InfoStaticText->Wrap (width); }
|
||||
void SetPageText (const wxString &text) { InfoStaticText->SetLabel (text); }
|
||||
void OnDisplayPimCheckBoxClick( wxCommandEvent& event );
|
||||
|
||||
|
||||
protected:
|
||||
void SetPimValidator ();
|
||||
void OnPimChanged (wxCommandEvent& event);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -38,7 +38,7 @@ namespace VeraCrypt
|
||||
AppendToList ("SIZE", Gui->SizeToString (volumeInfo.Size));
|
||||
AppendToList ("TYPE", Gui->VolumeTypeToString (volumeInfo.Type, volumeInfo.TrueCryptMode, volumeInfo.Protection));
|
||||
AppendToList ("READ_ONLY", LangString [volumeInfo.Protection == VolumeProtection::ReadOnly ? "UISTR_YES" : "UISTR_NO"]);
|
||||
|
||||
|
||||
wxString protection;
|
||||
if (volumeInfo.Type == VolumeType::Hidden)
|
||||
protection = LangString["NOT_APPLICABLE_OR_NOT_AVAILABLE"];
|
||||
@@ -84,7 +84,7 @@ namespace VeraCrypt
|
||||
#ifdef TC_LINUX
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Layout();
|
||||
Fit();
|
||||
Center();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -22,7 +22,7 @@ namespace VeraCrypt
|
||||
{
|
||||
public:
|
||||
VolumePropertiesDialog (wxWindow* parent, const VolumeInfo &volumeInfo);
|
||||
|
||||
|
||||
void AppendToList (const string &name, const wxString &value);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -74,7 +74,7 @@ namespace VeraCrypt
|
||||
return 0;
|
||||
|
||||
prefixMult = reinterpret_cast <uint64> (VolumeSizePrefixChoice->GetClientData (selection));
|
||||
|
||||
|
||||
uint64 val = StringConverter::ToUInt64 (wstring (VolumeSizeTextCtrl->GetValue()));
|
||||
if (val <= 0x7fffFFFFffffFFFFull / prefixMult)
|
||||
{
|
||||
@@ -119,7 +119,7 @@ namespace VeraCrypt
|
||||
VolumeSizeTextCtrl->SetValue (L"");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (size % (1024 * 1024 * 1024) == 0)
|
||||
{
|
||||
size /= 1024 * 1024 * 1024;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace VeraCrypt
|
||||
DEFINE_EVENT_TYPE(wxEVT_COMMAND_WAITDIALOG_SHOW_MSG)
|
||||
|
||||
wxThread::ExitCode WaitThread::Entry()
|
||||
{
|
||||
{
|
||||
m_pRoutine->Execute();
|
||||
wxQueueEvent (m_pHandler, new wxCommandEvent( wxEVT_COMMAND_WAITDIALOGTHREAD_COMPLETED,0));
|
||||
return (wxThread::ExitCode)0; // success
|
||||
@@ -59,7 +59,7 @@ namespace VeraCrypt
|
||||
VC_CONVERT_EXCEPTION (UserInterfaceException);
|
||||
VC_CONVERT_EXCEPTION (MissingArgument);
|
||||
VC_CONVERT_EXCEPTION (NoItemSelected);
|
||||
VC_CONVERT_EXCEPTION (StringFormatterException);
|
||||
VC_CONVERT_EXCEPTION (StringFormatterException);
|
||||
VC_CONVERT_EXCEPTION (ExecutedProcessFailed);
|
||||
VC_CONVERT_EXCEPTION (AlreadyInitialized);
|
||||
VC_CONVERT_EXCEPTION (AssertionFailed);
|
||||
@@ -77,7 +77,7 @@ namespace VeraCrypt
|
||||
VC_CONVERT_EXCEPTION (UnknownException);
|
||||
VC_CONVERT_EXCEPTION (UserAbort)
|
||||
VC_CONVERT_EXCEPTION (CipherInitError);
|
||||
VC_CONVERT_EXCEPTION (WeakKeyDetected);
|
||||
VC_CONVERT_EXCEPTION (WeakKeyDetected);
|
||||
VC_CONVERT_EXCEPTION (HigherVersionRequired);
|
||||
VC_CONVERT_EXCEPTION (KeyfilePathEmpty);
|
||||
VC_CONVERT_EXCEPTION (MissingVolumeData);
|
||||
@@ -92,7 +92,7 @@ namespace VeraCrypt
|
||||
VC_CONVERT_EXCEPTION (SecurityTokenLibraryNotInitialized);
|
||||
VC_CONVERT_EXCEPTION (SecurityTokenKeyfileAlreadyExists);
|
||||
VC_CONVERT_EXCEPTION (SecurityTokenKeyfileNotFound);
|
||||
VC_CONVERT_EXCEPTION (UnsupportedAlgoInTrueCryptMode);
|
||||
VC_CONVERT_EXCEPTION (UnsupportedAlgoInTrueCryptMode);
|
||||
VC_CONVERT_EXCEPTION (UnsupportedTrueCryptFormat);
|
||||
VC_CONVERT_EXCEPTION (SystemException);
|
||||
VC_CONVERT_EXCEPTION (CipherException);
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace VeraCrypt
|
||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_WAITDIALOG_ADMIN_PASSWORD, -1);
|
||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_WAITDIALOG_PIN, -1);
|
||||
DECLARE_LOCAL_EVENT_TYPE(wxEVT_COMMAND_WAITDIALOG_SHOW_MSG, -1);
|
||||
|
||||
|
||||
class WaitDialog;
|
||||
|
||||
|
||||
@@ -31,12 +31,12 @@ namespace VeraCrypt
|
||||
public:
|
||||
WaitThread(WaitDialog *handler, WaitThreadRoutine* pRoutine) : wxThread(wxTHREAD_DETACHED), m_pRoutine(pRoutine)
|
||||
{
|
||||
m_pHandler = handler;
|
||||
m_pHandler = handler;
|
||||
}
|
||||
~WaitThread()
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
virtual ExitCode Entry();
|
||||
WaitDialog *m_pHandler;
|
||||
@@ -46,7 +46,7 @@ namespace VeraCrypt
|
||||
class WaitDialog : public WaitDialogBase, public WaitThreadUI
|
||||
{
|
||||
public:
|
||||
WaitDialog (wxWindow *parent, const wxString& label, WaitThreadRoutine* pRoutine)
|
||||
WaitDialog (wxWindow *parent, const wxString& label, WaitThreadRoutine* pRoutine)
|
||||
: WaitDialogBase(parent), WaitThreadUI(pRoutine), m_timer (this)
|
||||
{
|
||||
WaitStaticText->SetLabel (label);
|
||||
@@ -58,11 +58,11 @@ namespace VeraCrypt
|
||||
Connect( wxID_ANY, wxEVT_COMMAND_WAITDIALOG_ADMIN_PASSWORD, wxCommandEventHandler( WaitDialog::OnAdminPasswordRequest ) );
|
||||
Connect( wxID_ANY, wxEVT_COMMAND_WAITDIALOG_PIN, wxCommandEventHandler( WaitDialog::OnPinRequest ) );
|
||||
Connect( wxID_ANY, wxEVT_COMMAND_WAITDIALOG_SHOW_MSG, wxCommandEventHandler( WaitDialog::OnShowMsg ) );
|
||||
|
||||
|
||||
Connect( wxEVT_TIMER, wxTimerEventHandler( WaitDialog::OnProgressTimer ), NULL, this );
|
||||
m_thread = new WaitThread(this, pRoutine);
|
||||
}
|
||||
|
||||
|
||||
~WaitDialog()
|
||||
{
|
||||
Disconnect( wxEVT_TIMER, wxTimerEventHandler( WaitDialog::OnProgressTimer ));
|
||||
@@ -73,7 +73,7 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
virtual void OnWaitDialogInit( wxInitDialogEvent& event )
|
||||
{
|
||||
{
|
||||
m_thread->Run();
|
||||
m_timer.Start(100);
|
||||
}
|
||||
@@ -114,7 +114,7 @@ namespace VeraCrypt
|
||||
wxQueueEvent (this, pEvent);
|
||||
m_queue.Receive (sResult);
|
||||
sResult.ToLong(&lResult);
|
||||
}
|
||||
}
|
||||
return (int) lResult;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace VeraCrypt
|
||||
else
|
||||
pin = wxT("");
|
||||
}
|
||||
|
||||
|
||||
// virtual void OnWaitDialogClose( wxCloseEvent& event ) { }
|
||||
void OnThreadCompletion(wxCommandEvent &)
|
||||
{
|
||||
@@ -187,10 +187,10 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
int iResult = wxMessageBox (pParam->m_message, pParam->m_caption, pParam->m_style, this);
|
||||
delete pParam;
|
||||
delete pParam;
|
||||
m_queue.Post(wxString::Format(wxT("%d"), iResult));
|
||||
}
|
||||
|
||||
|
||||
void OnProgressTimer(wxTimerEvent& event)
|
||||
{
|
||||
WaitProgessBar->Pulse();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -61,7 +61,7 @@ namespace VeraCrypt
|
||||
Gui->SetActiveFrame (this);
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void WizardFrame::OnClose (wxCloseEvent& event)
|
||||
{
|
||||
if (WorkInProgress)
|
||||
@@ -97,12 +97,12 @@ namespace VeraCrypt
|
||||
SetStep (prevStep, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WizardFrame::SetCancelButtonText (const wxString &text)
|
||||
{
|
||||
CancelButton->SetLabel (text.empty() ? wxString (_("Cancel")) : text);
|
||||
}
|
||||
|
||||
|
||||
void WizardFrame::SetImage (const wxBitmap &bitmap)
|
||||
{
|
||||
WizardBitmap->SetBitmap (bitmap);
|
||||
@@ -143,7 +143,7 @@ namespace VeraCrypt
|
||||
CurrentPage = GetPage (newStep);
|
||||
|
||||
CurrentPage->PageUpdatedEvent.Connect (EventConnector <WizardFrame> (this, &WizardFrame::OnPageUpdated));
|
||||
|
||||
|
||||
CurrentPage->Connect (wxEVT_MOTION, wxMouseEventHandler (WizardFrame::OnMouseMotion), nullptr, this);
|
||||
foreach (wxWindow *c, CurrentPage->GetChildren())
|
||||
c->Connect (wxEVT_MOTION, wxMouseEventHandler (WizardFrame::OnMouseMotion), nullptr, this);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -73,7 +73,7 @@ namespace VeraCrypt
|
||||
signal (SIGTERM, SIG_DFL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void GraphicUserInterface::AppendToListCtrl (wxListCtrl *listCtrl, const vector <wstring> &itemFields, int imageIndex, void *itemDataPtr) const
|
||||
{
|
||||
InsertToListCtrl (listCtrl, listCtrl->GetItemCount(), itemFields, imageIndex, itemDataPtr);
|
||||
@@ -83,7 +83,7 @@ namespace VeraCrypt
|
||||
{
|
||||
wxMenuItem *item = new wxMenuItem (&menu, itemId, label);
|
||||
menu.Append (item);
|
||||
|
||||
|
||||
if (handler)
|
||||
handler->Connect (item->GetId(), wxEVT_COMMAND_MENU_SELECTED, handlerFunction);
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace VeraCrypt
|
||||
if (Core->GetMountedVolumes().size() < mountedVolumeCount)
|
||||
OnVolumesAutoDismounted();
|
||||
}
|
||||
|
||||
|
||||
void GraphicUserInterface::BackupVolumeHeaders (shared_ptr <VolumePath> volumePath) const
|
||||
{
|
||||
wxWindow *parent = GetActiveWindow();
|
||||
@@ -196,7 +196,7 @@ namespace VeraCrypt
|
||||
options->UseBackupHeaders
|
||||
);
|
||||
|
||||
ExecuteWaitThreadRoutine (parent, &routine);
|
||||
ExecuteWaitThreadRoutine (parent, &routine);
|
||||
volume = routine.m_pVolume;
|
||||
}
|
||||
catch (PasswordException &e)
|
||||
@@ -332,12 +332,12 @@ namespace VeraCrypt
|
||||
wxHyperlinkCtrl *GraphicUserInterface::CreateHyperlink (wxWindow *parent, const wxString &linkUrl, const wxString &linkText) const
|
||||
{
|
||||
wxHyperlinkCtrl *hyperlink = new wxHyperlinkCtrl (parent, wxID_ANY, linkText, linkUrl, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
|
||||
|
||||
|
||||
wxColour color = wxSystemSettings::GetColour (wxSYS_COLOUR_WINDOWTEXT);
|
||||
hyperlink->SetHoverColour (color);
|
||||
hyperlink->SetNormalColour (color);
|
||||
hyperlink->SetVisitedColour (color);
|
||||
|
||||
|
||||
return hyperlink;
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ namespace VeraCrypt
|
||||
{
|
||||
ShowMessage (message, wxOK | wxICON_ERROR);
|
||||
}
|
||||
|
||||
|
||||
void GraphicUserInterface::DoShowInfo (const wxString &message) const
|
||||
{
|
||||
ShowMessage (message, wxOK | wxICON_INFORMATION);
|
||||
@@ -358,13 +358,13 @@ namespace VeraCrypt
|
||||
|
||||
void GraphicUserInterface::DoShowWarning (const wxString &message) const
|
||||
{
|
||||
ShowMessage (message, wxOK
|
||||
ShowMessage (message, wxOK
|
||||
#ifndef TC_MACOSX
|
||||
| wxICON_EXCLAMATION
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void GraphicUserInterface::EndInteractiveBusyState (wxWindow *window) const
|
||||
{
|
||||
static auto_ptr <wxCursor> arrowCursor;
|
||||
@@ -438,7 +438,7 @@ namespace VeraCrypt
|
||||
|
||||
return shared_ptr <GetStringFunctor> (new AdminPasswordRequestHandler);
|
||||
}
|
||||
|
||||
|
||||
int GraphicUserInterface::GetCharHeight (wxWindow *window) const
|
||||
{
|
||||
int width;
|
||||
@@ -471,9 +471,9 @@ namespace VeraCrypt
|
||||
#elif defined(TC_MACOSX)
|
||||
13
|
||||
#else
|
||||
10
|
||||
10
|
||||
#endif
|
||||
* GetCharHeight (window) / 13, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL,
|
||||
* GetCharHeight (window) / 13, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL,
|
||||
#ifdef __WXGTK__
|
||||
wxFONTWEIGHT_BOLD, false);
|
||||
#elif defined(TC_MACOSX)
|
||||
@@ -486,7 +486,7 @@ namespace VeraCrypt
|
||||
list <long> GraphicUserInterface::GetListCtrlSelectedItems (wxListCtrl *listCtrl) const
|
||||
{
|
||||
list <long> selectedItems;
|
||||
|
||||
|
||||
long item = -1;
|
||||
while ((item = listCtrl->GetNextItem (item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED)) != -1)
|
||||
selectedItems.push_back (item);
|
||||
@@ -500,7 +500,7 @@ namespace VeraCrypt
|
||||
item.SetId (itemIndex);
|
||||
item.SetColumn (columnIndex);
|
||||
item.SetText (L"");
|
||||
|
||||
|
||||
if (!listCtrl->GetItem (item))
|
||||
throw ParameterIncorrect (SRC_POS);
|
||||
|
||||
@@ -605,7 +605,7 @@ namespace VeraCrypt
|
||||
listCtrl->SetItem (item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool GraphicUserInterface::IsTheOnlyTopLevelWindow (const wxWindow *window) const
|
||||
{
|
||||
foreach (wxWindow *w, wxTopLevelWindows)
|
||||
@@ -654,7 +654,7 @@ namespace VeraCrypt
|
||||
item.SetId (itemIndex);
|
||||
item.SetData ((void *) nullptr);
|
||||
item.SetImage (-1);
|
||||
|
||||
|
||||
if (!listCtrl->GetItem (item))
|
||||
throw ParameterIncorrect (SRC_POS);
|
||||
|
||||
@@ -667,7 +667,7 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
listCtrl->DeleteItem (itemIndex);
|
||||
|
||||
|
||||
if (newItemIndex > listCtrl->GetItemCount() - 1)
|
||||
AppendToListCtrl (listCtrl, itemFields, item.GetImage(), (void *) item.GetData());
|
||||
else
|
||||
@@ -688,7 +688,7 @@ namespace VeraCrypt
|
||||
return VolumeInfoList();
|
||||
|
||||
VolumeInfoList mountedVolumes = UserInterface::MountAllDeviceHostedVolumes (options);
|
||||
|
||||
|
||||
if (!mountedVolumes.empty())
|
||||
return mountedVolumes;
|
||||
}
|
||||
@@ -857,7 +857,7 @@ namespace VeraCrypt
|
||||
|
||||
wxLogLevel logLevel = wxLog::GetLogLevel();
|
||||
wxLog::SetLogLevel (wxLOG_Error);
|
||||
|
||||
|
||||
const wxString instanceCheckerName = wxString (L".") + Application::GetName() + L"-lock-" + wxGetUserId();
|
||||
SingleInstanceChecker.reset (new wxSingleInstanceChecker (instanceCheckerName));
|
||||
|
||||
@@ -978,7 +978,7 @@ namespace VeraCrypt
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void GraphicUserInterface::OnLogOff ()
|
||||
{
|
||||
VolumeInfoList mountedVolumes = Core->GetMountedVolumes();
|
||||
@@ -994,10 +994,10 @@ namespace VeraCrypt
|
||||
try
|
||||
{
|
||||
timeOver = (wxGetLocalTimeMillis() - startTime >= 4000);
|
||||
|
||||
|
||||
DismountVolumes (mountedVolumes, !timeOver ? false : GetPreferences().ForceAutoDismount, timeOver);
|
||||
OnVolumesAutoDismounted();
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
catch (UserAbort&)
|
||||
@@ -1075,112 +1075,112 @@ namespace VeraCrypt
|
||||
wxString GraphicUserInterface::GetHomepageLinkURL (const wxString &linkId, bool secure, const wxString &extraVars) const
|
||||
{
|
||||
wxString url = wxString (StringConverter::ToWide (secure ? TC_APPLINK_SECURE : TC_APPLINK));
|
||||
|
||||
if (linkId == L"donate")
|
||||
|
||||
if (linkId == L"donate")
|
||||
{
|
||||
url = L"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5BCXVMTTNJDCY";
|
||||
}
|
||||
else if (linkId == L"main")
|
||||
else if (linkId == L"main")
|
||||
{
|
||||
url = wxString (StringConverter::ToWide (TC_HOMEPAGE));
|
||||
}
|
||||
else if (linkId == L"localizations")
|
||||
else if (linkId == L"localizations")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Language%20Packs";
|
||||
}
|
||||
else if (linkId == L"beginnerstutorial" || linkId == L"tutorial")
|
||||
else if (linkId == L"beginnerstutorial" || linkId == L"tutorial")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Beginner%27s%20Tutorial";
|
||||
}
|
||||
else if (linkId == L"releasenotes" || linkId == L"history")
|
||||
else if (linkId == L"releasenotes" || linkId == L"history")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Release%20Notes";
|
||||
}
|
||||
else if (linkId == L"hwacceleration")
|
||||
else if (linkId == L"hwacceleration")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Hardware%20Acceleration";
|
||||
}
|
||||
else if (linkId == L"parallelization")
|
||||
else if (linkId == L"parallelization")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Parallelization";
|
||||
}
|
||||
else if (linkId == L"help")
|
||||
else if (linkId == L"help")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/documentation";
|
||||
}
|
||||
else if (linkId == L"keyfiles")
|
||||
else if (linkId == L"keyfiles")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Keyfiles";
|
||||
}
|
||||
else if (linkId == L"introcontainer")
|
||||
else if (linkId == L"introcontainer")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Creating%20New%20Volumes";
|
||||
}
|
||||
else if (linkId == L"introsysenc")
|
||||
else if (linkId == L"introsysenc")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=System%20Encryption";
|
||||
}
|
||||
else if (linkId == L"hiddensysenc")
|
||||
else if (linkId == L"hiddensysenc")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=VeraCrypt%20Hidden%20Operating%20System";
|
||||
}
|
||||
else if (linkId == L"sysencprogressinfo")
|
||||
else if (linkId == L"sysencprogressinfo")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=System%20Encryption";
|
||||
}
|
||||
else if (linkId == L"hiddenvolume")
|
||||
else if (linkId == L"hiddenvolume")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Hidden%20Volume";
|
||||
}
|
||||
else if (linkId == L"aes")
|
||||
else if (linkId == L"aes")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=AES";
|
||||
}
|
||||
else if (linkId == L"serpent")
|
||||
else if (linkId == L"serpent")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Serpent";
|
||||
}
|
||||
else if (linkId == L"twofish")
|
||||
else if (linkId == L"twofish")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Twofish";
|
||||
}
|
||||
else if (linkId == L"cascades")
|
||||
else if (linkId == L"cascades")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Cascades";
|
||||
}
|
||||
else if (linkId == L"hashalgorithms")
|
||||
else if (linkId == L"hashalgorithms")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Hash%20Algorithms";
|
||||
}
|
||||
else if (linkId == L"isoburning")
|
||||
else if (linkId == L"isoburning")
|
||||
{
|
||||
url = L"https://cdburnerxp.se/en/home";
|
||||
}
|
||||
else if (linkId == L"sysfavorites")
|
||||
else if (linkId == L"sysfavorites")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=System%20Favorite%20Volumes";
|
||||
}
|
||||
else if (linkId == L"favorites")
|
||||
else if (linkId == L"favorites")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Favorite%20Volumes";
|
||||
}
|
||||
else if (linkId == L"hiddenvolprotection")
|
||||
else if (linkId == L"hiddenvolprotection")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Protection%20of%20Hidden%20Volumes";
|
||||
}
|
||||
else if (linkId == L"faq")
|
||||
else if (linkId == L"faq")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=FAQ";
|
||||
}
|
||||
else if (linkId == L"downloads")
|
||||
else if (linkId == L"downloads")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Downloads";
|
||||
}
|
||||
else if (linkId == L"news")
|
||||
else if (linkId == L"news")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=News";
|
||||
}
|
||||
else if (linkId == L"contact")
|
||||
else if (linkId == L"contact")
|
||||
{
|
||||
url = L"https://veracrypt.codeplex.com/wikipage?title=Contact";
|
||||
}
|
||||
@@ -1191,7 +1191,7 @@ namespace VeraCrypt
|
||||
void GraphicUserInterface::OpenHomepageLink (wxWindow *parent, const wxString &linkId, const wxString &extraVars)
|
||||
{
|
||||
wxString url;
|
||||
|
||||
|
||||
BeginInteractiveBusyState (parent);
|
||||
wxLaunchDefaultBrowser (GetHomepageLinkURL (linkId, false, extraVars), wxBROWSER_NEW_WINDOW);
|
||||
Thread::Sleep (200);
|
||||
@@ -1301,7 +1301,7 @@ namespace VeraCrypt
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* force the display of the random enriching interface */
|
||||
RandomNumberGenerator::SetEnrichedByUserStatus (false);
|
||||
|
||||
@@ -1341,7 +1341,7 @@ namespace VeraCrypt
|
||||
true
|
||||
);
|
||||
|
||||
ExecuteWaitThreadRoutine (parent, &routine);
|
||||
ExecuteWaitThreadRoutine (parent, &routine);
|
||||
volume = routine.m_pVolume;
|
||||
}
|
||||
catch (PasswordException &e)
|
||||
@@ -1449,7 +1449,7 @@ namespace VeraCrypt
|
||||
EncryptionAlgorithmList encryptionAlgorithms = layout->GetSupportedEncryptionAlgorithms();
|
||||
EncryptionModeList encryptionModes = layout->GetSupportedEncryptionModes();
|
||||
|
||||
DecryptThreadRoutine decryptRoutine(layout->GetHeader(), headerBuffer, *passwordKey, options.Pim, options.Kdf, options.TrueCryptMode, keyDerivationFunctions, encryptionAlgorithms, encryptionModes);
|
||||
DecryptThreadRoutine decryptRoutine(layout->GetHeader(), headerBuffer, *passwordKey, options.Pim, options.Kdf, options.TrueCryptMode, keyDerivationFunctions, encryptionAlgorithms, encryptionModes);
|
||||
|
||||
ExecuteWaitThreadRoutine (parent, &decryptRoutine);
|
||||
|
||||
@@ -1471,7 +1471,7 @@ namespace VeraCrypt
|
||||
|
||||
File volumeFile;
|
||||
volumeFile.Open (*volumePath, File::OpenReadWrite, File::ShareNone, File::PreserveTimestamps);
|
||||
|
||||
|
||||
RandomNumberGenerator::Start();
|
||||
UserEnrichRandomPool (nullptr);
|
||||
|
||||
@@ -1497,7 +1497,7 @@ namespace VeraCrypt
|
||||
ReEncryptHeaderThreadRoutine backupRoutine(newHeaderBuffer, decryptedLayout->GetHeader(), options.Password, options.Pim, options.Keyfiles);
|
||||
|
||||
ExecuteWaitThreadRoutine (parent, &backupRoutine);
|
||||
|
||||
|
||||
// Write backup volume header
|
||||
headerOffset = decryptedLayout->GetBackupHeaderOffset();
|
||||
if (headerOffset >= 0)
|
||||
@@ -1557,7 +1557,7 @@ namespace VeraCrypt
|
||||
if (!fileExtensions.empty())
|
||||
#endif
|
||||
{
|
||||
wildcards = LangString["ALL_FILES"] +
|
||||
wildcards = LangString["ALL_FILES"] +
|
||||
#ifdef TC_WINDOWS
|
||||
L" (*.*)|*.*";
|
||||
#else
|
||||
@@ -1595,7 +1595,7 @@ namespace VeraCrypt
|
||||
|
||||
return files;
|
||||
}
|
||||
|
||||
|
||||
FilePath GraphicUserInterface::SelectVolumeFile (wxWindow *parent, bool saveMode, const DirectoryPath &directory) const
|
||||
{
|
||||
list < pair <wstring, wstring> > extensions;
|
||||
@@ -1639,14 +1639,14 @@ namespace VeraCrypt
|
||||
listWidth = minListWidth;
|
||||
|
||||
listWidth -= GetScrollbarWidth (listCtrl, !hasVerticalScrollbar);
|
||||
|
||||
|
||||
int col = 0;
|
||||
int totalColWidth = 0;
|
||||
foreach (int colWidth, columnWidthPermilles)
|
||||
{
|
||||
int width = listWidth * colWidth / 1000;
|
||||
totalColWidth += width;
|
||||
|
||||
|
||||
if (col == listCtrl->GetColumnCount() - 1)
|
||||
width += listWidth - totalColWidth;
|
||||
|
||||
@@ -1712,7 +1712,7 @@ namespace VeraCrypt
|
||||
{
|
||||
ShowMessage (message, wxOK | wxICON_INFORMATION, true);
|
||||
}
|
||||
|
||||
|
||||
int GraphicUserInterface::ShowMessage (const wxString &message, long style, bool topMost) const
|
||||
{
|
||||
wxString caption = Application::GetName();
|
||||
@@ -1786,7 +1786,7 @@ namespace VeraCrypt
|
||||
|
||||
void GraphicUserInterface::ShowWarningTopMost (const wxString &message) const
|
||||
{
|
||||
ShowMessage (message, wxOK
|
||||
ShowMessage (message, wxOK
|
||||
#ifndef TC_MACOSX
|
||||
| wxICON_EXCLAMATION
|
||||
#endif
|
||||
@@ -1810,7 +1810,7 @@ namespace VeraCrypt
|
||||
foreach (wxString field, itemFields)
|
||||
{
|
||||
item.SetColumn (col++);
|
||||
|
||||
|
||||
if (!listCtrl->GetItem (item))
|
||||
throw ParameterIncorrect (SRC_POS);
|
||||
|
||||
@@ -1829,7 +1829,7 @@ namespace VeraCrypt
|
||||
void GraphicUserInterface::UserEnrichRandomPool (wxWindow *parent, shared_ptr <Hash> hash) const
|
||||
{
|
||||
RandomNumberGenerator::Start();
|
||||
|
||||
|
||||
if (hash)
|
||||
RandomNumberGenerator::SetHash (hash);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -89,7 +89,7 @@ namespace VeraCrypt
|
||||
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]); }
|
||||
virtual void ShowWarningTopMost (const wxString &message) const;
|
||||
virtual void ShowWarningTopMost (const wxString &message) const;
|
||||
virtual bool UpdateListCtrlItem (wxListCtrl *listCtrl, long itemIndex, const vector <wstring> &itemFields) const;
|
||||
virtual void UserEnrichRandomPool (wxWindow *parent, shared_ptr <Hash> hash = shared_ptr <Hash>()) const;
|
||||
virtual void Yield () const;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -50,13 +50,13 @@ namespace VeraCrypt
|
||||
|
||||
if (VirtualKeyModifiers & wxMOD_SHIFT)
|
||||
str += LangString["VK_SHIFT"] + L"+";
|
||||
|
||||
|
||||
if (VirtualKeyModifiers & wxMOD_CONTROL)
|
||||
str += LangString["VK_CONTROL"] + L"+";
|
||||
|
||||
|
||||
if (VirtualKeyModifiers & wxMOD_ALT)
|
||||
str += LangString["VK_ALT"] + L"+";
|
||||
|
||||
|
||||
if (VirtualKeyModifiers & wxMOD_WIN )
|
||||
str += LangString["VK_WIN"] + L"+";
|
||||
|
||||
@@ -67,11 +67,11 @@ namespace VeraCrypt
|
||||
{
|
||||
#ifdef TC_WINDOWS
|
||||
// ASCII characters
|
||||
if (virtualKeyCode >= 0x30 && virtualKeyCode <= 0x5a)
|
||||
if (virtualKeyCode >= 0x30 && virtualKeyCode <= 0x5a)
|
||||
return StringFormatter (L"{0}", char (virtualKeyCode));
|
||||
|
||||
// OEM-specific
|
||||
if (virtualKeyCode >= 0xE9 && virtualKeyCode <= 0xF5)
|
||||
if (virtualKeyCode >= 0xE9 && virtualKeyCode <= 0xF5)
|
||||
return StringFormatter (L"OEM-{0}", virtualKeyCode);
|
||||
|
||||
// F1-F24
|
||||
@@ -147,7 +147,7 @@ namespace VeraCrypt
|
||||
{
|
||||
hotkey->VirtualKeyCode = StringConverter::ToUInt32 (wstring (node.Attributes[L"vkeycode"]));
|
||||
hotkey->VirtualKeyModifiers = 0;
|
||||
|
||||
|
||||
if (node.Attributes[L"modshift"] == L"1")
|
||||
hotkey->VirtualKeyModifiers |= wxMOD_SHIFT;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
# by the TrueCrypt License 3.0.
|
||||
#
|
||||
# Modifications and additions to the original source code (contained in this file)
|
||||
# Modifications and additions to the original source code (contained in this file)
|
||||
# and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -152,7 +152,7 @@ ifeq "$(PLATFORM)" "MacOSX"
|
||||
mkdir -p $(APPNAME).app/Contents/MacOS $(APPNAME).app/Contents/Resources
|
||||
-rm -f $(APPNAME).app/Contents/MacOS/$(APPNAME)
|
||||
-rm -f $(APPNAME).app/Contents/MacOS/$(APPNAME)_console
|
||||
|
||||
|
||||
ifeq "$(TC_BUILD_CONFIG)" "Release"
|
||||
ifdef TC_NO_GUI
|
||||
cp $(PWD)/Main/$(APPNAME) $(APPNAME).app/Contents/MacOS/$(APPNAME)_console
|
||||
@@ -171,7 +171,7 @@ endif
|
||||
|
||||
cp $(PWD)/Resources/Icons/VeraCrypt.icns $(APPNAME).app/Contents/Resources
|
||||
cp "$(PWD)/Release/Setup Files/VeraCrypt User Guide.pdf" $(APPNAME).app/Contents/Resources
|
||||
|
||||
|
||||
echo -n APPLTRUE >$(APPNAME).app/Contents/PkgInfo
|
||||
sed -e 's/_VERSION_/$(patsubst %a,%.1,$(patsubst %b,%.2,$(TC_VERSION)))/' ../Build/Resources/MacOSX/Info.plist.xml >$(APPNAME).app/Contents/Info.plist
|
||||
codesign -s "Developer ID Application: Mounir IDRASSI" --timestamp $(APPNAME).app
|
||||
@@ -192,7 +192,7 @@ endif
|
||||
|
||||
|
||||
|
||||
ifeq "$(PLATFORM)" "Linux"
|
||||
ifeq "$(PLATFORM)" "Linux"
|
||||
ifeq "$(TC_BUILD_CONFIG)" "Release"
|
||||
mkdir -p $(PWD)/Setup/Linux/usr/bin
|
||||
mkdir -p $(PWD)/Setup/Linux/usr/share/$(APPNAME)/doc
|
||||
@@ -211,7 +211,7 @@ endif
|
||||
|
||||
|
||||
tar cfz $(PWD)/Setup/Linux/$(PACKAGE_NAME) --directory $(PWD)/Setup/Linux usr
|
||||
|
||||
|
||||
@rm -fr $(INTERNAL_INSTALLER_NAME)
|
||||
@echo "#!/bin/sh" > $(INTERNAL_INSTALLER_NAME)
|
||||
@echo "VERSION=$(TC_VERSION)" >> $(INTERNAL_INSTALLER_NAME)
|
||||
@@ -219,7 +219,7 @@ endif
|
||||
@echo "PACKAGE_NAME=$(PACKAGE_NAME)" >> $(INTERNAL_INSTALLER_NAME)
|
||||
@echo "PACKAGE_START=1107" >> $(INTERNAL_INSTALLER_NAME)
|
||||
@echo "INSTALLER_TYPE=$(INSTALLER_TYPE)" >> $(INTERNAL_INSTALLER_NAME)
|
||||
|
||||
|
||||
@cat $(PWD)/Setup/Linux/veracrypt_install_template.sh >> $(INTERNAL_INSTALLER_NAME)
|
||||
@cat $(PWD)/Setup/Linux/$(PACKAGE_NAME) >> $(INTERNAL_INSTALLER_NAME)
|
||||
chmod +x $(INTERNAL_INSTALLER_NAME)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -24,7 +24,7 @@ namespace VeraCrypt
|
||||
#ifdef TC_WINDOWS
|
||||
static ConstBufferPtr GetWindowsResource (const wchar_t *resourceType, const wchar_t *resourceName)
|
||||
{
|
||||
HGLOBAL hResL;
|
||||
HGLOBAL hResL;
|
||||
HRSRC hRes;
|
||||
|
||||
hRes = FindResource (NULL, resourceName, resourceType);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -26,8 +26,8 @@
|
||||
#ifndef TC_LOCAL_WIN32_WINNT_OVERRIDE
|
||||
# ifndef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x0501
|
||||
# endif
|
||||
#endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS
|
||||
#define _WIN32_WINDOWS 0x0410
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -165,7 +165,7 @@ namespace VeraCrypt
|
||||
|
||||
return password;
|
||||
}
|
||||
|
||||
|
||||
int TextUserInterface::AskPim (const wxString &message) const
|
||||
{
|
||||
int pim = -1;
|
||||
@@ -196,10 +196,10 @@ namespace VeraCrypt
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return pim;
|
||||
}
|
||||
|
||||
|
||||
ssize_t TextUserInterface::AskSelection (ssize_t optionCount, ssize_t defaultOption) const
|
||||
{
|
||||
while (true)
|
||||
@@ -229,7 +229,7 @@ namespace VeraCrypt
|
||||
ShowString (message);
|
||||
return wstring (ReadInputStreamLine());
|
||||
}
|
||||
|
||||
|
||||
bool TextUserInterface::AskYesNo (const wxString &message, bool defaultYes, bool warning) const
|
||||
{
|
||||
while (true)
|
||||
@@ -264,7 +264,7 @@ namespace VeraCrypt
|
||||
#endif
|
||||
|
||||
ShowInfo ("EXTERNAL_VOL_HEADER_BAK_FIRST_INFO");
|
||||
|
||||
|
||||
shared_ptr <Pkcs5Kdf> kdf;
|
||||
if (CmdLine->ArgHash)
|
||||
{
|
||||
@@ -426,7 +426,7 @@ namespace VeraCrypt
|
||||
{
|
||||
password = AskPassword ();
|
||||
}
|
||||
|
||||
|
||||
// current PIM
|
||||
if (!truecryptMode && !Preferences.NonInteractive && (pim < 0))
|
||||
{
|
||||
@@ -449,7 +449,7 @@ namespace VeraCrypt
|
||||
if (!Preferences.NonInteractive)
|
||||
keyfiles = AskKeyfiles ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!volume.get())
|
||||
volume = Core->OpenVolume (volumePath, Preferences.DefaultMountOptions.PreserveTimestamps, password, pim, kdf, truecryptMode, keyfiles);
|
||||
@@ -469,7 +469,7 @@ namespace VeraCrypt
|
||||
// New password
|
||||
if (!newPassword.get() && !Preferences.NonInteractive)
|
||||
newPassword = AskPassword (_("Enter new password"), true);
|
||||
|
||||
|
||||
// New PIM
|
||||
if ((newPim < 0) && !Preferences.NonInteractive)
|
||||
newPim = AskPim (_("Enter new PIM"));
|
||||
@@ -769,7 +769,7 @@ namespace VeraCrypt
|
||||
ShowString (L"\n");
|
||||
options->Password = AskPassword (_("Enter password"), true);
|
||||
}
|
||||
|
||||
|
||||
// PIM
|
||||
if ((options->Pim < 0) && !Preferences.NonInteractive)
|
||||
{
|
||||
@@ -784,7 +784,7 @@ namespace VeraCrypt
|
||||
options->Keyfiles = AskKeyfiles (_("Enter keyfile path"));
|
||||
}
|
||||
|
||||
if ((!options->Keyfiles || options->Keyfiles->empty())
|
||||
if ((!options->Keyfiles || options->Keyfiles->empty())
|
||||
&& (!options->Password || options->Password->IsEmpty()))
|
||||
{
|
||||
throw_err (_("Password cannot be empty when no keyfile is specified"));
|
||||
@@ -909,7 +909,7 @@ namespace VeraCrypt
|
||||
|
||||
ShowInfo (options->Type == VolumeType::Hidden ? "HIDVOL_FORMAT_FINISHED_HELP" : "FORMAT_FINISHED_INFO");
|
||||
}
|
||||
|
||||
|
||||
void TextUserInterface::DeleteSecurityTokenKeyfiles () const
|
||||
{
|
||||
shared_ptr <KeyfileList> keyfiles = AskKeyfiles();
|
||||
@@ -956,7 +956,7 @@ namespace VeraCrypt
|
||||
|
||||
BufferPtr keyfileDataBuf (&keyfileData.front(), keyfileData.size());
|
||||
finally_do_arg (BufferPtr, keyfileDataBuf, { finally_arg.Erase(); });
|
||||
|
||||
|
||||
FilePath exportFilePath = AskFilePath();
|
||||
|
||||
if (exportFilePath.IsEmpty())
|
||||
@@ -978,7 +978,7 @@ namespace VeraCrypt
|
||||
|
||||
TextUserInterface::SetTerminalEcho (false);
|
||||
finally_do ({ TextUserInterface::SetTerminalEcho (true); });
|
||||
|
||||
|
||||
wstring wPassword (UI->ReadInputStreamLine());
|
||||
finally_do_arg (wstring *, &wPassword, { StringConverter::Erase (*finally_arg); });
|
||||
|
||||
@@ -988,7 +988,7 @@ namespace VeraCrypt
|
||||
}
|
||||
TextUserInterface *UI;
|
||||
};
|
||||
|
||||
|
||||
return shared_ptr <GetStringFunctor> (new AdminPasswordRequestHandler (this));
|
||||
}
|
||||
|
||||
@@ -1060,7 +1060,7 @@ namespace VeraCrypt
|
||||
|
||||
TextUserInterface::SetTerminalEcho (false);
|
||||
finally_do ({ TextUserInterface::SetTerminalEcho (true); });
|
||||
|
||||
|
||||
wstring wPassword (UI->ReadInputStreamLine());
|
||||
finally_do_arg (wstring *, &wPassword, { StringConverter::Erase (*finally_arg); });
|
||||
|
||||
@@ -1110,7 +1110,7 @@ namespace VeraCrypt
|
||||
{
|
||||
if (!options.Password)
|
||||
options.Password = AskPassword();
|
||||
|
||||
|
||||
if (!options.TrueCryptMode && (options.Pim < 0))
|
||||
options.Pim = AskPim (_("Enter PIM"));
|
||||
|
||||
@@ -1118,7 +1118,7 @@ namespace VeraCrypt
|
||||
options.Keyfiles = AskKeyfiles();
|
||||
|
||||
VolumeInfoList mountedVolumes = UserInterface::MountAllDeviceHostedVolumes (options);
|
||||
|
||||
|
||||
if (!mountedVolumes.empty())
|
||||
return mountedVolumes;
|
||||
|
||||
@@ -1126,7 +1126,7 @@ namespace VeraCrypt
|
||||
options.Pim = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
shared_ptr <VolumeInfo> TextUserInterface::MountVolume (MountOptions &options) const
|
||||
{
|
||||
shared_ptr <VolumeInfo> volume;
|
||||
@@ -1151,7 +1151,7 @@ namespace VeraCrypt
|
||||
// Mount point
|
||||
if (!options.MountPoint && !options.NoFilesystem)
|
||||
options.MountPoint.reset (new DirectoryPath (AskString (_("Enter mount directory [default]: "))));
|
||||
|
||||
|
||||
VolumePassword password;
|
||||
KeyfileList keyfiles;
|
||||
|
||||
@@ -1176,7 +1176,7 @@ namespace VeraCrypt
|
||||
{
|
||||
options.Password = AskPassword (StringFormatter (_("Enter password for {0}"), wstring (*options.Path)));
|
||||
}
|
||||
|
||||
|
||||
if (!options.TrueCryptMode && (options.Pim < 0))
|
||||
{
|
||||
options.Pim = AskPim (StringFormatter (_("Enter PIM for {0}"), wstring (*options.Path)));
|
||||
@@ -1276,7 +1276,7 @@ namespace VeraCrypt
|
||||
}
|
||||
|
||||
int TextUserInterface::OnRun()
|
||||
{
|
||||
{
|
||||
try
|
||||
{
|
||||
if (ProcessCommandLine ())
|
||||
@@ -1362,7 +1362,7 @@ namespace VeraCrypt
|
||||
default:
|
||||
throw UserAbort (SRC_POS);
|
||||
}
|
||||
|
||||
|
||||
/* force the display of the random enriching interface */
|
||||
RandomNumberGenerator::SetEnrichedByUserStatus (false);
|
||||
|
||||
@@ -1513,7 +1513,7 @@ namespace VeraCrypt
|
||||
|
||||
File volumeFile;
|
||||
volumeFile.Open (*volumePath, File::OpenReadWrite, File::ShareNone, File::PreserveTimestamps);
|
||||
|
||||
|
||||
RandomNumberGenerator::Start();
|
||||
UserEnrichRandomPool();
|
||||
|
||||
@@ -1534,7 +1534,7 @@ namespace VeraCrypt
|
||||
{
|
||||
// Re-encrypt backup volume header
|
||||
Core->ReEncryptVolumeHeaderWithNewSalt (newHeaderBuffer, decryptedLayout->GetHeader(), options.Password, options.Pim, options.Keyfiles);
|
||||
|
||||
|
||||
// Write backup volume header
|
||||
headerOffset = decryptedLayout->GetBackupHeaderOffset();
|
||||
if (headerOffset >= 0)
|
||||
@@ -1572,7 +1572,7 @@ namespace VeraCrypt
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void TextUserInterface::UserEnrichRandomPool () const
|
||||
{
|
||||
RandomNumberGenerator::Start();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -33,7 +33,7 @@ int main (int argc, char **argv)
|
||||
{
|
||||
// Make sure all required commands can be executed via default search path
|
||||
string sysPathStr = "/usr/sbin:/sbin:/usr/bin:/bin";
|
||||
|
||||
|
||||
char *sysPath = getenv ("PATH");
|
||||
if (sysPath)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -73,7 +73,7 @@ namespace VeraCrypt
|
||||
static BOOL CALLBACK ChildWindows (HWND hwnd, LPARAM argsLP)
|
||||
{
|
||||
Args *args = reinterpret_cast <Args *> (argsLP);
|
||||
|
||||
|
||||
char s[4096];
|
||||
SendMessageA (hwnd, WM_GETTEXT, sizeof (s), (LPARAM) s);
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace VeraCrypt
|
||||
return;
|
||||
|
||||
args.DriveRootPath = string() + mountPoint[0] + string (":\\");
|
||||
|
||||
|
||||
EnumWindows (Enumerator::TopLevelWindows, (LPARAM) &args);
|
||||
#endif
|
||||
}
|
||||
@@ -237,7 +237,7 @@ namespace VeraCrypt
|
||||
if (Preferences.Verbose && !message.IsEmpty())
|
||||
ShowInfo (message);
|
||||
}
|
||||
|
||||
|
||||
void UserInterface::DisplayVolumeProperties (const VolumeInfoList &volumes) const
|
||||
{
|
||||
if (volumes.size() < 1)
|
||||
@@ -281,7 +281,7 @@ namespace VeraCrypt
|
||||
prop << LangString["BLOCK_SIZE"] << L": " << blockSize.str() + L" " + LangString ["BITS"] << L'\n';
|
||||
prop << LangString["MODE_OF_OPERATION"] << L": " << volume.EncryptionModeName << L'\n';
|
||||
prop << LangString["PKCS5_PRF"] << L": " << volume.Pkcs5PrfName << L'\n';
|
||||
|
||||
|
||||
prop << LangString["VOLUME_FORMAT_VERSION"] << L": " << (volume.MinRequiredProgramVersion < 0x10b ? 1 : 2) << L'\n';
|
||||
prop << LangString["BACKUP_HEADER"] << L": " << LangString[volume.MinRequiredProgramVersion >= 0x10b ? "UISTR_YES" : "UISTR_NO"] << L'\n';
|
||||
|
||||
@@ -294,7 +294,7 @@ namespace VeraCrypt
|
||||
#ifdef TC_LINUX
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
prop << L'\n';
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ namespace VeraCrypt
|
||||
wxString UserInterface::ExceptionToMessage (const exception &ex)
|
||||
{
|
||||
wxString message;
|
||||
|
||||
|
||||
const Exception *e = dynamic_cast <const Exception *> (&ex);
|
||||
if (e)
|
||||
{
|
||||
@@ -394,7 +394,7 @@ namespace VeraCrypt
|
||||
return wxString (errOutput).Trim (true);
|
||||
}
|
||||
|
||||
// PasswordIncorrect
|
||||
// PasswordIncorrect
|
||||
if (dynamic_cast <const PasswordException *> (&ex))
|
||||
{
|
||||
wxString message = ExceptionTypeToString (typeid (ex));
|
||||
@@ -419,7 +419,7 @@ namespace VeraCrypt
|
||||
if (dynamic_cast <const Pkcs11Exception *> (&ex))
|
||||
{
|
||||
string errorString = string (dynamic_cast <const Pkcs11Exception &> (ex));
|
||||
|
||||
|
||||
if (LangString.Exists (errorString))
|
||||
return LangString[errorString];
|
||||
|
||||
@@ -510,7 +510,7 @@ namespace VeraCrypt
|
||||
#endif
|
||||
LangString.Init();
|
||||
Core->Init();
|
||||
|
||||
|
||||
CmdLine.reset (new CommandLineInterface (argc, argv, InterfaceType));
|
||||
SetPreferences (CmdLine->Preferences);
|
||||
|
||||
@@ -551,7 +551,7 @@ namespace VeraCrypt
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void UserInterface::ListMountedVolumes (const VolumeInfoList &volumes) const
|
||||
{
|
||||
if (volumes.size() < 1)
|
||||
@@ -683,7 +683,7 @@ namespace VeraCrypt
|
||||
VolumeInfoList UserInterface::MountAllFavoriteVolumes (MountOptions &options)
|
||||
{
|
||||
BusyScope busy (this);
|
||||
|
||||
|
||||
VolumeInfoList newMountedVolumes;
|
||||
foreach_ref (const FavoriteVolume &favorite, FavoriteVolume::LoadList())
|
||||
{
|
||||
@@ -805,7 +805,7 @@ namespace VeraCrypt
|
||||
if (Preferences.OpenExplorerWindowAfterMount && !mountedVolume->MountPoint.IsEmpty())
|
||||
OpenExplorerWindow (mountedVolume->MountPoint);
|
||||
}
|
||||
|
||||
|
||||
void UserInterface::OnWarning (EventArgs &args)
|
||||
{
|
||||
ExceptionEventArgs &e = dynamic_cast <ExceptionEventArgs &> (args);
|
||||
@@ -876,7 +876,7 @@ namespace VeraCrypt
|
||||
}
|
||||
else if (xdgOpenPresent)
|
||||
{
|
||||
// Fallback on the standard xdg-open command
|
||||
// Fallback on the standard xdg-open command
|
||||
// which is not always available by default
|
||||
args.push_back (string (path));
|
||||
try
|
||||
@@ -905,7 +905,7 @@ namespace VeraCrypt
|
||||
wstring pwdInput;
|
||||
getline(wcin, pwdInput);
|
||||
|
||||
cmdLine.ArgPassword = ToUTF8Password ( pwdInput.c_str (), pwdInput.size ());
|
||||
cmdLine.ArgPassword = ToUTF8Password ( pwdInput.c_str (), pwdInput.size ());
|
||||
}
|
||||
|
||||
switch (cmdLine.ArgCommand)
|
||||
@@ -1025,7 +1025,7 @@ namespace VeraCrypt
|
||||
options->VolumeHeaderKdf = Pkcs5Kdf::GetAlgorithm (*cmdLine.ArgHash, false);
|
||||
RandomNumberGenerator::SetHash (cmdLine.ArgHash);
|
||||
}
|
||||
|
||||
|
||||
options->EA = cmdLine.ArgEncryptionAlgorithm;
|
||||
options->Filesystem = cmdLine.ArgFilesystem;
|
||||
options->Keyfiles = cmdLine.ArgKeyfiles;
|
||||
@@ -1494,7 +1494,7 @@ namespace VeraCrypt
|
||||
|
||||
return s.str();
|
||||
}
|
||||
|
||||
|
||||
bool UserInterface::VolumeHasUnrecommendedExtension (const VolumePath &path) const
|
||||
{
|
||||
wxString ext = wxFileName (wxString (wstring (path)).Lower()).GetExt();
|
||||
@@ -1580,7 +1580,7 @@ namespace VeraCrypt
|
||||
VC_CONVERT_EXCEPTION (UserInterfaceException);
|
||||
VC_CONVERT_EXCEPTION (MissingArgument);
|
||||
VC_CONVERT_EXCEPTION (NoItemSelected);
|
||||
VC_CONVERT_EXCEPTION (StringFormatterException);
|
||||
VC_CONVERT_EXCEPTION (StringFormatterException);
|
||||
VC_CONVERT_EXCEPTION (ExecutedProcessFailed);
|
||||
VC_CONVERT_EXCEPTION (AlreadyInitialized);
|
||||
VC_CONVERT_EXCEPTION (AssertionFailed);
|
||||
@@ -1598,7 +1598,7 @@ namespace VeraCrypt
|
||||
VC_CONVERT_EXCEPTION (UnknownException);
|
||||
VC_CONVERT_EXCEPTION (UserAbort)
|
||||
VC_CONVERT_EXCEPTION (CipherInitError);
|
||||
VC_CONVERT_EXCEPTION (WeakKeyDetected);
|
||||
VC_CONVERT_EXCEPTION (WeakKeyDetected);
|
||||
VC_CONVERT_EXCEPTION (HigherVersionRequired);
|
||||
VC_CONVERT_EXCEPTION (KeyfilePathEmpty);
|
||||
VC_CONVERT_EXCEPTION (MissingVolumeData);
|
||||
@@ -1613,7 +1613,7 @@ namespace VeraCrypt
|
||||
VC_CONVERT_EXCEPTION (SecurityTokenLibraryNotInitialized);
|
||||
VC_CONVERT_EXCEPTION (SecurityTokenKeyfileAlreadyExists);
|
||||
VC_CONVERT_EXCEPTION (SecurityTokenKeyfileNotFound);
|
||||
VC_CONVERT_EXCEPTION (UnsupportedAlgoInTrueCryptMode);
|
||||
VC_CONVERT_EXCEPTION (UnsupportedAlgoInTrueCryptMode);
|
||||
VC_CONVERT_EXCEPTION (UnsupportedTrueCryptFormat);
|
||||
VC_CONVERT_EXCEPTION (SystemException);
|
||||
VC_CONVERT_EXCEPTION (CipherException);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
@@ -32,7 +32,7 @@ namespace VeraCrypt
|
||||
else
|
||||
cfgVar = StringConverter::ToUInt32 (wstring (cfgText));
|
||||
}
|
||||
|
||||
|
||||
void UserPreferences::SetValue (const wxString &cfgText, uint64 &cfgVar)
|
||||
{
|
||||
if (cfgText.empty())
|
||||
@@ -108,12 +108,12 @@ namespace VeraCrypt
|
||||
TC_CONFIG_SET (UseKeyfiles);
|
||||
TC_CONFIG_SET (WipeCacheOnAutoDismount);
|
||||
TC_CONFIG_SET (WipeCacheOnClose);
|
||||
|
||||
|
||||
SetValue (configMap[L"DefaultTrueCryptMode"], DefaultMountOptions.TrueCryptMode);
|
||||
|
||||
|
||||
wstring defaultPrf;
|
||||
SetValue (configMap[L"DefaultPRF"], defaultPrf);
|
||||
|
||||
|
||||
shared_ptr <Pkcs5Kdf> savedKdf;
|
||||
try
|
||||
{
|
||||
@@ -123,9 +123,9 @@ namespace VeraCrypt
|
||||
catch (ParameterIncorrect&)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
DefaultMountOptions.Kdf = savedKdf;
|
||||
DefaultMountOptions.ProtectionKdf = savedKdf;
|
||||
DefaultMountOptions.ProtectionKdf = savedKdf;
|
||||
}
|
||||
|
||||
// Default keyfiles
|
||||
@@ -137,7 +137,7 @@ namespace VeraCrypt
|
||||
DefaultKeyfiles.push_back (make_shared <Keyfile> ((wstring) node.InnerText));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef TC_WINDOWS
|
||||
// Hotkeys
|
||||
Hotkeys = Hotkey::LoadList();
|
||||
@@ -222,12 +222,12 @@ namespace VeraCrypt
|
||||
TC_CONFIG_ADD (UseKeyfiles);
|
||||
TC_CONFIG_ADD (WipeCacheOnAutoDismount);
|
||||
TC_CONFIG_ADD (WipeCacheOnClose);
|
||||
|
||||
formatter.AddEntry (L"DefaultTrueCryptMode", DefaultMountOptions.TrueCryptMode);
|
||||
|
||||
|
||||
formatter.AddEntry (L"DefaultTrueCryptMode", DefaultMountOptions.TrueCryptMode);
|
||||
|
||||
wstring defaultPrf = L"autodetection";
|
||||
if (DefaultMountOptions.Kdf)
|
||||
defaultPrf = DefaultMountOptions.Kdf->GetName ();
|
||||
defaultPrf = DefaultMountOptions.Kdf->GetName ();
|
||||
formatter.AddEntry (L"DefaultPRF", defaultPrf);
|
||||
|
||||
XmlWriter writer (Application::GetConfigFilePath (GetPreferencesFileName(), true));
|
||||
@@ -236,7 +236,7 @@ namespace VeraCrypt
|
||||
|
||||
// Default keyfiles
|
||||
FilePath keyfilesCfgPath = Application::GetConfigFilePath (GetDefaultKeyfilesFileName(), true);
|
||||
|
||||
|
||||
if (DefaultKeyfiles.empty())
|
||||
{
|
||||
if (keyfilesCfgPath.IsFile())
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
|
||||
by the TrueCrypt License 3.0.
|
||||
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
Modifications and additions to the original source code (contained in this file)
|
||||
and all other portions of this file are Copyright (c) 2013-2016 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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user