os/security/cryptoservices/certificateandkeymgmt/tpkixcert_tef/src/datetimefatalteststep.cpp
First public contribution.
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #include "datetimefatalteststep.h"
22 CDateTimeFatalValidateStep::CDateTimeFatalValidateStep()
24 SetTestStepName(KDateTimeFatalTestStep);
27 TVerdict CDateTimeFatalValidateStep::doTestStepPreambleL()
29 CValidateCertChainStep::doTestStepPreambleL();
32 GetStringFromConfig(ConfigSection(), KDateTime, dateAndTime);
34 iDateTime = TTime(dateAndTime);
38 void CDateTimeFatalValidateStep::PerformTestL()
40 CPkixCertStepBase::PerformTestL();
42 iCertChain->SetSupportedCriticalExtensionsL(iProcessedOids);
44 ValidateL(iDateTime, ConfigSection());
46 iCertChain->SetValidityPeriodCheckFatal(EFalse);
48 HBufC* secondConfigSection = HBufC::NewLC(ConfigSection().Length() + KSecondConfigSection().Length());
49 TPtr ptr = secondConfigSection->Des();
51 ptr.Append(ConfigSection());
52 ptr.Append(KSecondConfigSection);
54 ValidateL(iDateTime, ptr);
56 CleanupStack::PopAndDestroy(secondConfigSection);
58 iCertChain->SetValidityPeriodCheckFatal(ETrue);
60 ValidateL(iDateTime, ConfigSection());
62 CleanupStack::PopAndDestroy(iCertChain);