sl@0: /* sl@0: * Copyright (c) 2008-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: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef VALIDATETESTSTEP_H sl@0: #define VALIDATETESTSTEP_H sl@0: sl@0: #include "pkixcertstepbase.h" sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: sl@0: _LIT(KValidateCertChainStep, "ValidateCertChain"); sl@0: sl@0: _LIT(KError, "error"); sl@0: _LIT(KErrorIndex, "errorindex"); sl@0: _LIT(KNumberOfCerts, "numberofcerts"); sl@0: _LIT(KCert, "cert"); sl@0: _LIT(KOldWarnings, "oldwarning"); sl@0: _LIT(KCritOid, "critoid"); sl@0: _LIT(KPolicyIndex, "policyindex"); sl@0: sl@0: class CValidateCertChainStep; sl@0: sl@0: class CValidateCertChainHelper : public CActive sl@0: { sl@0: public: sl@0: CValidateCertChainHelper(CTestExecuteLogger& aLogger); sl@0: ~CValidateCertChainHelper(); sl@0: sl@0: TInt PerformTestL(CPKIXCertChain* aCertChain, CPKIXValidationResult& aValidResult, TTime aValidateTime); sl@0: void DoCancel(); sl@0: void RunL(); sl@0: virtual TInt RunError(TInt aError); sl@0: sl@0: CTestExecuteLogger& Logger(){return iLogger;} sl@0: sl@0: private: sl@0: CTestExecuteLogger& iLogger; sl@0: TInt iRunError; sl@0: CPKIXCertChain* iCertChain; //not owned sl@0: sl@0: }; sl@0: sl@0: sl@0: sl@0: class CValidateCertChainStep : public CPkixCertStepBase sl@0: { sl@0: public: sl@0: CValidateCertChainStep(); sl@0: ~CValidateCertChainStep(); sl@0: sl@0: virtual TVerdict doTestStepPreambleL(); sl@0: sl@0: virtual void PerformTestL(); sl@0: sl@0: void ValidateL(TTime aValidateTime, TDes& aConfigSection); sl@0: sl@0: void TransferToNewWarningsL(RArray& aOldWarnings, RArray& aNewWarnings, TInt aCertIndex); sl@0: //takes away from aWarningsToCheckIn sl@0: void CheckWarningsPresentAndRemoveL(const RArray& aWarningsToCheckFor, RArray& aWarningsToCheckIn); sl@0: TBool ValidationStatusEqual(const TValidationStatus& aValidationStatus1, const TValidationStatus& aValidationStatus2); sl@0: //takes away from aOidsToCheckAgainst sl@0: void CheckCriticalExtsPresentAndRemoveL(const RPointerArray& aOidsToLookFor, RArray& aOidsToCheckAgainst); sl@0: sl@0: private: sl@0: CValidateCertChainHelper* iActiveObject; sl@0: TInt iNumberOfCerts; sl@0: sl@0: sl@0: }; sl@0: sl@0: #endif // VALIDATETESTSTEP_H