sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2007-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 |
* This file define all the common values thoughout your test project
|
sl@0
|
16 |
*
|
sl@0
|
17 |
*/
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
|
sl@0
|
21 |
|
sl@0
|
22 |
/**
|
sl@0
|
23 |
@file
|
sl@0
|
24 |
@internalTechnology
|
sl@0
|
25 |
*/
|
sl@0
|
26 |
#if (!defined __TE_CRYPTOSPI_SUITEDEFS_H__)
|
sl@0
|
27 |
#define __TE_CRYPTOSPI_SUITEDEFS_H__
|
sl@0
|
28 |
|
sl@0
|
29 |
#include <cryptospi/romlit.h>
|
sl@0
|
30 |
#include <cryptospi/cryptospidef.h>
|
sl@0
|
31 |
|
sl@0
|
32 |
namespace CryptoSpi
|
sl@0
|
33 |
{
|
sl@0
|
34 |
|
sl@0
|
35 |
const TInt KKeyExponent = 65537;
|
sl@0
|
36 |
|
sl@0
|
37 |
//tplugin01 implementation definitions
|
sl@0
|
38 |
const TInt32 KTestPlugin01Des_1 = 0x102831A1;
|
sl@0
|
39 |
const TInt32 KTestPlugin01Des_2 = 0x102831A2;
|
sl@0
|
40 |
const TInt32 KTestPlugin01Des_3 = 0x102831A3;
|
sl@0
|
41 |
const TInt32 KTestPlugin01Des_4 = 0x102831A4;
|
sl@0
|
42 |
const TInt32 KTestPlugin01Md2_1 = 0x102831A5;
|
sl@0
|
43 |
const TInt32 KTestPlugin01Md2_2 = 0x102831A6;
|
sl@0
|
44 |
const TInt32 KTestPlugin01RsaKeyGen_1 = 0x102831A7;
|
sl@0
|
45 |
const TInt32 KTestPlugin01RsaVerifier_1 = 0x102831A8;
|
sl@0
|
46 |
const TInt32 KTestPlugin01RsaVerifier_2 = 0x102831A9;
|
sl@0
|
47 |
|
sl@0
|
48 |
//tplugin02 implementation definitions
|
sl@0
|
49 |
const TInt32 KTestPlugin02Random_1 = 0x102831B0;
|
sl@0
|
50 |
const TInt32 KTestPlugin02Md5_1 = 0x102831B1;
|
sl@0
|
51 |
const TInt32 KTestPlugin02Des_1 = 0x102831B2;
|
sl@0
|
52 |
const TInt32 KTestPlugin02Des_2 = 0x102831B3;
|
sl@0
|
53 |
const TInt32 KTestPlugin02Rsa_1 = 0x102831B4;
|
sl@0
|
54 |
const TInt32 KTestPlugin02Rsa_2 = 0x102831B5;
|
sl@0
|
55 |
const TInt32 KTestPlugin02RsaKeyGen_1 = 0x102831B6;
|
sl@0
|
56 |
const TInt32 KTestPlugin02DHKeyGen_1 = 0x102831B7;
|
sl@0
|
57 |
const TInt32 KTestPlugin02RsaSigner_1 = 0x102831B8;
|
sl@0
|
58 |
const TInt32 KTestPlugin02DHKeyAgree_1 = 0x102831B9;
|
sl@0
|
59 |
const TInt32 KTestPlugin02Random_2 = 0x102831BA;
|
sl@0
|
60 |
|
sl@0
|
61 |
//softwarecrypto implementation definitions
|
sl@0
|
62 |
const TInt32 KCryptoPluginMd2 = 0x102831D0;
|
sl@0
|
63 |
const TInt32 KCryptoPluginMd5 = 0x102831D1;
|
sl@0
|
64 |
const TInt32 KCryptoPluginSha1 = 0x102831D2;
|
sl@0
|
65 |
const TInt32 KCryptoPluginSha224 = 0x2000E25C;
|
sl@0
|
66 |
const TInt32 KCryptoPluginSha256 = 0x2000E25D;
|
sl@0
|
67 |
const TInt32 KCryptoPluginSha384 = 0x2000E25E;
|
sl@0
|
68 |
const TInt32 KCryptoPluginSha512 = 0x2000E25F;
|
sl@0
|
69 |
const TInt32 KCryptoPluginRandom = 0x102831D3;
|
sl@0
|
70 |
const TInt32 KCryptoPluginDes = 0x102831D4;
|
sl@0
|
71 |
const TInt32 KCryptoPlugin3Des = 0x102831D5;
|
sl@0
|
72 |
const TInt32 KCryptoPluginAes = 0x102831D6;
|
sl@0
|
73 |
const TInt32 KCryptoPluginRc2 = 0x102831D7;
|
sl@0
|
74 |
const TInt32 KCryptoPluginArc4 = 0x102831D8;
|
sl@0
|
75 |
const TInt32 KCryptoPluginRsaCipher = 0x102831D9;
|
sl@0
|
76 |
const TInt32 KCryptoPluginRsaSigner = 0x102831DA;
|
sl@0
|
77 |
const TInt32 KCryptoPluginDsaSigner = 0x102831DB;
|
sl@0
|
78 |
const TInt32 KCryptoPluginRsaVerifier = 0x102831DC;
|
sl@0
|
79 |
const TInt32 KCryptoPluginDsaVerifier = 0x102831DD;
|
sl@0
|
80 |
const TInt32 KCryptoPluginDhKeyAgreement = 0x102831DE;
|
sl@0
|
81 |
const TInt32 KCryptoPluginDhKeyPairGen = 0x102831DF;
|
sl@0
|
82 |
const TInt32 KCryptoPluginRsaKeyPairGen = 0x102831E0;
|
sl@0
|
83 |
const TInt32 KCryptoPluginDsaKeyPairGen = 0x102831E1;
|
sl@0
|
84 |
#ifdef SYMBIAN_SDP_IPSEC_VOIP_SUPPORT
|
sl@0
|
85 |
const TInt32 KTestPlugin01Aes = 0x102831AA;
|
sl@0
|
86 |
const TInt32 KTestPlugin01XcbcMac96 = 0x102831AB;
|
sl@0
|
87 |
const TInt32 KTestPlugin01MacMd2_1 = 0x102831AC;
|
sl@0
|
88 |
const TInt32 KTestPlugin01MacMd2_2 = 0x102831AD;
|
sl@0
|
89 |
const TInt32 KTestPlugin02Aes = 0x102831BB;
|
sl@0
|
90 |
const TInt32 KTestPlugin02XcbcMac96 = 0x102831BC;
|
sl@0
|
91 |
const TInt32 KTestPlugin02XcbcPrf128 = 0x102831BD;
|
sl@0
|
92 |
#endif
|
sl@0
|
93 |
|
sl@0
|
94 |
//creator name definitions
|
sl@0
|
95 |
_ROMLIT16(KSymbian, "Symbian");
|
sl@0
|
96 |
_ROMLIT16(KSymbianTestFramework, "SymbianTestFramework");
|
sl@0
|
97 |
_ROMLIT16(KTestFramework, "TestFramework");
|
sl@0
|
98 |
_ROMLIT16(KAlternativeName, "AlternativeName");
|
sl@0
|
99 |
|
sl@0
|
100 |
//implementation name definitions
|
sl@0
|
101 |
_ROMLIT16(KMd2Description, "Md2");
|
sl@0
|
102 |
_ROMLIT16(KMd5Description, "Md5");
|
sl@0
|
103 |
_ROMLIT16(KSha1Description, "Sha1");
|
sl@0
|
104 |
_ROMLIT16(KSha224Description, "Sha224");
|
sl@0
|
105 |
_ROMLIT16(KSha256Description, "Sha256");
|
sl@0
|
106 |
_ROMLIT16(KSha384Description, "Sha384");
|
sl@0
|
107 |
_ROMLIT16(KSha512Description, "Sha512");
|
sl@0
|
108 |
_ROMLIT16(KHmacMd2Description, "HmacMd2");
|
sl@0
|
109 |
_ROMLIT16(KHmacMd5Description, "HmacMd5");
|
sl@0
|
110 |
_ROMLIT16(KHmacSha1Description, "HmacSha1");
|
sl@0
|
111 |
_ROMLIT16(KHmacSha224Description, "HmacSha224");
|
sl@0
|
112 |
_ROMLIT16(KHmacSha256Description, "HmacSha256");
|
sl@0
|
113 |
_ROMLIT16(KHmacSha384Description, "HmacSha384");
|
sl@0
|
114 |
_ROMLIT16(KHmacSha512Description, "HmacSha512");
|
sl@0
|
115 |
_ROMLIT16(KRandomDescription, "Random");
|
sl@0
|
116 |
_ROMLIT16(KDesDescription, "Des");
|
sl@0
|
117 |
_ROMLIT16(K3DesDescription, "3Des");
|
sl@0
|
118 |
_ROMLIT16(KAesDescription, "Aes");
|
sl@0
|
119 |
_ROMLIT16(KRC2Description, "RC2");
|
sl@0
|
120 |
_ROMLIT16(KARC4Description, "ARC4");
|
sl@0
|
121 |
_ROMLIT16(KRsaCipherDescription, "Rsa");
|
sl@0
|
122 |
_ROMLIT16(KRsaSignerDescription, "RsaSigner");
|
sl@0
|
123 |
_ROMLIT16(KDsaSignerDescription, "DsaSigner");
|
sl@0
|
124 |
_ROMLIT16(KRsaVerifierDescription, "RsaVerifier");
|
sl@0
|
125 |
_ROMLIT16(KDsaVerifierDescription, "DsaVerifier");
|
sl@0
|
126 |
_ROMLIT16(KDHDescription, "DH");
|
sl@0
|
127 |
_ROMLIT16(KSymmetricKeyGeneratorDescription, "Symmetric Key Generator");
|
sl@0
|
128 |
_ROMLIT16(KKeyPairDescription, "Key Pair Generator");
|
sl@0
|
129 |
#ifdef SYMBIAN_SDP_IPSEC_VOIP_SUPPORT
|
sl@0
|
130 |
_ROMLIT16(KAesXcbcMac96Description, "AesXcbcMac96");
|
sl@0
|
131 |
_ROMLIT16(KAesXcbcPrf128Description, "AesXcbcPrf128");
|
sl@0
|
132 |
#endif
|
sl@0
|
133 |
|
sl@0
|
134 |
//operation mode definitions
|
sl@0
|
135 |
const TInt32 KHashOperationModes[]={KHashMode, KHmacMode};
|
sl@0
|
136 |
const TInt32 KDesCryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC};
|
sl@0
|
137 |
const TInt32 K3DesCryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC};
|
sl@0
|
138 |
const TInt32 KAesCryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC};
|
sl@0
|
139 |
const TInt32 KRc2CryptoModes[]={KOperationModeNone, KOperationModeECB, KOperationModeCBC};
|
sl@0
|
140 |
const TInt32 KArc4CryptoModes[]={KOperationModeNone};
|
sl@0
|
141 |
|
sl@0
|
142 |
//padding mode definitions
|
sl@0
|
143 |
const TInt32 KDesPaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7};
|
sl@0
|
144 |
const TInt32 K3DesPaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7};
|
sl@0
|
145 |
const TInt32 KAesPaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7};
|
sl@0
|
146 |
const TInt32 KRc2PaddingModes[]={KPaddingModeNone, KPaddingModeSSLv3, KPaddingModePKCS7};
|
sl@0
|
147 |
const TInt32 KArc4PaddingModes[]={KPaddingModeNone};
|
sl@0
|
148 |
const TInt32 KRSACipherPaddingModes[]={KPaddingModeNone, KPaddingModePkcs1_v1_5_Encryption};
|
sl@0
|
149 |
const TInt32 KRSASignerPaddingModes[]={KPaddingModeNone, KPaddingModePkcs1_v1_5_Signature};
|
sl@0
|
150 |
const TInt32 KDSASignerPaddingModes[]={KPaddingModeNone};
|
sl@0
|
151 |
const TInt32 KRSAVerifierPaddingModes[]={KPaddingModeNone, KPaddingModePkcs1_v1_5_Signature};
|
sl@0
|
152 |
const TInt32 KDSAVerifierPaddingModes[]={KPaddingModeNone};
|
sl@0
|
153 |
|
sl@0
|
154 |
//Extended Characteristic Uids
|
sl@0
|
155 |
const TInt32 KExtendCharType1 = 0x102ABCD1;
|
sl@0
|
156 |
const TUid KExtendCharType1Uid ={KExtendCharType1};
|
sl@0
|
157 |
|
sl@0
|
158 |
const TInt32 KExtendCharType2 = 0x102ABCD2;
|
sl@0
|
159 |
const TUid KExtendCharType2Uid ={KExtendCharType2};
|
sl@0
|
160 |
|
sl@0
|
161 |
const TInt32 KExtendCharType3 = 0x102ABCD3;
|
sl@0
|
162 |
const TUid KExtendCharType3Uid ={KExtendCharType3};
|
sl@0
|
163 |
|
sl@0
|
164 |
//***********************************************************************
|
sl@0
|
165 |
//INI Configuration Parameter Definitons
|
sl@0
|
166 |
//***********************************************************************
|
sl@0
|
167 |
|
sl@0
|
168 |
//Test Case Initialisation Parameters
|
sl@0
|
169 |
_LIT(KConfigInterfaceType,"InterfaceType");
|
sl@0
|
170 |
_LIT(KConfigEncryptKey,"EncryptKey");
|
sl@0
|
171 |
_LIT(KConfigInvalidKey, "InvalidKey");
|
sl@0
|
172 |
_LIT(KConfigEncryptKeyType,"KeyType");
|
sl@0
|
173 |
_LIT(KConfigTestCaseId,"TestCaseId");
|
sl@0
|
174 |
_LIT(KConfigAlgorithmUid,"AlgorithmUid");
|
sl@0
|
175 |
_LIT(KConfigCryptoMode,"CryptoMode");
|
sl@0
|
176 |
_LIT(KConfigOperationMode,"OperationMode");
|
sl@0
|
177 |
_LIT(KConfigPaddingMode,"PaddingMode");
|
sl@0
|
178 |
_LIT(KConfigAlgorithmParams,"AlgorithmParams");
|
sl@0
|
179 |
_LIT(KConfigSourcePath,"SourcePath");
|
sl@0
|
180 |
_LIT(KConfigEncryptedPath,"EncryptedPath");
|
sl@0
|
181 |
_LIT(KConfigIVPath,"IVPath");
|
sl@0
|
182 |
|
sl@0
|
183 |
_LIT(KConfigInvalidPaddingMode,"InvalidPaddingMode");
|
sl@0
|
184 |
_LIT(KConfigInvalidOperationMode,"InvalidOperationMode");
|
sl@0
|
185 |
|
sl@0
|
186 |
//Source File Parameters
|
sl@0
|
187 |
const TInt KDataReadBlocks = 20;
|
sl@0
|
188 |
|
sl@0
|
189 |
//Symmetric/Asymmetric Parameters
|
sl@0
|
190 |
_LIT(KConfigExEncryptedData,"Encrypted");
|
sl@0
|
191 |
|
sl@0
|
192 |
//*****ASYMMETRIC ENCRYPT DATA CHECK PARAMS - TEMP*****
|
sl@0
|
193 |
_LIT(KConfigKeyModulous,"Modulous");
|
sl@0
|
194 |
_LIT(KConfigKeyExponent,"Exponent");
|
sl@0
|
195 |
//*****ASYMMETRIC ENCRYPT DATA CHECK PARAMS - TEMP*****
|
sl@0
|
196 |
|
sl@0
|
197 |
//Hash/Hmac Specific Parameters
|
sl@0
|
198 |
_LIT(KConfigExHashHmacValue,"ExHashValue");
|
sl@0
|
199 |
_LIT(KConfigExSecondHashHmacValue,"ExSecondHashValue");
|
sl@0
|
200 |
_LIT(KConfigSecondOperationMode,"SecondOperationMode");
|
sl@0
|
201 |
_LIT(KConfigThreadName,"WorkerThreadName");
|
sl@0
|
202 |
|
sl@0
|
203 |
//Key Exchange/Generation & Signer/Verifier Parameters
|
sl@0
|
204 |
_LIT(KConfigExchangeTestType,"TestType");
|
sl@0
|
205 |
_LIT(KConfigExchangeKey,"Key");
|
sl@0
|
206 |
_LIT(KConfigExchangePaddingMode,"PaddingMode");
|
sl@0
|
207 |
_LIT(KConfigExchangePaddingMode1,"PaddingMode1");
|
sl@0
|
208 |
_LIT(KConfigExchangePaddingMode2,"PaddingMode2");
|
sl@0
|
209 |
_LIT(KConfigExchangePaddingMode3,"PaddingMode3");
|
sl@0
|
210 |
_LIT(KConfigExchangeKeyTypeVariant, "Keytype");
|
sl@0
|
211 |
_LIT(KConfigSignVerifyType, "Type");
|
sl@0
|
212 |
_LIT(KConfigSignVerifyData, "Data");
|
sl@0
|
213 |
_LIT(KConfigSignVerifySigR, "SignatureR");
|
sl@0
|
214 |
_LIT(KConfigSignVerifySigS, "SignatureS");
|
sl@0
|
215 |
|
sl@0
|
216 |
//Common Definitions
|
sl@0
|
217 |
_LIT(KNullString, "NULL");
|
sl@0
|
218 |
_LIT(KEmptyString, "");
|
sl@0
|
219 |
_LIT8(KFileNewLine,"\r\n");
|
sl@0
|
220 |
|
sl@0
|
221 |
//Plugin Load
|
sl@0
|
222 |
_LIT(KConfigRuleSelectorToggle, "RuleSelectorToggle");
|
sl@0
|
223 |
|
sl@0
|
224 |
//********************CHARACTERISTICS**********************
|
sl@0
|
225 |
|
sl@0
|
226 |
//Selection Rule Input Parameters
|
sl@0
|
227 |
_LIT(KConfigInterfaceScopeBase,"InterfaceScopeRule");
|
sl@0
|
228 |
_LIT(KConfigAlgorithmScopeBase,"AlgorithmScopeRule");
|
sl@0
|
229 |
_LIT(KConfigCharUidBase, "CharacterUidRule");
|
sl@0
|
230 |
_LIT(KConfigCompareOperatorBase, "CompareOperatorRule");
|
sl@0
|
231 |
_LIT(KConfigCharValueBase, "CharacterValueRule");
|
sl@0
|
232 |
_LIT(KConfigCharValueTypeBase, "CharacterValueTypeRule");
|
sl@0
|
233 |
_LIT(KConfigIsOptionalBase, "IsOptionaRule");
|
sl@0
|
234 |
|
sl@0
|
235 |
const TInt KMaxConfigParamStringSize = 30; //Max String Size for Dynamic INI file parameters
|
sl@0
|
236 |
|
sl@0
|
237 |
//Expected Common Characteristics
|
sl@0
|
238 |
_LIT(KConfigExInterfaceUid, "ExInterfaceUid");
|
sl@0
|
239 |
_LIT(KConfigExAlgorithmUid, "ExAlgorithmUid");
|
sl@0
|
240 |
_LIT(KConfigExImplementationUid, "ExImplementationUid");
|
sl@0
|
241 |
_LIT(KConfigExCreatorName, "ExCreatorName");
|
sl@0
|
242 |
_LIT(KConfigExFIPSApproved, "ExFIPSApproved");
|
sl@0
|
243 |
_LIT(KConfigExHardwareSupport, "ExHardwareSupport");
|
sl@0
|
244 |
_LIT(KConfigExMaxConcurrency, "ExMaxConcurrency");
|
sl@0
|
245 |
_LIT(KConfigExAlgorithmName, "ExAlgorithmName");
|
sl@0
|
246 |
_LIT(KConfigExLatency, "ExLatency");
|
sl@0
|
247 |
_LIT(KConfigExThroughput, "ExThroughput");
|
sl@0
|
248 |
|
sl@0
|
249 |
//Expected Cipher Characteristics
|
sl@0
|
250 |
_LIT(KConfigExMaxKeyLength, "ExMaxKeyLength");
|
sl@0
|
251 |
_LIT(KConfigExKeySupportMode, "ExKeySupportMode");
|
sl@0
|
252 |
_LIT(KConfigExPaddingModes, "ExPaddingModes");
|
sl@0
|
253 |
_LIT(KConfigExPaddingModeNum, "ExPaddingModeNum");
|
sl@0
|
254 |
_LIT(KConfigExBlockSize, "ExBlockSize");
|
sl@0
|
255 |
_LIT(KConfigExOperationModes, "ExOperationModes");
|
sl@0
|
256 |
_LIT(KConfigExOperationModeNum, "ExOperationModeNum");
|
sl@0
|
257 |
|
sl@0
|
258 |
//Expected Hash/Hmac Specific Characteristics
|
sl@0
|
259 |
_LIT(KConfigExOutputSize, "ExOutputSize");
|
sl@0
|
260 |
|
sl@0
|
261 |
//Expected Random Specific Characteristics
|
sl@0
|
262 |
_LIT(KConfigExBlockingMode, "ExBlockingMode");
|
sl@0
|
263 |
|
sl@0
|
264 |
//Expected Extended Characteristics
|
sl@0
|
265 |
_LIT(KConfigExExtendConcurrency, "ExExtendConcurrency");
|
sl@0
|
266 |
_LIT(KConfigExExtendExclusiveUse, "ExExtendExclusiveUse");
|
sl@0
|
267 |
_LIT(KConfigExExtendTestChar1, "ExExtendTestChar1");
|
sl@0
|
268 |
_LIT(KConfigExExtendTestChar2, "ExExtendTestChar2");
|
sl@0
|
269 |
_LIT(KConfigExExtendTestChar3, "ExExtendTestChar3");
|
sl@0
|
270 |
|
sl@0
|
271 |
#ifdef SYMBIAN_SDP_IPSEC_VOIP_SUPPORT
|
sl@0
|
272 |
_LIT(KConfigEncryptKeyPath,"EncryptKeyPath");
|
sl@0
|
273 |
|
sl@0
|
274 |
//Mac Specific Parameters
|
sl@0
|
275 |
_LIT(KConfigExMacValue,"ExMacValue");
|
sl@0
|
276 |
|
sl@0
|
277 |
//Expected Mac Specific Characteristics
|
sl@0
|
278 |
_LIT(KConfigExMacMode, "ExMacMode");
|
sl@0
|
279 |
#endif
|
sl@0
|
280 |
|
sl@0
|
281 |
enum TReturnValueType
|
sl@0
|
282 |
{
|
sl@0
|
283 |
ERuleValueInteger,
|
sl@0
|
284 |
ERuleValueDes8,
|
sl@0
|
285 |
ERuleValueDes16,
|
sl@0
|
286 |
ERuleValueBoolean
|
sl@0
|
287 |
};
|
sl@0
|
288 |
|
sl@0
|
289 |
// For test step panics
|
sl@0
|
290 |
_LIT(KTe_CryptoSpiPanic,"Te_CryptoSpi");
|
sl@0
|
291 |
|
sl@0
|
292 |
}
|
sl@0
|
293 |
#endif
|