VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/CommandLineInterface.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-05-28 21:53:55 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-05-28 23:33:17 (GMT)
commita0d8b8a3b78b1d0db50de2a7d841efaec2a55c36 (patch)
tree749fb2a2fd5888145030b546666a41d28479bafa /src/Main/CommandLineInterface.cpp
parent3f806010d2e2d54f0b5bc796f2d5e506e66537c7 (diff)
downloadVeraCrypt-a0d8b8a3b78b1d0db50de2a7d841efaec2a55c36.zip
VeraCrypt-a0d8b8a3b78b1d0db50de2a7d841efaec2a55c36.tar.gz
Linux/MacOSX: Implement passing smart card PIN as command line argument (--token-pin switch)
Diffstat (limited to 'src/Main/CommandLineInterface.cpp')
-rw-r--r--src/Main/CommandLineInterface.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Main/CommandLineInterface.cpp b/src/Main/CommandLineInterface.cpp
index 0a4f41b..4d2f138 100644
--- a/src/Main/CommandLineInterface.cpp
+++ b/src/Main/CommandLineInterface.cpp
@@ -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;