|
1 /* |
|
2 * Copyright (c) 2002 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: Consts for WimClient, WimPlugin and WimServer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef WIMCONSTS_H |
|
20 #define WIMCONSTS_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <data_caging_path_literals.hrh> |
|
26 |
|
27 // Common error codes |
|
28 const TInt KWimSMInfoError = -7; |
|
29 const TInt KWimCardDriverInitError = -37; |
|
30 |
|
31 |
|
32 // Extract of the constant values as specified in WIM spec and ISO/IEC 7812-1 |
|
33 const TInt KLabelLen = 255; |
|
34 const TInt KManufacturerLen = 32; |
|
35 const TInt KSerialNumberLen = 20; |
|
36 const TInt KVersionNumberLen = 20; //Not sure of the length, may be less than 20 |
|
37 const TInt KIssuerHash = 20; |
|
38 const TInt KCertHash = 20; |
|
39 // Hacking this. Some spec somewhere says it is 4, WIMI returns 20. |
|
40 const TInt KKeyIdLen = 20; |
|
41 const TInt KPkcs15IdLen = 20; |
|
42 const TInt KSoftId = 255; |
|
43 const TInt KWimMaxCount = 8; |
|
44 const TInt KMaxPinLen = 8; |
|
45 const TInt KMinPinLen = 4; |
|
46 |
|
47 // PKCS15KeyUsageFlags |
|
48 const TInt KPkcs15KeyUsageFlagsEncrypt = 0x8000; |
|
49 const TInt KPkcs15KeyUsageFlagsDecrypt = 0x4000; |
|
50 const TInt KPkcs15KeyUsageFlagsSign = 0x2000; |
|
51 const TInt KPkcs15KeyUsageFlagsSignRecover = 0x1000; |
|
52 const TInt KPkcs15KeyUsageFlagsWrap = 0x0800; |
|
53 const TInt KPkcs15KeyUsageFlagsUnwrap = 0x0400; |
|
54 const TInt KPkcs15KeyUsageFlagsVerify = 0x0200; |
|
55 const TInt KPkcs15KeyUsageFlagsVerifyRecover = 0x0100; |
|
56 const TInt KPkcs15KeyUsageFlagsDerive = 0x0080; |
|
57 const TInt KPkcs15KeyUsageFlagsNonRepudiation = 0x0040; |
|
58 |
|
59 // WIMSTA_XX errors |
|
60 const TUint8 KWimStatusOK = 0x00; // WIMSTA_OK |
|
61 const TUint8 KWimStatusIOError = 0xa2; // WIMSTA_IO_ERROR |
|
62 |
|
63 // Server startup specific |
|
64 _LIT( KWimServerFile, "WimServer.EXE" ); |
|
65 |
|
66 const TUid KWimServerUid = {0x101F79DD}; |
|
67 // path is \\private\\<WimServerUid> |
|
68 _LIT( KWimTrustSettingsStorePath, "\\private\\101F79DD\\" ); |
|
69 |
|
70 const TInt KWimServerTerminatingMaxRetryCount = 10; |
|
71 const TInt KWimServerTerminatingRetryTimeout = 200000; /* 200 msec */ |
|
72 |
|
73 // Timeout limit values for WIM SetCloseAfter (in seconds) |
|
74 const TInt KWimNoTimeout = -1; // No timeout |
|
75 const TInt KWimTimeoutMax = 2146; // Maximum when converted to microseconds |
|
76 |
|
77 // Public Key export |
|
78 const TInt KPublicKeyLength = 512; |
|
79 |
|
80 // Digital signature |
|
81 const TInt KMaxRSADigestSize = 512; |
|
82 const TInt KMaxSignatureLength = 512; |
|
83 |
|
84 #endif // WIMCONSTS_H |
|
85 |
|
86 // End of File |