cryptoservices/certificateandkeymgmt/twtlscert/ValidateTest.cpp
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 /*
       
     2 * Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "ValidateTest.h"
       
    21 #include "t_input.h"
       
    22 #include <ecom.h>
       
    23 
       
    24 _LIT(KPath, "");
       
    25 _LIT(KChainStart, "<chain>");
       
    26 _LIT(KDateIssuedStart, "<dateissued>");
       
    27 _LIT(KIOStart, "<io>");
       
    28 
       
    29 CTestAction* CValidateTest::NewL(RFs& aFs, CConsoleBase& aConsole, 
       
    30 		Output& aOut, const TTestActionSpec& aTestActionSpec)
       
    31 	{
       
    32 	CTestAction* self = CValidateTest::NewLC(aFs, aConsole, aOut, aTestActionSpec);
       
    33 	CleanupStack::Pop(self);
       
    34 	return self;
       
    35 	}
       
    36 
       
    37 CTestAction* CValidateTest::NewLC(RFs& aFs, CConsoleBase& aConsole, 
       
    38 		Output& aOut, const TTestActionSpec& aTestActionSpec)
       
    39 	{
       
    40 	CValidateTest* self = new(ELeave) CValidateTest(aFs, aConsole, aOut);
       
    41 	CleanupStack::PushL(self);
       
    42 	self->ConstructL(aTestActionSpec);
       
    43 	return self;
       
    44 	}
       
    45 
       
    46 
       
    47 void CValidateTest::TestValidation(TRequestStatus& aStatus)
       
    48 	{
       
    49 	iOriginalRequestStatus = &aStatus;
       
    50 	aStatus = KRequestPending;
       
    51 
       
    52 	iState = EInit;
       
    53 	TRequestStatus* status = &aStatus;
       
    54 	User::RequestComplete(status, KErrNone);
       
    55 	}
       
    56 
       
    57 CValidateTest::CValidateTest(RFs& aFs, 
       
    58 								 CConsoleBase& aConsole,
       
    59 								 Output& aOut)
       
    60 : CTestAction(aConsole, aOut), iFs(aFs)
       
    61 	{
       
    62 	}
       
    63 
       
    64 void CValidateTest::ConstructL(const TTestActionSpec& aTestActionSpec)
       
    65 	{
       
    66 	CTestAction::ConstructL(aTestActionSpec);
       
    67 	iValidationResult = CWTLSValidationResult::NewL();
       
    68 	HBufC* aBody = HBufC::NewLC(aTestActionSpec.iActionBody.Length());
       
    69 	aBody->Des().Copy(aTestActionSpec.iActionBody);
       
    70 	// creates the test chan validation object
       
    71 	iTestChain = CTestChainValidate::NewL();
       
    72 	TPtrC chainBuf = Input::ParseElement(*aBody, KChainStart);
       
    73 	
       
    74 	iTestChain->AddChainL(chainBuf);
       
    75 	TPtrC ioDateIssued = Input::ParseElement(*aBody, KDateIssuedStart);
       
    76 	iTestChain->AddDateIssued(ioDateIssued);
       
    77 	TPtrC ioBuf = Input::ParseElement(*aBody, KIOStart);
       
    78 	iTestChain->AddIOL(ioBuf);
       
    79 
       
    80 	CleanupStack::PopAndDestroy(aBody);
       
    81 	}
       
    82 
       
    83 CValidateTest::~CValidateTest()
       
    84 	{
       
    85 	delete iTestChain;
       
    86 	delete iCertUtils;
       
    87 	delete iValidationResult;
       
    88 	delete iChain;
       
    89 	REComSession::FinalClose();
       
    90 	}
       
    91 
       
    92 void CValidateTest::DoPerformPrerequisite(TRequestStatus& aStatus)
       
    93 	{
       
    94 	TInt err = KErrNone;
       
    95 	
       
    96 	switch (iState)
       
    97 		{
       
    98 		case EInit:
       
    99 			iResult = ETrue;
       
   100 			__ASSERT_DEBUG(!iCertUtils, User::Panic(_L("TWTLSCertTest"), 1));
       
   101 			iCertUtils = CCertUtils::NewL(iFs);
       
   102 			TRAP(err, HandleEInitL(aStatus));
       
   103 			break;
       
   104 
       
   105 		case EValidationStoreInitStoreManager1:
       
   106 			TRAP(err, HandleEValidationInitStoreManager1L(aStatus));
       
   107 			iActionState = EAction;
       
   108 			break;		
       
   109 		case EValidationStoreDepopulateStore1:
       
   110 		case EValidationStorePopulateStoreRoots:
       
   111 		case EValidationStorePopulateStoreExtras:
       
   112 		case EValidationStoreValidate:
       
   113 		case EValidationStoreValidated:
       
   114 		case EValidationStoreInitStoreManager2:
       
   115 		case EValidationStoreDepopulateStore2:
       
   116 		case EValidationStoreEnd:
       
   117 		case EValidationSuppliedInit:
       
   118 		case EValidationSuppliedValidate:
       
   119 		case EValidationSuppliedValidated:
       
   120 		case EFinished:
       
   121 			break;	//	Nothing to do, for compiler
       
   122 		}
       
   123 	}
       
   124 
       
   125 void CValidateTest::DoPerformPostrequisite(TRequestStatus& aStatus)
       
   126 	{
       
   127 	TInt err = KErrNone;
       
   128 
       
   129 	switch (iState)
       
   130 		{
       
   131 	case EInit:
       
   132 	case EValidationStoreInitStoreManager1:
       
   133 	case EValidationStoreDepopulateStore1:
       
   134 	case EValidationStorePopulateStoreRoots:
       
   135 	case EValidationStorePopulateStoreExtras:
       
   136 	case EValidationStoreValidate:
       
   137 	case EValidationStoreValidated:
       
   138 	case EValidationStoreInitStoreManager2:
       
   139 	case EValidationStoreDepopulateStore2:
       
   140 	case EValidationStoreEnd:
       
   141 		break;	//	Nothing to do, for compiler
       
   142 	case EValidationSuppliedInit:
       
   143 			{
       
   144 			iConsole.Printf(_L("started with supplied certs...\n"));
       
   145 			iOut.writeString(_L("started with supplied certs..."));
       
   146 			iOut.writeNewLine();
       
   147 
       
   148 			iState = EValidationSuppliedValidate;
       
   149 			TRequestStatus* status = &aStatus;
       
   150 			User::RequestComplete(status, KErrNone);
       
   151 			}
       
   152 			break;
       
   153 
       
   154 		case EValidationSuppliedValidate:
       
   155 			{
       
   156 			HBufC8* encodedCerts = ReadFilesLC(*iTestChain->iServerCerts);
       
   157 
       
   158 			if(!encodedCerts)
       
   159 				{
       
   160 				TRequestStatus* status = &aStatus;
       
   161 				iFinished = ETrue;
       
   162 				User::RequestComplete(status, KErrNone);
       
   163 				}
       
   164 			else
       
   165 				{
       
   166 				TInt certCount = iTestChain->iRootCerts->MdcaCount();
       
   167 				CArrayPtrFlat<CWTLSCertificate>* roots = 
       
   168 					new(ELeave) CArrayPtrFlat<CWTLSCertificate>(1);
       
   169 				TCleanupItem cleanup(CleanupCertArray, roots);
       
   170 				CleanupStack::PushL(cleanup);
       
   171 				for (TInt i = 0; i < certCount; i++)
       
   172 					{
       
   173 					// build the root certificates array including all the candidates.
       
   174 					HBufC8* encCert = 
       
   175 						ReadFileLC(iTestChain->iRootCerts->MdcaPoint(i));
       
   176 					CWTLSCertificate* cert = CWTLSCertificate::NewLC(encCert->Des());
       
   177 					roots->AppendL(cert);
       
   178 					CleanupStack::Pop();	// cert
       
   179 					CleanupStack::PopAndDestroy();	// encCert
       
   180 					}
       
   181 
       
   182 				__ASSERT_DEBUG(!iChain, User::Panic(_L("CValidateTest"), 1));
       
   183 				iChain = CWTLSCertChain::NewL(iFs, *encodedCerts, *roots);
       
   184 
       
   185 				CleanupStack::PopAndDestroy(2);	// encodedCerts, roots
       
   186 
       
   187 				TDateTime dt(2000, EJuly, 0, 0, 0, 0, 0);
       
   188 				if(iTestChain->iDateIssued == 1)
       
   189 					{
       
   190 					dt.SetYear(2002);
       
   191 					}
       
   192 				iTime = dt;
       
   193 				
       
   194 				iChain->ValidateL(*iValidationResult, iTime, aStatus);
       
   195 				iState = EValidationSuppliedValidated;
       
   196 				}
       
   197 			}
       
   198 			break;
       
   199 
       
   200 		case EValidationSuppliedValidated:
       
   201 			{
       
   202 			delete iChain;
       
   203 			iChain = 0;
       
   204 			TWTLSValidationStatus* expectedStatus = iTestChain->iError;
       
   205 			const TWTLSValidationStatus& actualStatus = iValidationResult->Error();
       
   206 
       
   207 			iOut.writeString(_L("Expected Error = "));
       
   208 			WriteError(expectedStatus->iReason);
       
   209 			iOut.writeNewLine();
       
   210 
       
   211 			iOut.writeString(_L("Actual Error = "));
       
   212 			WriteError(actualStatus.iReason);
       
   213 			iOut.writeNewLine();
       
   214 					
       
   215 			TInt wCount = iTestChain->iWarnings->Count();
       
   216 			iOut.writeString(_L("Expected Warnings = "));
       
   217 			iOut.writeNewLine();
       
   218 			for (TInt i = 0; i < wCount; i++)
       
   219 				{
       
   220 				TWTLSValidationStatus warning = iTestChain->iWarnings->At(i);
       
   221 				WriteError(warning.iReason);
       
   222 				iOut.writeNewLine();
       
   223 				}
       
   224 
       
   225 			iOut.writeString(_L("Actual Warnings = "));
       
   226 			iOut.writeNewLine();
       
   227 			const CArrayFixFlat<TWTLSValidationStatus>& warnings = 
       
   228 				iValidationResult->Warnings();
       
   229 			wCount = warnings.Count();
       
   230 			for (TInt j = 0; j < wCount; j++)
       
   231 				{
       
   232 				TWTLSValidationStatus warning = warnings.At(j);
       
   233 				WriteError(warning.iReason);
       
   234 				iOut.writeNewLine();
       
   235 				}
       
   236 			iOut.writeNewLine();
       
   237 
       
   238 			if(expectedStatus->iReason != actualStatus.iReason)
       
   239 				{
       
   240 				iConsole.Printf(_L("FAILED!!!!\n"));
       
   241 				iOut.writeString(_L("FAILED!!!!"));
       
   242 				iOut.writeNewLine();
       
   243 				iResult = EFalse;
       
   244 				}
       
   245 		
       
   246 			// End of validatewith supplied
       
   247 			if (err != KErrNone)
       
   248 				{
       
   249 				iOut.writeString(_L("Failed: leave code = "));
       
   250 				iOut.writeNum(err);
       
   251 				iOut.writeNewLine();
       
   252 				}
       
   253 
       
   254 			iState = EFinished;
       
   255 			TRequestStatus* status = &aStatus;
       
   256 			User::RequestComplete(status, KErrNone);
       
   257 			}
       
   258 			break;
       
   259 
       
   260 		case EFinished:
       
   261 			{
       
   262 			TTime end;
       
   263 			end.HomeTime();
       
   264 			TTimeIntervalMicroSeconds intervalMS = end.MicroSecondsFrom(iStart);
       
   265 			iConsole.Printf(_L("Time taken = %d milliseconds\n"), (intervalMS.Int64()/1000));
       
   266 	
       
   267 			TRequestStatus* status = &aStatus;
       
   268 			iFinished = ETrue;
       
   269 			User::RequestComplete(status, KErrNone);
       
   270 			}
       
   271 			break;
       
   272 		}
       
   273 	}
       
   274 
       
   275 void CValidateTest::PerformAction(TRequestStatus& aStatus)
       
   276 	{
       
   277 	TRequestStatus* status = &aStatus;
       
   278 
       
   279 	switch (iState)
       
   280 		{
       
   281 		case EValidationStoreDepopulateStore1:
       
   282 			{
       
   283 			iCertUtils->RemoveCertsL(aStatus);
       
   284 			iState = EValidationStorePopulateStoreRoots;
       
   285 			break;
       
   286 			}
       
   287 
       
   288 		case EValidationStorePopulateStoreRoots:
       
   289 			{
       
   290 			TUid uid = { 1 };
       
   291 			TRAP_IGNORE(iCertUtils->RemoveApplicationL(uid));
       
   292 			iCertUtils->AddApplicationL(_L("testwtls"), uid);
       
   293 			iCertUtils->AddCACertsL(*iTestChain->iRootCerts, 
       
   294 				*iTestChain->iRootLabels, EWTLSCertificate, 1, KPath, aStatus);
       
   295 			iState = EValidationStorePopulateStoreExtras;
       
   296 			break;
       
   297 			}
       
   298 
       
   299 		case EValidationStorePopulateStoreExtras:
       
   300 			{
       
   301 			iCertUtils->AddCACertsL(*iTestChain->iExtraCerts, 
       
   302 				*iTestChain->iExtraLabels, EWTLSCertificate, 2, KPath, aStatus);
       
   303 			iState = EValidationStoreValidate;
       
   304 			break;
       
   305 			}
       
   306 
       
   307 		case EValidationStoreValidate:
       
   308 			{
       
   309 			HBufC8* encodedCerts = ReadFilesLC(*iTestChain->iServerCerts);
       
   310 
       
   311 			TUid testUid = TUid::Uid(1);
       
   312 
       
   313 			if(!encodedCerts)
       
   314 				{
       
   315 				TRequestStatus* status = &aStatus;
       
   316 				iFinished = ETrue;
       
   317 				User::RequestComplete(status, KErrNone);
       
   318 				}
       
   319 			else
       
   320 				{
       
   321 				__ASSERT_DEBUG(!iChain, User::Panic(_L("CValidateTest"), 1));
       
   322 				iChain = CWTLSCertChain::NewL(iFs, *encodedCerts, testUid);
       
   323 				CleanupStack::PopAndDestroy();	// encodedCerts
       
   324 
       
   325 				TDateTime dt(2000, EJuly, 0, 0, 0, 0, 0);
       
   326 				if(iTestChain->iDateIssued == 1)
       
   327 					{
       
   328 					dt.SetYear(2002);
       
   329 					}
       
   330 				iTime = dt;
       
   331 
       
   332 				TRAP_IGNORE(iChain->ValidateL(*iValidationResult, iTime, aStatus));
       
   333 				iState = EValidationStoreValidated;
       
   334 				};
       
   335 			break;
       
   336 			}
       
   337 			
       
   338 		case EValidationStoreValidated:
       
   339 			{
       
   340 			TInt count = iChain->Count();
       
   341 			if (count > 0)
       
   342 				{
       
   343 				iOut.writeString(_L("EE certificate = "));
       
   344 				const CWTLSCertificate& eeCert = iChain->Cert(0);
       
   345 				HBufC* eeSubject = eeCert.SubjectL();
       
   346 				CleanupStack::PushL(eeSubject);
       
   347 				iOut.writeString(*eeSubject);
       
   348 				CleanupStack::PopAndDestroy();
       
   349 				iOut.writeNewLine();
       
   350 				for (TInt i = 1; i < count - 1; i++)
       
   351 					{
       
   352 					iOut.writeString(_L("Intermediate certificate = "));
       
   353 					const CWTLSCertificate& iCert = iChain->Cert(i);
       
   354 					HBufC* subject = iCert.SubjectL();
       
   355 					CleanupStack::PushL(subject);
       
   356 					iOut.writeString(*subject);
       
   357 					CleanupStack::PopAndDestroy();
       
   358 					iOut.writeNewLine();	
       
   359 					}
       
   360 				iOut.writeString(_L("Root certificate = "));
       
   361 				const CWTLSCertificate& rCert = iChain->Cert(count-1);
       
   362 				HBufC* rSubject = rCert.SubjectL();
       
   363 				CleanupStack::PushL(rSubject);
       
   364 				iOut.writeString(*rSubject);
       
   365 				CleanupStack::PopAndDestroy();
       
   366 				iOut.writeNewLine();	
       
   367 				}
       
   368 
       
   369 			TWTLSValidationStatus* expectedStatus = iTestChain->iError;
       
   370 			const TWTLSValidationStatus& actualStatus = iValidationResult->Error();
       
   371 
       
   372 			iOut.writeString(_L("Expected Error = "));
       
   373 			WriteError(expectedStatus->iReason);
       
   374 			iOut.writeNewLine();
       
   375 
       
   376 			iOut.writeString(_L("Actual Error = "));
       
   377 			WriteError(actualStatus.iReason);
       
   378 			iOut.writeNewLine();
       
   379 			
       
   380 			TInt wCount = iTestChain->iWarnings->Count();
       
   381 			iOut.writeString(_L("Expected Warnings = "));
       
   382 			iOut.writeNewLine();
       
   383 			for (TInt i = 0; i < wCount; i++)
       
   384 				{
       
   385 				TWTLSValidationStatus warning = iTestChain->iWarnings->At(i);
       
   386 				WriteError(warning.iReason);
       
   387 				iOut.writeNewLine();
       
   388 				}
       
   389 
       
   390 			iOut.writeString(_L("Actual Warnings = "));
       
   391 			iOut.writeNewLine();
       
   392 			const CArrayFixFlat<TWTLSValidationStatus>& warnings = 
       
   393 				iValidationResult->Warnings();
       
   394 			wCount = warnings.Count();
       
   395 			for (TInt j = 0; j < wCount; j++)
       
   396 				{
       
   397 				TWTLSValidationStatus warning = warnings.At(j);
       
   398 				WriteError(warning.iReason);
       
   399 				iOut.writeNewLine();
       
   400 				}
       
   401 			iOut.writeNewLine();
       
   402 			
       
   403 			if(expectedStatus->iReason != actualStatus.iReason)
       
   404 				{
       
   405 				iConsole.Printf(_L("FAILED!!!!\n"));
       
   406 				iOut.writeString(_L("FAILED!!!!"));
       
   407 				iOut.writeNewLine();
       
   408 				iResult = EFalse;
       
   409 				}
       
   410 
       
   411 			// End of DoValidate
       
   412 			iState = EValidationStoreInitStoreManager2;				
       
   413 			User::RequestComplete(status, KErrNone);
       
   414 			delete iChain;
       
   415 			iChain = 0;
       
   416 			break;
       
   417 			}
       
   418 
       
   419 		case EValidationStoreInitStoreManager2:
       
   420 			{
       
   421 			User::RequestComplete(status, KErrNone);
       
   422 			iState = EValidationStoreDepopulateStore2;
       
   423 			break;
       
   424 			}
       
   425 
       
   426 		case EValidationStoreDepopulateStore2:
       
   427 			{
       
   428 			iCertUtils->RemoveCertsL(aStatus);
       
   429 			TUid uid = { 1 };
       
   430 			iCertUtils->RemoveApplicationL(uid);
       
   431 			iState = EValidationStoreEnd;
       
   432 			break;
       
   433 			}
       
   434 
       
   435 		case EValidationStoreEnd:
       
   436 			{
       
   437 			iState = EValidationSuppliedInit;
       
   438 			iActionState = EPostrequisite;
       
   439 			User::RequestComplete(status, KErrNone);
       
   440 			break;
       
   441 			}
       
   442 		case EInit:
       
   443 		case EValidationStoreInitStoreManager1:
       
   444 		case EValidationSuppliedInit:
       
   445 		case EValidationSuppliedValidate:
       
   446 		case EValidationSuppliedValidated:
       
   447 		case EFinished:
       
   448 			break;	//	Nothing to do, for compiler
       
   449 		}
       
   450 	}
       
   451 
       
   452 HBufC8* CValidateTest::ReadFileLC(const TDesC& aFilename)
       
   453 	{
       
   454 	RFile file;
       
   455 	User::LeaveIfError(file.Open(iFs, aFilename, EFileRead));
       
   456 	CleanupClosePushL(file);
       
   457 	TInt size;
       
   458 	file.Size(size);
       
   459 	CleanupStack::PopAndDestroy(1);//fileClose
       
   460 
       
   461 	HBufC8* res = HBufC8::NewLC(size);
       
   462 	TPtr8 p(res->Des());
       
   463 	p.SetLength(size);
       
   464 
       
   465 	RFileReadStream stream;
       
   466 	User::LeaveIfError(stream.Open(iFs, aFilename, EFileStream));
       
   467 	CleanupClosePushL(stream);
       
   468 	stream.ReadL(p, size);
       
   469 	CleanupStack::PopAndDestroy();//streamClose...bleurgh
       
   470 	return res;
       
   471 	}
       
   472 
       
   473 
       
   474 HBufC8* CValidateTest::ReadFilesLC(CDesCArray& aServerCerts)
       
   475 	{
       
   476 	TInt count = aServerCerts.MdcaCount();
       
   477 	TInt totalSize = 0;
       
   478 	TInt i;
       
   479 
       
   480 	for (i = 0; i < count; i++)
       
   481 		{
       
   482 		TPtrC filename = aServerCerts.MdcaPoint(i);
       
   483 		RFile file;
       
   484 		TRAPD(err, file.Open(iFs, filename, EFileRead));
       
   485 		if(err != KErrNone)
       
   486 			{
       
   487 			HBufC *failedToLoad = filename.AllocLC();
       
   488 			SetScriptError(EFileNotFound, failedToLoad->Des());
       
   489 			CleanupStack::PopAndDestroy(2);//fsclose, fileClose	
       
   490 			return(NULL);
       
   491 			};
       
   492 		CleanupClosePushL(file);
       
   493 		TInt size;
       
   494 		file.Size(size);
       
   495 		CleanupStack::PopAndDestroy(1);	//	fileClose
       
   496 		totalSize += size;
       
   497 		}
       
   498 
       
   499 	HBufC8* res = HBufC8::NewLC(totalSize);
       
   500 	TPtr8 pRes = res->Des();
       
   501 	for (i = 0; i < count; i++)
       
   502 		{
       
   503 		HBufC8* cert = ReadFileLC(aServerCerts.MdcaPoint(i));
       
   504 		pRes.Append(cert->Des());
       
   505 		CleanupStack::PopAndDestroy();//cert
       
   506 		}
       
   507 	return res;
       
   508 	}
       
   509 
       
   510 void CValidateTest::WriteError(TValidationError aError)
       
   511 	{
       
   512 	switch(aError)
       
   513 		{
       
   514 		//errors
       
   515 		case EValidatedOK:
       
   516 			{
       
   517 			iOut.writeString(_L("Validated OK"));
       
   518 			break;
       
   519 			}
       
   520 		case EChainHasNoRoot:
       
   521 			{
       
   522 			iOut.writeString(_L("No trusted root found"));
       
   523 			break;
       
   524 			}
       
   525 		case ESignatureInvalid:
       
   526 			{
       
   527 			iOut.writeString(_L("Signature invalid"));
       
   528 			break;
       
   529 			}
       
   530 		case EDateOutOfRange:
       
   531 			{
       
   532 			iOut.writeString(_L("Date out of range"));
       
   533 			break;
       
   534 			}
       
   535 		case ENamesDontChain:
       
   536 			{
       
   537 			iOut.writeString(_L("Names don't chain"));
       
   538 			break;
       
   539 			}
       
   540 		case ENotCACert:
       
   541 			{
       
   542 			iOut.writeString(_L("Cert not authorised to sign other certs"));
       
   543 			break;
       
   544 			}
       
   545 
       
   546 		default:
       
   547 			{
       
   548 			iOut.writeString(_L("Unknown"));
       
   549 			break;
       
   550 			}
       
   551 		}
       
   552 	}
       
   553 
       
   554 void CValidateTest::CleanupCertArray(TAny* aCertArray)
       
   555 	{
       
   556 	CArrayPtrFlat<CWTLSCertificate>* certs = REINTERPRET_CAST(CArrayPtrFlat<CWTLSCertificate>*, aCertArray);
       
   557 	certs->ResetAndDestroy();
       
   558 	delete certs;
       
   559 	}
       
   560 
       
   561 void CValidateTest::HandleEInitL(TRequestStatus& aStatus)
       
   562 	{
       
   563 	iConsole.Printf(_L("Chain validation tests...\n"));
       
   564 	iStart.HomeTime();
       
   565 
       
   566 	iConsole.Printf(_L("started with store...\n"));
       
   567 	iOut.writeString(_L("started with store..."));
       
   568 	iOut.writeNewLine();
       
   569 
       
   570 	iState = EValidationStoreInitStoreManager1;
       
   571 	TRequestStatus* status = &aStatus;
       
   572 	User::RequestComplete(status, KErrNone);
       
   573 	}
       
   574 
       
   575 void CValidateTest::HandleEValidationInitStoreManager1L(TRequestStatus& aStatus)
       
   576 	{
       
   577 	TRequestStatus* status = &aStatus;
       
   578 	User::RequestComplete(status, KErrNone);
       
   579 	iState = EValidationStoreDepopulateStore1;
       
   580 	}
       
   581 
       
   582 
       
   583 void CValidateTest::DoReportAction()
       
   584 	{
       
   585 	}
       
   586 
       
   587 void CValidateTest::DoCheckResult(TInt /*aError*/)
       
   588 	{
       
   589 	}