From c070394f824cffeefa5a8dbd7776c6e563588210 Mon Sep 17 00:00:00 2001 From: psytester Date: Mon, 19 May 2014 21:26:40 +0200 Subject: [PATCH] vicc reads dataset file That new option -d or --datasetfile will read an optional dataset file to be able to start vicc->CardGenerator.py with various content --- virtualsmartcard/src/vpicc/vicc.in | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/virtualsmartcard/src/vpicc/vicc.in b/virtualsmartcard/src/vpicc/vicc.in index 170467e..5fd7b53 100644 --- a/virtualsmartcard/src/vpicc/vicc.in +++ b/virtualsmartcard/src/vpicc/vicc.in @@ -45,6 +45,16 @@ parser.add_argument("-f", "--file", action="store", type=argparse.FileType('r'), help="load a saved smart card image") +parser.add_argument("-d", "--datasetfile", + action="store", + help="Load the smartcard's data groups (DGs) from the specified dataset file. For DGs not in dataset file default values are used. \ +The data groups in the data set file must have the following syntax: \ +--------------------------------------------------- Datagroupname=Datagroupvalue \ +--------------------------------------------------- \ +For Example: GivenNames=GERTRUD. \ +The following Dataset Elements may be used in the dataset file: \ +DocumentType, IssuingState, DateOfExpiry, GivenNames, FamilyNames, ReligiousArtisticName, AcademicTitle, DateOfBirth, PlaceOfBirth, Nationality, Sex, Country, City, ZIP, Street, CommunityID, dg12, dg13, dg14, dg15, dg16, dg19, dg20, dg21.\ +") parser.add_argument("-H", "--hostname", action="store", type=str, @@ -126,7 +136,7 @@ if args.reversed: else: hostname = args.hostname -vicc = VirtualICC(args.file, args.type, +vicc = VirtualICC(args.file, args.datasetfile, args.type, hostname, args.port, readernum=args.reader, ef_cardaccess=ef_cardaccess_data, ef_cardsecurity=ef_cardsecurity_data, ca_key=ca_key_data, cvca=cvca, disable_checks=args.disable_ta_checks, logginglevel=logginglevel)