sl@0: /* sl@0: * Copyright (c) 1998-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: #if !defined(__E32STD_H__) sl@0: #include sl@0: #endif sl@0: sl@0: #if !defined (__BADESCA_H__) sl@0: #include sl@0: #endif sl@0: sl@0: #include sl@0: sl@0: /* Chain Orders: sl@0: 1) unstructured text, no T=CA chains sl@0: Canadian Universities sl@0: Waterloo noTCA sl@0: Laurier noTCA sl@0: McMaster noTCA sl@0: Guelph noTCA sl@0: sl@0: 2) proper x509 text with T=ca sl@0: Canadian Universities sl@0: Waterloo sl@0: McMaster sl@0: Guelph sl@0: Queens sl@0: Ottawa sl@0: Lakehead sl@0: Laurier sl@0: sl@0: 3) proper structured text with T=ca sl@0: Canadian Hockey Teams sl@0: Toronto Maple Leafs sl@0: Ottawa Senators sl@0: Montreal Canadiens sl@0: Winnipeg Jets (missing common name) sl@0: Vancouver Canucks sl@0: */ sl@0: sl@0: class CTestChain : public CBase sl@0: { sl@0: public: sl@0: ~CTestChain(); sl@0: CTestChain(); sl@0: virtual void ConstructL(); sl@0: CDesCArray* iServerCerts; sl@0: CDesCArray* iServerLabels; sl@0: CDesCArray* iRootCerts; sl@0: CDesCArray* iRootLabels; sl@0: CDesCArray* iExtraCerts; sl@0: CDesCArray* iExtraLabels; sl@0: }; sl@0: sl@0: class CTestChainBuild : public CTestChain sl@0: { sl@0: public: sl@0: static CTestChainBuild* NewL(); sl@0: static CTestChainBuild* NewLC(); sl@0: ~CTestChainBuild(); sl@0: HBufC* iCorrectChain; sl@0: }; sl@0: sl@0: class CTestChainValidate : public CTestChain sl@0: { sl@0: public: sl@0: static CTestChainValidate* NewL(); sl@0: static CTestChainValidate* NewLC(); sl@0: void ConstructL(); sl@0: sl@0: // warning: sl@0: //We have test certificates issued at different times in such a way that test validating sl@0: // these certificates with the same date will result in at least some of them being out sl@0: // of their validity period sl@0: //Old certificates == 0 and should be validated with a date of July 2000 sl@0: //New certificates == 1 and should be validated with a date of July 2002 sl@0: //This defaults to 0 in the constructor sl@0: TInt iDateIssued; sl@0: sl@0: ~CTestChainValidate(); sl@0: TWTLSValidationStatus* iError; sl@0: CArrayFixFlat* iWarnings; sl@0: void AddChainL(const TDesC& aValues); sl@0: void AddIOL(const TDesC& aValues); sl@0: void AddDateIssued(const TDesC& aValues); sl@0: private: sl@0: TBool AddRootL(const TDesC& aBuf); sl@0: TBool AddServerL(const TDesC& aBuf); sl@0: }; sl@0: sl@0: