1 /**
  2  *  ---------
  3  * |.##> <##.|  Open Smart Card Development Platform (www.openscdp.org)
  4  * |#       #|  
  5  * |#       #|  Copyright (c) 1999-2008 CardContact Software & System Consulting
  6  * |'##> <##'|  Andreas Schwier, 32429 Minden, Germany (www.cardcontact.de)
  7  *  --------- 
  8  *
  9  *  This file is part of OpenSCDP.
 10  *
 11  *  OpenSCDP is free software; you can redistribute it and/or modify
 12  *  it under the terms of the GNU General Public License version 2 as
 13  *  published by the Free Software Foundation.
 14  *
 15  *  OpenSCDP is distributed in the hope that it will be useful,
 16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 18  *  GNU General Public License for more details.
 19  *
 20  *  You should have received a copy of the GNU General Public License
 21  *  along with OpenSCDP; if not, write to the Free Software
 22  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 23  *
 24  * @fileoverview Script to load all tests for the eID test suite into the GUI test runner
 25  */
 26 
 27 load("tools/TestRunner.js");
 28 load("tools/TestGroup.js");
 29 load("tools/TestProcedure.js");
 30 
 31 load("../../icao/eac20.js");
 32 
 33 
 34 var param = new Array();
 35 
 36 param["crypto"] = new Crypto();
 37 
 38 param["MRZ"] =	"TPD<<T220001293<<<<<<<<<<<<<<<" +
 39 				"6408125<1010318D<<<<<<<<<<<<<6" +
 40 				"MUSTERMANN<<ERIKA<<<<<<<<<<<<<";
 41 
 42 var certstorepath = GPSystem.mapFilename("../cvc", GPSystem.CWD);
 43 param["certstore"] = new CVCertificateStore(certstorepath);
 44 param["isrootpath"] = "/UTISCVCA";
 45 param["atrootpath"] = "/UTATCVCA";
 46 param["strootpath"] = "/UTSTCVCA";
 47 param["isodcertpath"] = param["isrootpath"] + "/UTISDVCAOD/UTTERM";		// Official Domestic Inspection System
 48 param["isofcertpath"] = param["isrootpath"] + "/UTISDVCAOF/UTTERM";		// Foreign Inspection System
 49 param["atodcertpath"] = param["atrootpath"] + "/UTATDVCAOD/UTTERM";		// Official Domestic Authentication Terminal
 50 param["atnocertpath"] = param["atrootpath"] + "/UTATDVCANO/UTTERM";		// Non-official Domestic Authentication Terminal
 51 param["stabcertpath"] = param["strootpath"] + "/UTSTDVCAAB/UTTERM";		// Accreditation Body Signature Terminal
 52 param["stcpcertpath"] = param["strootpath"] + "/UTSTDVCACP/UTTERM";		// Certificate Service Provider Signature Terminal
 53 
 54 
 55 
 56 /**
 57  * Create a new instance of the EAC20 class
 58  *
 59  * <p>This method allows to tailor the EAC instance before running the test.</p>
 60  *
 61  * @param {Crypto} crypto the crypto provider to use
 62  * @param {Card} card the card under test
 63  * @type EAC20
 64  * @return a new instance of the EAC20 protocol stack
 65  */
 66 function newEAC20(crypto, card) {
 67 	var eac = new EAC20(crypto, card);
 68 	eac.verbose = true;
 69 	return eac;
 70 }
 71 
 72 
 73 
 74 var testRunner = new TestRunner("eID Test Suite");
 75 
 76 testRunner.addTestGroupFromXML("tg_StandardInspectionProcedureWithBAC.xml", param);
 77 testRunner.addTestGroupFromXML("tg_StandardInspectionProcedureWithSAC.xml", param);
 78 testRunner.addTestGroupFromXML("tg_AdvancedInspectionProcedureWithBAC.xml", param);
 79 testRunner.addTestGroupFromXML("tg_AdvancedInspectionProcedureWithSAC.xml", param);
 80 testRunner.addTestGroupFromXML("tg_GeneralAuthenticationProcedure.xml", param);
 81 
 82 print("Test-Suite loaded...");
 83 print("Right-click on the tests on the left.");
 84