cryptomgmtlibs/cryptotokenfw/inc_interfaces/CCTCertInfo_v2.h
changeset 8 35751d3474b7
parent 0 2c201484c85f
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
    15 * CCTCertInfo.H
    15 * CCTCertInfo.H
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 
       
    21 
       
    22 /**
    20 /**
    23  @file 
    21  @file 
    24  @internalTechnology
    22  @publishedAll
       
    23  @released
    25 */
    24 */
    26  
    25  
    27 #ifndef __CCTCERTINFO_H__
    26 #ifndef __CCTCERTINFO_H__
    28 #define __CCTCERTINFO_H__
    27 #define __CCTCERTINFO_H__
    29 
    28 
    33 #include <securitydefs.h>
    32 #include <securitydefs.h>
    34 #include <ct/mcttokentype.h>
    33 #include <ct/mcttokentype.h>
    35 #include <ct/mcttoken.h>
    34 #include <ct/mcttoken.h>
    36 #include <ct/mcttokenobject.h>
    35 #include <ct/mcttokenobject.h>
    37 
    36 
       
    37 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    38 
    38 /** Mask constants used for serializing iDeletable and iFormat attributes 
    39 /** Mask constants used for serializing iDeletable and iFormat attributes 
    39 */
    40 */
    40 const TUint KReadOnlyFlagMask = 128;
    41 const TUint KReadOnlyFlagMask = 128;
    41 const TUint KFormatMask = 127;
    42 const TUint KFormatMask = 127;
    42 
    43 
    43 /** The UID of a CertInfo MCTTokenObject. */
    44 /** The UID of a CertInfo MCTTokenObject. */
    44 const TInt KCTObjectCertInfo = 0x101F50E6;
    45 const TInt KCTObjectCertInfo = 0x101F50E6;
    45 
    46 
       
    47 #endif
       
    48 
    46 /** The maximum length of a certificate label. */
    49 /** The maximum length of a certificate label. */
    47 const TUint32 KMaxCertLabelLength = 64;
    50 const TUint32 KMaxCertLabelLength = 64;
    48 
    51 
    49 /** Defines a modifiable buffer descriptor to contain a human-readable certificate label. 
    52 /** Defines a modifiable buffer descriptor to contain a human-readable certificate label. 
    50 *
    53 *
    51 * @publishedAll
    54 */
    52 * @released */
       
    53 typedef TBuf<KMaxCertLabelLength> TCertLabel;
    55 typedef TBuf<KMaxCertLabelLength> TCertLabel;
    54 
    56 
    55 /**
    57 /**
    56  * Mix-in class representnig data about a stored certificate.  Provides
    58  * Mix-in class representnig data about a stored certificate.  Provides
    57  * implementation of serialization.
    59  * implementation of serialization.
    58  * 
    60  * 
    59  * Note that for backward compatibility reasons, the issuer hash is not serialised.
    61  * Note that for backward compatibility reasons, the issuer hash is not serialised.
    60  *
    62  *
    61  * @internalTechnology
       
    62  */
    63  */
    63 class MCertInfo
    64 class MCertInfo
    64 	{
    65 	{
    65  public:
    66  public:
    66 	// Internalization/Externalization
    67 	// Internalization/Externalization
   127  * a client to query the contents of the store.
   128  * a client to query the contents of the store.
   128  * 
   129  * 
   129  * Note that these objects are normally constructed by certificate stores, not 
   130  * Note that these objects are normally constructed by certificate stores, not 
   130  * by clients. 
   131  * by clients. 
   131  *
   132  *
   132  * @publishedAll
       
   133  * @released
       
   134  */
   133  */
   135 class CCTCertInfo : protected CBase, public MCTTokenObject, public MCertInfo
   134 class CCTCertInfo : protected CBase, public MCTTokenObject, public MCertInfo
   136 	{
   135 	{
   137 public:
   136 public:
   138 	/** Construction -- Note that these objects are normally constructed by certificate stores, not by clients. */
   137 	/** Construction -- Note that these objects are normally constructed by certificate stores, not by clients. */
   139 
   138 
   140 	/** 
   139 	/** 
   141 	* @publishedPartner
       
   142 	* @released
       
   143 	*
   140 	*
   144 	* Creates the certificate information object by copying from an existing object.
   141 	* Creates the certificate information object by copying from an existing object.
   145 	* 
   142 	* 
   146 	* @param aCertInfo			The source certificate information.
   143 	* @param aCertInfo			The source certificate information.
   147 	* @return					A pointer to the new certificate information object.
   144 	* @return					A pointer to the new certificate information object.
   148 	* @leave KErrNoMemory	There is no memory to construct it. */
   145 	* @leave KErrNoMemory	There is no memory to construct it. */
   149 	IMPORT_C static CCTCertInfo* NewL(const CCTCertInfo& aCertInfo);
   146 	IMPORT_C static CCTCertInfo* NewL(const CCTCertInfo& aCertInfo);
   150 
   147 
   151 	/** 
   148 	/** 
   152 	* @publishedPartner
       
   153 	* @released
       
   154 	*
   149 	*
   155 	* Creates the certificate information object by copying from an existing object, 
   150 	* Creates the certificate information object by copying from an existing object, 
   156 	* and puts a pointer to the new object onto the cleanup stack.
   151 	* and puts a pointer to the new object onto the cleanup stack.
   157 	* 
   152 	* 
   158 	* @param aCertInfo			The source certificate information.
   153 	* @param aCertInfo			The source certificate information.
   159 	* @return					A pointer to the new certificate information object.
   154 	* @return					A pointer to the new certificate information object.
   160 	* @leave KErrNoMemory	There is no memory to construct it. */
   155 	* @leave KErrNoMemory	There is no memory to construct it. */
   161 	IMPORT_C static CCTCertInfo* NewLC(const CCTCertInfo& aCertInfo);
   156 	IMPORT_C static CCTCertInfo* NewLC(const CCTCertInfo& aCertInfo);
   162 
   157 
   163 	/** 
   158 	/** 
   164 	* @publishedPartner
       
   165 	* @released
       
   166 	*
   159 	*
   167 	* Creates the certificate information object from its constituent parts.
   160 	* Creates the certificate information object from its constituent parts.
   168 	* 
   161 	* 
   169 	* @param aLabel					The certificate's label.
   162 	* @param aLabel					The certificate's label.
   170 	* @param aFormat				The certificate's format.
   163 	* @param aFormat				The certificate's format.
   183 		const TKeyIdentifier* aSubjectKeyId, const TKeyIdentifier* aIssuerKeyId,
   176 		const TKeyIdentifier* aSubjectKeyId, const TKeyIdentifier* aIssuerKeyId,
   184 		MCTToken& aToken, TInt aCertificateId, TBool aDeletable, 
   177 		MCTToken& aToken, TInt aCertificateId, TBool aDeletable, 
   185 									  const TDesC8* aIssuerHash = NULL);
   178 									  const TDesC8* aIssuerHash = NULL);
   186 
   179 
   187 	/** 
   180 	/** 
   188 	* @publishedPartner
       
   189 	* @released
       
   190 	*
   181 	*
   191 	* Creates the certificate information object from its constituent parts.	
   182 	* Creates the certificate information object from its constituent parts.	
   192 	* 
   183 	* 
   193 	* @param aLabel					The certificate's label.
   184 	* @param aLabel					The certificate's label.
   194 	* @param aFormat 				The certificate's format.
   185 	* @param aFormat 				The certificate's format.
   204 		TCertificateOwnerType aCertificateOwnerType, TInt aSize,
   195 		TCertificateOwnerType aCertificateOwnerType, TInt aSize,
   205 		const TKeyIdentifier* aSubjectKeyId, const TKeyIdentifier* aIssuerKeyId,
   196 		const TKeyIdentifier* aSubjectKeyId, const TKeyIdentifier* aIssuerKeyId,
   206 		MCTToken& aToken, TInt aCertificateId);
   197 		MCTToken& aToken, TInt aCertificateId);
   207 
   198 
   208 	/** 
   199 	/** 
   209 	* @publishedPartner
       
   210 	* @released
       
   211 	* 
   200 	* 
   212 	* Creates the certificate information object from its constituent parts, 
   201 	* Creates the certificate information object from its constituent parts, 
   213 	* and puts a pointer to the new object onto the cleanup stack.
   202 	* and puts a pointer to the new object onto the cleanup stack.
   214 	* 
   203 	* 
   215 	* @param aLabel					The certificate's label.
   204 	* @param aLabel					The certificate's label.
   229 		const TKeyIdentifier* aSubjectKeyId, const TKeyIdentifier* aIssuerKeyId,
   218 		const TKeyIdentifier* aSubjectKeyId, const TKeyIdentifier* aIssuerKeyId,
   230 		MCTToken& aToken, TInt aCertificateId, TBool aDeletable, 
   219 		MCTToken& aToken, TInt aCertificateId, TBool aDeletable, 
   231 									   const TDesC8* aIssuerHash = NULL);
   220 									   const TDesC8* aIssuerHash = NULL);
   232 
   221 
   233 	/**
   222 	/**
   234 	* @publishedPartner
       
   235 	* @released
       
   236 	*
   223 	*
   237 	* Creates the certificate information object from its constituent parts, and puts 
   224 	* Creates the certificate information object from its constituent parts, and puts 
   238 	* a pointer to the new object onto the cleanup stack.
   225 	* a pointer to the new object onto the cleanup stack.
   239 	* 
   226 	* 
   240 	* @param aLabel					The certificate's label.
   227 	* @param aLabel					The certificate's label.
   251 		TCertificateOwnerType aCertificateOwnerType, TInt aSize,
   238 		TCertificateOwnerType aCertificateOwnerType, TInt aSize,
   252 		const TKeyIdentifier* aSubjectKeyId, const TKeyIdentifier* aIssuerKeyId,
   239 		const TKeyIdentifier* aSubjectKeyId, const TKeyIdentifier* aIssuerKeyId,
   253 		MCTToken& aToken, TInt aCertificateId);
   240 		MCTToken& aToken, TInt aCertificateId);
   254 
   241 
   255 	/** 
   242 	/** 
   256 	* @publishedPartner
       
   257 	* @released
       
   258 	* 
   243 	* 
   259 	* Creates the certificate information object by internalising a previously externalised 
   244 	* Creates the certificate information object by internalising a previously externalised 
   260 	* one.
   245 	* one.
   261 	* 
   246 	* 
   262 	* @param aStream			The stream from which the object is to be internalised.
   247 	* @param aStream			The stream from which the object is to be internalised.
   266 	* @see ExternalizeL
   251 	* @see ExternalizeL
   267 	* @see InternalizeL */
   252 	* @see InternalizeL */
   268 	IMPORT_C static CCTCertInfo* NewL(RReadStream& aStream, MCTToken& aToken);
   253 	IMPORT_C static CCTCertInfo* NewL(RReadStream& aStream, MCTToken& aToken);
   269 
   254 
   270 	/** 
   255 	/** 
   271 	* @publishedPartner
       
   272 	* @released
       
   273 	* 
   256 	* 
   274 	* Creates the certificate information object, by internalising a previously externalised 
   257 	* Creates the certificate information object, by internalising a previously externalised 
   275 	* one, and puts a pointer to the new object onto the cleanup stack.	
   258 	* one, and puts a pointer to the new object onto the cleanup stack.	
   276 	* 
   259 	* 
   277 	* @param aStream			The stream from which the object is to be internalised.
   260 	* @param aStream			The stream from which the object is to be internalised.