1 /* |
1 /** |
2 * smfkeystoremanager.h |
2 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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" |
3 * |
8 * |
4 * Created on: 21.4.2010 |
9 * Initial Contributors: |
5 * Author: lassela |
10 * Lasse Laasonen, Sasken Communication Technologies Ltd - Initial contribution |
|
11 * |
|
12 * Description: |
|
13 * This header contains routines handling RSA signing using Unified Key Store |
6 */ |
14 */ |
7 |
15 |
8 #ifndef SMFKEYSTOREMANAGER_H_ |
16 #ifndef SMFKEYSTOREMANAGER_H_ |
9 #define SMFKEYSTOREMANAGER_H_ |
17 #define SMFKEYSTOREMANAGER_H_ |
10 |
18 |
|
19 // Include files |
11 #include <e32base.h> |
20 #include <e32base.h> |
12 #include <f32file.h> |
21 #include <f32file.h> |
13 |
22 |
14 #ifdef SYMBIAN_V3 |
23 #ifdef SYMBIAN_V3 |
15 #include <rmpointerarray.h> |
24 #include <rmpointerarray.h> |
25 class CSmfRsaKeyParameters; |
34 class CSmfRsaKeyParameters; |
26 |
35 |
27 class CSmfKeyStoreManager : public CActive |
36 class CSmfKeyStoreManager : public CActive |
28 { |
37 { |
29 public: |
38 public: |
|
39 /** |
|
40 * NewL Method |
|
41 * @return The constructed CSmfKeyStoreManager instance |
|
42 */ |
30 static CSmfKeyStoreManager* NewL(); |
43 static CSmfKeyStoreManager* NewL(); |
|
44 |
|
45 /** |
|
46 * NewLC Method |
|
47 * @return The constructed CSmfKeyStoreManager instance |
|
48 */ |
31 static CSmfKeyStoreManager* NewLC(); |
49 static CSmfKeyStoreManager* NewLC(); |
32 |
50 |
|
51 /** |
|
52 * Destructor |
|
53 */ |
33 ~CSmfKeyStoreManager(); |
54 ~CSmfKeyStoreManager(); |
34 |
55 |
|
56 /** |
|
57 * HandleMessageL |
|
58 * @param aMessage |
|
59 */ |
35 void HandleMessageL( const RMessage2& aMessage ); |
60 void HandleMessageL( const RMessage2& aMessage ); |
36 |
61 |
37 // void GenerateKeyL( const RMessage2& aMessage ); |
62 // void GenerateKeyL( const RMessage2& aMessage ); |
38 // void StoreRSAKeyL( const RMessage2& aMessage ); |
63 // void StoreRSAKeyL( const RMessage2& aMessage ); |
39 |
64 |
40 private: // from CActive |
65 private: // from CActive |
|
66 /** |
|
67 * RunL |
|
68 */ |
41 void RunL(); |
69 void RunL(); |
|
70 |
|
71 /** |
|
72 * DoCancel |
|
73 */ |
42 void DoCancel(); |
74 void DoCancel(); |
|
75 |
|
76 /** |
|
77 * RunError |
|
78 * @param aError |
|
79 * @return |
|
80 */ |
43 TInt RunError(TInt aError); |
81 TInt RunError(TInt aError); |
44 |
82 |
45 private: |
83 private: |
|
84 /** |
|
85 * Constructor |
|
86 */ |
46 CSmfKeyStoreManager(); |
87 CSmfKeyStoreManager(); |
|
88 |
|
89 /** |
|
90 * Two-phase constructor |
|
91 */ |
47 void ConstructL(); |
92 void ConstructL(); |
48 |
93 |
|
94 /** |
|
95 * ContinueMessageHandlingL |
|
96 */ |
49 void ContinueMessageHandlingL(); |
97 void ContinueMessageHandlingL(); |
50 |
98 |
|
99 /** |
|
100 * StoreRSAKeyL |
|
101 */ |
51 void StoreRSAKeyL(); |
102 void StoreRSAKeyL(); |
|
103 |
|
104 /** |
|
105 * RSA_SHA1_SignMessageL |
|
106 */ |
52 void RSA_SHA1_SignMessageL(); |
107 void RSA_SHA1_SignMessageL(); |
|
108 |
|
109 /** |
|
110 * HMAC_SHA1_SignMessageL |
|
111 */ |
53 void HMAC_SHA1_SignMessageL(); |
112 void HMAC_SHA1_SignMessageL(); |
54 |
113 |
55 void DeleteKeys(); |
114 /** |
|
115 * DeleteKeysL |
|
116 */ |
|
117 void DeleteKeysL(); |
56 |
118 |
|
119 /** |
|
120 * SetPassphraseTimeout |
|
121 */ |
57 void SetPassphraseTimeout(); |
122 void SetPassphraseTimeout(); |
58 |
123 |
|
124 /** |
|
125 * ReadSignParametersL |
|
126 */ |
59 void ReadSignParametersL(); |
127 void ReadSignParametersL(); |
|
128 |
|
129 /** |
|
130 * ReadRsaKeyParametersL |
|
131 */ |
60 void ReadRsaKeyParametersL(); |
132 void ReadRsaKeyParametersL(); |
61 |
133 |
62 private: |
134 private: |
63 RFs iFs; |
135 RFs iFs; |
64 |
136 |