diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-11-30 11:35:41 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2015-11-30 13:58:19 +0100 |
commit | efa436974d8203485eec6faa1bf0116bb32f6fcd (patch) | |
tree | 97a5ef2eea0310a12db399151de7ca97dbd47ece /src/Main/UserInterface.cpp | |
parent | cfadb231d24bd292a6ea3708b776bde8f06e50ab (diff) | |
download | VeraCrypt-efa436974d8203485eec6faa1bf0116bb32f6fcd.tar.gz VeraCrypt-efa436974d8203485eec6faa1bf0116bb32f6fcd.zip |
Linux/MacOSX: Implement Unicode passwords suppport. Make validation of parameters in GUI more robust.
Diffstat (limited to 'src/Main/UserInterface.cpp')
-rw-r--r-- | src/Main/UserInterface.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Main/UserInterface.cpp b/src/Main/UserInterface.cpp index 070a49c1..73c99142 100644 --- a/src/Main/UserInterface.cpp +++ b/src/Main/UserInterface.cpp @@ -462,6 +462,8 @@ namespace VeraCrypt EX2MSG (PasswordOrKeyboardLayoutIncorrect, LangString["PASSWORD_OR_KEYFILE_WRONG"] + _("\n\nNote that pre-boot authentication passwords need to be typed in the pre-boot environment where non-US keyboard layouts are not available. Therefore, pre-boot authentication passwords must always be typed using the standard US keyboard layout (otherwise, the password will be typed incorrectly in most cases). However, note that you do NOT need a real US keyboard; you just need to change the keyboard layout in your operating system.")); EX2MSG (PasswordOrMountOptionsIncorrect, LangString["PASSWORD_OR_KEYFILE_OR_MODE_WRONG"] + _("\n\nNote: If you are attempting to mount a partition located on an encrypted system drive without pre-boot authentication or to mount the encrypted system partition of an operating system that is not running, you can do so by selecting 'Options >' > 'Mount partition using system encryption'.")); EX2MSG (PasswordTooLong, StringFormatter (_("Password is longer than {0} characters."), (int) VolumePassword::MaxSize)); + EX2MSG (PasswordUTF8TooLong, LangString["PASSWORD_UTF8_TOO_LONG"]); + EX2MSG (PasswordUTF8Invalid, LangString["PASSWORD_UTF8_INVALID"]); EX2MSG (PartitionDeviceRequired, _("Partition device required.")); EX2MSG (ProtectionPasswordIncorrect, _("Incorrect password to the protected hidden volume or the hidden volume does not exist.")); EX2MSG (ProtectionPasswordKeyfilesIncorrect,_("Incorrect keyfile(s) and/or password to the protected hidden volume or the hidden volume does not exist.")); @@ -897,7 +899,7 @@ namespace VeraCrypt wstring pwdInput; wcin >> pwdInput; - cmdLine.ArgPassword = make_shared<VolumePassword> (pwdInput); + cmdLine.ArgPassword = ToUTF8Password ( pwdInput.c_str (), pwdInput.size ()); } switch (cmdLine.ArgCommand) @@ -1549,6 +1551,8 @@ namespace VeraCrypt VC_CONVERT_EXCEPTION (ProtectionPasswordKeyfilesIncorrect); VC_CONVERT_EXCEPTION (PasswordEmpty); VC_CONVERT_EXCEPTION (PasswordTooLong); + VC_CONVERT_EXCEPTION (PasswordUTF8TooLong); + VC_CONVERT_EXCEPTION (PasswordUTF8Invalid); VC_CONVERT_EXCEPTION (UnportablePassword); VC_CONVERT_EXCEPTION (ElevationFailed); VC_CONVERT_EXCEPTION (RootDeviceUnavailable); |