CLI: retry hidden-protection credentials after keyfile failures

Handle protection-keyfile failures before general password failures.
Reset the hidden password, PIM, and keyfiles for correction while retaining
outer credentials and avoiding backup-header retries.
This commit is contained in:
Mounir IDRASSI
2026-09-25 13:19:08 +02:00
parent 266a892cda
commit 035b116d53
+7
View File
@@ -1566,6 +1566,13 @@ namespace VeraCrypt
options.ProtectionPassword.reset();
options.ProtectionPim = -1;
}
catch (ProtectionPasswordKeyfilesIncorrect &e)
{
ShowInfo (e);
options.ProtectionPassword.reset();
options.ProtectionPim = -1;
options.ProtectionKeyfiles.reset();
}
catch (PasswordIncorrect &e)
{
if (++incorrectPasswordCount > 2 && !options.UseBackupHeaders)