os/security/cryptoservices/filebasedcertificateandkeystores/source/shared/CCertInfo.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptoservices/filebasedcertificateandkeystores/source/shared/CCertInfo.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,132 @@
     1.4 +/*
     1.5 +* Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +#include "fsdatatypes.h"
    1.23 +
    1.24 +EXPORT_C CCertInfo* CCertInfo::NewLC(const CCertInfo& aOther)
    1.25 +	{
    1.26 +	CCertInfo* self = NewL(aOther);
    1.27 +	CleanupStack::PushL(self);
    1.28 +	return self;
    1.29 +	}
    1.30 +
    1.31 +EXPORT_C CCertInfo* CCertInfo::NewL(const CCertInfo& aOther)
    1.32 +	{
    1.33 +	return new (ELeave) CCertInfo(aOther);
    1.34 +	}
    1.35 +CCertInfo::CCertInfo(const CCertInfo& aOther) :
    1.36 +	MCertInfo(aOther)
    1.37 +	{
    1.38 +	}
    1.39 +
    1.40 +EXPORT_C CCertInfo* CCertInfo::NewLC(const TDesC& aLabel,
    1.41 +						   TCertificateFormat aFormat,
    1.42 +						   TCertificateOwnerType aCertificateOwnerType,
    1.43 +						   TInt aSize,
    1.44 +						   const TKeyIdentifier* aSubjectKeyId,		
    1.45 +						   const TKeyIdentifier* aIssuerKeyId,
    1.46 +						   TInt aCertificateId)
    1.47 +	{
    1.48 +	CCertInfo* self = new(ELeave) CCertInfo(aLabel,
    1.49 +		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    1.50 +		aCertificateId);
    1.51 +	CleanupStack::PushL(self);
    1.52 +	self->ConstructL(NULL);
    1.53 +	return self;
    1.54 +	}
    1.55 +
    1.56 +EXPORT_C CCertInfo* CCertInfo::NewLC(const TDesC& aLabel,
    1.57 +						   TCertificateFormat aFormat,
    1.58 +						   TCertificateOwnerType aCertificateOwnerType,
    1.59 +						   TInt aSize,
    1.60 +						   const TKeyIdentifier* aSubjectKeyId,		
    1.61 +						   const TKeyIdentifier* aIssuerKeyId,
    1.62 +						   TInt aCertificateId,
    1.63 +						   const TBool aDeletable)
    1.64 +	{
    1.65 +	CCertInfo* self = new(ELeave) CCertInfo(aLabel,
    1.66 +		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    1.67 +		aCertificateId, aDeletable);
    1.68 +	CleanupStack::PushL(self);
    1.69 +	self->ConstructL(NULL);
    1.70 +	return self;
    1.71 +	}
    1.72 +
    1.73 +EXPORT_C CCertInfo* CCertInfo::NewL(const TDesC& aLabel,
    1.74 +							TCertificateFormat aFormat,
    1.75 +							TCertificateOwnerType aCertificateOwnerType,
    1.76 +							TInt aSize,
    1.77 +							const TKeyIdentifier* aSubjectKeyId,
    1.78 +							const TKeyIdentifier* aIssuerKeyId,
    1.79 +							TInt aCertificateId)
    1.80 +	{
    1.81 +	CCertInfo* self = CCertInfo::NewLC(aLabel,
    1.82 +		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    1.83 +		aCertificateId);
    1.84 +	CleanupStack::Pop(self);
    1.85 +	return self;
    1.86 +	}
    1.87 +
    1.88 +EXPORT_C CCertInfo* CCertInfo::NewL(const TDesC& aLabel,
    1.89 +							TCertificateFormat aFormat,
    1.90 +							TCertificateOwnerType aCertificateOwnerType,
    1.91 +							TInt aSize,
    1.92 +							const TKeyIdentifier* aSubjectKeyId,
    1.93 +							const TKeyIdentifier* aIssuerKeyId,
    1.94 +							TInt aCertificateId,
    1.95 +						    const TBool aDeletable)
    1.96 +	{
    1.97 +	CCertInfo* self = CCertInfo::NewLC(aLabel,
    1.98 +		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    1.99 +		aCertificateId, aDeletable);
   1.100 +	CleanupStack::Pop(self);
   1.101 +	return self;
   1.102 +	}
   1.103 +
   1.104 +CCertInfo::CCertInfo(const TDesC& aLabel, 
   1.105 +					 TCertificateFormat aFormat,
   1.106 +					 TCertificateOwnerType aCertificateOwnerType,
   1.107 +					 TInt aSize,
   1.108 +					 const TKeyIdentifier* aSubjectKeyId,
   1.109 +					 const TKeyIdentifier* aIssuerKeyId,
   1.110 +					 TInt aCertificateId,
   1.111 +					 const TBool aDeletable) :
   1.112 +	MCertInfo(aLabel, aFormat, aCertificateOwnerType, aSize, aSubjectKeyId,
   1.113 +			  aIssuerKeyId, aCertificateId, aDeletable)
   1.114 +	{
   1.115 +	}
   1.116 +
   1.117 +EXPORT_C CCertInfo* CCertInfo::NewL(RReadStream& aStream)
   1.118 +	{
   1.119 +	CCertInfo* me = NewLC(aStream);
   1.120 +	CleanupStack::Pop(me);
   1.121 +	return me;
   1.122 +	}
   1.123 +
   1.124 +EXPORT_C CCertInfo* CCertInfo::NewLC(RReadStream& aStream)
   1.125 +	{
   1.126 +	CCertInfo* self = new (ELeave) CCertInfo();
   1.127 +	CleanupStack::PushL(self);
   1.128 +	self->InternalizeL(aStream);
   1.129 +	return self;
   1.130 +	}
   1.131 +
   1.132 +CCertInfo::CCertInfo() :
   1.133 +	MCertInfo()
   1.134 +	{
   1.135 +	}