1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Linux/MacOSX: Implement passing smart card PIN as command line argument (--token-pin switch)

This commit is contained in:
Mounir IDRASSI
2016-05-28 23:53:55 +02:00
parent 3f806010d2
commit a0d8b8a3b7
6 changed files with 39 additions and 0 deletions

View File

@@ -89,6 +89,7 @@ namespace VeraCrypt
parser.AddSwitch (L"", L"test", _("Test internal algorithms"));
parser.AddSwitch (L"t", L"text", _("Use text user interface"));
parser.AddOption (L"", L"token-lib", _("Security token library"));
parser.AddOption (L"", L"token-pin", _("Security token PIN"));
parser.AddSwitch (L"v", L"verbose", _("Enable verbose output"));
parser.AddSwitch (L"", L"version", _("Display version information"));
parser.AddSwitch (L"", L"volume-properties", _("Display volume properties"));
@@ -593,6 +594,11 @@ namespace VeraCrypt
if (parser.Found (L"token-lib", &str))
Preferences.SecurityTokenModule = wstring (str);
if (parser.Found (L"token-pin", &str) && !str.IsEmpty ())
{
ArgTokenPin = ToUTF8Buffer (str.c_str(), str.Len ());
}
if (parser.Found (L"verbose"))
Preferences.Verbose = true;