os/security/cryptoservices/certificateandkeymgmt/inc/pkcs7excert.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2003-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 /**
    20  @file
    21  @internalTechnology
    22  @released
    23 */
    24 
    25 
    26 #ifndef __PKCS7_EXTENDED_CERTIFICATE_OR_CERTIFICATE_H__
    27 #define __PKCS7_EXTENDED_CERTIFICATE_OR_CERTIFICATE_H__
    28 
    29 #include <e32base.h>
    30 
    31 class CX509Certificate;
    32 class CASN1EncEncoding;
    33 
    34 
    35 /**
    36 An instance of a member of the RFC2315 ExtendedCertificatesAndCertificates.
    37 At present, only X509 certificates are supported.
    38 (not PKCS#6 extended certificates).
    39 @internalTechnology
    40 */
    41 class CPKCS7ExtendedCertificateOrCertificate : public CBase
    42 	{
    43 public:
    44 	/**
    45 	Creates an ExtendedCertificatesAndCertificates as defined in RFC2315.
    46 	@param aRawData The encoded CertificateChoices object to be decoded.
    47 	@return The fully constructed object.
    48 	*/			
    49 	static CPKCS7ExtendedCertificateOrCertificate* NewL(const TDesC8& aRawData);
    50 	
    51 	/**
    52 	Destructor
    53 	*/
    54 	~CPKCS7ExtendedCertificateOrCertificate();
    55 		
    56 	/**
    57 	Returns the x509 certificate reference if the certificate is a X509 certificate.
    58 	Callers need to check whether the certificate's type is X509 beforehand.
    59 	@return The x509 certificate reference.
    60 	*/
    61 	IMPORT_C const CX509Certificate& Certificate(void) const;
    62 
    63 private:
    64 	/**
    65 	Default Constructor
    66 	*/
    67 	CPKCS7ExtendedCertificateOrCertificate();
    68 	
    69 	/**
    70 	Copy Constructor
    71 	@param the source object to be copied
    72 	*/	
    73 	CPKCS7ExtendedCertificateOrCertificate(const CPKCS7ExtendedCertificateOrCertificate&);
    74 	
    75 	/**
    76 	Second phase constructor for decoding.
    77 	@param aRawData the raw data to be decoded.
    78 	*/
    79 	void ConstructL(const TDesC8& aRawData);
    80 	
    81 private:	
    82 	/**
    83 	The X509 certificate pointer
    84 	*/
    85 	CX509Certificate* iCertificate;
    86 	};
    87 
    88 
    89 	
    90 #endif