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: @test sl@0: */ sl@0: sl@0: #ifndef __COMPARISONTEST_H sl@0: #define __COMPARISONTEST_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #include "t_testaction.h" sl@0: sl@0: class CX509Certificate; sl@0: sl@0: /** sl@0: Validates the comparison of certificates and issuer-names. sl@0: */ sl@0: class CComparisonTest : public CTestAction sl@0: { sl@0: public: sl@0: static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, sl@0: Output& aOut, const TTestActionSpec& aTestActionSpec); sl@0: static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole, sl@0: Output& aOut, const TTestActionSpec& aTestActionSpec); sl@0: ~CComparisonTest(); sl@0: sl@0: public: sl@0: // From CTestAction sl@0: void DoPerformPrerequisite(TRequestStatus& aStatus); sl@0: void DoPerformPostrequisite(TRequestStatus& aStatus); sl@0: void PerformAction(TRequestStatus& aStatus); sl@0: sl@0: void DoReportAction(); sl@0: void DoCheckResult(TInt aError); sl@0: sl@0: private: sl@0: void ConstructL(const TTestActionSpec& aTestActionSpec); sl@0: CX509Certificate* ReadCertificateL(const TDesC8& aFileName); sl@0: CComparisonTest(RFs& aFs, CConsoleBase& aConsole, Output& aOut); sl@0: void DoActionL(); sl@0: sl@0: private: sl@0: RFs& iFs; /// shared file server session sl@0: CX509Certificate* iCert1; /// LHS of comparison sl@0: CX509Certificate* iCert2; /// RHS of comparison sl@0: TBool iMatchExpected; /// ETrue if CX509Certificate::IsEqualL is expected to return ETrue sl@0: }; sl@0: sl@0: #endif