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.
25 #ifndef __COMPARISONTEST_H
26 #define __COMPARISONTEST_H
31 #include "t_testaction.h"
33 class CX509Certificate;
36 Validates the comparison of certificates and issuer-names.
38 class CComparisonTest : public CTestAction
41 static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole,
42 Output& aOut, const TTestActionSpec& aTestActionSpec);
43 static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole,
44 Output& aOut, const TTestActionSpec& aTestActionSpec);
49 void DoPerformPrerequisite(TRequestStatus& aStatus);
50 void DoPerformPostrequisite(TRequestStatus& aStatus);
51 void PerformAction(TRequestStatus& aStatus);
53 void DoReportAction();
54 void DoCheckResult(TInt aError);
57 void ConstructL(const TTestActionSpec& aTestActionSpec);
58 CX509Certificate* ReadCertificateL(const TDesC8& aFileName);
59 CComparisonTest(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
63 RFs& iFs; /// shared file server session
64 CX509Certificate* iCert1; /// LHS of comparison
65 CX509Certificate* iCert2; /// RHS of comparison
66 TBool iMatchExpected; /// ETrue if CX509Certificate::IsEqualL is expected to return ETrue