sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 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 |
* Defines the class which represents the structure of the key on
|
sl@0
|
16 |
* which Crypto Token HAI internally operates. It contains the key
|
sl@0
|
17 |
* information relevant to Crypto Token HAI.
|
sl@0
|
18 |
*
|
sl@0
|
19 |
*/
|
sl@0
|
20 |
|
sl@0
|
21 |
|
sl@0
|
22 |
/**
|
sl@0
|
23 |
@file
|
sl@0
|
24 |
@internalComponent
|
sl@0
|
25 |
@released
|
sl@0
|
26 |
*/
|
sl@0
|
27 |
|
sl@0
|
28 |
#ifndef TKEYDETAILS_H
|
sl@0
|
29 |
#define TKEYDETAILS_H
|
sl@0
|
30 |
|
sl@0
|
31 |
#include <e32base.h>
|
sl@0
|
32 |
#include <mctkeystore.h>
|
sl@0
|
33 |
|
sl@0
|
34 |
class CKeyDetails : public CKeyInfoBase
|
sl@0
|
35 |
{
|
sl@0
|
36 |
public:
|
sl@0
|
37 |
static CKeyDetails* NewL( TInt aHandle, const TDesC& aLabel,
|
sl@0
|
38 |
const TDesC8& aPrivateKey, const TDesC8& aPublicKey );
|
sl@0
|
39 |
static CKeyDetails* NewL(RStoreReadStream& aReadStream);
|
sl@0
|
40 |
~CKeyDetails();
|
sl@0
|
41 |
|
sl@0
|
42 |
public:
|
sl@0
|
43 |
/** Get the handle of the key. */
|
sl@0
|
44 |
TInt Handle() const;
|
sl@0
|
45 |
HBufC8* PrivateKey() const;
|
sl@0
|
46 |
HBufC8* PublicKey() const;
|
sl@0
|
47 |
void ExternalizeL(RWriteStream&) const;
|
sl@0
|
48 |
|
sl@0
|
49 |
private:
|
sl@0
|
50 |
CKeyDetails(TKeyIdentifier aID,
|
sl@0
|
51 |
TKeyUsagePKCS15 aUsage,
|
sl@0
|
52 |
TUint aSize,
|
sl@0
|
53 |
HBufC* aLabel,
|
sl@0
|
54 |
TInt aHandle,
|
sl@0
|
55 |
const TSecurityPolicy& aUsePolicy,
|
sl@0
|
56 |
const TSecurityPolicy& aManagementPolicy,
|
sl@0
|
57 |
EKeyAlgorithm aAlgorithm,
|
sl@0
|
58 |
TInt aAccessType,
|
sl@0
|
59 |
TBool aNative,
|
sl@0
|
60 |
TTime aStartDate,
|
sl@0
|
61 |
TTime aEndDate,
|
sl@0
|
62 |
HBufC8* aPKCS8AttributeSet);
|
sl@0
|
63 |
|
sl@0
|
64 |
void ConstructL(const TDesC8& aPrivateKey, const TDesC8& aPublicKey );
|
sl@0
|
65 |
void ConstructL( RStoreReadStream& aReadStream);
|
sl@0
|
66 |
CKeyDetails();
|
sl@0
|
67 |
void InternalizeL(RReadStream& aReadStream);
|
sl@0
|
68 |
|
sl@0
|
69 |
private:
|
sl@0
|
70 |
HBufC8* iPrivateKey;
|
sl@0
|
71 |
HBufC8* iPublicKey;
|
sl@0
|
72 |
};
|
sl@0
|
73 |
|
sl@0
|
74 |
#endif // TKEYDETAILS_H
|