sl@0: /* sl@0: * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #include sl@0: #include "t_testhandler.h" sl@0: #include "tscripttests.h" sl@0: #include "trsaencryptfb.h" sl@0: #include "trsasignfb.h" sl@0: #include "tdsasignfb.h" sl@0: #include "trsavector.h" sl@0: #include "tdsavector.h" sl@0: #include "tdsasignfb.h" sl@0: #include "tdsaprimegen.h" sl@0: #include "performancetest.h" sl@0: #include "tdhvector.h" sl@0: #include "trsaparams.h" sl@0: sl@0: LOCAL_D void callExampleL() // initialize and call example code under cleanup stack sl@0: { sl@0: START_SCRIPT_LIST sl@0: SCRIPT_ITEM(CRSAEncryptFB,_L8("RSAEncryptStandardAndCRTFB")), sl@0: SCRIPT_ITEM(CRSASignFB,_L8("RSASignStandardAndCRTFB")), sl@0: SCRIPT_ITEM(CDSASignFB,_L8("DSASignFB")), sl@0: SCRIPT_ITEM(CRSAEncryptVector,_L8("RSAEncryptVector")), sl@0: SCRIPT_ITEM(CRSADecryptVector,_L8("RSADecryptVector")), sl@0: SCRIPT_ITEM(CRSADecryptVectorCRT,_L8("RSADecryptVectorCRT")), sl@0: SCRIPT_ITEM(CRSASignVector,_L8("RSASignVector")), sl@0: SCRIPT_ITEM(CRSASignVectorCRT,_L8("RSASignVectorCRT")), sl@0: SCRIPT_ITEM(CRSAVerifyVector,_L8("RSAVerifyVector")), sl@0: SCRIPT_ITEM(CDSASignVector,_L8("DSASignVector")), sl@0: SCRIPT_ITEM(CDSAVerifyVector,_L8("DSAVerifyVector")), sl@0: SCRIPT_ITEM(CDSASignFB,_L8("DSASignFB")), sl@0: SCRIPT_ITEM(CDSAPrimeGen,_L8("DSAPrimeGen")), sl@0: SCRIPT_ITEM(CPerformanceTest, _L8("PerformanceTestSettings")), sl@0: SCRIPT_ITEM(CDHVector,_L8("DHVector")), sl@0: SCRIPT_ITEM(CRSATestPublicKey,_L8("RSAPublicKeyParams")), sl@0: SCRIPT_ITEM(CRSATestPrivateKey,_L8("RSAPrivateKeyParams")), sl@0: SCRIPT_ITEM(CRSATestPrivateKeyCRT,_L8("RSAPrivateKeyCRTParams")) sl@0: END_SCRIPT_LIST sl@0: sl@0: // Either run the top level build and test script or, if running this test specifically, sl@0: // uncomment the following and it'll run them all one after the other sl@0: sl@0: //get the system drive. sl@0: TDriveUnit sysDrive (RFs::GetSystemDrive()); sl@0: TBuf<64> scriptFile = sysDrive.Name(); sl@0: scriptFile.Append(_L("\\tasymmetric\\tasymmetrictests.txt")); sl@0: TBuf<64> logFile = sysDrive.Name(); sl@0: logFile.Append(_L("\\tasymmetric\\tasymmetrictests.log")); sl@0: CTestSetup::CreateAndRunTestsL(theTestTypes, scriptFile, logFile); sl@0: sl@0: /* The test framework can't handle more than one script sl@0: * at a time. If you want to run all of the asymmetric tests from the command sl@0: * line, uncomment this next section. sl@0: #ifndef _DEBUG sl@0: CTestSetup::CreateAndRunTestsL(theTestTypes, _L("c:\\tasymmetric\\asymmetricPerformance.txt"), sl@0: _L("c:\\tasymmetric\\asymmetricPerformance.log")); sl@0: #endif sl@0: */ sl@0: } sl@0: sl@0: GLDEF_C TInt E32Main() // main function called by E32 sl@0: { sl@0: __UHEAP_MARK; sl@0: CTrapCleanup* cleanup = CTrapCleanup::New(); // get clean-up stack sl@0: CPerformance::NewL(); sl@0: TRAPD(error, callExampleL()); sl@0: CPerformance::ClosePerformanceTester(); sl@0: __ASSERT_ALWAYS(!error,User::Panic(_L("tasymmetricmain"),error)); sl@0: delete cleanup; // destroy clean-up stack sl@0: __UHEAP_MARKEND; sl@0: return 0; sl@0: }