cryptoservices/filebasedcertificateandkeystores/source/shared/CCertInfo.cpp
changeset 8 35751d3474b7
parent 0 2c201484c85f
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
    27 
    27 
    28 EXPORT_C CCertInfo* CCertInfo::NewL(const CCertInfo& aOther)
    28 EXPORT_C CCertInfo* CCertInfo::NewL(const CCertInfo& aOther)
    29 	{
    29 	{
    30 	return new (ELeave) CCertInfo(aOther);
    30 	return new (ELeave) CCertInfo(aOther);
    31 	}
    31 	}
    32 
       
    33 CCertInfo::CCertInfo(const CCertInfo& aOther) :
    32 CCertInfo::CCertInfo(const CCertInfo& aOther) :
    34 	MCertInfo(aOther)
    33 	MCertInfo(aOther)
    35 	{
    34 	{
    36 	}
    35 	}
    37 
    36 
    38 EXPORT_C CCertInfo* CCertInfo::NewL(const TDesC& aLabel,
    37 EXPORT_C CCertInfo* CCertInfo::NewLC(const TDesC& aLabel,
    39 						   TCertificateFormat aFormat,
    38 						   TCertificateFormat aFormat,
    40 						   TCertificateOwnerType aCertificateOwnerType,
    39 						   TCertificateOwnerType aCertificateOwnerType,
    41 						   TInt aSize,
    40 						   TInt aSize,
    42 						   const TKeyIdentifier* aSubjectKeyId,		
    41 						   const TKeyIdentifier* aSubjectKeyId,		
    43 						   const TKeyIdentifier* aIssuerKeyId,
    42 						   const TKeyIdentifier* aIssuerKeyId,
    44 						   TInt aCertificateId)
    43 						   TInt aCertificateId)
    45 	{
    44 	{
    46 	CCertInfo* self = new(ELeave) CCertInfo(aLabel,
    45 	CCertInfo* self = new(ELeave) CCertInfo(aLabel,
    47 		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    46 		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    48 		aCertificateId);
    47 		aCertificateId);
       
    48 	CleanupStack::PushL(self);
    49 	self->ConstructL(NULL);
    49 	self->ConstructL(NULL);
    50 	return self;
    50 	return self;
    51 	}
    51 	}
    52 
    52 
    53 EXPORT_C CCertInfo* CCertInfo::NewL(const TDesC& aLabel,
    53 EXPORT_C CCertInfo* CCertInfo::NewLC(const TDesC& aLabel,
    54 						   TCertificateFormat aFormat,
    54 						   TCertificateFormat aFormat,
    55 						   TCertificateOwnerType aCertificateOwnerType,
    55 						   TCertificateOwnerType aCertificateOwnerType,
    56 						   TInt aSize,
    56 						   TInt aSize,
    57 						   const TKeyIdentifier* aSubjectKeyId,		
    57 						   const TKeyIdentifier* aSubjectKeyId,		
    58 						   const TKeyIdentifier* aIssuerKeyId,
    58 						   const TKeyIdentifier* aIssuerKeyId,
    60 						   const TBool aDeletable)
    60 						   const TBool aDeletable)
    61 	{
    61 	{
    62 	CCertInfo* self = new(ELeave) CCertInfo(aLabel,
    62 	CCertInfo* self = new(ELeave) CCertInfo(aLabel,
    63 		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    63 		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    64 		aCertificateId, aDeletable);
    64 		aCertificateId, aDeletable);
       
    65 	CleanupStack::PushL(self);
    65 	self->ConstructL(NULL);
    66 	self->ConstructL(NULL);
    66 	return self;
    67 	return self;
    67 	}
    68 	}
    68 
    69 
    69 EXPORT_C CCertInfo* CCertInfo::NewLC(const TDesC& aLabel,
    70 EXPORT_C CCertInfo* CCertInfo::NewL(const TDesC& aLabel,
    70 							TCertificateFormat aFormat,
    71 							TCertificateFormat aFormat,
    71 							TCertificateOwnerType aCertificateOwnerType,
    72 							TCertificateOwnerType aCertificateOwnerType,
    72 							TInt aSize,
    73 							TInt aSize,
    73 							const TKeyIdentifier* aSubjectKeyId,
    74 							const TKeyIdentifier* aSubjectKeyId,
    74 							const TKeyIdentifier* aIssuerKeyId,
    75 							const TKeyIdentifier* aIssuerKeyId,
    75 							TInt aCertificateId)
    76 							TInt aCertificateId)
    76 	{
    77 	{
    77 	CCertInfo* self = CCertInfo::NewL(aLabel,
    78 	CCertInfo* self = CCertInfo::NewLC(aLabel,
    78 		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    79 		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    79 		aCertificateId);
    80 		aCertificateId);
    80 	CleanupStack::PushL(self);
    81 	CleanupStack::Pop(self);
    81 	return self;
    82 	return self;
    82 	}
    83 	}
    83 
    84 
    84 EXPORT_C CCertInfo* CCertInfo::NewLC(const TDesC& aLabel,
    85 EXPORT_C CCertInfo* CCertInfo::NewL(const TDesC& aLabel,
    85 							TCertificateFormat aFormat,
    86 							TCertificateFormat aFormat,
    86 							TCertificateOwnerType aCertificateOwnerType,
    87 							TCertificateOwnerType aCertificateOwnerType,
    87 							TInt aSize,
    88 							TInt aSize,
    88 							const TKeyIdentifier* aSubjectKeyId,
    89 							const TKeyIdentifier* aSubjectKeyId,
    89 							const TKeyIdentifier* aIssuerKeyId,
    90 							const TKeyIdentifier* aIssuerKeyId,
    90 							TInt aCertificateId,
    91 							TInt aCertificateId,
    91 						    const TBool aDeletable)
    92 						    const TBool aDeletable)
    92 	{
    93 	{
    93 	CCertInfo* self = CCertInfo::NewL(aLabel,
    94 	CCertInfo* self = CCertInfo::NewLC(aLabel,
    94 		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    95 		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    95 		aCertificateId, aDeletable);
    96 		aCertificateId, aDeletable);
    96 	CleanupStack::PushL(self);
    97 	CleanupStack::Pop(self);
    97 	return self;
    98 	return self;
    98 	}
    99 	}
    99 
   100 
   100 CCertInfo::CCertInfo(const TDesC& aLabel, 
   101 CCertInfo::CCertInfo(const TDesC& aLabel, 
   101 					 TCertificateFormat aFormat,
   102 					 TCertificateFormat aFormat,