VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver/Fuse/Driver.make
blob: 1367bd424db624b65d7c863193d0b27eca6ad340 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#
# Derived from source code of TrueCrypt 7.1a, which is
# Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
# by the TrueCrypt License 3.0.
#
# Modifications and additions to the original source code (contained in this file) 
# and all other portions of this file are Copyright (c) 2013-2015 IDRIX
# and are governed by the Apache License 2.0 the full text of which is
# contained in the file License.txt included in VeraCrypt binary and source
# code distribution packages.
#

NAME := Driver

OBJS :=
OBJS += FuseService.o

CXXFLAGS += $(shell pkg-config fuse --cflags)

include $(BUILD_INC)/Makefile.inc
} /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 Derived from source code of TrueCrypt 7.1a, which is
 Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed
 by the TrueCrypt License 3.0.

 Modifications and additions to the original source code (contained in this file)
 and all other portions of this file are Copyright (c) 2013-2017 IDRIX
 and are governed by the Apache License 2.0 the full text of which is
 contained in the file License.txt included in VeraCrypt binary and source
 code distribution packages.
*/

#include "System.h"
#include "Main/Main.h"
#include "Main/GraphicUserInterface.h"
#include "VolumePropertiesDialog.h"

namespace VeraCrypt
{
	VolumePropertiesDialog::VolumePropertiesDialog (wxWindow* parent, const VolumeInfo &volumeInfo)
		: VolumePropertiesDialogBase (parent)
	{
		list <int> colPermilles;

		PropertiesListCtrl->InsertColumn (0, LangString["PROPERTY"], wxLIST_FORMAT_LEFT, 208);
		colPermilles.push_back (500);
		PropertiesListCtrl->InsertColumn (1, LangString["VALUE"], wxLIST_FORMAT_LEFT, 192);
		colPermilles.push_back (500);

		Gui->SetListCtrlWidth (PropertiesListCtrl, 70, false);
		Gui->SetListCtrlHeight (PropertiesListCtrl, 17);
		Gui->SetListCtrlColumnWidths (PropertiesListCtrl, colPermilles, false);

		AppendToList ("LOCATION", wstring (volumeInfo.Path));
#ifndef TC_WINDOWS
		AppendToList ("VIRTUAL_DEVICE", wstring (volumeInfo.VirtualDevice));
#endif
		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"];
		else if (volumeInfo.HiddenVolumeProtectionTriggered)
			protection = LangString["HID_VOL_DAMAGE_PREVENTED"];
		else
			protection = LangString [volumeInfo.Protection == VolumeProtection::HiddenVolumeReadOnly ? "UISTR_YES" : "UISTR_NO"];

		AppendToList ("HIDDEN_VOL_PROTECTION", protection);
		AppendToList ("ENCRYPTION_ALGORITHM", volumeInfo.EncryptionAlgorithmName);
		AppendToList ("KEY_SIZE", StringFormatter (L"{0} {1}", volumeInfo.EncryptionAlgorithmKeySize * 8, LangString ["BITS"]));

		if (volumeInfo.EncryptionModeName == L"XTS")
			AppendToList ("SECONDARY_KEY_SIZE_XTS", StringFormatter (L"{0} {1}", volumeInfo.EncryptionAlgorithmKeySize * 8, LangString ["BITS"]));

		wstringstream blockSize;
		blockSize << volumeInfo.EncryptionAlgorithmBlockSize * 8;
		if (volumeInfo.EncryptionAlgorithmBlockSize != volumeInfo.EncryptionAlgorithmMinBlockSize)
			blockSize << L"/" << volumeInfo.EncryptionAlgorithmMinBlockSize * 8;

		AppendToList ("BLOCK_SIZE", blockSize.str() + L" " + LangString ["BITS"]);
		AppendToList ("MODE_OF_OPERATION", volumeInfo.EncryptionModeName);
		if (volumeInfo.Pim <= 0)
			AppendToList ("PKCS5_PRF", volumeInfo.Pkcs5PrfName);
		else
			AppendToList ("PKCS5_PRF", StringFormatter (L"{0} (Dynamic)", volumeInfo.Pkcs5PrfName));

#if 0
		AppendToList ("PKCS5_ITERATIONS", StringConverter::FromNumber (volumeInfo.Pkcs5IterationCount));
		AppendToList ("VOLUME_CREATE_DATE", Gui->VolumeTimeToString (volumeInfo.VolumeCreationTime));
		AppendToList ("VOLUME_HEADER_DATE", Gui->VolumeTimeToString (volumeInfo.HeaderCreationTime));
#endif

		AppendToList ("VOLUME_FORMAT_VERSION", StringConverter::ToWide (volumeInfo.MinRequiredProgramVersion < 0x10b ? 1 : 2));
		AppendToList ("BACKUP_HEADER", LangString[volumeInfo.MinRequiredProgramVersion >= 0x10b ? "UISTR_YES" : "UISTR_NO"]);

#ifdef TC_LINUX
		if (string (volumeInfo.VirtualDevice).find ("/dev/mapper/veracrypt") != 0)
		{
#endif
		AppendToList ("TOTAL_DATA_READ", Gui->SizeToString (volumeInfo.TotalDataRead));
		AppendToList ("TOTAL_DATA_WRITTEN", Gui->SizeToString (volumeInfo.TotalDataWritten));
#ifdef TC_LINUX
		}
#endif

		Layout();
		Fit();
		Center();

		OKButton->SetDefault();
	}

	void VolumePropertiesDialog::AppendToList (const string &name, const wxString &value)
	{
		vector <wstring> fields (PropertiesListCtrl->GetColumnCount());

		fields[0] = LangString[name];
		fields[1] = value;

		Gui->AppendToListCtrl (PropertiesListCtrl, fields);
	}
}