|
1 /* |
|
2 * Copyright (c) 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 "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 #ifndef STORAGEHANDLER_H |
|
18 #define STORAGEHANDLER_H |
|
19 |
|
20 #include "javastorage.h" |
|
21 #include "javastorageexception.h" |
|
22 #include "javauid.h" |
|
23 |
|
24 using namespace java::storage; |
|
25 using namespace java::util; |
|
26 |
|
27 namespace java |
|
28 { |
|
29 namespace security |
|
30 { |
|
31 |
|
32 class StorageHandler |
|
33 { |
|
34 public: |
|
35 StorageHandler(); |
|
36 |
|
37 /** |
|
38 * Read application suite valid certificates. |
|
39 * |
|
40 * @param aUid Application suite Uid. |
|
41 * @param[out] aCerts Valid certificate indexes. |
|
42 */ |
|
43 void readValidCerts(const Uid& aUid, std::list<int>& aCerts); |
|
44 |
|
45 /** |
|
46 * Read application suite certificate chains. They are read from given |
|
47 * attributes based on certificate chain index. |
|
48 * |
|
49 * @param aAttributes attributes where to read. |
|
50 * @param aIndex certificate chain index. |
|
51 * @param[out] aChain chain. Empty if certificate not found. |
|
52 */ |
|
53 void getChainFromIndex( |
|
54 const java::storage::JavaStorageApplicationList_t& aAttributes, |
|
55 const int aIndex, |
|
56 std::string& aChain); |
|
57 |
|
58 |
|
59 virtual ~StorageHandler(); |
|
60 private: |
|
61 void findEntry(const JavaStorageApplicationList_t&, |
|
62 const std::wstring&, |
|
63 std::wstring& eValue) ; |
|
64 void addToValidCerts(const std::wstring& aValue, std::list<int>& aCerts); |
|
65 JavaStorage* iStorage; |
|
66 }; |
|
67 |
|
68 } //end namespace security |
|
69 } //end namespace java |
|
70 |
|
71 #endif // STORAGEHANDLER_H |
|
72 |