From 3cddd24df26085682c819a3c8e9e3ce21a2872da Mon Sep 17 00:00:00 2001 From: kavsrf Date: Mon, 27 Mar 2017 16:01:33 +0300 Subject: smart card tests via DcsCfg --- DcsCfg/DcsCfgMain.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'DcsCfg/DcsCfgMain.c') diff --git a/DcsCfg/DcsCfgMain.c b/DcsCfg/DcsCfgMain.c index c289bf8..3abd759 100644 --- a/DcsCfg/DcsCfgMain.c +++ b/DcsCfg/DcsCfgMain.c @@ -40,6 +40,8 @@ https://opensource.org/licenses/LGPL-3.0 #define OPT_DISK_END L"-de" #define OPT_DISK_BOOT L"-db" #define OPT_USB_LIST L"-ul" +#define OPT_USB_SELECT L"-us" +#define OPT_SC_APDU L"-scapdu" #define OPT_TOUCH_LIST L"-tl" #define OPT_TOUCH_TEST L"-tt" #define OPT_GRAPH_LIST L"-gl" @@ -123,6 +125,8 @@ STATIC CONST SHELL_PARAM_ITEM ParamList[] = { { OPT_VOLUME_DECRYPT,TypeValue }, { OPT_VOLUME_CHANGEPWD,TypeValue }, { OPT_USB_LIST, TypeFlag }, + { OPT_USB_SELECT, TypeValue }, + { OPT_SC_APDU, TypeValue }, { OPT_TOUCH_LIST, TypeFlag }, { OPT_TOUCH_TEST, TypeValue }, { OPT_GRAPH_LIST, TypeFlag }, @@ -409,6 +413,18 @@ DcsCfgMain( PrintUsbList(); } + if (ShellCommandLineGetFlag(Package, OPT_USB_SELECT)) { + CHAR16 * opt; + opt = (CHAR16*)ShellCommandLineGetValue(Package, OPT_USB_SELECT); + UsbIndex = StrDecimalToUintn(opt); + } + + if (ShellCommandLineGetFlag(Package, OPT_SC_APDU)) { + CHAR16 * opt; + opt = (CHAR16*)ShellCommandLineGetValue(Package, OPT_SC_APDU); + UsbScApdu(opt); + } + // Randoms if (ShellCommandLineGetFlag(Package, OPT_RND_LOAD)) { CONST CHAR16* opt = NULL; -- cgit v1.2.3