|
1 /* |
|
2 * Copyright (c) 2002-2004 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef DRMKEYSTORAGE_H |
|
21 #define DRMKEYSTORAGE_H |
|
22 |
|
23 // FORWARD DECLARATIONS |
|
24 |
|
25 // CLASS DECLARATION |
|
26 |
|
27 /** |
|
28 * CDrmKeyStorage: Contains key storage for OMA DRM 2.0 |
|
29 * |
|
30 * @lib - |
|
31 * @since 3.0 |
|
32 */ |
|
33 class MDrmKeyStorage |
|
34 { |
|
35 public: |
|
36 static const TInt KDeviceSpecificKeyLength = 16; |
|
37 static const TInt KRdbSerialNumberLength = 16; |
|
38 |
|
39 public: // New functions |
|
40 |
|
41 virtual ~MDrmKeyStorage() = 0; |
|
42 |
|
43 virtual TInt ModulusSize() = 0; |
|
44 |
|
45 virtual void SelectTrustedRootL( |
|
46 const TDesC8& aRootKeyHash) = 0; |
|
47 |
|
48 virtual TBool SelectedRootIsCmla() = 0; |
|
49 |
|
50 virtual void SelectDefaultRootL() = 0; |
|
51 |
|
52 virtual void GetTrustedRootsL( |
|
53 RPointerArray<HBufC8>& aRootList) = 0; |
|
54 |
|
55 virtual void GetCertificateChainL( |
|
56 RPointerArray<HBufC8>& aCertChain) = 0; |
|
57 |
|
58 virtual HBufC8* RsaSignL( |
|
59 const TDesC8& aInput) = 0; |
|
60 |
|
61 virtual HBufC8* RsaDecryptL( |
|
62 const TDesC8& aInput) = 0; |
|
63 |
|
64 virtual void ImportDataL( |
|
65 const TDesC8& aPrivateKey, |
|
66 const RArray<TPtrC8>& aCertificateChain) = 0; |
|
67 |
|
68 virtual void GetDeviceSpecificKeyL( |
|
69 TBuf8<KDeviceSpecificKeyLength>& aKey) = 0; |
|
70 |
|
71 virtual void GetRdbSerialNumberL( |
|
72 TBuf8<KRdbSerialNumberLength>& aSerialNumber) = 0; |
|
73 |
|
74 virtual void GenerateNewRdbSerialNumberL() = 0; |
|
75 |
|
76 virtual HBufC8* UdtEncryptL( |
|
77 const TDesC8& aInput) = 0; |
|
78 |
|
79 virtual void GetRootCertificatesL( |
|
80 RPointerArray<HBufC8>& aRootCerts) = 0; |
|
81 |
|
82 virtual void RandomDataGetL( |
|
83 TDes8& aData, |
|
84 const TInt aLength ) = 0; |
|
85 |
|
86 }; |
|
87 |
|
88 IMPORT_C MDrmKeyStorage* DrmKeyStorageNewL(); |
|
89 |
|
90 #endif // DRMKEYSTORAGE_H |
|
91 |
|
92 // End of File |