VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main
AgeCommit message (Collapse)AuthorFilesLines
2024-09-17Add Option to Enable/Disable Screen Capture (#1418)Deniz Türkoglu6-0/+22
Veracrypt currently appears in screenshots and screen captures, which can unintentionally expose sensitive information, such as the fact that Veracrypt is running or the location of your volumes. Both Windows and macOS offer mechanisms to exclude specific windows from being captured. While not foolproof, this is a useful preventative measure. The method is a no-op for Linux/FreeBSD. For more details on the wxWidgets API, see: https://docs.wxwidgets.org/3.2/classwx_top_level_window.html#a337b9cec62b0cbd3b1b1545a83270f64
2024-08-25Linux/MacOSX: Only load valid XML language files (Language.langid.xml format ↵Mounir IDRASSI1-5/+14
with langid one of the predefined language identifiers)
2024-08-22Revert "Add Hausa translation (#1404)" (#1407)Mounir IDRASSI1-1/+0
This reverts commit ce9537f2b847b9b3b89e8dfca377d2659b3f02fc.
2024-08-21Add Hausa translation (#1404)Marius Kjærstad1-0/+1
2024-08-03Add Norwegian Bokmål translation (#1382)Marius Kjærstad1-0/+1
* Add Norwegian Bokmål translation * Fix Norwegian Bokmål translation
2024-08-02Implement detection of volumes with vulnerable XTS master key.Mounir IDRASSI4-0/+71
If vulnerability detected, a warning message is displayed during mount or backup/restore header, and changing the password is disallowed since it will not change the master key.
2024-07-13Linux: fix linker type confusion that was causing crash.Mounir IDRASSI3-32/+32
The class AdminPasswordRequestHandler was defined in several places in the same namespace and the linker was picking up one definition for constructor and the other one when calling virtual method. Now we use different named for different implementations.
2024-07-10Linux: fix typoMounir IDRASSI1-1/+1
2024-07-10Linux: fix crash when displaying Admin password dialog. Fix failure of ↵Mounir IDRASSI1-27/+26
Github action by using builtin GITHUB_TOKEN
2024-07-05Linux/FreeBSD: Improve build scripts for Linux/FreeBSD to have correct name ↵Mounir IDRASSI1-3/+28
for generic GUI installer
2024-06-30Linux: Make the C++ code compatible with old compilers (g++ 4.4.7 on CentOS 6)Mounir IDRASSI8-115/+126
2024-06-26Linux/FreeBSD: Fix GNU Make syntax error in Main.makeMounir IDRASSI1-3/+3
2024-06-26Linux/FreeBSD: use GTK3 flavor for default generic gui installer. create ↵Mounir IDRASSI1-0/+12
GTK2 specific gui installer.
2024-06-23MacOSX: Fix compiler warningMounir IDRASSI1-2/+2
Update friend declaration in FuseService.h and refactor GetCharWidth to ComputeCharWidth in WaitDialog.h to avoif hiding GetCharWidth inherited from wxWindow
2024-06-23macOSX: Add "FUSE-T build" in About dialog when linking against FUSE-T ↵Mounir IDRASSI1-1/+5
instead of MacFUSE
2024-06-23Update copyright date in some filesMounir IDRASSI1-2/+2
2024-06-22MacOSX: Add for using FUSE-T instead of MacFUSEMounir IDRASSI1-1/+5
The build script build_veracrypt_macosx.h now accepts the argument -f to enable fuse-t support. It is also possible to set the environment variable VC_OSX_FUSET to 1 for FUSE-T support. A change was done in CoreUnix::GetMountedVolumes to add a waiting loop for control file to be accessible because when using FUSE-T there always a delay before control file can be serialized.
2024-06-18fix: Correct missing 'endif' in Main.make for MacOSX sectionMounir IDRASSI1-1/+1
Replaced an incorrect 'end' statement with 'endif' in the MacOSX-specific section of the Main.make file. This resolves the make error caused by an unclosed conditional block.
2024-06-16MacOSX: Fix skipping codesign and productsign for local development buildMounir IDRASSI1-1/+6
2024-06-16Improve and simplify macOS builds (#1276)Deniz Türkoglu1-0/+2
* Add missing macOS requirement for 'make package' We need packages for the last build step on macOS, update docs to reflect the requirement. * Add build instructions using homebrew On macOS, we can use a package manager to easily install dependencies. This simplifies onboarding and building Veracrypt. * Add flag to use homebrew packages When building, we can use prebuilt wxwidgets from homebrew to simplify and speed up local building. We also put the package behind a flag as it's optional during development. * Skip signing for local builds When building with homebrew, skip signing. This can be put behind a flag to enable, if needed. * Use system yasm on macOS if available The binary in the repo is not universal (x86_64) and therefore building fails on arm architecture if Rosetta is not installed. Use local yasm if available. * Build local arch only in development When building via homebrew and locally, build only the local arch which skips ASM for arm(Mx) for MacOS. This removes the need to have rosetta installed for building. * Fix compilation issue when COMPILE_ASM is undefined Use a conditional check for COMPILE_ASM not being false instead of true. This avoids passing the variable to other parts of the build script. * Set SDK 12 as the minimum requirement and target Align the requirement to SDK 12 in both the makefile and script, and update the comment to remove confusion. I chose to leave this on 12 to be on the side of err and support as many building platforms as possible, when we can support. The local script now also sets the target using the local sdk version. This should improve the local development experience. * Fix wrong architecture for macOS in x86 builds We now build only the current arch for local development builds in macOS. This change also fixes the x86 builds failing. * Add instructions brew backed macOS local builds Flags to build a local build using homebrew packages are not default and require parameter -b to build. We also don't build packages directly, which requires -p. * Fix wxwidgets not linking in local x86 macOS development builds * Clarify build location in the document
2024-06-12Avoid conflict with C++17 features std::byte by using uint8 type instead of byteMounir IDRASSI14-35/+35
2024-06-03Avoid assert by verifying installed languages exist (#1354)Jertzukka1-8/+10
wxDir::GetAllFiles will throw an assert when opening the preferences dialog if for some reason the user has not installed VeraCrypt properly and is missing the intended folder. This patch adds a check to ensure the folder first exists before querying its files.
2024-06-03FreeBSD: Support automatic detection and mounting of ext2/3/4, exFAT, NTFS ↵Jertzukka1-0/+10
filesystems (#1350)
2024-05-18Prepare for changes in wxWidgets 3.3 (#1343)Jertzukka5-7/+7
* Move from deprecated wxScopedPtr to std::unique_ptr wxScopedPtr was included previously through some header hierarchy which as of 3.3 is no longer the case causing it to break. But instead of including a header for a deprecated function explicitly, just move to std::unique_ptr as recommended by upstream. * Convert to explicit conversions from wxString As of https://github.com/wxWidgets/wxWidgets/pull/23449/commits/35c35c235e9c29b40002131602e050dca8d65b8c wxWidgets defaults to STL classes, which has a side-effect that some implicit conversions break. This patch converts those conversions to explicit in anticipation of wxWidgets 3.3 release.
2024-05-08Fix incorrect max hidden volume size for file containers on CLI (#1338)Jertzukka1-6/+12
Currently the maximum hidden volume size for file containers is limited by available free space on the device the file container resides on, which we do not care about. This commit changes so that only Normal volumes get their `maxVolumeSize` limited by `AvailableDiskSpace`. Also the --size=max parameter is restricted from hidden volume creation as there is no way to determine a good size as we do not mount the outer volume through the CLI process flow to determine available free space on the outer volume.
2024-04-10Correct exceptions to match the correct language strings (#1299)Jertzukka1-3/+3
Fixes the order of the language strings to match the correct exceptions.
2024-04-10Unix CLI: Don't initially re-ask PIM if it was already specified (#1288)Jertzukka1-1/+0
We don't need to reset PIM in PasswordException as it is immediately fell back to if PIM is specified in text mode, but password is not. This causes an exception that resets the PIM when it shouldn't.
2023-12-11Linux: Allows GUI to launch in a Wayland-only environment (#1264)Jertzukka1-1/+1
Currently we check whether the system has DISPLAY environment variable set, which is the case in a system that uses X11 natively or XWayland. This variable is not set in a system with only Wayland, so we need to also check whether WAYLAND_DISPLAY is set. Fixes: #184
2023-12-11macOS: Fix near zero width PIM input box and simplify wxTextValidator logic ↵Jertzukka4-13/+8
(#1274) * macOS: Fix issue where PIM box has no width in Wizard VolumePimTextCtrl has a problem with width on macOS which we can fix by adjusting the proportions of the elements inside the PimSizer, which seems like a better solution than using a forced minimum size in pixels. Adjacent, simplifies the validator logic for digits in PIM field. Fixes #1219
2023-11-19Linux/FreeBSD/macOS: Implement language selection settings (#1253)Jertzukka12-68/+805
* Implement Language selection into settings Initial commit to create a new tab in PreferencesNotebook for Language selection. By default, if nothing is chosen, it uses the current behaviour of using the language from system environment variables. If another language is chosen from the settings, it is saved into the Configuration.xml and this is used instead. * Fix SetStringSelection() assert issue on macOS * Add header include to fix build * Add current language pack, authors and way to use literal strings * Translations also for FreeBSD * Minimal GTK3 WX build on FreeBSD requires wxGraphicsContext * Get Preferences properly instead of workaround function * Use WrapSizer instead of BoxSizer for author line This forces long author lists to be put on a new line, reducing the need to increase window width. * Update Finnish translation * Borrow translation from IDM_LANGUAGE where it makes sense * Remove colon and thus unneeded function * Simplify Language tab layout * Reintroduce macOS specific fixes to Forms.cpp * cleanup
2023-11-13wolfCrypt as crypto backend for VeraCrypt (#1227)lealem473-3/+21
* wolfCrypt as crypto backend for VeraCrypt * Refactor to use EncryptionModeWolfCryptXTS class
2023-10-31Linux: Focus PIM field when selected (#1239)Jertzukka1-0/+1
Sets focus to VolumePimTextCtrl initially when the checkbox is clicked.
2023-10-08Fix warnings and throwing an exception instead of ignoring the error (#1229)kovalev01-1/+0
* EMVCard.cpp: ArrayToHexWideString: prohibit conversion of a string constant ../Common/EMVCard.cpp: In function 'std::wstring VeraCrypt::ArrayToHexWideString(con st unsigned char*, size_t)': ../Common/EMVCard.cpp:28:43: warning: ISO C++ forbids converting a string constant to 'wchar_t*' [-Wwrite-strings] 28 | static wchar_t* hexChar = L"0123456789ABCDEF"; | ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org> * EMVCard.cpp: ArrayToHexWideString: fix of the comparison of different types ../Common/EMVCard.cpp: In function 'std::wstring VeraCrypt::ArrayToHexWideString(con st unsigned char*, size_t)': ../Common/EMVCard.cpp:32:43: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare] 32 | for (int i = 0; i < cbData; i++) | ~~^~~~~~~~ Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org> * SecurityTokenKeyfilesDialog.cpp: removed initialization of an unused variable Forms/SecurityTokenKeyfilesDialog.cpp:58:24: warning: unused variable 'i' [-Wunused- variable] 58 | size_t i = 0; | ^ Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org> * Core/Unix: throwing an exception instead of ignoring the error Fixes: 5a6b445f ("fix warnings and UB (#1164)") Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org> --------- Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org> Co-authored-by: Vasiliy Kovalev <kovalev@altlinux.org>
2023-10-05Update various copyright datesMounir IDRASSI1-5/+5
2023-10-05fix for corrupted icons (#1226)sardanap1-1/+1
2023-10-01MacOS: set minimum target to OSX 12. Fix About menu not working.Mounir IDRASSI1-0/+14
The modification to Forms.cpp is temporary until we find a better approach
2023-09-02Linux/macOS: preserve unknown entries in configuration fileMounir IDRASSI2-10/+28
This helps to preserve unknown entries that may be used by future versions of VeraCrypt (forward compatibility) or entries used by old versions that were removed from current version (backward compatibility)
2023-08-21Allow cross compilation. (#1182)Unit 1931-2/+2
2023-08-19Linux: Fix wrong max size for hidden volume in CLI direct mode creationMounir IDRASSI1-8/+15
There was a logical bug that made the code check the filesystem size of the device path "/dev" instead of using the actual size of the device Fix #1180
2023-08-12Linux: Flush stdout explicitly when reading stdin (#1172)Jertzukka1-1/+1
Rules of automatic flushing of stdout buffer is implementation-defined behaviour. In glibc this is automatically flushed, but we can't rely on it for other implementations such as musl.
2023-08-12Linux: Typo fix and consistency in help command (#1169)Jertzukka1-1/+2
2023-08-07Call EnsureVisible() for OSX in OnActivate (#1167)Deniz Türkoglu1-0/+1
When using multiple monitors, the resolution can change in OSX, during plug-in/off off the display(s). To avoid window becoming non-usable, there is EnsureVisible, that is called in several places. However, if you minimize VeraCrypt on the bigger screen, and restore it in the main screen of a MacBook, after unplugging, the window will become unusable (unless you know that clicking 'About' calls EnsureVisible :-)). Call EnsureVisible OnActivate so MainFrame is always functional across screens, even when minimized.
2023-08-04fix warnings and UB (#1164)kovalev01-2/+2
* Crypto: fix warning mismatched bound ../Crypto/cpu.c:67:32: warning: argument 2 of type 'uint32[4]' {aka 'unsigned int[4]'} with mismatched bound [-Warray-parameter=] 67 | int CpuId(uint32 input, uint32 output[4]) | ~~~~~~~^~~~~~~~~ In file included from ../Crypto/cpu.c:3: ../Crypto/cpu.h:236:33: note: previously declared as 'uint32 *' {aka 'unsigned int *'} 236 | int CpuId(uint32 input, uint32 *output); Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org> * Core/Unix: fix warning ignoring return value Unix/CoreUnix.cpp: In member function 'virtual std::shared_ptr<VeraCrypt:\ :VolumeInfo> VeraCrypt::CoreUnix::MountVolume(VeraCrypt::MountOptions&)': Unix/CoreUnix.cpp:682:55: warning: ignoring return value of 'int chown(const char*, __uid_t, __gid_t)' declared with attribute 'warn_unused_result' [-Wunused-result] 682 | chown (mountPoint.c_str(), GetRealUserId(), GetRealGroupId()); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org> * Main/Forms: fix warning cast to pointer from integer of different size Forms/MainFrame.cpp: In member function 'void VeraCrypt::MainFrame:\ :UpdateVolumeList()': Forms/MainFrame.cpp:1718:106: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 1718 | Gui->InsertToListCtrl (SlotListCtrl, ++prevItemIndex, fields, 0, (void *) volume->SlotNumber); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Forms/MainFrame.cpp:1753:114: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 1753 | Gui->InsertToListCtrl (SlotListCtrl, ++prevItemIndex, fields, 0, (void *) slotNumber); | ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org> * Crypto: fix undefined behavior signed integer overflow In function 'twofish_set_key': cc1: warning: iteration 4 invokes undefined behavior [-Waggressive-loop-optimizations] ../Crypto/Twofish.c:626:23: note: within this loop 626 | for (i = 0; i != 40; i += 2) | ~~^~~~~ Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org> --------- Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org> Co-authored-by: Vasiliy Kovalev <kovalev@altlinux.org>
2023-07-24Linux/macOS: Remove TrueCrypt supportMounir IDRASSI21-191/+59
2023-07-23Linux/macOS:Add EMV option checkbox to the fbp file. Remove TrueCrypt ↵Mounir IDRASSI3-9698/+2294
checkboxes. We also update to wxFormBuilder 3.10.1
2023-07-23Update UserInterface.cpp (#1155)Springfield Data Recovery1-1/+1
Docs specify cascading encryption should be specified as "AES(Twofish)" but on Linux it requires "AES-Twofish".
2023-07-05Linux: Overwriting file container allows you to use its space (#1147)Jertzukka1-0/+6
When replacing a file container, we increase the `diskSpace` by the file container's size. This doesn't affect the hidden volume space logic, as in that case we use `MaxVolumeSize` when `MaxVolumeSizeValid` is true instead of `AvailableDiskSpace`.
2023-06-29Linux: Fix wrong size for hidden volume when selecting the option to use all ↵Mounir IDRASSI1-1/+1
free space (fix by @Jertzukka)
2023-06-29Linux/FreeBSD: Make pcsclite a dependency of the packages and the generic ↵Mounir IDRASSI1-2/+2
installer
2023-06-29EMV keyfile support: Overall code improvements and bug fixesMounir IDRASSI19-103/+135