sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* CTestCertForDeletable class implementation
|
sl@0
|
16 |
*
|
sl@0
|
17 |
*/
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
/**
|
sl@0
|
21 |
@file
|
sl@0
|
22 |
@internalTechnology
|
sl@0
|
23 |
*/
|
sl@0
|
24 |
|
sl@0
|
25 |
#ifndef __T_TESTCERTFORDELETABLE_H__
|
sl@0
|
26 |
#define __T_TESTCERTFORDELETABLE_H__
|
sl@0
|
27 |
|
sl@0
|
28 |
#include "t_certstoreactions.h"
|
sl@0
|
29 |
#include "t_testactionspec.h"
|
sl@0
|
30 |
#include <mctkeystore.h>
|
sl@0
|
31 |
#include <unifiedkeystore.h>
|
sl@0
|
32 |
|
sl@0
|
33 |
/**
|
sl@0
|
34 |
* This class tests the addition of a certificate to the store.
|
sl@0
|
35 |
*/
|
sl@0
|
36 |
class CTestCertForDeletable : public CCertStoreTestAction
|
sl@0
|
37 |
{
|
sl@0
|
38 |
public:
|
sl@0
|
39 |
static CTestAction* NewL( RFs& aFs,
|
sl@0
|
40 |
CConsoleBase& aConsole,
|
sl@0
|
41 |
Output& aOut,
|
sl@0
|
42 |
const TTestActionSpec& aTestActionSpec);
|
sl@0
|
43 |
~CTestCertForDeletable();
|
sl@0
|
44 |
virtual void PerformAction(TRequestStatus& aStatus);
|
sl@0
|
45 |
virtual void PerformCancel();
|
sl@0
|
46 |
virtual void AfterOOMFailure();
|
sl@0
|
47 |
virtual void Reset();
|
sl@0
|
48 |
|
sl@0
|
49 |
private:
|
sl@0
|
50 |
CTestCertForDeletable(RFs& aFs, CConsoleBase& aConsole, Output& aOut);
|
sl@0
|
51 |
void ConstructL(const TTestActionSpec& aTestActionSpec);
|
sl@0
|
52 |
void DoReportAction();
|
sl@0
|
53 |
void DoCheckResult(TInt aError);
|
sl@0
|
54 |
|
sl@0
|
55 |
void WriteFormat(TCertificateFormat aFormat);
|
sl@0
|
56 |
void WriteOwnerType();
|
sl@0
|
57 |
void SetKeyId(TKeyIdentifier& aKeyIdentifier, const TDesC8& aKeyInfo);
|
sl@0
|
58 |
void SetCertFormatL(const TDesC8& aFormat);
|
sl@0
|
59 |
void SetCertOwnerTypeL(const TDesC8& aOwnerType);
|
sl@0
|
60 |
void SetCertLabelL(const TDesC8& aLabel);
|
sl@0
|
61 |
void SetStoreToUse(const TDesC8& aStoreToUse);
|
sl@0
|
62 |
void SetDeletable(const TDesC8& aStringValue);
|
sl@0
|
63 |
void SetSubActionL(const TDesC8& aStringValue);
|
sl@0
|
64 |
void SetCertificateContentL(const TDesC8& aFileName);
|
sl@0
|
65 |
void ConstructCertL(const TDesC8& aCert);
|
sl@0
|
66 |
|
sl@0
|
67 |
void TestSerializationL(MCTToken& aToken,
|
sl@0
|
68 |
TKeyIdentifier* aIssuerKeyId,
|
sl@0
|
69 |
TKeyIdentifier* aSubjectKeyId,
|
sl@0
|
70 |
const TInt aCertificateId,
|
sl@0
|
71 |
const TDesC8* aIssuerHash );
|
sl@0
|
72 |
private:
|
sl@0
|
73 |
enum TState
|
sl@0
|
74 |
{
|
sl@0
|
75 |
ETestSerialization,
|
sl@0
|
76 |
ETestNewCSClasswDeletable,
|
sl@0
|
77 |
ETestOldCSClasswoDeletable,
|
sl@0
|
78 |
EFinished
|
sl@0
|
79 |
};
|
sl@0
|
80 |
|
sl@0
|
81 |
private:
|
sl@0
|
82 |
TState iState;
|
sl@0
|
83 |
CCertificate* iCertificate;
|
sl@0
|
84 |
HBufC8* iCertificateURL;
|
sl@0
|
85 |
HBufC* iCertificateLabel;
|
sl@0
|
86 |
TCertificateFormat iCertificateFormat;
|
sl@0
|
87 |
TCertificateOwnerType iOwnerType;
|
sl@0
|
88 |
TKeyIdentifier iIssuerKeyId;
|
sl@0
|
89 |
TKeyIdentifier iSubjectKeyId;
|
sl@0
|
90 |
TInt iStoreIndex;
|
sl@0
|
91 |
TBool iSelfInit;
|
sl@0
|
92 |
TBool iResultGood;
|
sl@0
|
93 |
|
sl@0
|
94 |
HBufC8* iCertificateContent;
|
sl@0
|
95 |
|
sl@0
|
96 |
CCTCertInfo* iCertInfo;
|
sl@0
|
97 |
CCertificate* iCert;
|
sl@0
|
98 |
TBool iDeletable;
|
sl@0
|
99 |
};
|
sl@0
|
100 |
|
sl@0
|
101 |
|
sl@0
|
102 |
#endif
|