|
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 |
|
21 /** |
|
22 @file |
|
23 @internalTechnology |
|
24 @test |
|
25 */ |
|
26 |
|
27 #ifndef __COMPARISONTEST_H |
|
28 #define __COMPARISONTEST_H |
|
29 |
|
30 #include <e32base.h> |
|
31 #include <e32cmn.h> |
|
32 |
|
33 #include "t_testaction.h" |
|
34 |
|
35 class CX509Certificate; |
|
36 |
|
37 /** |
|
38 Validates the comparison of certificates and issuer-names. |
|
39 */ |
|
40 class CComparisonTest : public CTestAction |
|
41 { |
|
42 public: |
|
43 static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole, |
|
44 Output& aOut, const TTestActionSpec& aTestActionSpec); |
|
45 static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole, |
|
46 Output& aOut, const TTestActionSpec& aTestActionSpec); |
|
47 ~CComparisonTest(); |
|
48 |
|
49 public: |
|
50 // From CTestAction |
|
51 void DoPerformPrerequisite(TRequestStatus& aStatus); |
|
52 void DoPerformPostrequisite(TRequestStatus& aStatus); |
|
53 void PerformAction(TRequestStatus& aStatus); |
|
54 |
|
55 void DoReportAction(); |
|
56 void DoCheckResult(TInt aError); |
|
57 |
|
58 private: |
|
59 void ConstructL(const TTestActionSpec& aTestActionSpec); |
|
60 CX509Certificate* ReadCertificateL(const TDesC8& aFileName); |
|
61 CComparisonTest(RFs& aFs, CConsoleBase& aConsole, Output& aOut); |
|
62 void DoActionL(); |
|
63 |
|
64 private: |
|
65 RFs& iFs; /// shared file server session |
|
66 CX509Certificate* iCert1; /// LHS of comparison |
|
67 CX509Certificate* iCert2; /// RHS of comparison |
|
68 TBool iMatchExpected; /// ETrue if CX509Certificate::IsEqualL is expected to return ETrue |
|
69 }; |
|
70 |
|
71 #endif |