williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@2
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@2
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description:
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*/
|
williamr@2
|
17 |
|
williamr@2
|
18 |
|
williamr@2
|
19 |
|
williamr@2
|
20 |
|
williamr@2
|
21 |
/**
|
williamr@2
|
22 |
@file
|
williamr@2
|
23 |
@internalAll
|
williamr@2
|
24 |
*/
|
williamr@2
|
25 |
|
williamr@2
|
26 |
#ifndef __MCTCERTAPPS_H__
|
williamr@2
|
27 |
#define __MCTCERTAPPS_H__
|
williamr@2
|
28 |
|
williamr@2
|
29 |
#include <e32base.h>
|
williamr@2
|
30 |
#include <f32file.h>
|
williamr@2
|
31 |
#include <s32file.h>
|
williamr@2
|
32 |
#include <ct/mcttokeninterface.h>
|
williamr@2
|
33 |
|
williamr@2
|
34 |
/** The UID of certificate application token type */
|
williamr@2
|
35 |
const TInt KTokenTypeCertApps = 0x101f7a37;
|
williamr@2
|
36 |
|
williamr@2
|
37 |
/** The UID of certificate application interface */
|
williamr@2
|
38 |
const TInt KInterfaceCertApps = 0x101f7a38;
|
williamr@2
|
39 |
|
williamr@2
|
40 |
/**
|
williamr@2
|
41 |
* Information about a certificate application.
|
williamr@2
|
42 |
*
|
williamr@2
|
43 |
* Certificate applications are used to represent classes of certificate use,
|
williamr@2
|
44 |
* for example Software Install, TLS, WTLS, WMLScript, SignText, etc.
|
williamr@2
|
45 |
*
|
williamr@2
|
46 |
* CA Certificates are associated with zero or more applications, and this
|
williamr@2
|
47 |
* information is used to determine which certificates are used when building
|
williamr@2
|
48 |
* and validating certificate chains.
|
williamr@2
|
49 |
*
|
williamr@2
|
50 |
* An application is identified by a UID. A TCertificateAppInfo contains this
|
williamr@2
|
51 |
* and the name of the application.
|
williamr@2
|
52 |
*
|
williamr@2
|
53 |
* @publishedAll
|
williamr@2
|
54 |
* @released
|
williamr@2
|
55 |
*/
|
williamr@2
|
56 |
class TCertificateAppInfo
|
williamr@2
|
57 |
{
|
williamr@2
|
58 |
public:
|
williamr@2
|
59 |
IMPORT_C TCertificateAppInfo(const TUid& aUid, const TName& aName);
|
williamr@2
|
60 |
IMPORT_C TCertificateAppInfo& operator = (const TCertificateAppInfo& aClient);
|
williamr@2
|
61 |
IMPORT_C TCertificateAppInfo();
|
williamr@2
|
62 |
IMPORT_C const TUid& Id() const;
|
williamr@2
|
63 |
IMPORT_C const TName& Name() const;
|
williamr@2
|
64 |
IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
|
williamr@2
|
65 |
IMPORT_C void InternalizeL(RReadStream& aStream);
|
williamr@2
|
66 |
|
williamr@2
|
67 |
private:
|
williamr@2
|
68 |
TUid iUid;
|
williamr@2
|
69 |
TName iName;
|
williamr@2
|
70 |
};
|
williamr@2
|
71 |
|
williamr@2
|
72 |
/**
|
williamr@2
|
73 |
* Interface for certificate applications manager token.
|
williamr@2
|
74 |
*/
|
williamr@2
|
75 |
class MCTCertApps : public MCTTokenInterface
|
williamr@2
|
76 |
{
|
williamr@2
|
77 |
public:
|
williamr@2
|
78 |
virtual void AddL(const TCertificateAppInfo& aClient) = 0;
|
williamr@2
|
79 |
virtual void RemoveL(const TUid& aUid) = 0;
|
williamr@2
|
80 |
virtual TInt ApplicationCountL() const = 0;
|
williamr@2
|
81 |
virtual void ApplicationsL(RArray<TCertificateAppInfo>& aAppArray) const = 0;
|
williamr@2
|
82 |
virtual void ApplicationL(const TUid& aUid, TCertificateAppInfo& aInfo) const = 0;
|
williamr@2
|
83 |
};
|
williamr@2
|
84 |
|
williamr@2
|
85 |
|
williamr@2
|
86 |
#endif // __MCTCERTAPPS_H__
|