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