12 * Description: |
12 * Description: |
13 * This header contains common data-types between the server and client |
13 * This header contains common data-types between the server and client |
14 */ |
14 */ |
15 /** |
15 /** |
16 * @section CredentialMgr_info Implementation Information |
16 * @section CredentialMgr_info Implementation Information |
17 * Currently there are 9 Apis exposed by the CredMgr Client. |
17 * Currently there are 9 Apis exposed by the CredMgr Client. |
18 * |
18 * |
19 * The client is a Dll which will be used by Apps to get the CredMgr services. |
19 * The client is a Dll which will be used by Apps to get the CredMgr services. |
20 * The server is a seperate EXE(process). |
20 * The server is a seperate EXE(process). |
21 * |
21 * |
22 * There is also a static LIB SmfCredMgrCommon which contains data structures that are |
22 * There is also a static LIB SmfCredMgrCommon which contains data structures that are |
23 * common between the server-client. |
23 * common between the server-client. |
24 * |
24 * |
25 * Currently data is given to server to store in a Database using @ref storeAuthData() |
25 * Currently data is given to server to store in a Database using @ref storeAuthData() |
26 * and the other APIs are used to retrieve the data from the server-database |
26 * and the other APIs are used to retrieve the data from the server-database |
27 * using SqLite queries. |
27 * using SqLite queries. |
28 * |
28 * |
29 * So, generally to store authentication data the flow is like |
29 * So, generally to store authentication data the flow is like |
30 * @msc { |
30 * @msc { |
31 * SmfCredMgrClient, SmfCredMgrClient_p, RSmfCredMgrClientSession, SmfCredMgrServer, SmfCredMgrServerSession, CSmfCredMgrDbUser; |
31 * SmfCredMgrClient, SmfCredMgrClient_p, RSmfCredMgrClientSession, SmfCredMgrServer, SmfCredMgrServerSession, CSmfCredMgrDbUser; |
32 * SmfCredMgrClient->SmfCredMgrClient_p [label = "storeAuthData()"]; |
32 * SmfCredMgrClient->SmfCredMgrClient_p [label = "storeAuthData()"]; |
33 * SmfCredMgrClient_p=>SmfCredMgrClient_p [label = "ConversionsOfDatatypeAndSerializing"]; |
33 * SmfCredMgrClient_p=>SmfCredMgrClient_p [label = "ConversionsOfDatatypeAndSerializing"]; |
34 * SmfCredMgrClient_p->RSmfCredMgrClientSession [label = "RequestService()"]; |
34 * SmfCredMgrClient_p->RSmfCredMgrClientSession [label = "RequestService()"]; |
37 * SmfCredMgrServerSession->CSmfCredMgrDbUser [label = "InsertTables"]; |
37 * SmfCredMgrServerSession->CSmfCredMgrDbUser [label = "InsertTables"]; |
38 * SmfCredMgrClient_p<-SmfCredMgrServerSession [label = "return = Registration Token"]; |
38 * SmfCredMgrClient_p<-SmfCredMgrServerSession [label = "return = Registration Token"]; |
39 * SmfCredMgrClient<-SmfCredMgrClient_p [label = "return = Registration Token"]; |
39 * SmfCredMgrClient<-SmfCredMgrClient_p [label = "return = Registration Token"]; |
40 * }; |
40 * }; |
41 * |
41 * |
42 * The flag associated to each Plugin ID is now taken as a generic flag to entire |
42 * The flag associated to each Plugin ID is now taken as a generic flag to entire |
43 * PluginList during storing in storeAuthData() API ,i.e if Flag = 1 the |
43 * PluginList during storing in storeAuthData() API ,i.e if Flag = 1 the |
44 * entire List of Plugins are enabled. |
44 * entire List of Plugins are enabled. |
45 * |
45 * |
46 * The NONCE is generated using rand() library function. |
46 * The NONCE is generated using rand() library function. |
47 * |
47 * |
48 * @Todo- 1)The validity check of the authentication data at the server side is an open item yet and is to be implemented. |
48 * @Todo- 1)The validity check of the authentication data at the server side is an open item yet and is to be implemented. |
49 * This will require the signal-slot implementation at the client side to notify authentication expiry, if decided that |
49 * This will require the signal-slot implementation at the client side to notify authentication expiry, if decided that |
50 * credentialmgr will launch authapp. |
50 * credentialmgr will launch authapp. |
51 * 2)The error handling and state-machine (if required) are to be implemented. |
51 * 2)The error handling and state-machine (if required) are to be implemented. |
52 * 3) The process id of smfserver needs to be checked inside credmgr to ensure only smfserver reads the keys. |
52 * 3) The process id of smfserver needs to be checked inside credmgr to ensure only smfserver reads the keys. |
53 * |
53 * |
54 */ |
54 */ |
55 |
55 |
56 #ifndef COMMON_H_ |
56 #ifndef COMMON_H_ |
57 #define COMMON_H_ |
57 #define COMMON_H_ |
58 |
58 |
73 const TUint KSecureServMajorVersionNumber = 1; |
73 const TUint KSecureServMajorVersionNumber = 1; |
74 const TUint KSecureServMinorVersionNumber = 0; |
74 const TUint KSecureServMinorVersionNumber = 0; |
75 const TUint KSecureServBuildVersionNumber = 0; |
75 const TUint KSecureServBuildVersionNumber = 0; |
76 |
76 |
77 /** |
77 /** |
|
78 * @ingroup smf_credmgr_group |
78 *Enumeration to represent Cryptographic Algorithm useds |
79 *Enumeration to represent Cryptographic Algorithm useds |
79 */ |
80 */ |
80 enum SmfSignatureMethod |
81 enum SmfSignatureMethod |
81 { |
82 { |
82 /** |
83 /** |
83 * Enum for no algorithm |
84 * Enum for no algorithm |
84 */ |
85 */ |
85 ESmfNoSigningMethod = 0, |
86 ESmfNoSigningMethod = 0, |
86 |
87 |
87 /** |
88 /** |
88 *Enum for algorithm RSA-SHA1 |
89 *Enum for algorithm RSA-SHA1 |
89 */ |
90 */ |
90 ESMFRSAProtocol, |
91 ESMFRSAProtocol, |
91 |
92 |
92 /** |
93 /** |
93 *Enum for algorithm HMAC-SHA1 |
94 *Enum for algorithm HMAC-SHA1 |
94 */ |
95 */ |
95 ESMFHMACProtocol, |
96 ESMFHMACProtocol, |
96 |
97 |
97 /** |
98 /** |
98 *Enum for Plain Tezt |
99 *Enum for Plain Tezt |
99 */ |
100 */ |
100 ESMFPlainText, |
101 ESMFPlainText, |
101 |
102 |
102 /** |
103 /** |
103 *Enum for SHA256 |
104 *Enum for SHA256 |
104 */ |
105 */ |
105 ESMFSHA256Protocol |
106 ESMFSHA256Protocol |
106 }; |
107 }; |
142 |
143 |
143 /** |
144 /** |
144 * Op code to store RSA keys. |
145 * Op code to store RSA keys. |
145 */ |
146 */ |
146 ESmfStoreRSAKey, |
147 ESmfStoreRSAKey, |
147 |
148 |
148 /** |
149 /** |
149 * Op code to sign message using RSA algo. |
150 * Op code to sign message using RSA algo. |
150 */ |
151 */ |
151 ESmfRSASignMessage, |
152 ESmfRSASignMessage, |
152 |
153 |
153 /** |
154 /** |
154 * Op code to sign using HAMC-SHA1 algo. |
155 * Op code to sign using HAMC-SHA1 algo. |
155 */ |
156 */ |
156 ESmfHMACSHA1SignMessage, |
157 ESmfHMACSHA1SignMessage, |
157 |
158 |
158 /** |
159 /** |
159 * Op code to delete RSA keys. |
160 * Op code to delete RSA keys. |
160 */ |
161 */ |
161 ESmfDeleteKeys |
162 ESmfDeleteKeys |
162 }; |
163 }; |