os/security/cryptoservices/filebasedcertificateandkeystores/source/shared/CCertInfo.cpp
First public contribution.
2 * Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #include "fsdatatypes.h"
21 EXPORT_C CCertInfo* CCertInfo::NewLC(const CCertInfo& aOther)
23 CCertInfo* self = NewL(aOther);
24 CleanupStack::PushL(self);
28 EXPORT_C CCertInfo* CCertInfo::NewL(const CCertInfo& aOther)
30 return new (ELeave) CCertInfo(aOther);
32 CCertInfo::CCertInfo(const CCertInfo& aOther) :
37 EXPORT_C CCertInfo* CCertInfo::NewLC(const TDesC& aLabel,
38 TCertificateFormat aFormat,
39 TCertificateOwnerType aCertificateOwnerType,
41 const TKeyIdentifier* aSubjectKeyId,
42 const TKeyIdentifier* aIssuerKeyId,
45 CCertInfo* self = new(ELeave) CCertInfo(aLabel,
46 aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
48 CleanupStack::PushL(self);
49 self->ConstructL(NULL);
53 EXPORT_C CCertInfo* CCertInfo::NewLC(const TDesC& aLabel,
54 TCertificateFormat aFormat,
55 TCertificateOwnerType aCertificateOwnerType,
57 const TKeyIdentifier* aSubjectKeyId,
58 const TKeyIdentifier* aIssuerKeyId,
60 const TBool aDeletable)
62 CCertInfo* self = new(ELeave) CCertInfo(aLabel,
63 aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
64 aCertificateId, aDeletable);
65 CleanupStack::PushL(self);
66 self->ConstructL(NULL);
70 EXPORT_C CCertInfo* CCertInfo::NewL(const TDesC& aLabel,
71 TCertificateFormat aFormat,
72 TCertificateOwnerType aCertificateOwnerType,
74 const TKeyIdentifier* aSubjectKeyId,
75 const TKeyIdentifier* aIssuerKeyId,
78 CCertInfo* self = CCertInfo::NewLC(aLabel,
79 aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
81 CleanupStack::Pop(self);
85 EXPORT_C CCertInfo* CCertInfo::NewL(const TDesC& aLabel,
86 TCertificateFormat aFormat,
87 TCertificateOwnerType aCertificateOwnerType,
89 const TKeyIdentifier* aSubjectKeyId,
90 const TKeyIdentifier* aIssuerKeyId,
92 const TBool aDeletable)
94 CCertInfo* self = CCertInfo::NewLC(aLabel,
95 aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
96 aCertificateId, aDeletable);
97 CleanupStack::Pop(self);
101 CCertInfo::CCertInfo(const TDesC& aLabel,
102 TCertificateFormat aFormat,
103 TCertificateOwnerType aCertificateOwnerType,
105 const TKeyIdentifier* aSubjectKeyId,
106 const TKeyIdentifier* aIssuerKeyId,
108 const TBool aDeletable) :
109 MCertInfo(aLabel, aFormat, aCertificateOwnerType, aSize, aSubjectKeyId,
110 aIssuerKeyId, aCertificateId, aDeletable)
114 EXPORT_C CCertInfo* CCertInfo::NewL(RReadStream& aStream)
116 CCertInfo* me = NewLC(aStream);
117 CleanupStack::Pop(me);
121 EXPORT_C CCertInfo* CCertInfo::NewLC(RReadStream& aStream)
123 CCertInfo* self = new (ELeave) CCertInfo();
124 CleanupStack::PushL(self);
125 self->InternalizeL(aStream);
129 CCertInfo::CCertInfo() :