os/security/cryptoservices/filebasedcertificateandkeystores/source/shared/CCertInfo.cpp
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2001-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 *
    16 */
    17 
    18 
    19 #include "fsdatatypes.h"
    20 
    21 EXPORT_C CCertInfo* CCertInfo::NewLC(const CCertInfo& aOther)
    22 	{
    23 	CCertInfo* self = NewL(aOther);
    24 	CleanupStack::PushL(self);
    25 	return self;
    26 	}
    27 
    28 EXPORT_C CCertInfo* CCertInfo::NewL(const CCertInfo& aOther)
    29 	{
    30 	return new (ELeave) CCertInfo(aOther);
    31 	}
    32 CCertInfo::CCertInfo(const CCertInfo& aOther) :
    33 	MCertInfo(aOther)
    34 	{
    35 	}
    36 
    37 EXPORT_C CCertInfo* CCertInfo::NewLC(const TDesC& aLabel,
    38 						   TCertificateFormat aFormat,
    39 						   TCertificateOwnerType aCertificateOwnerType,
    40 						   TInt aSize,
    41 						   const TKeyIdentifier* aSubjectKeyId,		
    42 						   const TKeyIdentifier* aIssuerKeyId,
    43 						   TInt aCertificateId)
    44 	{
    45 	CCertInfo* self = new(ELeave) CCertInfo(aLabel,
    46 		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    47 		aCertificateId);
    48 	CleanupStack::PushL(self);
    49 	self->ConstructL(NULL);
    50 	return self;
    51 	}
    52 
    53 EXPORT_C CCertInfo* CCertInfo::NewLC(const TDesC& aLabel,
    54 						   TCertificateFormat aFormat,
    55 						   TCertificateOwnerType aCertificateOwnerType,
    56 						   TInt aSize,
    57 						   const TKeyIdentifier* aSubjectKeyId,		
    58 						   const TKeyIdentifier* aIssuerKeyId,
    59 						   TInt aCertificateId,
    60 						   const TBool aDeletable)
    61 	{
    62 	CCertInfo* self = new(ELeave) CCertInfo(aLabel,
    63 		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    64 		aCertificateId, aDeletable);
    65 	CleanupStack::PushL(self);
    66 	self->ConstructL(NULL);
    67 	return self;
    68 	}
    69 
    70 EXPORT_C CCertInfo* CCertInfo::NewL(const TDesC& aLabel,
    71 							TCertificateFormat aFormat,
    72 							TCertificateOwnerType aCertificateOwnerType,
    73 							TInt aSize,
    74 							const TKeyIdentifier* aSubjectKeyId,
    75 							const TKeyIdentifier* aIssuerKeyId,
    76 							TInt aCertificateId)
    77 	{
    78 	CCertInfo* self = CCertInfo::NewLC(aLabel,
    79 		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    80 		aCertificateId);
    81 	CleanupStack::Pop(self);
    82 	return self;
    83 	}
    84 
    85 EXPORT_C CCertInfo* CCertInfo::NewL(const TDesC& aLabel,
    86 							TCertificateFormat aFormat,
    87 							TCertificateOwnerType aCertificateOwnerType,
    88 							TInt aSize,
    89 							const TKeyIdentifier* aSubjectKeyId,
    90 							const TKeyIdentifier* aIssuerKeyId,
    91 							TInt aCertificateId,
    92 						    const TBool aDeletable)
    93 	{
    94 	CCertInfo* self = CCertInfo::NewLC(aLabel,
    95 		aFormat, aCertificateOwnerType, aSize, aSubjectKeyId, aIssuerKeyId,
    96 		aCertificateId, aDeletable);
    97 	CleanupStack::Pop(self);
    98 	return self;
    99 	}
   100 
   101 CCertInfo::CCertInfo(const TDesC& aLabel, 
   102 					 TCertificateFormat aFormat,
   103 					 TCertificateOwnerType aCertificateOwnerType,
   104 					 TInt aSize,
   105 					 const TKeyIdentifier* aSubjectKeyId,
   106 					 const TKeyIdentifier* aIssuerKeyId,
   107 					 TInt aCertificateId,
   108 					 const TBool aDeletable) :
   109 	MCertInfo(aLabel, aFormat, aCertificateOwnerType, aSize, aSubjectKeyId,
   110 			  aIssuerKeyId, aCertificateId, aDeletable)
   111 	{
   112 	}
   113 
   114 EXPORT_C CCertInfo* CCertInfo::NewL(RReadStream& aStream)
   115 	{
   116 	CCertInfo* me = NewLC(aStream);
   117 	CleanupStack::Pop(me);
   118 	return me;
   119 	}
   120 
   121 EXPORT_C CCertInfo* CCertInfo::NewLC(RReadStream& aStream)
   122 	{
   123 	CCertInfo* self = new (ELeave) CCertInfo();
   124 	CleanupStack::PushL(self);
   125 	self->InternalizeL(aStream);
   126 	return self;
   127 	}
   128 
   129 CCertInfo::CCertInfo() :
   130 	MCertInfo()
   131 	{
   132 	}