os/security/cryptoservices/certificateandkeymgmt/tpkixcert_tef/src/validateteststep.h
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.
24 #ifndef VALIDATETESTSTEP_H
25 #define VALIDATETESTSTEP_H
27 #include "pkixcertstepbase.h"
28 #include <pkixcertchain.h>
29 #include <securitydefs.h>
30 #include <x509certchain.h>
34 _LIT(KValidateCertChainStep, "ValidateCertChain");
36 _LIT(KError, "error");
37 _LIT(KErrorIndex, "errorindex");
38 _LIT(KNumberOfCerts, "numberofcerts");
40 _LIT(KOldWarnings, "oldwarning");
41 _LIT(KCritOid, "critoid");
42 _LIT(KPolicyIndex, "policyindex");
44 class CValidateCertChainStep;
46 class CValidateCertChainHelper : public CActive
49 CValidateCertChainHelper(CTestExecuteLogger& aLogger);
50 ~CValidateCertChainHelper();
52 TInt PerformTestL(CPKIXCertChain* aCertChain, CPKIXValidationResult& aValidResult, TTime aValidateTime);
55 virtual TInt RunError(TInt aError);
57 CTestExecuteLogger& Logger(){return iLogger;}
60 CTestExecuteLogger& iLogger;
62 CPKIXCertChain* iCertChain; //not owned
68 class CValidateCertChainStep : public CPkixCertStepBase
71 CValidateCertChainStep();
72 ~CValidateCertChainStep();
74 virtual TVerdict doTestStepPreambleL();
76 virtual void PerformTestL();
78 void ValidateL(TTime aValidateTime, TDes& aConfigSection);
80 void TransferToNewWarningsL(RArray<TInt>& aOldWarnings, RArray<TValidationStatus>& aNewWarnings, TInt aCertIndex);
81 //takes away from aWarningsToCheckIn
82 void CheckWarningsPresentAndRemoveL(const RArray<TValidationStatus>& aWarningsToCheckFor, RArray<TValidationStatus>& aWarningsToCheckIn);
83 TBool ValidationStatusEqual(const TValidationStatus& aValidationStatus1, const TValidationStatus& aValidationStatus2);
84 //takes away from aOidsToCheckAgainst
85 void CheckCriticalExtsPresentAndRemoveL(const RPointerArray<TDesC>& aOidsToLookFor, RArray<TPtrC>& aOidsToCheckAgainst);
88 CValidateCertChainHelper* iActiveObject;
94 #endif // VALIDATETESTSTEP_H