|
1 /* |
|
2 * Copyright (c) 2004-2009 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 the License "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: |
|
15 * Note: This file may contain code to generate corrupt files for test purposes. |
|
16 * Such code is excluded from production builds by use of compiler defines; |
|
17 * it is recommended that such code should be removed if this code is ever published publicly. |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 /** |
|
23 @file |
|
24 @internalComponent |
|
25 @released |
|
26 */ |
|
27 |
|
28 #ifndef __CERTCHAINDATA_H__ |
|
29 #define __CERTCHAINDATA_H__ |
|
30 |
|
31 |
|
32 #include "symbiantypes.h" |
|
33 #include "structure.h" |
|
34 #include "sisblob.h" |
|
35 |
|
36 class CCertChainData : public CStructure <CSISFieldRoot::ESISCertificateChain> |
|
37 |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * Default Constructor |
|
42 */ |
|
43 CCertChainData (); |
|
44 /** |
|
45 * Copy constructor |
|
46 */ |
|
47 CCertChainData (const CCertChainData& aInitialiser); |
|
48 |
|
49 public: |
|
50 /** |
|
51 * Class Name |
|
52 */ |
|
53 inline virtual std::string Name () const; |
|
54 /** |
|
55 * Retrieves certificate data. |
|
56 */ |
|
57 inline const CSISBlob& CertificateData() const; |
|
58 /** |
|
59 * Adds the write the package details into the stream. |
|
60 * @param aStream - Stream in which the package entries need to be written. |
|
61 * @param aVerbose - If this option is set then detail description of pkg |
|
62 * will be written into the stream. |
|
63 */ |
|
64 void AddPackageEntry(std::wostream& aStream, bool aVerbose) const; |
|
65 |
|
66 private: |
|
67 CSISBlob iCertificateData; |
|
68 }; |
|
69 |
|
70 inline CCertChainData::CCertChainData () |
|
71 { |
|
72 InsertMember (iCertificateData); |
|
73 } |
|
74 |
|
75 |
|
76 inline CCertChainData::CCertChainData (const CCertChainData& aInitialiser) : |
|
77 CStructure <CSISFieldRoot::ESISCertificateChain> (aInitialiser), |
|
78 iCertificateData (aInitialiser.iCertificateData) |
|
79 { |
|
80 InsertMember (iCertificateData); |
|
81 } |
|
82 |
|
83 inline const CSISBlob& CCertChainData::CertificateData() const |
|
84 { |
|
85 return iCertificateData; |
|
86 } |
|
87 |
|
88 inline std::string CCertChainData::Name () const |
|
89 { |
|
90 return "Certificate Chain"; |
|
91 } |
|
92 |
|
93 |
|
94 inline void CCertChainData::AddPackageEntry(std::wostream& aStream, bool aVerbose) const |
|
95 { |
|
96 if(aVerbose) |
|
97 { |
|
98 aStream << L"; Certificate chain of " << iCertificateData.Size() << L" bytes" << std::endl; |
|
99 } |
|
100 } |
|
101 |
|
102 #endif // __CERTCHAINDATA_H__ |
|
103 |