sl@0
|
1 |
#ifndef __BADCONFIGWRITER_H__
|
sl@0
|
2 |
#define __BADCONFIGWRITER_H__/*
|
sl@0
|
3 |
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
4 |
* All rights reserved.
|
sl@0
|
5 |
* This component and the accompanying materials are made available
|
sl@0
|
6 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
7 |
* which accompanies this distribution, and is available
|
sl@0
|
8 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
9 |
*
|
sl@0
|
10 |
* Initial Contributors:
|
sl@0
|
11 |
* Nokia Corporation - initial contribution.
|
sl@0
|
12 |
*
|
sl@0
|
13 |
* Contributors:
|
sl@0
|
14 |
*
|
sl@0
|
15 |
* Description:
|
sl@0
|
16 |
*
|
sl@0
|
17 |
*/
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
#include <string>
|
sl@0
|
21 |
#include <fstream>
|
sl@0
|
22 |
#include <sstream>
|
sl@0
|
23 |
|
sl@0
|
24 |
/**
|
sl@0
|
25 |
Class to create file to write the configuration inputs for store creation
|
sl@0
|
26 |
*/
|
sl@0
|
27 |
class BadConfigWriter
|
sl@0
|
28 |
{
|
sl@0
|
29 |
public:
|
sl@0
|
30 |
BadConfigWriter(const std::stringstream &aFileName);
|
sl@0
|
31 |
~BadConfigWriter();
|
sl@0
|
32 |
protected:
|
sl@0
|
33 |
std::ofstream iFile;
|
sl@0
|
34 |
};
|
sl@0
|
35 |
|
sl@0
|
36 |
class FileBadCertStoreConfigWriter : public BadConfigWriter
|
sl@0
|
37 |
{
|
sl@0
|
38 |
public:
|
sl@0
|
39 |
FileBadCertStoreConfigWriter(const std::stringstream &aFileName);
|
sl@0
|
40 |
~FileBadCertStoreConfigWriter();
|
sl@0
|
41 |
|
sl@0
|
42 |
void WriteFileEntry(const char *aBadLabel= 0,
|
sl@0
|
43 |
const char *aBadDeletable = 0,
|
sl@0
|
44 |
const char *aBadFormat= 0,
|
sl@0
|
45 |
const char *aBadCertOwnerType = 0,
|
sl@0
|
46 |
const char *aBadSubjectKeyId =0,
|
sl@0
|
47 |
const char *aBadIssuerKeyId = 0,
|
sl@0
|
48 |
const char *aBadApplication = 0,
|
sl@0
|
49 |
const char *aBadTrusted = 0,
|
sl@0
|
50 |
const char *aBadInvalidPath = 0);
|
sl@0
|
51 |
private:
|
sl@0
|
52 |
int iEntryCount;
|
sl@0
|
53 |
};
|
sl@0
|
54 |
|
sl@0
|
55 |
class FileBadCertClientConfigWriter : public BadConfigWriter
|
sl@0
|
56 |
{
|
sl@0
|
57 |
public:
|
sl@0
|
58 |
FileBadCertClientConfigWriter(const std::stringstream &aFileName);
|
sl@0
|
59 |
~FileBadCertClientConfigWriter();
|
sl@0
|
60 |
|
sl@0
|
61 |
void WriteCertClientName(const char *aArrayVal);
|
sl@0
|
62 |
void WriteCertClientUid(const char *aArrayVal);
|
sl@0
|
63 |
};
|
sl@0
|
64 |
|
sl@0
|
65 |
class SwiBadCertStoreConfigWriter : public BadConfigWriter
|
sl@0
|
66 |
{
|
sl@0
|
67 |
public:
|
sl@0
|
68 |
SwiBadCertStoreConfigWriter(const std::stringstream &aFileName);
|
sl@0
|
69 |
~SwiBadCertStoreConfigWriter();
|
sl@0
|
70 |
|
sl@0
|
71 |
void WriteSwiEntry(const char *aBadLabel= 0,
|
sl@0
|
72 |
const char *aBadFormat= 0,
|
sl@0
|
73 |
const char *aBadCertOwnerType = 0,
|
sl@0
|
74 |
const char *aBadSubjectKeyId =0,
|
sl@0
|
75 |
const char *aBadIssuerKeyId = 0,
|
sl@0
|
76 |
const char *aBadApplication = 0,
|
sl@0
|
77 |
const char *aBadTrusted = 0,
|
sl@0
|
78 |
const char *aBadDatafilePath= 0,
|
sl@0
|
79 |
const char *aBadCapabilitySet = 0,
|
sl@0
|
80 |
const char *aBadMandatory = 0,
|
sl@0
|
81 |
const char *aBadSystemUpgrade = 0);
|
sl@0
|
82 |
private:
|
sl@0
|
83 |
int iEntryCount;
|
sl@0
|
84 |
};
|
sl@0
|
85 |
|
sl@0
|
86 |
|
sl@0
|
87 |
#endif
|