loadtests.js

Summary

SmartCard-HSM Use Case Tests


Method Summary
static void dumpSlotInfo(s)
          
static Object generateECCKeyPair(s, label, curve)
          
static Object generateRSAKeyPair(s, label, keysize)
          
static Object getObjectByLabel(s, clazz, label)
          
static Object getSlot(p)
          
static void issueCertificate(ca, s, cn, keysizeOrCurve, profile)
          
static void log(s)
          
static Object storeCertificate(s, label, cert)
          
static Object str4class(c)
          

/**
 *  ---------
 * |.##> <##.|  SmartCard-HSM Support Scripts
 * |#       #|
 * |#       #|  Copyright (c) 2011-2012 CardContact Software & System Consulting
 * |'##> <##'|  Andreas Schwier, 32429 Minden, Germany (www.cardcontact.de)
 *  ---------
 *
 * Consult your license package for usage terms and conditions.
 *
 * @fileoverview SmartCard-HSM Use Case Tests
 */

var TestRunner = require("scsh/testing/TestRunner").TestRunner;
var TestGroup = require("scsh/testing/TestGroup").TestGroup;
var TestProcedure = require("scsh/testing/TestProcedure").TestProcedure;


var PublicKeyReference = require('scsh/eac/PublicKeyReference').PublicKeyReference;
var CVC = require("scsh/eac/CVC").CVC;
var SmartCardHSM = require('scsh/sc-hsm/SmartCardHSM').SmartCardHSM;

// Define test parameter
var param = new Array();
param["pin"] = new ByteString("648219", ASCII);
param["newpin"] = new ByteString("112233", ASCII);
param["initializationCode"] = new ByteString("57621880", ASCII);


var testRunner = new TestRunner("SmartCard-HSM Use Case Tests");
testRunner.addTestGroupFromXML("tg_initialization.xml", param);
testRunner.addTestGroupFromXML("tg_device_authentication.xml", param);
testRunner.addTestGroupFromXML("tg_pin_management.xml", param);
testRunner.addTestGroupFromXML("tg_writing_files.xml", param);
testRunner.addTestGroupFromXML("tg_reading_files.xml", param);
testRunner.addTestGroupFromXML("tg_managing_files_and_keys.xml", param);
testRunner.addTestGroupFromXML("tg_key_generation.xml", param);
testRunner.enable("tg_key_generation/005 Generate RSA v1.5 SHA 256 with Keysize 4096 in a loop", false);
testRunner.addTestGroupFromXML("tg_random_number_generation.xml", param);
testRunner.addTestGroupFromXML("tg_signing.xml", param);
testRunner.addTestGroupFromXML("tg_decipher.xml", param);
testRunner.addTestGroupFromXML("tg_dkek_setup.xml", param);

print("Test-Suite loaded...");




Documentation generated by JSDoc on Sat Feb 24 15:17:19 2024