os/security/cryptoservices/certificateandkeymgmt/tpkixcert_tef/src/pkixcertstepbase.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/cryptoservices/certificateandkeymgmt/tpkixcert_tef/src/pkixcertstepbase.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,75 @@
1.4 +/*
1.5 +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @internalTechnology
1.25 +*/
1.26 +
1.27 +#ifndef PKIXCERTSTEPBASE_H
1.28 +#define PKIXCERTSTEPBASE_H
1.29 +
1.30 +#include <test/testexecutestepbase.h>
1.31 +#include <e32std.h>
1.32 +#include <pkixcertchain.h>
1.33 +#include <x509cert.h>
1.34 +
1.35 +
1.36 +_LIT(KPerformOom, "performoom");
1.37 +_LIT(KEndEntity, "endentity");
1.38 +_LIT(KIntermediateCert, "intermediatecert");
1.39 +_LIT(KRootCert, "rootcert");
1.40 +_LIT(KUid, "uid");
1.41 +_LIT(KOid, "oid");
1.42 +_LIT(KKeyFormat, "-%02d");
1.43 +
1.44 +
1.45 +class CPkixCertStepBase : public CTestStep
1.46 + {
1.47 +public:
1.48 + ~CPkixCertStepBase();
1.49 +
1.50 + virtual TVerdict doTestStepPreambleL();
1.51 + virtual TVerdict doTestStepL();
1.52 +
1.53 +
1.54 +protected:
1.55 + virtual void PerformTestL();
1.56 + void PerformOomTestL();
1.57 +
1.58 + //so keyname concat with -01, -02, -03, .... , -XX
1.59 + void GetStringArrayFromConfigL(const TDesC& aSectName, const TDesC& aKeyName, RArray<TPtrC>& aArray);
1.60 + void GetIntArrayFromConfigL(const TDesC& aSectName, const TDesC& aKeyName, RArray<TInt>& aArray);
1.61 + HBufC8* ReadFileLC(const TDesC& aFileName);
1.62 +
1.63 +protected:
1.64 + TBool iPerformOom;
1.65 + RFs iFileServer;
1.66 + CPKIXCertChain* iCertChain;
1.67 + HBufC8* iConcatenatedChain; //string concatenation of the DER encoded certs in the chain, not including the root cert
1.68 + TUid iUid;
1.69 + RArray<TPtrC> iOids;
1.70 + RPointerArray<TDesC> iProcessedOids; //pointers into iOids, necessary format for API calls
1.71 + RPointerArray<CX509Certificate> iRootCerts;
1.72 + TPtrC8 iPtr;
1.73 + TBool iUseUidOverload;
1.74 +
1.75 + CActiveScheduler* iScheduler;
1.76 + };
1.77 +
1.78 +#endif // PKIXCERTSTEPBASE_H