os/security/cryptoservices/certificateandkeymgmt/tpkixcert_tef/src/pkixcertstepbase.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2008-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  @file 
    21  @internalTechnology
    22 */
    23 
    24 #ifndef PKIXCERTSTEPBASE_H
    25 #define PKIXCERTSTEPBASE_H
    26 
    27 #include <test/testexecutestepbase.h>
    28 #include <e32std.h>
    29 #include <pkixcertchain.h>
    30 #include <x509cert.h>
    31 
    32 
    33 _LIT(KPerformOom, "performoom");
    34 _LIT(KEndEntity, "endentity");
    35 _LIT(KIntermediateCert, "intermediatecert");
    36 _LIT(KRootCert, "rootcert");
    37 _LIT(KUid, "uid");
    38 _LIT(KOid, "oid");
    39 _LIT(KKeyFormat, "-%02d");
    40 
    41 
    42 class CPkixCertStepBase : public CTestStep
    43 	{
    44 public:
    45 	~CPkixCertStepBase();
    46 	
    47 	virtual TVerdict doTestStepPreambleL();
    48 	virtual TVerdict doTestStepL();		
    49 
    50 	
    51 protected:
    52 	virtual void PerformTestL();
    53 	void PerformOomTestL();
    54 		
    55 	//so keyname concat with -01, -02, -03, .... , -XX
    56 	void GetStringArrayFromConfigL(const TDesC& aSectName, const TDesC& aKeyName, RArray<TPtrC>& aArray);
    57 	void GetIntArrayFromConfigL(const TDesC& aSectName, const TDesC& aKeyName, RArray<TInt>& aArray);
    58 	HBufC8* ReadFileLC(const TDesC& aFileName);
    59 
    60 protected:
    61 	TBool iPerformOom;
    62 	RFs iFileServer;
    63 	CPKIXCertChain* iCertChain;
    64 	HBufC8* iConcatenatedChain;	//string concatenation of the DER encoded certs in the chain, not including the root cert
    65 	TUid iUid;
    66 	RArray<TPtrC> iOids;
    67 	RPointerArray<TDesC> iProcessedOids; //pointers into iOids, necessary format for API calls
    68 	RPointerArray<CX509Certificate> iRootCerts;
    69 	TPtrC8 iPtr;
    70 	TBool iUseUidOverload;
    71 	
    72 	CActiveScheduler*	iScheduler;
    73 	};	
    74 
    75 #endif // PKIXCERTSTEPBASE_H